/var/log/mail/counters/smtp_rbl.txt permissions?

Started by donavan, April 06, 2004, 03:06:04 PM

Previous topic - Next topic

donavan

getting this error in /var/log/mail/smtp:

smack# tail @40000000406c565609026f44.s
@40000000406c560f1c8a57d4 rblsmtpd: 61.73.48.93 pid 67185: 553 http://dsbl.org/listing?ip=61.73.48.93" target="_blank">http://dsbl.org/listing?ip=61.73.48.93
FAILURE: WriteCounters /var/log/mail/counters/smtp_rbl.txt is  not writable!
WriteFile FAILURE: /var/log/mail/counters/smtp_rbl.txt is not writable!

smack# ls -l /var/log/mail/counters
total 14
....
-rw-r--r--  1 qmaill  qnofiles   20 Apr  6 13:35 smtp_auth.txt
-rw-r--r--  1 qmaill  qnofiles   57 Apr  2 01:45 smtp_rbl.txt
-rw-r--r--  1 qmaill  qnofiles  129 Apr  6 13:35 spam.txt
.....

So Im assuming it needs other permissions or ......?
What handles the mail counters anyways? Something spawned by toaster_watcher.pl or is it a sub of rrdutil?

davidcl

The counters are written by the "maillogs" program (called as "smtplog" in that particular place), which is called as a postprocessor by the various qmail logging routines.  These typically do run as qmaill, so your permissions look like they should be fine.

I don't know what's causing those messages, but here are a couple things to check:

You may want to check that qmail_log_user = qmaill in toaster-watcher.conf.

As a doublecheck, make sure that the multilog line in /var/service/smtp/log/run has "exec setuidgid qmaill" at the beginning.  If it doesn't, don't fix it directly as your changes will be over-written the next time toaster-watcher runs.

Oh, also check that /var/log/mail/smtp/smtplog and /usr/sbin/maillogs are the same program (ie, they have the same version string).

donavan

Nevermind, I didnt bother to decode the tai64n stamp. The error was from  April 1st but  smtp_rbl.txt was changed on Apr 2nd. Look like I just havnt had any rbl blocks since then. Thanks for the suggestions. PS: Couldnt find an easy way to get version from smtplog but they MD5'd the same.