If clamd configured to use only TCP socket then clamav-milter rc.d script does not start clamav-milter. -S test in rc.d-script fails because there is no clamd UNIX-socket. Fix: Apply attached patch to clamav-milter rc.d-script, set clamav_clamd_socket variable to empty string in rc.conf to disable checks of local clamd UNIX-socket. Patch attached with submission follows: How-To-Repeat: 1. Disable LocalSocket and enable "TCPSocket 3310" and "TCPAddr 127.0.0.1" in clamd.conf. 2. Add following lines to rc.conf: clamav_freshclam_enable="YES" clamav_clamd_enable=YES clamav_milter_enable="YES" clamav_milter_socktimeout=2 clamav_milter_socket="/var/run/clamav/milter.sock" clamav_milter_flags=" --dont-scan-on-error \ --force-scan \ --blacklist-time=60 \ --quiet \ --max-children=16 \ --timeout=30 \ --external \ --server=localhost" 3. Start clamd with "/usr/local/etc/rc.d/clamav-clamd start" command. 4. Try to start clamav-milter. You should get the following error: # /usr/local/etc/rc.d/clamav-milter start Waiting for clamd socket.. There is no clamd socket (/var/run/clamav/clamd)!
Responsible Changed From-To: freebsd-ports-bugs->garga Over to maintainer
Hello, Could you apply following patch on your clamav port, reinstall it and test it for me? If it works fine i can commit. FYI, with this change, you need to set clamav_clamd_socket="" on your /etc/rc.conf Thanks ---------------------------------------------------------------------- Index: files/clamav-milter.in =================================================================== RCS file: /home/pcvs/ports/security/clamav-devel/files/clamav-milter.in,v retrieving revision 1.3 diff -u -r1.3 clamav-milter.in --- files/clamav-milter.in 29 May 2007 17:33:52 -0000 1.3 +++ files/clamav-milter.in 13 Aug 2007 18:48:18 -0000 @@ -36,7 +36,7 @@ fi rc_flags="--pidfile ${pidfile} ${flags:-$clamav_milter_flags} $clamav_milter_socket" - if checkyesno clamav_clamd_enable; then + if checkyesno clamav_clamd_enable && [ "x$clamav_clamd_socket" != "x" ]; then echo -n "Waiting for clamd socket.. " i=${clamav_milter_socktimeout} while [ $i -ne 0 ] ---------------------------------------------------------------------- -- Renato Botelho <garga @ FreeBSD.org> <freebsd @ galle.com.br> GnuPG Key: http://www.FreeBSD.org/~garga/pubkey.asc Therefore it is necessary to learn how not to be good, and to use this knowledge and not use it, according to the necessity of the cause. -- Machiavelli
State Changed From-To: open->feedback Wait submitter test and answer
On Mon, Aug 13, 2007 at 06:49:31PM +0000, garga@FreeBSD.org wrote: > Synopsis: security/clamav - security/clamav-milter does not start up when clamd listens TCP socket > > State-Changed-From-To: open->feedback > State-Changed-By: garga > State-Changed-When: Mon Aug 13 18:49:30 UTC 2007 > State-Changed-Why: > Wait submitter test and answer > > http://www.freebsd.org/cgi/query-pr.cgi?pr=115353 Hello, Your patch applies cleanly and works fine. Thanks! -- Kind Regards, Alexander Shikoff minotaur@crete.org.ua
garga 2007-08-14 11:14:06 UTC FreeBSD ports repository Modified files: security/clamav/files clamav-milter.in security/clamav-devel/files clamav-milter.in Log: Fix clamav-milter startup script to don't wait clamd socket when it's using tcp socket PR: ports/115353 (Based on) Submitted by: Alexander Shikoff <minotaur@crete.org.ua> Revision Changes Path 1.4 +2 -2 ports/security/clamav-devel/files/clamav-milter.in 1.5 +2 -2 ports/security/clamav/files/clamav-milter.in _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
State Changed From-To: feedback->closed Fixed. Thanks!