https://bugzilla.novell.com/show_bug.cgi?id=809969 https://bugzilla.novell.com/show_bug.cgi?id=809969#c0 Summary: Wrong startup options for amavisd-milter in amavisd-new packages Classification: openSUSE Product: openSUSE 12.3 Version: Final Platform: x86-64 OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: Other AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: zinovik.igor@gmail.com QAContact: qa-bugs@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0 amavisd-new is shipped with amavisd-milter program that implements Sendmail Milter support for amavisd-new. amavisd-new is shipped with startup script for SysV and for systemd. Both scripts use incorrect options for starting amavisd-milter. I'm using amavisd-new-2.8.0-1.1.1.x86_64 /etc/init.d/amavis starts amavisd-milter this way: ... echo -n "Starting amavis-milter:" startproc -u vscan $AMAVIS_MILTER_BIN -p $AMAVIS_MILTER_SOCK > /dev/null 2>&1 rc_status -v ... But according to amavisd-milter usage `-p' option is used to specify PID file location: suse12.3# amavisd-milter -h Usage: amavisd-milter [OPTIONS] Options are: -d debug-level Set debug level -D delivery Delivery care of server or client -f Run in the foreground -h Print this page -m max-conns Maximum amavisd connections -M max-wait Maximum wait for connection in seconds -p pidfile Use this pid file -P When amavisd fails mail will be passed through unchecked -q backlog Milter communication socket backlog -s socket Milter communication socket -S socket Amavisd communication socket -t timeout Milter connection timeout in seconds -T timeout Amavisd connection timeout in seconds -v Report the version and exit -w directory Set the working directory I modified /etc/init.d/amavis this way to allow it to start amavisd-milter: --- amavis 2013-02-26 01:49:04.000000000 +0400 +++ amavis.new 2013-03-18 14:44:43.114487449 +0400 @@ -26,7 +26,10 @@ AMAVIS_SYSCONFIG=/etc/sysconfig/amavis AMAVIS_CONF=/etc/amavisd.conf AMAVIS_PID=/var/spool/amavis/amavisd.pid +AMAVIS_MILTER_PID=/var/spool/amavis/amavis-milter.pid AMAVIS_MILTER_SOCK=local:/var/run/amavis/amavis-milter.sock +# Use local TCP socket +# AMAVIS_MILTER_SOCK=inet:10024@localhost # it's like checkproc, but works for scripts too: checkproc_script() @@ -108,7 +111,7 @@ if [ "$AMAVIS_SENDMAIL_MILTER" == "yes" ]; then rc_reset echo -n "Starting amavis-milter:" - startproc -u vscan $AMAVIS_MILTER_BIN -p $AMAVIS_MILTER_SOCK > /dev/null 2>&1 + startproc -u vscan $AMAVIS_MILTER_BIN -s $AMAVIS_MILTER_SOCK -p $AMAVIS_MILTER_PID > /dev/null 2>&1 rc_status -v fi ;; systemd uses /usr/lib/systemd/system/amavisd.service unit to start amavisd-milter via shell script /usr/sbin/amavisd-milter.sh suse12.3# systemctl show amavisd.service | egrep -e '^ExecStartPre.*amavisd-milter.sh' ExecStartPre={ path=/usr/sbin/amavisd-milter.sh ; argv[]=/usr/sbin/amavisd-milter.sh start ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } But when i start amavisd-new with milter (AMAVISD_SENDMAIL_MILTER="yes" in /etc/sysconfig/amavis) it does not start. suse12.3# systemctl start amavisd.service suse12.3# systemctl status amavisd.service amavisd.service - Amavisd-new Virus Scanner interface Loaded: loaded (/usr/lib/systemd/system/amavisd.service; disabled) Active: active (running) since Mon, 2013-03-18 14:48:38 MSK; 5s ago Process: 3384 ExecStart=/usr/sbin/amavisd start (code=exited, status=0/SUCCESS) Process: 3379 ExecStartPre=/usr/sbin/amavisd-milter.sh start (code=exited, status=0/SUCCESS) Process: 3375 ExecStartPre=/bin/echo Starting virus-scanner (amavisd-new): (code=exited, status=0/SUCCESS) Main PID: 3385 (/usr/sbin/amavi) CGroup: name=systemd:/system/amavisd.service └ 3385 /usr/sbin/amavisd (master) Mar 18 14:48:40 suse12.3 amavis[3385]: No decoder for .jar Mar 18 14:48:40 suse12.3 amavis[3385]: No decoder for .lha Mar 18 14:48:40 suse12.3 amavis[3385]: No decoder for .lrz Mar 18 14:48:40 suse12.3 amavis[3385]: No decoder for .lzo Mar 18 14:48:40 suse12.3 amavis[3385]: No decoder for .swf Mar 18 14:48:40 suse12.3 amavis[3385]: Using primary internal av scanner code for ClamAV-clamd Mar 18 14:48:40 suse12.3 amavis[3385]: Found secondary av scanner ClamAV-clamscan at /usr/bin/clamscan Mar 18 14:48:40 suse12.3 amavis[3385]: Deleting db files __db.003,__db.004,snmp.db,__db.001,nanny.db,__db.002 in ...vis/db Mar 18 14:48:40 suse12.3 amavis[3385]: Creating db in /var/spool/amavis/db/; BerkeleyDB 0.50, libdb 4.8 Mar 18 14:48:38 suse12.3 systemd[1]: Started Amavisd-new Virus Scanner interface. But amavisd-milter does not appear in running processes: suse12.3# ps auxw|grep amavisd-milter|grep -v grep|wc -l 0 But even with following diff I did not managed to start amavisd-milter via `systemctl start amavisd.service'. --- amavisd-milter.sh.orig 2013-03-18 14:53:37.542789597 +0400 +++ amavisd-milter.sh 2013-03-18 15:50:12.496855075 +0400 @@ -2,12 +2,14 @@ . /etc/sysconfig/amavis AMAVIS_MILTER_BIN=/usr/sbin/amavisd-milter -AMAVIS_MILTER_SOCK=local:/var/run/amavis/amavis-milter.sock +AMAVIS_MILTER_SOCK=local:/var/spool/amavis/amavisd-milter.sock +#AMAVIS_MILTER_SOCK=inet:10024@localhost +AMAVIS_MILTER_PID=/var/spool/amavis/amavisd-milter.pid case "$1" in start) if [ "$AMAVIS_SENDMAIL_MILTER" = "yes" ]; then - startproc -u vscan $AMAVIS_MILTER_BIN -p $AMAVIS_MILTER_SOCK > /dev/null 2>&1 + startproc -u vscan $AMAVIS_MILTER_BIN -s $AMAVIS_MILTER_SOCK -p $AMAVIS_MILTER_PID > /dev/null 2>&1 fi ;; stop) But if i run suse12.3# /usr/sbin/amavisd-milter.sh start program successfully starts. Reproducible: Always Steps to Reproduce: 1. 2. 3. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.