Server Fault is a question and answer site for system and network administrators. 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

I'm running Postfix 2.11 together with amavisd-new which works fine with spamassassin and clamav to prevent inbound/outbound spam and virus traffic.

Right now i'm looking for a way to alert users when outbound email is not delivered - rejected, quarantined, etc. Does anyone knows how to accomplish that?

Thanks in advaned!

share|improve this question

In amavisd.conf you'll have a few options that can be useful.

The options are :

$final_virus_destiny =
$final_banned_destiny =
$final_bad_header_destiny =

$virus_quarantine_to = 
$banned_quarantine_to = 
$bad_header_quarantine_to = 

With the $final_X_destiny if you set it to D_BOUNCE, amavisd will create a DSN to the sender, this can be problematic if you're being spammed with spoofed addresses, you might want to look into creating a policy bank for authenticated users, and using this option just there.

The other option you have is the $X_quarantine_to if you set that to a particular email, you could run a script that checks the mailbox, and sends messages to people..

This page has some further info also, including the spam counterparts to these options.

share|improve this answer
Hi, thanks a lot for the answer. Is it possible to create a different policy for inbound and for outbound email? Inbound email i would like to send it to iser's spam folder but outgoing email i would like to reject so the user can get same feedback as Postfix rejection policies. – user846226 Mar 31 '14 at 13:05
Yeah, this article is a quite detailed explanation on setting up a policy bank for differentiating clients.. : – NickW Mar 31 '14 at 13:12
For example, if your clients use the submission port (587) to send mail using TLS, you can set up a policy bank on all mail that arrives through 587, and direct it into amavis, using a custom policy bank.. – NickW Mar 31 '14 at 13:14
Thank you so much, will give it all a read and post the results ASAP. Thanks again! – user846226 Mar 31 '14 at 13:28

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.