Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Member
    Join Date
    Jun 2007
    Posts
    6

    Default Block Incoming Mail on a Server Level

    Exim is generating very large log files on a server which hosts about 60 domains belonging to one client, some of the domain names being very old and subject to large amount of spam. The device containing /var/log is reaching close to 100% usage just as the log files rotate. Less than 10 of the domains actually use mail, the rest being configured to :fail:.

    Some of the things I have either tried or have considered are:
    • removing valias file for a domain (still generates log entries)
    • alias the primary maillog file to another device (does not deal with the problem really)
    • remove MX from zone file (still resolves via A record)

    It would make more sense to simply (or not simply?) block the mail for these domains before they reach the MTA. While the server performs well even under the load, there seems to be no logical reason to subject it to the processing of mail which will never be delivered.

    Is there a way to block mail to defined domains on a server level so the connection would be rejected immediately?

  2. #2
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    Quote Originally Posted by webdr View Post
    Is there a way to block mail to defined domains on a server level so the connection would be rejected immediately?
    That's what :fail: will do. You'll still see the connection and rejection in the exim logs. One idea would be to point MX record to an A record that goes to 127.0.0.1 for those domains that you don't want to see any email for. You'll still probably get some coming through on the A record, but it should be less that if you simply remove the MX record.
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  3. #3
    Member
    Join Date
    Jun 2007
    Posts
    6

    Default

    Quote Originally Posted by chirpy View Post
    That's what :fail: will do. You'll still see the connection and rejection in the exim logs. One idea would be to point MX record to an A record that goes to 127.0.0.1 for those domains that you don't want to see any email for. You'll still probably get some coming through on the A record, but it should be less that if you simply remove the MX record.
    That looks like a promising solution. Am trying it out now and will post results. Thanks!

  4. #4
    Member
    Join Date
    Nov 2003
    Posts
    119

    Default

    maybe ASSP or ASSPx might help..

    Amount of spam i've been getting on my domain email accounts has plummeted since I started using that

  5. #5
    Member
    Join Date
    Jun 2007
    Posts
    6

    Default

    Mail is rejected with a server misconfiguration error. A single entry is made in the log (cannot deliver...) instead of multiple entries. This is an improvement and should reduce log file size and reduce server impact.

    While not a perfect solution, it is adequate. With any luck spammers will stop hitting these domains over time (not holding breath).

    Thanks again!

  6. #6
    Member serversphere's Avatar
    Join Date
    Jan 2004
    Posts
    658

    Default

    Quote Originally Posted by webdr View Post
    While not a perfect solution, it is adequate. With any luck spammers will stop hitting these domains over time (not holding breath).
    I have an address I used to sign up for a mailing list back in 1996 that still gets email. I stopped using it looong ago. I don't think they EVER give up...
    Darren Benfer | SS-Darren | AIM: serversphere
    www.serversphere.com
    Dedicated Server Solutions Have Come Full Circle

  7. #7
    Member
    Join Date
    Sep 2007
    Posts
    11

    Default Re: miail issues

    Hello,

    Your story sounds horrible. I think that you already know that the cPanel team has begun to use a new "strategy" in the mail service configuration - access list. You could use the "rcpt" check access list in order to create custom rules for your needs. You could create your own policy and the "bad" e-mail messages will be discarded very fast. However they will reach the SMTP service and they will be discarded after that. So they will reach the application (layer 7).

    I am afraid that the only possibility to prevent the attack is to use layer 7 based firewall on the local machine, to use a spam filtering device before your server or 3rd party smtp machine.

    Otherwise you will have to configure your machine properly.

    Best Regards
    Kevin K
    cpanelblog.hostsol.eu

Similar Threads & Tags
Similar threads

  1. Customize Sub-domain of Outgoing/Incoming Mail Server for Mail Client Settings
    By URPad in forum Feature Requests for cPanel/WHM
    Replies: 6
    Last Post: 09-07-2010, 09:36 PM
  2. Replies: 3
    Last Post: 08-07-2010, 01:45 AM
  3. Replies: 4
    Last Post: 09-03-2009, 03:46 PM
  4. Wrong incoming mail server
    By testlog_4u in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 03-15-2009, 05:15 PM
  5. how to block incoming mail senders?
    By ricardom in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 04-07-2004, 07:55 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube