How to: Define Outgoing IP Address for Mail

qmail allows system administrators to set an outgoing IP address for some, or all, email leaving the server. This is advantageous on systems with multiple IP addresses, as system administrators can apply specific IP addresses for specific accounts. This may help manage IP reputation on a shared hosting system.

Note

In order to use this method to specify the outgoing IP, Qmail Sender IP must be disabled. This setting is found on the Settings in NodeWorx page (Server > Settings), under the heading “Mail Options”.

To Set A Default IP For All Outgoing Mail

  1. Log in to the server at the CLI as root, either via SSH or from the terminal

  2. Using a text editor, edit the file named /var/qmail/control/bindroutes and add the following line (replacing ip.ad.dr.es with the desired IP address):

    :ip.ad.dr.es
    
  3. Save and close the file

To Set A Default IP For Outgoing Mail For A Single Domain

  1. Log in to the server at the CLI as root, either via SSH or from the terminal

  2. Using a text editor, edit the file named /var/qmail/control/bindroutes and add the following line (replace “domain.com” with the desired domain and ip.ad.dr.es with the desired IP address):

    domain.com:ip.ad.dr.es
    
  3. Save and close the file