# amavisd-new can't start again



## xwwu (May 17, 2010)

Dear Friends:

Amavisd can't start again:


```
# /usr/local/etc/rc.d/amavisd start
Starting amavisd.
# /usr/local/etc/rc.d/amavisd restart
amavisd not running?
Starting amavisd.
#
```

Quite simple, no any clue. How to fix it?

I remember when upgrade python, there are some problem with some modules, then the server ask me if ignore the problem, I reply yes.  

Regards!

Xwwu


----------



## SirDice (May 17, 2010)

Perhaps you should look in a few log files to see _why_ it's failing to start?


----------



## xwwu (May 17, 2010)

Thanks very much for your reply. No log file regarding amavisd-new.
but there is a sentence regarding amvisd-new in maillog:


```
May 17 21:52:15 xxx postfix/error[1332]: EC5352DE97:to=<xxx@xxx.xxx.xxx.xxx>, relay=none, delay=4690, delays=4690/0.07/0/0, dsn=4.4.1, 
status=deferred (delivery temporarily suspended: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)
```


----------



## DutchDaemon (May 17, 2010)

Increase verbosity with [cmd=]sh -x /usr/local/etc/rc.d/amavisd start[/cmd] or even [cmd=]sh -xv /usr/local/etc/rc.d/amavisd start[/cmd] and see whether any error or problem shows up.

And be so kind to format your posts.


----------



## xwwu (May 17, 2010)

Thanks your reply very much.

The output is:
	
	



```
#amavis_p0fanalyser_enable="YES"
#amavis_p0fanalyser_p0f_filter="tcp dst port 25"
clamav_clamd_enable="YES"
+ clamav_clamd_enable=YES
clamav_freshclam_enable="YES"
+ clamav_freshclam_enable=YES
spamd_enable="YES"
+ spamd_enable=YES
webmin_enable="YES"
+ webmin_enable=YES
snmpd_enable="YES"
+ snmpd_enable=YES
#snmpd_flagse="-a -p /var/run/snmpd.pid"
snmptrapd_enable="YES"
+ snmptrapd_enable=YES
#snmptrapd_flags="-a -p /var/run/snmptrapd.pid"
#mrtg_daemon_enable="YES"
#nfsuserd_enable="YES"
#nfscbd_enable="YES"
#gssd_enable="YES"
inetd_enable="YES"
+ inetd_enable=YES
+ sourced_files=:/etc/rc.conf::/etc/rc.conf.local:
+ [ -r /etc/rc.conf.local ]
+ _rc_conf_loaded=true
+ [ -f /etc/rc.conf.d/amavisd ]
+ [ -n '' ]
run_rc_command "$1"
+ run_rc_command start
+ _return=0
+ rc_arg=start
+ [ -z amavisd ]
+ shift 1
+ rc_extra_args=''
+ _rc_prefix=''
+ eval '_override_command=$amavisd_program'
+ _override_command=''
+ command=/usr/local/sbin/amavisd
+ _keywords='start stop restart rcvar reload'
+ rc_pid=''
+ _pidcmd=''
+ _procname=/usr/local/sbin/amavisd
+ [ -n /usr/local/sbin/amavisd ]
+ [ -n '' ]
+ _pidcmd='rc_pid=$(check_process /usr/local/sbin/amavisd )'
+ [ -n 'rc_pid=$(check_process /usr/local/sbin/amavisd )' ]
+ _keywords='start stop restart rcvar reload status poll'
+ [ -z start ]
+ [ -n '' ]
+ eval 'rc_flags=$amavisd_flags'
+ rc_flags=''
+ eval '_chdir=$amavisd_chdir' '_chroot=$amavisd_chroot' '_nic'_groups=$amavisd_groups'
+ _chdir='' _chroot='' _nice='' _user='' _group='' _groups=''
+ [ -n '' ]
+ eval 'rc_pid=$(check_process' /usr/local/sbin/amavisd ')'
+ check_process /usr/local/sbin/amavisd
+ _procname=/usr/local/sbin/amavisd
+ _interpreter=''
+ [ -z /usr/local/sbin/amavisd ]
+ _find_processes /usr/local/sbin/amavisd . -ax
+ [ 3 -ne 3 ]
+ _procname=/usr/local/sbin/amavisd
+ _interpreter=.
+ _psargs=-ax
+ _pref=''
+ [ . != . ]
+ _procnamebn=amavisd
+ _fp_args='_arg0 _argv'
+ _fp_match='case "$_arg0" in
                    $_procname|$_procnamebn|${_procnamebn}:|"(
+ _proccheck='          /bin/ps -ww 2>/dev/null -o pid= -o jid
                while read _npid _jid _arg0 _argv; do
                        case "$_arg0" in
                    $_procname|$_procnamebn|${_procnamebn}:|"(
                                if [ "$JID" -eq "$_jid" ];
                                then echo -n "$_pref$_npid";
                                _pref=" ";
                                fi
                                ;;
                        esac
                done'
+ eval /bin/ps -ww '2>/dev/null' -o pid= -o jid= -o command= -in '$_procname|$_procnamebn|${_procnamebn}:|"(${_procnamebn})"o -n '"$_pref$_npid";' '_pref="' '";' fi ';;' esac done
+ /bin/ps -ww -o pid= -o jid= -o command= -ax
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ read _npid _jid _arg0 _argv
+ rc_pid=''
+ [ start != start ]
+ [ -n amavisd_enable -a start != rcvar ]
+ checkyesno amavisd_enable
+ eval '_value=$amavisd_enable'
+ _value=YES
+ debug 'checkyesno: amavisd_enable is set to YES.'
+ return 0
+ eval '_cmd=$start_cmd' '_precmd=$start_precmd' '_postcmd=$st
+ _cmd='' _precmd=start_precmd _postcmd=''
+ [ -n '' ]
+ [ -z '' -a -n '' ]
+ [ ! -x /usr/local/sbin/amavisd ]
+ _run_rc_precmd
+ check_required_before start
+ local _f
+ [ ! -r /usr/local/etc/amavisd.conf ]
+ return 0
+ [ -n start_precmd ]
+ debug 'run_rc_command: start_precmd: start_precmd '
+ eval 'start_precmd '
+ start_precmd
+ rm -rf '/var/amavis/tmp/*' /var/amavis/tmp/. /var/amavis/tmp
+ true
+ [ ]
+ _return=0
+ [ 0 -ne 0 ]
+ check_required_after start
+ local _f _args
+ return 0
+ return 0
+ check_startmsgs
+ [ -n '' ]
+ return 0
+ echo 'Starting amavisd.'
Starting amavisd.
+ [ -n '' ]
+ _doit='/usr/local/sbin/amavisd  '
+ [ -n '' ]
+ [ -n '' ]
+ _run_rc_doit '/usr/local/sbin/amavisd  '
+ debug 'run_rc_command: doit: /usr/local/sbin/amavisd  '
+ eval '/usr/local/sbin/amavisd  '
+ /usr/local/sbin/amavisd
+ _return=0
+ [ 0 -ne 0 ]
+ return 0
+ _run_rc_postcmd
+ [ -n '' ]
+ return 0
+ return 0
```


