<?xml version="1.0" encoding="UTF-8"?>

<rss version="2.0"
 xmlns:blogChannel="http://backend.userland.com/blogChannelModule"
>

<channel>
<title>Parallels knowledgebase (KB)</title>
<link>http://kb.parallels.com/</link>
<description>Parallels knowledgebase (KB)</description>
<language>en</language>
<copyright>Copyright 2008 Parallels</copyright>
<pubDate>Wed, 10 Sep 2008 00:00:00 +0600</pubDate>
<lastBuildDate>Wed, 10 Sep 2008 00:00:00 +0600</lastBuildDate>
<webMaster>rt-team@parallels.com</webMaster>

<item>
<title><![CDATA[The server is saturated with SPAM. There are many messages in the queue. The mail is sent slowly.]]></title>
<link>http://kb.parallels.com/en/766</link>
<description><![CDATA[<div id="article">
	




	<div id="kb" class="kb">
		<div class="article-container">
			<h2 class="title">The server is saturated with SPAM. There are many messages in the queue. The mail is sent slowly.</h2>
			<div class="ab-frame"><div class="bl"><div class="br"><div class="tl"><div class="tr"><!-- frame -->
				<div class="articleProperty">
					<div>Article ID: 766&nbsp;</div>
					<div>Last Review: Mar,16 2009</div>
					<tr>
						<td>Author: </td>
						<td>Daria Taranova</td>
					</tr>
					<br/>
					<tr>
						<td>Last updated by: </td>
						<td>Daria Taranova</td>
					</tr>
					<strong>APPLIES TO:</strong>
					<div class="articleApplies">
						<ul>
							<li>Plesk 7.5.x Reloaded</li>
							<li>Plesk 9.x for Linux/Unix</li>
							<li>Plesk 8.x for Linux/Unix</li>
						</ul>
					</div>
				</div><!-- articleProperty -->
			</div></div></div></div></div><!-- frame -->

			<div class="article-internal-flag"></div>

			<div id="article-content">
				<div class="article-part">
					<h2>Resolution</h2>
					First check that all domains have the option 'Mail to non-existing user' set to 'reject' but not to 'forward'. You can change this setting to all domains using &quot;Group Operations&quot; in the &quot;Domains&quot; tab in Parallels Plesk Control Panel. The option &quot;Reject mail to nonexistent user&quot; is available since Parallels Plesk Panel 7.5.3. <br /><br /> Also, please, check that all the IPs and networks in the white lists are reliable and familiar to you. <br /><br /> Check how many messages are in the queue with Qmail: <br /><br /><div class="commandline"><code><code># /var/qmail/bin/qmail-qstat<br />messages in queue: 27645<br />messages in queue but not yet preprocessed: 82</code></code></div><br /><code><br /></code>If the queue has too many messages, try to discover the source of SPAM. <br /><br />If mail is being sent by an authorized user but not from the PHP script, you can run the command below to find the user that has sent the most messages (available since Plesk 8.x). Note that you must have the 'SMTP authorization' activated on the server to see these records:<br /><br /><code># cat /usr/local/psa/var/log/maillog |grep -I smtp_auth |grep -I user |awk '{print $11}' |sort |uniq -c |sort -n</code></code></div><br /><code><br /></code>The path to 'maillog' may differ depending on the OS you are using. <br /><br />The next step is to use is &quot;qmail-qread&quot;, which can be used to read the message headers:<br /><br /><div class="commandline"><code><code># /var/qmail/bin/qmail-qread<br />18 Jul 2005 15:03:07 GMT  #2996948  9073  &lt;user@domain.com&gt;  bouncing<br />  done  remote  user1@domain1.com<br />  done  remote  user2@domain2.com<br />  done  remote  user3@domain3.com</code><br /><code>....</code></code></div><br /><code><br /></code>This shows the senders and recipients of messages. If the message contains too many recipients, probably this is spam. Now try to find this message in the queue by its ID ( # 2996948 in our example):<code><br /></code><br /><div class="commandline"><code><code># find /var/qmail/queue/mess/ -name 2996948</code></code></div><br /><code><br /></code>Examine the message and find the line &quot;Received&quot; to find out from where it was sent for the first time, for example, if you find:  <code><br /></code><br /><span style="font-family: courier new,courier; font-size: 12px;">Received: (qmail 19514 invoked by uid 10003); 13 Sep 2005 17:48:22 +0700</span><br /><br /> it means that this message was sent via a CGI by user with UID 10003. Using this UID it is possible to find the domain:  <br /><br /><div class="commandline"><code><code># grep 10003 /etc/passwd</code></code></div><br /><code><br /></code>If the 'Received' line contains a UID of a user 'apache' (for example invoked by uid 48) - it means that spam was sent through a PHP script. In this case, you can try to find the spammer using information from spam email (address from/to or any other information). It is usually very difficult to discover the source of SPAM. If you are absolutely sure that this time there is a script which sends SPAM (tail grows rapidly for no apparent reason), you can use the following script to know what PHP scripts are running at this time:<br /><br /><div class="commandline"><code><code># lsof +r 1 -p `ps axww | grep httpd | grep -v grep | awk ' { if(!str) { str=$1 } else { str=str&quot;,&quot;$1}}END{print str}'` | grep vhosts | grep php</code></code></div><br /><code><br /></code>You can also apply KB article which describes the <a href="http://kb.parallels.comhttp://kb.parallels.com/en/1711">procedure of discovering which domains are sending mail through PHP scripts</a>. <br /> <code><br />Lines in Received section like<br /><br /></code><span style="font-family: courier new,courier; font-size: 12px;">Received: (qmail 19622 invoked from network); 13 Sep 2005 17:52:36 +0700</span><br /><span style="font-family: courier new,courier; font-size: 12px;">Received: from external_domain.com (192.168.0.1)</span><code><br /></code><br />mean that the message has been accepted and delivered via SMTP, and that the sender is an authorized mail user.  <br /> <br /> IMPORTANT: <a href="http://kb.parallels.comhttp://kb.parallels.com/en/252">Learn how to recreate the queue in Qmail</a> <br />
				</div>
			</div>
		</div><!-- article-container -->


			<br/><br/>

			<div id="SubscriptionLink24Article" class="subscriptionLink2">
<a href="http://kb.parallels.com/subscriptions/index.html?Type=Article&ArticleID=766&ArticleLanguage=en&Product=&Category="><img src="http://kb.parallels.com/images/mail.png" width="15" height="15" alt="Subscription for changes to this article"></a>
<a href="http://kb.parallels.com/subscriptions/index.html?Type=Article&ArticleID=766&ArticleLanguage=en&Product=&Category=">Subscription for changes to this article</a>

<script type="text/javascript">

$(document).ready(function() {
	$('#SubscriptionLink24Article a').each(function(){
		$(this).click(function(event) {
			event.preventDefault();
			MainPageContentHide();
			$('#subscription').html('');
			$.get('/Stuff/Subscription', {
													'Type' : 'Article',
													'ArticleID' : '766',
													'ArticleLanguage' : 'en',
													'Product' : '',
													'Category' : ''
												}, function(data) {
																	$('#subscription').html(data);
																	$('#subscription').show();
																	SUBbuildsubmenus_product();
																});
		});
	});
});

</script>

</div>





	</div><!-- kb -->

</div><!-- article -->


]]></description>
<author>Daria Taranova</author>
<guid isPermaLink="false">5601 LastUpdated: 2009-03-16 10:12:37</guid>
<pubDate>2009-01-21 22:59:58</pubDate>
</item>
</channel>
</rss>



