Skip to main content

Block receive from sender no-reply@mydomain.tld

Comments

13 comments

  • kodeslogic
    You wish to block it for a specific cPanel account or for all accounts hosted on the server?
    0
  • Michaelit
    I would love the second but for all domains - not only cPanel accounts on the server. Can i do that?
    0
  • kodeslogic
    For the server-wide, you can filter incoming emails by domain - Log in to WHM as the root user and navigate to the "Email" section. - Select the "Filter Incoming Emails by Domain" option. By using this interface, you can block emails from a particular domain. If you specify the domain in this interface, then your server rejects email messages when the "From" address matches a blocked domain. This feature is useful to block all email messages from a domain that sends only spam. You can block a domain by performing the below steps: - To block a domain, you can add its detail in the "Blocked Domains" text box. For blocking multiple domains, you can use a new line for each domain. - Click "Save". To block emails from a specific email address for the particular cPanel account: - Log in to cPanel - Under the section Mail, click on Account-Level Filtering - Under Create Filter, click on Create a new filter - Enter the following information:
    • Filter Name: any name you wish to use
    • Under Rules: From - equals - EMAIL (EMAIL should be the address you wish to block)
    • Actions: Discard Message
    - Click on Create
    0
  • Michaelit
    Thank you for the reply @kodeslogic. I could follow the second option however there are a huge number of emails on the server. The first option block domains. What i need is to block from no-reply@test1.com to info@test1.com, from no-reply@test2.com to info@test2.com and so on. What i would like is something like $domains = [test1.com, test2.com, test3.com,...test100.com]; //These are all the available domains (addons included) on the server foreach ($domais as $domain) { if ($from == no-reply@$domain AND $to == info@$domain) then REJECT; }
    0
  • cPRex Jurassic Moderator
    It sounds like you are trying to stop spoofed message, where the from address is faked. There unfortunately isn't a 100% reliable way to stop that behavior, although we do have a guide that will help prevent them:
    0
  • Michaelit
    Thank you @cPRex! Exactly, the last months users (info@server'sdomain.com) receive messages from (no-reply@server'sdomain.com) where no-reply senders claim that the disk quota is almost full and click to the link to change that. As i have seen these messages are generated through PHP Script mail function. I attach a relative image. I have enabled from the very first time the DKIM/SPF globally option however i am a little bit hesitant to enable Allow DKIM verification for incoming messages and reject DKIM failures in a matter of server's performance and general reliability. What's your opinion about these two options?
    0
  • cPRex Jurassic Moderator
    Those two options will definitely make the server authentication for incoming mail more strict, and would certainly cut down on spoofing. It's possible that it could affect legitimate messages, but nearly every mail server and admin has setup DKIM records by this point in time in order to send messages to any of the major mail providers.
    0
  • Michaelit
    So a legitimate income message that don't have a DKIM record will be rejected by my exim installation if i "enable Allow DKIM verification" and "reject DKIM failures" option. Right?
    0
  • cPRex Jurassic Moderator
    That's correct. But, anyone that doesn't have DKIM at this point also isn't likely getting good delivery results to Gmail, Outlook, or Yahoo either.
    0
  • Michaelit
    I am mainly thinking of the other cases except of Gmail, Outlook and yahoo.
    0
  • cPRex Jurassic Moderator
    I guess my point was more that most mailservers would have that set up by now anyway. You could always try it and see if you get reports of missing things.
    0
  • Michaelit
    i did follow your instructions and enabled these two options: - Allow DKIM verification for incoming messages and - Reject DKIM Failures under Exim configuration. Can you please help me which log files have under consideration?
    0
  • cPRex Jurassic Moderator
    The only log that would be showing any mail details is /var/log/exim_mainlog.
    0

Please sign in to leave a comment.