Using a second ip for mail services?

Discussion in 'Installation/Configuration' started by hermestrismegistus, Feb 11, 2013.

  1. hermestrismegistus

    hermestrismegistus New Member

    A couple of days, my server has been abused by outsiders to send spam trough my ip. For that reason my ip got blacklisted. Although after some upgrades of the software the problem seem to be solved now, but still need to get removed from some of the blacklists. Therefore my isp gave me a second ip. So i could use this ip for outcoming and incoming mail.

    My question is, how can i configure the mail system to use the second ip adres they gave me? Btw, i have used the perfect server setup for debian 6.0 to configure my server.
  2. Parsec

    Parsec New Member

    I've been pondering on answering your question, I am not sure however if I can make the answer simple and how it affects the ISPConfig on your server (although I'm guessing it won't affect ISPConfig).

    So here is a brief outline....

    Configure your second IP to your NIC interface ie: eth0:0
    Give the IP a name (FQDN) and make sure that name is added to the second IP both in your dns and in your /etc/hosts file
    Change /etc/mailname to this new FQDN for the second IP

    In /etc/postfix/ you'll need to alter a few things for postfix.

    inet_interfaces =, your.second.ip.address
    (note if you also have a private lan attached on another network card ie: eth1 - you'll need to also add that network)

    mydestination = "fqdn of your second ip", localhost, localhost.localdomain
    (note you should perhaps leave the existing name of your server that is in here as well - as you most probably are using local mail delivery for that to)

    You will also note the "myorigin = /etc/mailname" is in here as well - that's why you had to change that mailname file.

    Now, you will most probably have to create a new ssl cert for postfix under the new name - if you created one for the old name.

    restart postfix, a reload won't do when you change the interfaces.

    Thats basically it.
    Things to watch out for: try and get a reverse dns entry for your second IP to match the fqdn you gave it - your provider will most probably need to do this.

    Questions? fire away...

Share This Page