Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Lion Mail Server component postfix/smtp 100% reproducible blocks inbound smtp mail delivery on first boot after a panic or power failure.

Error messages from mail.log are like:

postfix/smtp[45785]: connect to[]:10024: Connection refused
postfix/smtp[45785]: 2F7131F9A97: to=<user@host.tld>, relay=none, delay=76041, delays=76040/0.36/0.05/0, dsn=4.4.1, status=deferred (connect to[]:10024: Connection refused)
postfix/error[45790]: 550D61F9A99: to=<user@host.tld>, relay=none, delay=76040, delays=76040/0.39/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to[]:10024: Connection refused)
postfix/postscreen[45872]: NOQUEUE: reject: RCPT from []:65392: 450 4.3.2 Service currently unavailable; from=<user2@host2.tld>, to=<user@host.tld>, proto=ESMTP, helo=<host.domain.tld>
/usr/libexec/postfix/[45885]: Temporary message rejection to: <user@host.tld> from: <user2@host2.tld> sent from: [] for: 60 seconds due to greylisting
postfix/smtpd[45879]: NOQUEUE: reject: RCPT from host.domain.tld[]: 450 4.7.1 <user@host.tld>: Recipient address rejected: Service is unavailable; from=<user2@domain2.tld> to=<user@domain.tld> proto=ESMTP helo=<host.domain.tld>

The issue seems to be related to the amavis content filter due to the connection to port number 10024 and amavisd being configured on that port. Amavis.log:

/usr/bin/amavisd[236]: (!)Net::Server: 2012/07/25-13:38:49 Pid_file already exists for running process (88)... aborting\n\n  at line 277 in file /System/Library/Perl/Extras/5.12/Net/
/usr/bin/amavisd[236]: Net::Server: 2012/07/25-13:38:49 Server closing!
...repeating roughly every 10 seconds...

The workaround is to reboot the machine, after the second boot the inbound smtp mail delivery is no longer stuck.

The issue seems to be related to

How to permanently fix Apple Mail Server to accept smtp inbound messages on first boot, by removing the left over amavis pid_file from the previous unclean shutdown?

share|improve this question

Create a launchd item that runs on boot (system startup before amavisd is started) executing the command to test that /private/var/run/ exists and then delete it:

if test -f /private/var/run/; then rm /private/var/run/

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC -//Apple Computer//DTD PLIST 1.0//EN >
<plist version="1.0">
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.