Results 1 to 9 of 9

Thread: Formats for /etc/mailhelo, mailips, etc.

  1. #1
    Registered Member nyjimbo's Avatar
    Join Date
    Jan 2003
    Location
    New York
    Posts
    1,125

    Default Formats for /etc/mailhelo, mailips, etc.

    I have to change how mail is sent from one of our machines because it is on a network with a poor reputation. I have additional ips and can switch the sending ip to something else.

    When I look at the options in EXIM CONFIGURATION I see:

    ** Send HELO based on the domain name in /etc/mailhelo (*: HELONAME can be added to the file to change the default helo name) [?]
    Send HELO based on the domain name in /etc/mailhelo (*: HELONAME can be added to the file to change the default helo name)


    ** Send outgoing mail from the ip that matches the domain name in /etc/mailips (*: IP can be added to the file to change the main outgoing interface) [?]
    Send outgoing mail from the ip that matches the domain name in /etc/mailips (*: IP can be added to the file to change the main outgoing interface)


    ** Automaticlly send outgoing mail from the account's IP address instead of the main IP address. Warning: If you turn this setting on you should make sure reverse DNS entries match the ones in /etc/mail_reverse_dns. [?]
    Automaticlly send outgoing mail from the account's IP address instead of the main IP address.


    How do I change the info for these files, all of them are currently empty except for /etc/mail_reverse_dns which has the main server ip and machine name. Do I just edit it manually with VI or PICO and it will work or will it be blown away with the next "upcp" ?.

    What is the format for these three files ?.
    "A dog has raised it’s hind leg on the age of nevermore !"
    -- Rolf

  2. #2
    Registered User
    Join Date
    Mar 2009
    Posts
    4

    Default

    Bump for an answer to the above post?

    The manual has no format info of what needs to be in these files.

    Thanks

    A sample file would do as well.

  3. #3
    cPanel Quality Assurance Analyst cPanelDon's Avatar
    Join Date
    Nov 2008
    Location
    Houston, Texas, U.S.A.
    Posts
    2,554
    cPanel Access Level

    DataCenter Provider

    Lightbulb Re: Formats for /etc/mailhelo, mailips, etc.

    Hello,

    You may use any command-line text editor such as vi (or vim), nano (or pico), to edit the files. As long as the automatic option is not in use you can manually update and manage the mailhelo and mailips files without them being overwritten.

    The easiest method to see a full version of the files with proper syntax is to temporarily enable the following "automatic" option:
    WHM: Main >> Service Configuration >> Exim Configuration Editor >> Standard Options >> Domains and IPs
    * Automatically send outgoing mail from the account's IP address instead of the main IP address. Warning: If you turn this setting on you should make sure reverse DNS entries match the ones in /etc/mail_reverse_dns

    The above option will create the files so you can simply view their contents to see how they are used.

    Alternatively, you can manually create them based off the following examples, while being sure to use your own domains and IP addresses where applicable; however, please note that to retain customizations of the two files, mailhelo and mailips, it is necessary to enable the relevant options via the Exim Configuration Editor in WHM as seen below.

    WHM: Main >> Service Configuration >> Exim Configuration Editor >> Standard Options >> Domains and IPs
    * Send HELO based on the domain name in /etc/mailhelo (*: HELONAME can be added to the file to change the default helo name)
    * Send outgoing mail from the ip that matches the domain name in /etc/mailips (*: IP can be added to the file to change the main outgoing interface)

    Full Path: "/etc/mailhelo"
    Code:
    domain2.tld: domain2.tld
    sub.domain2.tld: domain2.tld
    addondomain.tld: domain2.tld
    other.domain3.tld: other.domain3.tld
    *: server1.domain1.tld
    In mailhelo, the example entry that begins with an asterisk sets the default HELO for domains without their own specific entry; you could, if desired, just have the default set and nothing else.

    The "#.#.#.#" entries in the following two examples are meant to represent IP addresses on your system; be sure to use only valid, public IP addresses that are accessible via the Internet.

    Full Path: "/etc/mailips"
    Code:
    domain2.tld: #.#.#.2
    sub.domain2.tld: #.#.#.2
    addondomain.tld: #.#.#.2
    other.domain3.tld: #.#.#.3
    *: #.#.#.1
    In mailips, the example entry that begins with an asterisk sets the default outbound (sending) IP address for domains without their own specific entry; you could, if desired, just have the default set and nothing else.

    You should not have to manually edit or manage the mail_reverse_dns file; the only two that you would manually edit are mailhelo and mailips. For the sake of showing an example, though, here is what the mail_reverse_dns file might look like:

    Full Path: "/etc/mail_reverse_dns"
    Code:
    #.#.#.1: server1.domain1.tld
    #.#.#.2: domain2.tld
    #.#.#.3: other.domain3.tld
    To help understand why the above examples look the way they do, in terms of why a particular domain has a specific HELO value and or why a particular domain has a specific outbound IP, and to help show what you might expect to see from the aforementioned "automatic" option, the following could be assumed:
    1.) "domain2.tld" is a primary domain
    2.) "sub.domain2.tld" is a sub-domain of "domain2.tld"
    3.) "addondomain.tld" is an add-on domain of "domain2.tld"
    4.) "other.domain3.tld" is a also primary domain
    5.) "server1.domain1.tld" is the server hostname

    If you opt to manually create, update and manage the mailhelo and mailips files, you are free to customize them as needed provided they contain the correct syntax and use only valid domains and IP addresses.
    Last edited by cPanelDon; 12-23-2009 at 11:31 PM. Reason: Clarification of required options to enable for retaining customizations

  4. #4
    Registered User
    Join Date
    Mar 2009
    Posts
    4

    Default

    Thannks, That was an excellent treastise and should be just copy and pasted into the manual.

    I'll try these out later this afternoon.

    Why doesn't exim create the data for these files in the first place? Seems like the information already "exists" in the domain setups...

    And to help me better understand the current behavior, when the files are empty, the information exim posts to a helo query when these are checked and the resultant error message is...

    mail.domain1.com claims to be host server1.domain.com [but that host is at xx.xxx.xxx.52 (may be cached), not xx.xxx.xxx.94]. <br />

    with the changes to the two files, then this type of message would be "fixed". right?

  5. #5
    cPanel Quality Assurance Analyst cPanelDon's Avatar
    Join Date
    Nov 2008
    Location
    Houston, Texas, U.S.A.
    Posts
    2,554
    cPanel Access Level

    DataCenter Provider

    Lightbulb

    Quote Originally Posted by Pablo Escobar View Post
    Why doesn't exim create the data for these files in the first place? Seems like the information already "exists" in the domain setups...
    The mailhelo and mailips files are only needed if you desire customization of HELO responses from Exim and to override the stock-default behavior of Exim using the main server IP address. If you opt to -not-use- the "automatic" option then you must manually create and manage the two (mailhelo and mailips) files. Conversely, if you opt to -use- the "automatic" option then cPanel will create and manage both files for you based upon the IP address of each account.

    Quote Originally Posted by Pablo Escobar View Post
    And to help me better understand the current behavior, when the files are empty, the information exim posts to a helo query when these are checked and the resultant error message is...

    mail.domain1.com claims to be host server1.domain.com [but that host is at xx.xxx.xxx.52 (may be cached), not xx.xxx.xxx.94].

    with the changes to the two files, then this type of message would be "fixed". right?
    The message alone usually does not indicate a fatal error, but whether or not the receiving mail server rejects an e-mail for that depends on how the recipient mail system is configured to handle the specific circumstances involved. Normally the warning is safe to ignore, and to the best of my knowledge it is usually only shown by online tools that check for possible DNS issues.

    The message should only appear if an account is on an IP address different than your main server IP address, or more specifically, different than the default interface's IP address that you have Exim configured to use; however, as certain third-party mail server configurations might be more strict, to help ensure this scenario does not become a problem for you, or if you need to correct it, we have the functionality there for you to easily customize (Exim) as your needs require.
    Last edited by cPanelDon; 04-25-2009 at 04:15 AM.

  6. #6
    big
    big is offline
    Registered Member
    Join Date
    Aug 2001
    Location
    Earth
    Posts
    232

    Default

    why updated exim configurator doesn't automatically build these files ?

    or there is a script to run todo so?

  7. #7
    cPanel Quality Assurance Analyst cPanelDon's Avatar
    Join Date
    Nov 2008
    Location
    Houston, Texas, U.S.A.
    Posts
    2,554
    cPanel Access Level

    DataCenter Provider

    Default

    Quote Originally Posted by big View Post
    why updated exim configurator doesn't automatically build these files ?

    or there is a script to run todo so?
    Via root SSH access, please let us know the output from the following commands:
    Code:
    # grep "mailhelo\|mailips" /etc/exim.conf.localopts
    # stat /var/cpanel/custom_mailhelo /var/cpanel/custom_mailips
    To the best of my knowledge the following script would be the one that triggers an update of the files but only if circumstances are appropriate (i.e., not when the files are managed manually):
    Code:
    # /scripts/updateuserdomains

  8. #8
    Registered Member
    Join Date
    Dec 2006
    Posts
    16

    Default

    Have you found that this works for you?

    We have found that this does not work at all!

    The HELO is still seen as the hostname, even though we have the domains listed in /etc/mailhelo

  9. #9
    cPanel Quality Assurance Analyst cPanelDon's Avatar
    Join Date
    Nov 2008
    Location
    Houston, Texas, U.S.A.
    Posts
    2,554
    cPanel Access Level

    DataCenter Provider

    Default

    Quote Originally Posted by Ralph9110 View Post
    Have you found that this works for you?

    We have found that this does not work at all!

    The HELO is still seen as the hostname, even though we have the domains listed in /etc/mailhelo
    If a bug is suspected please note that the best avenue to report it is via our ticket system, such as by using the link in the top-right corner of the forums, labeled Bugs; using this method helps to ensure greater efficiency, accuracy in diagnosis, full and in-depth investigation and faster resolution.

    When available, please send me a private message (PM) including your new ticket ID number so that I may follow-up internally.

Similar Threads

  1. wildcard formats
    By neil154 in forum General Discussion
    Replies: 4
    Last Post: 02-19-2014, 11:59 AM
  2. mailhelo and mailips being overwritten
    By Gareth-AWD in forum E-mail Discussions
    Replies: 3
    Last Post: 08-21-2013, 11:04 AM
  3. Email Username Formats
    By themiliton in forum E-mail Discussions
    Replies: 2
    Last Post: 11-16-2011, 06:58 AM
  4. mailhelo and mailips being cleared by upcp ?
    By nyjimbo in forum E-mail Discussions
    Replies: 33
    Last Post: 03-14-2011, 10:15 AM
  5. domain not added to mailhelo and mailips
    By Cristi4n in forum E-mail Discussions
    Replies: 0
    Last Post: 12-12-2008, 04:01 AM
bargain