Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Amavisd died? - Connection refused.

Hi!

Suddenly my junk mail filtering (I suppose amavisd) died. When I turn it off via server admin my mail gets delivered fine. When it is turned on I read in the logs:
connect to 127.0.0.1[127.0.0.1]: Connection refused


Here is the output of my postconf -n:
command_directory = /usr/sbin
config_directory = /etc/postfix
content_filter = smtp-amavis:[127.0.0.1]:10024
daemon_directory = /usr/libexec/postfix
debugpeerlevel = 2
disablevrfycommand = yes
enableserveroptions = yes
html_directory = no
inet_interfaces = all
localrecipientmaps = proxy:unix:passwd.byname $alias_maps
mail_owner = _postfix
mailboxsizelimit = 0
mailbox_transport = cyrus
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
messagesizelimit = 15728640
mydestination = $myhostname,localhost.$mydomain,localhost,kosmatschof.com,veech-vma.com
mydomain = veech-vma.com
mydomain_fallback = localhost
myhostname = server.veech-vma.com
newaliases_path = /usr/bin/newaliases
queue_directory = /private/var/spool/postfix
readme_directory = /usr/share/doc/postfix
relayhost = smtp.inode.at
sample_directory = /usr/share/doc/postfix/examples
sendmail_path = /usr/sbin/sendmail
setgid_group = _postdrop
smtpsasl_passwordmaps =
smtpdclientrestrictions = permitsaslauthenticated, permit_mynetworks, rejectrblclient zen.spamhaus.org, permit
smtpddatarestrictions = permit_mynetworks, rejectunauthpipelining, permit
smtpdenforcetls = no
smtpdhelorequired = yes
smtpdhelorestrictions = permitsaslauthenticated, permit_mynetworks, checkheloaccess hash:/etc/postfix/helo_access, rejectnon_fqdnhostname, rejectinvalidhostname, permit
smtpdpw_server_securityoptions = plain,login,gssapi,cram-md5
smtpdrecipientrestrictions = permitsasl_authenticated,permit_mynetworks,reject_unauthdestination,permit
smtpdsasl_authenable = yes
smtpdsenderrestrictions = permitsaslauthenticated, permit_mynetworks, rejectnon_fqdnsender, permit
smtpdtls_certfile = /etc/certificates/Default.crt
smtpdtls_keyfile = /etc/certificates/Default.key
smtpdtlsloglevel = 0
smtpduse_pwserver = yes
smtpdusetls = no
unknownlocal_recipient_rejectcode = 550


When I issue ps U clamav I see:
83022 ?? Ss 0:00.01 freshclam -d -c 4


Please help and thanks so much in advance for helping me out, as I am really stuck right now.
Chris

Posted on Jul 12, 2009 2:25 AM

Reply
17 replies

Jul 12, 2009 3:04 AM in response to criuz

Quick update:

/var/log/system.log repeats following error:

Jul 12 12:03:01 server org.amavis.amavisd[88822]: Can't open PID file /var/amavis/amavisd.pid: Permission denied at /usr/bin/amavisd line 11193.
Jul 12 12:03:01 server com.apple.launchd[1] (org.amavis.amavisd[88822]): Exited with exit code: 13
Jul 12 12:03:01 server com.apple.launchd[1] (org.amavis.amavisd): Throttling respawn: Will start in 7 seconds


Seems like my amavisd has serious problems.

Jul 12, 2009 6:10 PM in response to criuz

If you look at that line in /usr/bin/amavisd , you'll see that it can't work with the PID file.

You probably have a stale PID file after amavisd crashed, and that's putting a wrench in the works.

Stop mail via (the Terminal)
sudo serveradmin stop mail

wait 10-15 seconds
and then unload & reload the launchd plist for amavisd:

sudo launchctl unload /System/Library/LaunchDaemons/org.amavis.amavisd.plist

wait 5 seconds
sudo launchctl load /System/Library/LaunchDaemons/org.amavis.amavisd.plist

and then start mail via

sudo serveradmin start mail

In all instances watch the system & mail logs.

If the problem persists, stop mail unload amavisd and set aside any PID file in
/var/amavis
or
/var/amavis/var

and reload amavisd and start mail.

Jul 13, 2009 12:35 AM in response to davidh

Hi Davidh,

thanks for your answer. Unfortunately the steps you described did not work perfectly. When I stop mail via sudo serveradmin stop mail I can not unload the amavisd LaunchDaemon without getting errors:
launchctl: Error unloading: org.amavis.amavisd


