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!

Filtering "Mail delivery failed : returning message to sender" emails

Discussion in 'E-mail Discussion' started by monkey64, Jun 17, 2019.

  1. monkey64

    monkey64 Well-Known Member

    Joined:
    Nov 6, 2011
    Messages:
    99
    Likes Received:
    4
    Trophy Points:
    58
    cPanel Access Level:
    Root Administrator
    I am receiving lots of "Mail delivery failed : returning message to sender" emails which are being sent to "[email protected]". WHM currently forwards mail for root to my own email address. I'd rather not receive this emails so I thought I would set up filtering to stop them coming through to my mailbox.

    I set up a Global Email Filter as well as an Email Filter on my email account, neither of which had any effect. The Filter Trace Results section did apparently match the condition though:

    Code:
    The Filter has matched the following condition(s):
    
        $header_subject: contains Mail delivery failed : returning message to sender
    
    Return-path copied from sender
    Sender      = [email protected]
    Recipient   = [email protected]
    Testing Exim filter file "/etc/vfilters/server.com"
    
    Headers charset "UTF-8"
    Save message to: /dev/null 0660
    Filtering set up at least one significant delivery or other action.
    No other deliveries will occur.
    Then I tried creating an Exim Filter at /usr/local/cpanel/etc/exim/sysfilter/options/

    Code:
    # Mail delivery failed: returning message to sender
    if $header_subject: contains "Mail delivery failed: returning message to sender"
    then fail
    endif
    Code:
    # Warning: message 123456789 delayed 72 hours
    if $header_subject: contains "Warning: message" and $header_subject: contains "delayed"
    then fail
    endif
    I went to the Exim Configuration Manager, enabled the filter and restarted EXIM but that hasn't worked either because the emails still come through. Can anyone help?

    Thanks
     
  2. keat63

    keat63 Well-Known Member

    Joined:
    Nov 20, 2014
    Messages:
    1,291
    Likes Received:
    91
    Trophy Points:
    28
    cPanel Access Level:
    Root Administrator
    I dont get any of these.
    Are you saying if [email protected] sends an email, then the root user receives the bounce message ?
     
  3. monkey64

    monkey64 Well-Known Member

    Joined:
    Nov 6, 2011
    Messages:
    99
    Likes Received:
    4
    Trophy Points:
    58
    cPanel Access Level:
    Root Administrator
    Yes that is correct. Root is receiving the bounce message(s).
     
  4. keat63

    keat63 Well-Known Member

    Joined:
    Nov 20, 2014
    Messages:
    1,291
    Likes Received:
    91
    Trophy Points:
    28
    cPanel Access Level:
    Root Administrator
    In the cpanel for the domain in question, do you have anything configured in 'Default Address'
     
  5. monkey64

    monkey64 Well-Known Member

    Joined:
    Nov 6, 2011
    Messages:
    99
    Likes Received:
    4
    Trophy Points:
    58
    cPanel Access Level:
    Root Administrator
    It is set to: Discard the email while your server processes it by SMTP time with an error message. Failure Message (seen by sender)
     
  6. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,459
    Likes Received:
    503
    Trophy Points:
    263
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    I'd first be concerned why you're getting so many of these, they're indicative of a problem and resolving the underlying issue will resolve the symptom of receiving the bounce messages.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

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