Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#33995 - [dspam] package bugs/enhancements

Attached to Project: Community Packages
Opened by Tom Kuther (teekay) - Sunday, 24 February 2013, 13:58 GMT
Last edited by Sergej Pupykin (sergej) - Thursday, 28 February 2013, 15:34 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sergej Pupykin (sergej)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
The dspam package could be enhanced to provide a better out-of-the-box experience.

Following issues arose when I did a simple setup with postfix, dovecot and dovecot-antispam-hg:
1) support for syslog is disabled (FEATURE ENHANCEMENT)
2) logrotate complains about /var/log/dspam owning group not being "root", and missing files (BUG)
3) the dspamc binary has false file permissions, causing permission errors on /var/lib/dspam/data when being executed from other processes like dovecot, or any user != dspam (BUG)


Solutions:
* for 1) provide syslog support by adding following configure flags:

--enable-syslog --with-logfile=/var/log/dspam/dspam.log

* for 2) add missingok, su, and correct paths to logrotate script (system.log is in /var/lib/dspam, dspam.debug doesn't exist as --enable-debug is not set at configure time)

/var/log/dspam/sql.errors /var/lib/dspam/system.log /var/log/dspam/dspam.debug /var/log/dspam/dspam.messages /var/log/dspam/dspam.log {
weekly
compress
missingok
su dspam dspam
create 0644 dspam dspam
}

* for 3) set dspamc root:dspam setgid:

chown root:dspam $pkgdir/usr/bin/dspamc
chmod g+s $pkgdir/usr/bin/dspamc



Additional info:
* dspam-3.10.2-2


Steps to reproduce:
1. install dpsam
2. configure and start it
3. run "logrotate -f /etc/logrotate.d/dspam"
4. pipe something to dspamc, either directly from commandline, or e.g. via dovecot-antispam-hg plugin
This task depends upon

Closed by  Sergej Pupykin (sergej)
Thursday, 28 February 2013, 15:34 GMT
Reason for closing:  Fixed
Additional comments about closing:  thanks
Comment by Tom Kuther (teekay) - Sunday, 24 February 2013, 15:25 GMT
More things:

re 2) another approach to make logrotate happy would be

chmod 750 $pkgdir/var/log/dspam

this way su isn't needed, missingok ist still required anyways.

4) the dspam binary has wrong permission, 2510 is more sane

drop the line "chmod 0755 $pkgdir/usr/bin/*" from the PKGBUILD

5) The SQL scripts end up in /var/lib/dspam and cannot be read by others, install those to /usr/share/dspam instead.
6) enable clamav support
7) enable external lookup support
8) Install the handy dspam_maintenance script from crontrib/

I'm going to attach my final PKGBUILD and files, cherry pick new features as desired, but please fix at least the logrotate and file permission bugs.


Comment by Tom Kuther (teekay) - Sunday, 24 February 2013, 15:27 GMT
PKGBUILD and files with all fixes and enhancements.

Loading...