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!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Block outgoing mail with From address that doesn't exist

Discussion in 'E-mail Discussions' started by wintech2003, Feb 8, 2018.

  1. wintech2003

    wintech2003 Active Member
    PartnerNOC

    Joined:
    Sep 15, 2010
    Messages:
    26
    Likes Received:
    1
    Trophy Points:
    53
    Location:
    Greece
    cPanel Access Level:
    DataCenter Provider
    Hello,

    I would like to block outgoing email from users who authenticate with a valid username/password, but use a non-existent "From" address to send their emails.
    I've read about the "Experimental: Rewrite From: header to match actual sender" option, but from what I can tell this will only show an informational message in the exim logs - it will not actually block the outgoing email.

    Think of a mail client configured with proper credentials for the incoming/outgoing mailserver (ie. info@domain.com) but with a "From" address that does not exist (ie first.lastname@domain.com)
    With the default configuration, the email will go through and will get delivered to the destination email address (the receiver will of course not be able to reply, since replying to first.lastname@domain.com will go nowhere).
    Is there any option to block this email from even getting send? Can exim check that the From address does not exist on the server and block the email from getting sent?

    Thanks in advance,
    George
     
  2. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,672
    Likes Received:
    73
    Trophy Points:
    28
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hi,

    Try setting up the option that says sender verification callout, check whether that also checks for mails that are send out..
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    41,484
    Likes Received:
    1,612
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    You could try using the option referenced in the previous post. It's found under the "Mail" tab in "WHM >> Exim Configuration Manager >> Basic Editor":

    Sender Verification Callouts

    Per it's description:

    Use callouts to verify the existence of email senders. Exim will connect to the mail exchanger for a given address to verify it exists before accepting mail from it.

    Also, note the "EXPERIMENTAL: Rewrite From: header to match actual sender" does more than just add information to the Exim logs. While it won't block the message, it actually rewrites the from address to match the actual email user used to authenticate.

    Thank you.
     
Loading...

Share This Page