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.

Send some email to blackhole depending on email domain name

Discussion in 'E-mail Discussions' started by LeGastronome, Jun 1, 2017.

  1. LeGastronome

    LeGastronome Active Member

    Joined:
    Oct 21, 2010
    Messages:
    36
    Likes Received:
    1
    Trophy Points:
    58
    Hello,

    We have some trashing email sent from a CMS @trash.com example, to be sent to the end client.

    We would like to avoid all exim Mail delivery failed messages, we know that these domains won't reply.

    We try to set up a fail rule under exim config file SSH or a rule under Cpanel filter using "to" and containing domain name... but we keep receiving "Mail delivery failed: returning message to sender" alert email every day....

    if someone could help ?

    Thank you
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,287
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Could you let us know the specific filter rule that you added via cPanel? Also, what have you configured for this domain name under the "Default Address" option in cPanel?

    Thank you.
     
  3. LeGastronome

    LeGastronome Active Member

    Joined:
    Oct 21, 2010
    Messages:
    36
    Likes Received:
    1
    Trophy Points:
    58
    Hi :

    default address "Forward to Email Address" is our gmail.com email

    Filter is :

    Rules "To" "contains" "@domain@ Action "Discard"
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,287
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Could you let us know the output from /var/log/exim_mainlog for one of the affected messages? EX:

    Code:
    exigrep user@example.tld /var/log/exim_mainlog
    Replace "user@example.tld" with one of the affected email addresses. Ensure to remove any real domain names from the output.

    Thank you.
     
  5. LeGastronome

    LeGastronome Active Member

    Joined:
    Oct 21, 2010
    Messages:
    36
    Likes Received:
    1
    Trophy Points:
    58
    Code:
    +++ 1dGpZf-0000aG-FC has not completed +++
    2017-06-02 18:37:19 1dGpZf-0000aG-FC <= Contact@mydomain.com U=legastro P=local S=14799 id=20170602163719.1153.763411037.swift@www.mydomain.com T="[mydomain.com] Livr\351" for c.9a99148694314eeb8e241dda54c02500@domaintoblacklist.com
    2017-06-02 18:37:19 1dGpZf-0000aG-FC SMTP connection outbound 1496421439 1dGpZf-0000aG-FC mydomain.com c.9a99148694314eeb8e241dda54c02500@domaintoblacklist.com
    2017-06-02 18:37:19 1dGpZf-0000aG-FC H=mail1.domaintoblacklist.com [***.***.***.***]: SMTP error from remote mail server after RCPT TO:<c.9a99148694314eeb8e241dda54c02500@domaintoblacklist.com>: 450 4.7.1 <godzilla.****.co.uk>: Helo command rejected: Host not found
    2017-06-02 18:37:19 1dGpZf-0000aG-FC == c.9a99148694314eeb8e241dda54c02500@domaintoblacklist.com R=dkim_lookuphost T=dkim_remote_smtp defer (-44) H=mail1.domaintoblacklist.com [***.***.***.***]: SMTP error from remote mail server after RCPT TO:<c.9a99148694314eeb8e241dda54c02500@domaintoblacklist.com>: 450 4.7.1 <godzilla.****.co.uk>: Helo command rejected: Host not found
    2017-06-03 02:48:38 1dGpZf-0000aG-FC H=mail1.domaintoblacklist.com [***.***.***.***]: SMTP error from remote mail server after RCPT TO:<c.9a99148694314eeb8e241dda54c02500@domaintoblacklist.com>: 450 4.7.1 <godzilla.****.co.uk>: Helo command rejected: Host not found
    2017-06-03 02:48:38 1dGpZf-0000aG-FC == c.9a99148694314eeb8e241dda54c02500@domaintoblacklist.com R=dkim_lookuphost T=dkim_remote_smtp defer (-44) H=mail1.domaintoblacklist.com [***.***.***.***]: SMTP error from remote mail server after RCPT TO:<c.9a99148694314eeb8e241dda54c02500@domaintoblacklist.com>: 450 4.7.1 <godzilla.****.co.uk>: Helo command rejected: Host not found
    
    
    
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,287
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    This suggests a rejection at SMTP time as opposed to a bounce. Are you receiving an actual bounced message, or do you simply notice an error in your email client?

    Thank you.
     
  7. LeGastronome

    LeGastronome Active Member

    Joined:
    Oct 21, 2010
    Messages:
    36
    Likes Received:
    1
    Trophy Points:
    58
    Hi,

    I notice notice in email client (too many, that's we want to stop)
     
  8. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    15,618
    Likes Received:
    296
    Trophy Points:
    433
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    What are your settings under, cPanel > Mail > Default Address?
     
  9. LeGastronome

    LeGastronome Active Member

    Joined:
    Oct 21, 2010
    Messages:
    36
    Likes Received:
    1
    Trophy Points:
    58
    Forwarded to our maintenance email adress
     
  10. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    15,618
    Likes Received:
    296
    Trophy Points:
    433
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
  11. LeGastronome

    LeGastronome Active Member

    Joined:
    Oct 21, 2010
    Messages:
    36
    Likes Received:
    1
    Trophy Points:
    58
    ok but, what if we want to receive email sent to a undefined alias ? this will go to :fail: ?

    in our case we want to block outgoing email to avoid receiving bounce msg from server not redirecting incoming emails
     
  12. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    15,618
    Likes Received:
    296
    Trophy Points:
    433
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    My apologies, not enough coffee yet this morning to understand that comment.
     
  13. LeGastronome

    LeGastronome Active Member

    Joined:
    Oct 21, 2010
    Messages:
    36
    Likes Received:
    1
    Trophy Points:
    58
    default email address is the catch all process, to catch emails : This interface allows you to set up a default address (catch-all address) that receives any mail for an invalid email address for the domain. You can also define how the default address handles incoming messages.
    Default Address - Documentation - cPanel Documentation

    if someone send email to : toto@domain.com, this email is routed to our maintenance address, nothing wrong here

    in our case we send emails to a dummy address @dummydomain.com , and we don't want exim to proceed with this particular email, it's a kind of outgoing filter ?
     
  14. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    15,618
    Likes Received:
    296
    Trophy Points:
    433
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    If someone sends an email to infopro @ yourdomain.com for example, you'll get that too though.

    Can you expand on this part a bit more?
     
  15. LeGastronome

    LeGastronome Active Member

    Joined:
    Oct 21, 2010
    Messages:
    36
    Likes Received:
    1
    Trophy Points:
    58
    we have some email of the kind : donotreply@domaintrash.com (not our domain)

    we know that the domain : domaintrash.com is just here to send a (php script) message to nowhere sometime, so if exim try to send the email customer@domaintrash.com we will receive the bounce.. and it's annoying.

    so we would like to say to exim, if someone (php script for instance) try to send email to @domaintrash.com, don't do and don't notice
     
  16. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    15,618
    Likes Received:
    296
    Trophy Points:
    433
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    You have an account on your server[?] that has a php script that sends email using a non existent email address to a non existent email address. And those emails bounce and come back to that cPanel account's default address, which you forward to a real email address.

    Is that it?
     
  17. LeGastronome

    LeGastronome Active Member

    Joined:
    Oct 21, 2010
    Messages:
    36
    Likes Received:
    1
    Trophy Points:
    58
    it's an existent email address that send to an non existent email address, and yes these emails bounce back to our sender address
     
  18. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    15,618
    Likes Received:
    296
    Trophy Points:
    433
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Ok dumb question then, why is it sending emails at all?
     
  19. LeGastronome

    LeGastronome Active Member

    Joined:
    Oct 21, 2010
    Messages:
    36
    Likes Received:
    1
    Trophy Points:
    58
    :) ah ah

    it's an automated script, we can filter directly into the php files, but as we are braves we would like to challenge exim filters... but with no success...
     
  20. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    15,618
    Likes Received:
    296
    Trophy Points:
    433
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Spam script?
     
Loading...

Share This Page