When I try this with mail service running, unloading the daemon works fine. I also deleted the PID file. Now the system log show only this error:
Jul 13 09:31:34 server com.apple.launchd[1] (org.amavis.amavisd): Throttling respawn: Will start in 9 seconds


Maybe something is wrong with my LaunchDaemon?

Thanks for your help!

Jul 13, 2009 1:41 AM in response to David_x

Thanks for the hint, but I think my master.cf is fine:
#
# Postfix master process configuration file. For details on the format
# of the file, see the master(5) manual page (command: "man 5 master").
#
# ==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ==========================================================================
smtp inet n - n - - smtpd
#submission inet n - n - - smtpd
# -o smtpdenforcetls=yes
# -o smtpdsasl_authenable=yes
# -o smtpdclient_restrictions=permit_saslauthenticated,reject
#smtps inet n - n - - smtpd
# -o smtpdtlswrappermode=yes
# -o smtpdsasl_authenable=yes
# -o smtpdclient_restrictions=permit_saslauthenticated,reject
#628 inet n - n - - qmqpd
pickup fifo n - n 60 1 pickup
-o content_filter=
cleanup unix n - n - 0 cleanup
qmgr fifo n - n 300 1 qmgr
#qmgr fifo n - n 300 1 oqmgr
tlsmgr unix - - n 1000? 1 tlsmgr
rewrite unix - - n - - trivial-rewrite
bounce unix - - n - 0 bounce
defer unix - - n - 0 bounce
trace unix - - n - 0 bounce
verify unix - - n - 1 verify
flush unix n - n 1000? 0 flush
proxymap unix - - n - - proxymap
smtp unix - - n - - smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay unix - - n - - smtp
-o fallback_relay=
# -o smtphelotimeout=5 -o smtpconnecttimeout=5
showq unix n - n - - showq
error unix - - n - - error
retry unix - - n - - error
discard unix - - n - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
anvil unix - - n - 1 anvil
scache unix - - n - 1 scache
#
# ====================================================================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe(8) delivery
# agent. See the pipe(8) man page for information about ${recipient}
# and other message envelope options.
# ====================================================================
#
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildropdestination_recipientlimit=1
#
#maildrop unix - n n - - pipe
# flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
#
# ====================================================================
#
# The Cyrus deliver program has changed incompatibly, multiple times.
#
#old-cyrus unix - n n - - pipe
# flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}
#
# ====================================================================
#
# Cyrus 2.1.5 (Amos Gouaux)
# Also specify in main.cf: cyrusdestination_recipientlimit=1
#
cyrus unix - n n - - pipe
user=_cyrus argv=/usr/bin/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
#
# ====================================================================
#
# See the Postfix UUCP_README file for configuration details.
#
#uucp unix - n n - - pipe
# flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
#
# ====================================================================
#
# Other external delivery methods.
#
#ifmail unix - n n - - pipe
# flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
#
#bsmtp unix - n n - - pipe
# flags=Fq. user=bsmtp argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient
#
#scalemail-backend unix - n n - 2 pipe
# flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store
# ${nexthop} ${user} ${extension}
#
#mailman unix - n n - - pipe
# flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
# ${nexthop} ${user}

Jul 13, 2009 3:23 AM in response to pterobyte

Yes I tried everything david suggested. After issuing sudo /bin/launchctl load -w /System/Library/LaunchDaemons/org.amavis.amavisd.plist I see this in my amavis.log:

Jul 13 12:21:31 server.veech-vma.com /usr/bin/amavisd[5087]: logging initialized, log level 2, logfile: /var/log/amavis.log
Jul 13 12:21:31 server.veech-vma.com /usr/bin/amavisd[5087]: starting. /usr/bin/amavisd at server.veech-vma.com amavisd-new-2.5.1 (20070531), Unicode aware
Jul 13 12:21:31 server.veech-vma.com /usr/bin/amavisd[5087]: user=83, EUID: 83 (83); group=, EGID: 83 83 (83 83)
Jul 13 12:21:31 server.veech-vma.com /usr/bin/amavisd[5087]: Perl version 5.008008
Jul 13 12:21:32 server.veech-vma.com /usr/bin/amavisd[5087]: (!)Net::Server: 2009/07/13-12:21:32 Couldn't open pid file "/var/amavis/amavisd.pid" [Permission denied]. at line 268 in file /System/Library/Perl/Extras/5.8.8/Net/Server.pm
Jul 13 12:21:32 server.veech-vma.com /usr/bin/amavisd[5087]: Net::Server: 2009/07/13-12:21:32 Server closing!

Amavisd died? - Connection refused.

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.