socket file location doesn't support chroot'd postfix smtpd, which is default

Bug #430429 reported by Stephen Warren
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
clamav (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

Binary package hint: clamav

A default postfix install, at least on Jaunty, runs smtpd chroot'd.

/etc/clamav/clamav-milter.conf contains this by default:

MilterSocket /var/run/clamav/milter.ctl

Which is fine for non-chroot'd smtpd, but doesn't work for chroot'd smtpd.

To solve this for the spamassassin milter, I did something like:

mkdir -p /var/spool/postfix/var/spool/postfix/spamass
ln /var/spool/postfix/spamass/spamass.sock spamass.sock

However, a similar workaround doesn't work for clamav-milter, because the clamav socket is /var/run/clamav/milter.ctl, and /var/run is mounted on tmpfs, whereas /var/spool/postfix/ is part of /, and hard-links can't be made across filesystems,

Instead, I added this to fstab:

/var/run/clamav /var/spool/postfix/var/run/clamav none bind 0 0

It'd be nice if the clamav-milter package automated this fstab entry, or provided some other automatic/default solution (or perhaps moved the socket into /var/spool/postfix under some conditions, perhaps set by a default-enabled option in clamav-milter.conf), so that clamav-milter "just worked" out-of-the-box with default postfix configuration.

Revision history for this message
Scott Kitterman (kitterman) wrote :

There isn't a good automated solution for this. How to configure your system for Postfix in a chroot is described in README.Debian that's shipped with the package. The problem is that if we defaulted to a Postfix friendly configuration, that would break Sendmail configurations.

Changed in clamav (Ubuntu):
status: New → Won't Fix
Revision history for this message
Stephen Warren (srwarren) wrote :

The solutions I gave wouldn't break sendmail...

Revision history for this message
Stephen Warren (srwarren) wrote :

I just read the README.Debian file you mentioned. There's an explicit USE_POSTFIX setting that could trivially drive the socket location; not-set==current value, set==move-to-chroot.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.