postfix, backup mx host + spam and virus scanning enabled

Discussion in 'Tips/Tricks/Mods' started by rdeussen, Nov 1, 2006.

  1. rdeussen

    rdeussen New Member

    Hi all,

    In ISPConfig we have the option to specify a external mailserver. For this "external mailserver" domain, ISPconfig is not relaying any e-mail by default.

    I've edited postfix:

    relay_domains = hash:/etc/postfix/relay_domains
    relay_recipient_maps = hash:/etc/postfix/relay_recipients

    and put the users there who are known at the primary mailserver in the relay_recipients file. This way e-mail gets relayed at the backup mx, and delivered at the primary host as soon as this host becomes available.


    there is no spam and e-mail scanning done this way. Does somebody know where to look?

  2. rdeussen

    rdeussen New Member

    added info

    Ofcourse i also have:

    transport_maps = hash:/etc/postfix/transport

    so postfix knows the primary server...instead of dns lookup...
  3. falko

    falko Super Moderator ISPConfig Developer

    Yes, because this is invoked by procmail, but it isn't called if the emails don't arrive at the users' homedirs. You must set up Postfix to use amavisd instead which then passes the emails back to Postfix after scanning.
  4. rdeussen

    rdeussen New Member

    ispconfig, postfix, amavisd

    Is there a howto regarding ispconfig, postfix and amavisd?

    And is there any interaction between the ispconfig web interface and this postfix / amavisd solution?

    I'm also thinking about performance issue, is every e-mail send or received by the system scanned by amavisd? Or can i limit this to the backup domains?
  5. falko

    falko Super Moderator ISPConfig Developer

    These howtos are about Postfix and amavisd_new:,_Postfix,_Amavis

    Basically you must install your distribution's amavisd_new package, and then you configure Postfix and amavisd_new.


    You can create whitelists with amavisd_new.
  6. rdeussen

    rdeussen New Member

    todo ...

    I've configured;

    postfix,, transport, relay_domains, relay_recipients.

    amavisd is configured using the 50-user file (debian..)

    But now it seems every e-mail is scanned with amavis...and again after the procmail invokes? Perhaps this is unneeded load, but for the meantime it looks ok. I'm trying out the whitelist stuff to see if i can limit this to the back domains. I'll keep you updated.

    It would be awesome if i could use a tool like mailwatch (sourceforge) Anybody any experience with this?
  7. falko

    falko Super Moderator ISPConfig Developer

    Then you did something wrong. The mail must go to Postfix, then to amavisd, which delviers it back to Postfix after scanning. Have a look here:
    But please don't follow the whole tutorial as it configures Postfix for virtual mailboxes which is not compatible with ISPConfig!

Share This Page