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 127.0.0.1[127.0.0.1]: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 127.0.0.1[127.0.0.1]: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 127.0.0.1[127.0.0.1]:10024: Connection refused)
postfix/postscreen[45872]: NOQUEUE: reject: RCPT from [100.200.100.159]: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/greylist.pl[45885]: Temporary message rejection to: <user@host.tld> from: <user2@host2.tld> sent from: [100.200.100.159] for: 60 seconds due to greylisting
postfix/smtpd[45879]: NOQUEUE: reject: RCPT from host.domain.tld[100.200.100.159]: 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/Server.pm
...
/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 http://serverfault.com/questions/138690/amavisd-net-server-pid-file-already-exists-after-system-crash-and-startup
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?