The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Email - Domain Literals

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

  1. RBogan

    RBogan Registered

    Joined:
    Jan 30, 2004
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Houston, TX
    Can anyone suggest a way of clearing up this annoying issue when running my domains through tests at dnsreport.com?

    WARN: One or more of your mailservers does not accept mail in the domain literal format (user@[0.0.0.0]). 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.

    mail.generic.net'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@[111.111.111.111]", 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 say...my 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.

    Thanks,
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    It took a bit of work, but I finally found this out:

    The example in exim.conf is wrong (possibly from exim3?). You actually should use the command:

    allow_domain_literals

    You also need to list your IP addresses within:
    /etc/localdomains

    as (including square brackets):
    [11.22.33.44]

    Then restart:
    /etc/rc.d/init.d/exim restart

    I did this on a cPanel server and it then passed the domain literals test on dnsreport.com (and worked!).
     
  3. RBogan

    RBogan Registered

    Joined:
    Jan 30, 2004
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Houston, TX
    After applying the steps outlined in your post, the problem is solved and the domains now accept literal email.

    Thanks so much for posting this solution!
     
  4. goodmove

    goodmove Well-Known Member

    Joined:
    May 12, 2003
    Messages:
    624
    Likes Received:
    0
    Trophy Points:
    16
    Are there any security implications of opening up the IPs to external mail tests?

    What are the advantages of allowing domain literals?
     
  5. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    The advantages are that it makes your MTA RFC compliant. The main point of domain literals is a "last port of call" when routing or other problems mean that using domain literals is the only way of contacting the postmaster on a server.

    For example, if SpamCop cannot find a contact for the IP address of the server, it will attempt to email postmaster@[11.22.33.44].

    The main problem with domain literals is that the MTA can have trouble delivering email to the correct mailbox. Exim relies on the username + domain name for email delivery and is why the valiases work for accounts of the same name (e.g. bob@domain1.com and bob@domain2.com can both be POP3 accounts without actual aliases being involved). The problem exim would have is if it receives an email for bob@[11.22.33.44], who should it deliver to?

    I'm not aware of any security implications beyond someone receiving an email that should be for someone else for the reasons I mention above. I'd be happy to be corrected, but that's my understanding after reading up on this.
     
  6. kliest

    kliest Member

    Joined:
    Feb 23, 2004
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    I have a weird problem. I just setup a new server, and it seems that the ip that is used as the mainserver ip is blacklisted on the dsbl.org. They only want to remove me from their blacklist if I can receive messages send to postmaster@[ip] or abuse@[ip]

    I edited etc/exim.conf and added the following command:

    allow_domain_literals

    Then I edited the etc/localdomains and put the server IP there [ip] (including the square brackets)

    Then I restarted exim and everything it said that everything was okay. But when I email myself to postmaster@[ip] I receive the message back. Mail delivery error.

    I don't know what I am doing wrong. Does anybody have any suggestions. I have set all the system mail preferences to send it to my email account. But it doesn't want to receive the messages send to postmaster@[ip].

    Any help is really appreciated.

    Thanks,
    Edwin
     
  7. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    What is the full bounce message? Is it saying no such user? If so, you will also need an alias for postmaster to forward to, e.g. root.

    The full error bounce would help.
     
  8. mickalo

    mickalo Well-Known Member

    Joined:
    Apr 16, 2002
    Messages:
    765
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    N.W. Iowa
    Clarify

    Just curious, after reading this thread as it seems a bit old. We are running the most recent version of exim, and in the exim.conf is the following:
    Code:
    # If you want to accept mail addressed to your host's literal IP address, for
    # example, mail addressed to "user@[111.111.111.111]", then uncomment the
    # following line, or supply the literal domain(s) as part of "local_domains"
    # above.
    
    # local_domains_include_host_literals
    
    Would this be the same as the
    allow_domain_literals or is this something different and does the server IP address still need to be added to the localdomains file ??

    TIA
    Mickalo
     
  9. kliest

    kliest Member

    Joined:
    Feb 23, 2004
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Oh oops :eek: . I was just looking at the bounce error, and saw that I made a little typo in the IP adress. After fixing it, it is working.

    Editing the exim.conf, localdomains and sending it to the correct IP did the trick :(

    Thanks for your fast reply :)
     
  10. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Good news :)
     
  11. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Hi Mickalo,
    The exim.conf file is wrong. I believe that the comments refer to how domain literals worked in v3 of Exim. They changed the directives for Exim v4 and the directions in my post above are correct for the latest release that cPanel uses.
     
  12. mickalo

    mickalo Well-Known Member

    Joined:
    Apr 16, 2002
    Messages:
    765
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    N.W. Iowa
    Ok, thanks :)

    where about would one add the allow_domain_literals directive and do you only add the server IP address or each domain IP address ??

    Thx's
    Mickalo
     
  13. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Pop it in at the same place where the old comments are in exim.conf.

    I guess you would need to list all the IP addresses for the server since exim does listen on each (as it would need to since the MX records for the domains will resolve to the IP address for the domain).
     
  14. mickalo

    mickalo Well-Known Member

    Joined:
    Apr 16, 2002
    Messages:
    765
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    N.W. Iowa
    thx's :)
     
  15. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Alberta, Canada
    cPanel Access Level:
    Root Administrator
    Thanks for sharing, Jonathan.

    Although most Servers will works just fine without Domain Literals, this is one of those 'niggly' things that, if one wants to go all the way to compliance, your information allows them to do that.
     
  16. Jeff-C

    Jeff-C Well-Known Member

    Joined:
    Mar 16, 2004
    Messages:
    117
    Likes Received:
    0
    Trophy Points:
    16
    Thanks very much Jonathan for the solution.
     
  17. kryptcon

    kryptcon Registered

    Joined:
    Jun 24, 2003
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Huntsville, AL
    Error when sending to postmaster@[ip]

    Hey everyone. I tried following the instructions here.

    Added allow_domain_literals to the exim.conf file.
    Added [64.246.22.71] to the /etc/localdomains file.
    Restarted exim.

    Oh, and aliases points postmaster--> root.

    Now, when sending messages, I immediately get back:
    ----------------------------------
    This message was created automatically by mail delivery software.

    A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed:

    postmaster@64.246.22.71
    unrouteable mail domain "64.246.22.71"
    -----------------------------------
    Any ideas?

    Thanks in advance,
    Derek
     
  18. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    When you email to domain literals you must use square brackets around the IP address, i.e.:

    postmaster@[64.246.22.71]
     
  19. kryptcon

    kryptcon Registered

    Joined:
    Jun 24, 2003
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Huntsville, AL
    For some reason, when I try that in Outlook, it tells me "Microsoft Office Outlook does not recognize that name." and gives me no options to send anyways... :(

    However, tried it through yahoo! and it worked. Yet another Microsoft problem... Never fails.

    Thanks for the help.

    Derek
     
  20. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Definitely another non-RFC compliant feature of Outlook :rolleyes: Glad it got you working throuigh Yahoo! :)
     
Loading...

Share This Page