----------



## DutchDaemon (May 18, 2010)

Well, everything seems to be ok in the environment. Does anything show up in /var/log/messages after starting amavisd?


----------



## plamaiziere (May 18, 2010)

xwwu said:
			
		

> Thanks very much for your reply. No log file regarding amavisd-new.



You should configure amavisd-new to log into syslog: (they will be in /var/log/mailog)

amavisd.conf:

```
# Section III - Logging
#

# true (e.g. 1) => syslog;  false (e.g. 0) => logging to file
$DO_SYSLOG = 1;                   # (defaults to false)
#$SYSLOG_LEVEL = 'user.info';     # (facility.priority, default 'mail.info')

#NOTE: levels are not strictly observed and are somewhat arbitrary
# 0: startup/exit/failure messages, viruses detected
# 1: args passed from client, some more interesting messages
# 2: virus scanner output, timing
# 3: server, client
# 4: decompose parts
# 5: more debug details
$log_level = 5;           # (defaults to 0)
```


----------



## xwwu (May 18, 2010)

DutchDaemon said:
			
		

> Well, everything seems to be ok in the environment. Does anything show up in /var/log/messages after starting amavisd?



Yes, the code is:
	
	



```
asus# tail -f /var/log/messages
May 18 10:40:11 xxx postfix/sendmail[39016]: fatal: root(0): No recipient addresses found in message header
May 18 10:42:20 xxx inetd[1112]: ssh/tcp: bind: Address already in use
May 18 10:45:01 xxx postfix/sendmail[39036]: fatal: root(0): No recipient addresses found in message header
May 18 10:45:05 xxx postfix/sendmail[39044]: fatal: root(0): No recipient addresses found in message header
May 18 10:50:00 xxx postfix/sendmail[39053]: fatal: root(0): No recipient addresses found in message header
May 18 10:50:01 xxx postfix/sendmail[39055]: fatal: root(0): No recipient addresses found in message header
May 18 10:52:20 xxx inetd[1112]: ssh/tcp: bind: Address already in use
May 18 10:55:01 xxx postfix/sendmail[39082]: fatal: root(0): No recipient addresses found in message header
May 18 10:55:01 xxx postfix/sendmail[39084]: fatal: root(0): No recipient addresses found in message header
May 18 10:58:36 xxx su: owen to root on /dev/pts/0
May 18 10:59:00 xxx postfix/sendmail[39107]: fatal: root(0): No recipient addresses found in message header
```


----------



## xwwu (May 18, 2010)

DutchDaemon said:
			
		

> Well, everything seems to be ok in the environment. Does anything show up in /var/log/messages after starting amavisd?



Problem solved by run:sa-update.

But mail server works. But it is very slow.


----------

