Security – How to prevent Linux server from spamming

email-serverSecurityspamspam-filter

I installed mail scanner for spam protection, but is there any script for Linux to notify me or email me that some one spaming on my server ?

Best Answer

I am assuming you are talking about your "customers" who are authenticated users sending outgoing mail via SMTP.

There are number of steps to take which would make large scale spamming difficult.

Such as;

  1. Rate limit outgoing mail per-user, to prevent large mail shots of UCE
  2. generate weekly reports of outgoing smtp mail per-user, so you can see who is bulk sending
  3. Require users to use correctly formatted RFC headers, which can block simplistic spamming
  4. use spamassassin and MIMEdefang to alert on very "spammy" outgoing messages

The above steps are dependent on what platform and what MTA you are using. I use logwatch to monitor the /var/log/maillog, but tools like munin, and collectd, or nagios can be configured to execute custom scripts to monitor per-user.

You can sign up for RBL monitoring services, which will give you a retrospective view of whether the server is being used to originate UCE, or other abuse mail;

http://mxtoolbox.com/services_servermonitoring2.aspx

http://blacklist-monitor.simplycast.com/Multi-Channel/blm/blacklist-smtp-check.html