Send mail with differenet ip adresses

Discussion in 'ISPConfig 3 Priority Support' started by diablo666, Oct 5, 2017.

  1. diablo666

    diablo666 Active Member HowtoForge Supporter

    Is it possibile to add multiple ip address to ispconfig and decide to send email for a specific domain only through a specific ip address?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    That's possible, but not in ISPConfig directly, you'll have to do this in postfix.

    add this line in main.cf:

    sender_dependent_default_transport_maps = hash:/etc/postfix/sdd_transport

    Then create a file:

    /etc/postfix/sdd_transport

    which contains lines like this:

    @domain1.tld othersmtp:
    @domain2.tld othersmtp:

    and then you have to add a smtp2 stanza in postfix master.cf file (somewhere at the beginning after the 'smtp' line. Example:

    Code:
    othersmtp     unix -       -       n       -       -       smtp
        -o smtp_bind_address=1.2.3.4
        -o smtp_helo_name=mx2.yourdomain.tld[code]
    
    Probably you find a more sophisticated guide on the topic when you search for sender_dependent_default_transport_maps though :)
     

Share This Page