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.

postmaster, abuse and :fail:

Discussion in 'General Discussion' started by aegis, Dec 1, 2004.

  1. aegis

    aegis Well-Known Member

    Joined:
    Jul 6, 2003
    Messages:
    64
    Likes Received:
    0
    Trophy Points:
    6
    I want to use a default mail address of

    *: :fail: No such address

    ... in a domain's valias file. Easy enough to do but I still want to let through postmaster@domain.com and abuse@domain.com as per common practice. Some servers for instance will not allow mail through if there is no postmaster@... defined for a domain, Sourceforge being an example.

    What's the best way of making sure users have these two defined?

    Could I set a global rule in the /etc/alias file so that they'd go to me if the user didn't have them? Do I set them in every valias file? Or is this best done in exim.conf?
     
  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
    Actually, it's probably best done in /etc/aliases so that it is server wide (if you want to receive abuse@anydomain.com on your server. Most would probably do something like this (postmaster is usually already configured):

    Code:
    postmaster: root
    abuse: root
    Edit: Just tried that and it didn't work. I'll have a play and see what best solution I can come up with.
     
    #2 chirpy, Dec 2, 2004
    Last edited: Dec 2, 2004
  3. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    OK, the above doesn't work because the system aliases are checked after the virtual aliases :rolleyes:

    Here's a solution:

    1. Create a file called /etc/myaliases with:

    Code:
    postmaster: root
    abuse: root
    2. In the WHM > Exim Configuration Editor scroll down to the section "DIRECTORS CONFIGURATION" and in the first textbox of that section put:

    Code:
    mysystem_aliases:
      driver = redirect
      allow_defer
      allow_fail
      data = ${lookup{$local_part}lsearch{/etc/myaliases}}
      file_transport = address_file
      pipe_transport = address_pipe
      retry_use_local_part
    You'll then have a server-wide postmaster and abuse address that won't be interefered with by users having :fail: Default Addresses.
     
    destr0yr likes this.
  4. sleddog

    sleddog Active Member

    Joined:
    Jun 13, 2004
    Messages:
    44
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Labrador, Canada
    What happens if an account has configured postmaster & abuse virtual aliases (in addition to the system-wide ones)? A mail to postmaster (or abuse) gets delivered to two recipients?
     
  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
    No. This catches those emails before they hit /etc/valiases/ and delivers them only to the configured addresses in /etc/myaliases.
     
  6. Stefaans

    Stefaans Well-Known Member

    Joined:
    Mar 5, 2002
    Messages:
    451
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Vancouver, Canada
    Thanks for the very useful tip :)
     
  7. nisse

    nisse Well-Known Member

    Joined:
    Nov 11, 2003
    Messages:
    87
    Likes Received:
    0
    Trophy Points:
    6
    I use this:

    Code:
    postmaster_alias:
      driver = redirect
      domains = +local_domains
      condition  = ${if eq{$local_part}{postmaster}{1}{0}}
      data = root
     
    #7 nisse, Mar 11, 2005
    Last edited: Apr 7, 2005
  8. Stream

    Stream Well-Known Member

    Joined:
    Feb 7, 2004
    Messages:
    64
    Likes Received:
    0
    Trophy Points:
    6
    Thank you for a nice and useful tip - works very well. :)
     
  9. craigbrass

    craigbrass Active Member

    Joined:
    Nov 17, 2003
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
  10. nisse

    nisse Well-Known Member

    Joined:
    Nov 11, 2003
    Messages:
    87
    Likes Received:
    0
    Trophy Points:
    6
    postmaster@domain-name-here.com will go to the default email account by, erm, default.

    To redirect the abuse address, add this to your routers:

    Code:
    abuse_alias:
      driver = redirect
      domains = +local_domains
      condition  = ${if eq{$local_part}{abuse}{1}{0}}
      data = abuse@anonymousservers.org
     
  11. 10101

    10101 Well-Known Member

    Joined:
    Sep 4, 2003
    Messages:
    151
    Likes Received:
    0
    Trophy Points:
    16
    Hi,

    Im having the same problem with "Acceptance of postmaster address" and the fix above does not work, any other ideas?

    Ta,
     
  12. 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 method I posted works just fine.
     
  13. 10101

    10101 Well-Known Member

    Joined:
    Sep 4, 2003
    Messages:
    151
    Likes Received:
    0
    Trophy Points:
    16

    I get this in dnsstuff when i try it:

    ERROR: One or more of your mailservers does not accept mail to postmaster@my-servername.com. Mailservers are required (RFC822 6.3, RFC1123 5.2.7, and RFC2821 4.5.1) to accept mail to postmaster.
    my-servername.com's postmaster response: >>> RCPT TO postmaster@my-servername.com> <<< 550-test.dnsstuff.com (test.DNSreport.com) [69.2.200.182] is currently not 550-permitted to relay through this server. Perhaps you have not logged into 550-the pop/imap server in the last 30 minutes or do not have SMTP 550 Authentication turned on in your email client.
     
  14. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Well, using my method, if you have done it correctly and have roots email forwarded correctly should definitely work as I've implemented it successfully on hundreds of servers. Here's the response for our main domain in dnsreport.com:

    OK: All of your mailservers accept mail to postmaster@domain.com (as required by RFC822 6.3, RFC1123 5.2.7, and RFC2821 4.5.1).

    If yours isn't working, I can only guess that you've missed one of the steps somewhere. Feel free to PM me if you'd like me to take a peek for you.
     
  15. 10101

    10101 Well-Known Member

    Joined:
    Sep 4, 2003
    Messages:
    151
    Likes Received:
    0
    Trophy Points:
    16
    Ive followed the steps perfectly which makes it odd that isnt working. i have roots email to go to an email address in "Change System Mail Preferences", its not an email address used on that server mind.
     
  16. nisse

    nisse Well-Known Member

    Joined:
    Nov 11, 2003
    Messages:
    87
    Likes Received:
    0
    Trophy Points:
    6
  17. 10101

    10101 Well-Known Member

    Joined:
    Sep 4, 2003
    Messages:
    151
    Likes Received:
    0
    Trophy Points:
    16
    LOG: MAIN
    lowest numbered MX record points to local host: mydomain.com (while routing <postmaster@mydomain.com>)
    postmaster@mydomin.com cannot be resolved at this time:
    lowest numbered MX record points to local host


    :confused:
     
  18. nisse

    nisse Well-Known Member

    Joined:
    Nov 11, 2003
    Messages:
    87
    Likes Received:
    0
    Trophy Points:
    6
    That suggests that the MX record for mydomain is pointing to 127.0.0.1. Is it?
     
  19. nisse

    nisse Well-Known Member

    Joined:
    Nov 11, 2003
    Messages:
    87
    Likes Received:
    0
    Trophy Points:
    6
    Also, check whether mydomain.com is listed in /etc/localdomains.
     
  20. 10101

    10101 Well-Known Member

    Joined:
    Sep 4, 2003
    Messages:
    151
    Likes Received:
    0
    Trophy Points:
    16
    The mx record is pointiing to mydomain,com which is fine, its not being in local domains did not help... odd.
     

Share This Page