Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Email - Domain Literals

Discussion in 'E-mail Discussion' started by RBogan, Feb 16, 2004.

  1. RBogan

    RBogan Registered

    Jan 30, 2004
    Likes Received:
    Trophy Points:
    Houston, TX
    Can anyone suggest a way of clearing up this annoying issue when running my domains through tests at

    WARN: One or more of your mailservers does not accept mail in the domain literal format (user@[]). Mailservers are technically required RFC1123 5.2.17 to accept mail to domain literals for any of its IP addresses. Not accepting domain literals can make it more difficult to test your mailserver, and can prevent you from receiving E-mail from people reporting problems with your mailserver. However, it is unlikely that any problems will occur if the domain literals are not accepted.'s postmaster@[xx.xx.xx.xx] response:
    >>> RCPT TO:<postmaster@[xx.xx.xx.xx]>
    <<< 501 : domain literals not allowed

    I have already tried to edit the exim.conf file as suggested in the file itself :

    # If you want to accept mail addressed to your host's literal IP address, for
    # example, mail addressed to "user@[]", then uncomment the
    # following line, or supply the literal domain(s) as part of "local_domains"
    # above.

    # local_domains_include_host_literals

    But, needless to Exim configuration seems to ignore its own .conf file. I can't get the variable above to stick when uncommenting the line above.

    Any suggestions are appreciated.

    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. WizardOfYonder

    WizardOfYonder Member

    Jul 19, 2015
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    Here is what I found works under any circumstances as of date posted:

    #1 Put into /etc/localdomains all FQDN/NS/MX IPs in both formats
    this way, no matter whether some feedback loop emails
    to postmaster@
    or postmaster@[]
    no mail delivery error, it will arrive :)

    #2 Only put into WHM's Exim Configuration Manager 'Advanced Editor'
    the new setting for
    by using 'Add additional configuration setting' (big blue button)
    and set it in the right column box to 'true'

    #3 While still in the 'Advanced Editor'
    do NOT add @[] to
    domainlist local_domains' right box, it will break the full function,
    again: do NOT add @[].
    Also, do NOT edit manually into exim.conf, e.g.
    uncommenting # local_domains_include_host_literals; again, do NOT.
    Save the new settings made in #2, and wait until the process finishes
    with WHM restarting Exim.

    #4 In your cPanel, add forwarders for the domain you have the IPs on
    so that Exim can find the postmaster and abuse addresses that the IPs
    belong to. This will take care of the routing, so no complicated extra
    routers need to be configured in the Exim Advanced Editor or aliases.

    #5 Restart Exim
    which can be done from within WHM: https://fqdn:2087/cpsess.../scripts/resexim
    or from CLI that way: /etc/rc.d/init.d/exim restart
    or from CLI this way: service exim restart

    #6 Then you can run the test with DNSstuff or other DNS tests,
    and they can try any way they want with @[IP] or @IP, it will work,
    hence, no matter how feedback loops are configured, you are set and
    can receive their message to domain names, and any IP format, thereby
    not missing important information perhaps viable to your operations!
    You should get a response/test result of
    '250 Accepted' for abuse, postmaster and literals :)
    Hence, RFC/ESP compliance achieved, while preserving full safety as
    set by Exim/cPanel (incl mail flow, SpamAssassin, etc).

    #7 This will also preserve all cPanel Exim settings, which does not
    happen otherwise if you had edited the exim.conf manually. cPanel does
    overwrite manual settings on next Advanced Editor save action or when
    you update, etc. Again, above procedure takes care of that, no problem.

    #8 Enjoy a test drive of your fixed server/Exim:
    use Gmail to send to postmaster@IP (Gmail cannot do to @[IP])
    use RoundCube to send to postmaster@[IP] (RoundCube cannot do to @IP)
    it should work :)
    If you use some other mail program, you may get an error such as
    'An unknown error has occurred.'...'Error Number: 0x800CCC0B' which is
    re the program or the account not being able to handle literals.

    #2 WizardOfYonder, Jul 19, 2015
    Last edited by a moderator: Jul 19, 2015
  3. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Apr 11, 2011
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator

    Here's the section from Exim's documentation relevant to domain literals:

    If upon reviewing this documentation you determine that you'd like to enable domain literals with Exim, you can do so via the following steps:

    1. Browse to WHM >> Exim Configuration Manager >> Advanced Editor.

    2. Scroll down and click on the Add additional configuration setting button.

    3. Enter allow_domain_literals and set the value to true.

    4. Scroll down to the very bottom of the interface and clicking on the Save button.

    Additionally, a user-submitted workaround the previous post is available if you are attempting to pass online DNS/Mail analyzer tests. Keep in mind this user-submitted workaround is unsupported and untested by cPanel & WHM development.

    Thank you.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice