[Esd-l] Sanitizer and logrotate

John D. Hardin jhardin at impsec.org
Sun Nov 10 19:36:01 PST 2002


On Wed, 6 Nov 2002, [iso-8859-1] Informatica - Fenac wrote:

> Beyond my dificult with english, I'm a beginner in Linux world. I
> tried logrotate with procmail but I has experienced a "crash" with
> some mail spool files. I think that problem is the wrinting
> process in log files at rotation moment.

More likely the replacement log and quarantine files weren't created
with the necessary permissions, and the sanitizer couldn't write to
them after they were rotated.

> I would like of tips a litle more detalhed about logrotate with
> sanitizer.

The only odd thing about rotating sanitizer-related files is the
world-writable requirement on those files.

The logrotate script posted earlier was interesting but overly
complex. Try this:

	# individual user procmail log files
	/home/*/procmail.log {
		weekly
		rotate 6
		compress
		missingok
	}
	
	# the quarantine
	/var/spool/mail/quarantine {
		weekly
		size=25m
		rotate 6
		compress
		missingok
		create 622 root root
	}

	# the global log file (if you're not doing per-user logging)
	/var/log/procmail.log {
		weekly
		rotate 6
		compress
		missingok
		create 622 root root
	}


Vary file and path names to suit local needs.

--
 John Hardin KA7OHZ    ICQ#15735746    http://www.impsec.org/~jhardin/
 jhardin at impsec.org                        pgpk -a jhardin at impsec.org
 key: 0xB8732E79 - 2D8C 34F4 6411 F507 136C  AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
  ...the Fates notice those who buy chainsaws...
                                              -- www.darwinawards.com
-----------------------------------------------------------------------
   38 days until The Two Towers



More information about the esd-l mailing list