Redirect Postfix Spam

Discussion in 'Server Operation' started by TimmBo, Feb 20, 2008.

  1. TimmBo

    TimmBo New Member


    I am new to this forum and even though my english is quite rusty (was it ever good ?), I hope you can understand my problem and help me with it.

    We have a CentOS linux server with Postfix, Amavis, Spamassassin and ClamAV up and running. Everything works perfect.
    To get control over all the incoming spam, I have to redirect all the spam, that is addressed to a specific address to a new one.
    Spam gets identified by Amavis over Spamassassin and the subject of an identified spam mail changes to ***spam*** + the old subject, and is transported to the target address. But there ist one E-Mail adress, let's say [email protected], where we do not want to have any spam at all. But just to be sure, that Spamassassin worked correct, we do not want the spam to be deleted, but to be sent to another mail adress (let's say [email protected]), where we collect all those mails.
    I do know, how to redirect all mails, but I have no idea how to just redirect the spam.

    I searched the internet for this problem, but with no real result. Also using the search function in this forum brought no success :(

    Now I hope, someone out there has an idea, what I have to do, to get the function explained above working :(

  2. falko

    falko Super Moderator ISPConfig Developer

    I think you can set a spam email address in the amavisd configuration. :)
  3. TimmBo

    TimmBo New Member


    if I configure this spam e-mail adress, doesn't this mean, that all received spam will be redirected there.
    In our setup, spam shall pass through to the actual receiver. It shall only be marked as spam (this is already configured and works fine). But the spam, that is send to one specific adresse ([email protected]), shall be redirected.

    I can use header checks on the subject of the spam mail, because amavis did change the subject (as mentioned above), so I am able to redirect all spam to the spam mail adresse. But I have no idea, how I can filter mails by subject AND by receiver.

    Last edited: Mar 3, 2008
  4. falko

    falko Super Moderator ISPConfig Developer
  5. TimmBo

    TimmBo New Member


    thx for your reply! I was afraid it wouldn't be so easy...
  6. whoisit

    whoisit New Member

    with spamassassin you can specify what to do with mail marked as spam, options of forward, you can set forward to [email protected] as already created
  7. TimmBo

    TimmBo New Member


    I will try this solution in the next few days. Thanks for the very help!


Share This Page