Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'd like to save the details (headers and contents) of all messages that are rejected when sent out from our server, so I can figure out why they might have been rejected.

Is there any way for postfix to save a message somewhere when it has been rejected?

Forwarding a copy to the root mail account would be fine.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Add bounce to your notify_classes directive in main.cf. This will send a copy of all of the message headers to postmaster. (For privacy reasons, Postfix truncates the message body on the copy sent to postmaster.)

share|improve this answer
add comment

Your Answer

 
discard

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.