<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>kservik.com &#187; Cpanel</title>
	<atom:link href="http://kservik.com/tags/how-to/cpanel/feed/" rel="self" type="application/rss+xml" />
	<link>http://kservik.com</link>
	<description>Unplugged</description>
	<lastBuildDate>Fri, 05 Mar 2010 14:30:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>How to prevent Spamming on a Cpanel server</title>
		<link>http://kservik.com/how-to-prevent-spamming-on-a-cpanel-server/</link>
		<comments>http://kservik.com/how-to-prevent-spamming-on-a-cpanel-server/#comments</comments>
		<pubDate>Mon, 11 Jan 2010 06:51:20 +0000</pubDate>
		<dc:creator>kservik</dc:creator>
				<category><![CDATA[Cpanel]]></category>

		<guid isPermaLink="false">http://kservik.com/?p=70</guid>
		<description><![CDATA[cPanel servers have a good small file named as antivirus.exim. It is a central filter for the exim mail server which lets you setup all kinds of good filters which helps you to stop spam from coming in and going &#8230; <a href="http://kservik.com/how-to-prevent-spamming-on-a-cpanel-server/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>cPanel servers have a good small file named as <strong>antivirus.exim</strong>. It is a central filter for the exim mail server which lets you setup all kinds of good filters which helps you to stop spam from coming in and going out of your server.<span id="more-70"></span></p>
<p>In this article I will provide you my /etc/antivirus.exim config file which will help you to protect your servers from spammers. First off the default /etc/antivirus.exim has a couple different rule sets in it. The main ones are attachment filters to help stop email viruses from your users. They stop things like .src and .com and .exe attachments.This shows you some custom rules to stop spammers from sending out of your server, you can also use it to stop spam from coming in. I donâ€™t really go into a lot of detail for filtering incoming mail since other applications like Spam Assassin handle that better IMO.</p>
<p>You will need root access to your cPanel server.</p>
<p>First off we need to create a special log file for these filters do this:</p>
<p>touch /var/log/filter.log chmod 0644 /var/log/filter.log</p>
<p>Now open up the configuration file vi /etc/antivirus.exim</p>
<p>Simply add this to your existing file, and save the changes and they take effect instantly.</p>
<p># START # Filters all incoming an outgoing mail</p>
<p>logfile /var/log/filter.log 0644 ## Common Spam if</p>
<p># Header Spam $header_subject: contains â€œPharmaceuticalâ€ or $header_subject: contains â€œViagraâ€ or $header_subject: contains â€œCialisâ€ or $header_subject: is â€œThe Ultimate Online Pharmaceuticalâ€ or $header_subject: contains â€œ***SPAM***â€ or $header_subject: contains â€œ[SPAM]â€</p>
<p># Body Spam or $message_body: contains â€œCialisâ€ or $message_body: contains â€œViagraâ€ or $message_body: contains â€œLeavitraâ€ or $message_body: contains â€œSt0ckâ€ or $message_body: contains â€œViaagrraâ€ or $message_body: contains â€œCia1iisâ€ or $message_body: contains â€œURGENT BUSINESS PROPOSALâ€ or $message_body matches â€œangka[^s]+[net|com|org|biz|info|us|name]+?â€ or $message_body matches â€œv(i|1)agra|vag(i|1)n(a|4)|pen( i|1)s|asu|seks|l(o|0)l(i|1)ta|dewacolokâ€</p>
<p>then # Log Message â€“ SENDS RESPONSE BACK TO SENDER # SUGGESTED TO LEAVE OFF to prevent fail loops # and more work for the mail system #fail text â€œMessage has been rejected because it hasn # triggered our central filter.â€ logwrite â€œ$tod_log $message_id from $sender_address contained spam keywordsâ€</p>
<p>seen finish endif</p>
<p># END # Filters all incoming an outgoing mail</p>
<p># START # All outgoing mail on the server only â€“ what is sent out</p>
<p>#Check forwarders so it doesnâ€™t get blocked #Forwarders still work =)</p>
<p>## FINANCIAL FAKE SENDERS ## Log all outgoing mail from server that matches rules logfile /var/log/filter.log 0644 if ( $received_protocol is â€œlocalâ€ or $received_protocol is â€œesmtpaâ€ ) and ( $header_from contains â€œ@citibank.comâ€ or $header_from contains â€œ@bankofamerica.comâ€ or $header_from contains â€œ@wamu.comâ€ or $header_from contains â€œ@ebay.comâ€ or $header_from contains â€œ@chase.comâ€ or $header_from contains â€œ@paypal.comâ€ or $header_from contains â€œ@wellsfargo.comâ€ or $header_from contains â€œ@bankunited.comâ€ or $header_from contains â€œ@bankerstrust.comâ€ or $header_from contains â€œ@bankfirst.comâ€ or $header_from contains â€œ@capitalone.comâ€ or $header_from contains â€œ@citizensbank.comâ€ or $header_from contains â€œ@jpmorgan.comâ€ or $header_from contains â€œ@wachovia.comâ€ or $header_from contains â€œ@bankone.comâ€ or $header_from contains â€œ@suntrust.comâ€ or $header_from contains â€œ@amazon.comâ€ or $header_from contains â€œ@banksecurity.comâ€ or $header_from contains â€œ@visa.comâ€ or $header_from contains â€œ@mastercard.comâ€ or $header_from contains â€œ@mbna.comâ€ ) then logwrite â€œ$tod_log $message_id from $sender_address is fraudâ€ seen finish endif</p>
<p>## OTHER FAKE SENDERS SPAM ## Enable this to prevent users using @domain from addresses ## Not recommended since users do use from addresses not on the server ## Log all outgoing mail from server that matches rules logfile /var/log/filter.log 0644 if ( $received_protocol is â€œlocalâ€ or $received_protocol is â€œesmtpaâ€ ) and ( $header_from contains â€œ@hotmail.comâ€ or $header_from contains â€œ@yahoo.comâ€ or $header_from contains â€œ@aol.comâ€</p>
<p>) then logwrite â€œ$tod_log $message_id from $sender_address is forged fakeâ€ seen finish endif</p>
<p>## KNOWN FAKE PHISHING ### Log all outgoing mail from server that matches rules logfile /var/log/filter.log 0644 if ( $received_protocol is â€œlocalâ€ or $received_protocol is â€œesmtpaâ€ ) and ( #Paypal $message_body: contains â€œDear valued PayPal memberâ€ or $message_body: contains â€œDear valued PayPal customerâ€ or $message_body: contains â€œDear Paypalâ€ or $message_body: contains â€œThe PayPal Teamâ€ or $message_body: contains â€œDear Paypal Customerâ€ or $message_body: contains â€œPaypal Account Review Departmentâ€ or</p>
<p>#Ebay $message_body: contains â€œDear eBay memberâ€ or $message_body: contains â€œDear eBay Userâ€ or $message_body: contains â€œThe eBay teamâ€ or $message_body: contains â€œDear eBay Community Memberâ€ or</p>
<p>#Banks $message_body: contains â€œDear Charter One Customerâ€ or $message_body: contains â€œDear wamu.com customerâ€ or $message_body: contains â€œDear valued Citizens Bank memberâ€ or $message_body: contains â€œDear Visaâ€ or $message_body: contains â€œDear Citibankâ€ or $message_body: contains â€œCitibank Emailâ€ or $message_body: contains â€œDear customer of Chase Bankâ€ or $message_body: contains â€œDear Bank of America customerâ€ or</p>
<p>#ISPs $message_body: contains â€œDear AOL Memberâ€ or $message_body: contains â€œDear AOL Customerâ€</p>
<p>) then logwrite â€œ$tod_log $message_id from $sender_address is phishingâ€ seen finish endif</p>
<p># END # All outgoing mail on the server only â€“ what is sent out</p>
<p>The log file will have the logging format like this: /var/log/filter.log</p>
<p>2006-05-10 12:05:13 1Fds7S-0002Sa-MV from smooth595@gmail.com contained spam keywords 2006-05-10 14:18:47 1FduCn-0006GV-1r from dayton.nowellu7xn@gmail.com contained spam keywords 2006-04-27 15:44:35 1FZDLn-0005Mo-5z from nobody@ocean.wavepointmedia.com is fraud 2006-04-27 16:37:40 1FZEB9-0002KQ-VP from nobody@ocean.wavepointmedia.com is phishing</p>
<p>Date and time, the Exim message ID, the sender and the section of the filter, like phishing, fraud or spam. You can check the mail message by grepping the exim_mainlog for it like this</p>
<p>grep 1FZEB9-0002KQ-VP /var/log/exim_mainlog</p>
<p>Note: This article came from hostentrepreneur.com. The domain there seemed to have expired and I got this from Google Cache.</p>
]]></content:encoded>
			<wfw:commentRss>http://kservik.com/how-to-prevent-spamming-on-a-cpanel-server/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
