postfix: Process did not exit cleanly, returned 1 with signal 0

Ronny T. Lampert telecaadmin at gmail.com
Fri Jun 6 09:19:02 IST 2008


>> MailScanner & postfix have mostly been running happily for a few
>> weeks, averaging about 5 msgs/min. But on two occasions we've had
>> defunct MailScanner processes and the error "postfix: Process did not
>> exit cleanly, returned 1 with signal 0".
>>
>> Once the error & the defunct processes started appearing, there was an
>> ever-growing "Found N messages waiting" (got to 480 first time) and no
>> mail getting through. /var/log/maillog revealed that the same batch of
>> 30 messages was being scanned over & over.

I looks like your postfix has problems. postfix does not do such things 
- maybe some smtpds died in the middle of something?
Did you DOUBLEcheck your config?

Please have a CLOSE look into the maillog for postfix's error messages - 
they can be quite subtle at times.


>> The second time it happened, before clearing the queue I took a copy
>> of /var/spool/MailScanner/incoming; will that help in debugging the
>> problem? If so, what should I do with it and if not, what should I do
>> next time it happens?

Make sure that MailScanner is running as your postfix user and you did 
the postfix-specific side of the setup procedure.
Your versions of postfix and MailScanner look fine.

One small thing: have a look at the permissions and ownerships of the 
incoming/ snapshot you took.

postfix will be totally knocked out if queue files have wrong 
ownerships. The delivery will come to a total(!) halt, and you will not 
really see any errors in the log.
All files should have postfix as owner, and 0600 if the files are "in 
progress" and 0700 if they are deemed ready for final delievery.


To hardcore-test your postfix you can do the following:

Stop MailScanner, have only postfix running.

#> cd /var/spool/postfix
#> mv hold/<QUEUE_FILE> incoming
#> chmod 0700 incoming/<QUEUE_FILE>

This file should be delivered successfully without any scanning and you 
should see entries in the maillog.



Cheers,
Ronny


More information about the MailScanner mailing list