Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 205923 - mail-filter/dspam directory structure broken
Summary: mail-filter/dspam directory structure broken
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Alin Năstac (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-15 09:14 UTC by Benedikt Böhm (RETIRED)
Modified: 2008-01-20 09:37 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Benedikt Böhm (RETIRED) gentoo-dev 2008-01-15 09:14:08 UTC
there are a number of path problems with the current dspam.cron script:

1) DSPAM_CONFIGDIR lookup via getent, though DSPAM_HOME != DSPAM_CONFIGDIR
2) data dir is not in DSPAM_CONFIGDIR, but in DSPAM_HOME

and with the current logging settings:

1) no logging is done in /var/log/dspam, e.g. in dspam.c:2890 the directory lookup is performed for HOME
2) logrotate fails if any of the logs mentioned in /etc/logrotate.d/dspam does not exist (missingok should be used here)
Comment 1 Alin Năstac (RETIRED) gentoo-dev 2008-01-15 09:47:30 UTC
(In reply to comment #0)
> there are a number of path problems with the current dspam.cron script:
> 
> 1) DSPAM_CONFIGDIR lookup via getent, though DSPAM_HOME != DSPAM_CONFIGDIR

Don't understand what problem you have with DSPAM_CONFIGDIR. Are you saying that it fails to detect the right location of dspam.conf? Keep in mind that this script must be usable on all hosts, including those where dspam have been installed ages ago.

> 2) data dir is not in DSPAM_CONFIGDIR, but in DSPAM_HOME
oops, I will fix dspam_logrotate execution in r10.

> and with the current logging settings:
> 
> 1) no logging is done in /var/log/dspam, e.g. in dspam.c:2890 the directory
> lookup is performed for HOME

This directory gets installed only if ! use syslog || use debug.

> 2) logrotate fails if any of the logs mentioned in /etc/logrotate.d/dspam does
> not exist (missingok should be used here)

Ditto
Comment 2 Benedikt Böhm (RETIRED) gentoo-dev 2008-01-15 09:58:25 UTC
(In reply to comment #1)
> > 1) no logging is done in /var/log/dspam, e.g. in dspam.c:2890 the directory
> > lookup is performed for HOME
> 
> This directory gets installed only if ! use syslog || use debug.
> 
> > 2) logrotate fails if any of the logs mentioned in /etc/logrotate.d/dspam does
> > not exist (missingok should be used here)
> 
> Ditto

Yes, i have not enabled USE=syslog, but there are still no logfiles in this directory, the only logging is done in users' ~/.dspam/<uid>.log

so either the logging is broken, or there has nothing been logged .. in any case missingok in the logrotate script wouldn't hurt i guess (would at least prevent messages from logrotate cron about file not found)
Comment 3 Benedikt Böhm (RETIRED) gentoo-dev 2008-01-15 10:13:32 UTC
(In reply to comment #1)
> (In reply to comment #0)
> > there are a number of path problems with the current dspam.cron script:
> > 
> > 1) DSPAM_CONFIGDIR lookup via getent, though DSPAM_HOME != DSPAM_CONFIGDIR
> 
> Don't understand what problem you have with DSPAM_CONFIGDIR. Are you saying
> that it fails to detect the right location of dspam.conf? Keep in mind that
> this script must be usable on all hosts, including those where dspam have been
> installed ages ago.

It is working for me, just the comment in dspam.cron is a bit misleading:

# Something is wrong in passwd! Check if /etc/mail/dspam exists instead.

maybe add a note that the getent check is only for legacy reasons and nothing is wrong with my /etc/passwd ..
Comment 4 Alin Năstac (RETIRED) gentoo-dev 2008-01-16 06:36:55 UTC
All the issues have been fixed in r10. 
When syslog flag is disabled, /var/log/dspam/dspam.log file is used instead.
Comment 5 Alin Năstac (RETIRED) gentoo-dev 2008-01-20 09:37:41 UTC
I've just realized that dspam_logrotate must be executed in Home dir because this is the location of system.log file.

Fixed in r11.