Showing posts with label spam. Show all posts
Showing posts with label spam. Show all posts

Saturday, 16 June 2012

Mailscanner : Allow extensions like .docx, .dox,

How to allow some other extensions like .docx, .app and etc in the mailscanner?

I have followed this post to allow the .zip extensions to  in the mailscanner.

http://linux-bloggers.blogspot.in/2012/06/mailscanner-allow-zip-tar-gz-extension.html


However, when I am trying to send email of my word doc and other files, that are being blocked by mailscanner. How to allow it?

Solution:-

You have two solutions to solve the issue.

Solution1:- Disable the SPAM scanner and virus scanner for that user alone via cPanel.
1) Go to cPanel > Emails > Mailscanner configuration.
2) Select the the domain name under SPAM and VIRUS option set it the options to "NO" and save the settings.

This will allow that domain to send emails with all the extensions.

Solution2:-


This is serverwide changes. Where the editing will reflect to all the domain in the server.

1) Login to the server with the root access
2) locate the file name "filename.rules.con"

in cPanel server it will be available in /etc/MailScanner/filename.rules.con

3) vi /etc/MailScanner/filename.rules.con
4) in that file, find the place which has specified "allow"
5) add the following syntax to allow the extension


allow \.docx$ - -
allow \.xlsx$ - -
allow \.app - -
allow \.x(ml)?\d{0,}\.rel$ - - 

Save the file and restart your mail scanner. Thats it. Your mailscanner will allow the specified extensions to all the domain in the server.

Note: When you add the syntax " allow \.docx$ - - ", you should use "TAB key" to leave a space between them. DO NOT use "spacebar" to leave the space. Beware!!!!! ;-)

Saturday, 26 May 2012

Detect top 10 spammers in exim

Detect top 10 spammers in exim

Eximstats is a useful command to find spamming in the cpanel server. Execute the following command in your terminal

/usr/sbin/eximstats -t10 /var/log/exim_mainlog > teststats

The stats output will be appended to a file called "teststats". This have the following data.

(t10 is an option which shows the top 5 count)
The above command gives the following details:

* Top 10 local destinations by volume
* Top 10 local destinations by message count
* Top 10 sending hosts by volume
* Top 10 sending hosts by message count

and other stats such as total number of mails received and
delivered...top 10 sender (username) and many other data are available in that file.

You just need to vi to that file or less the file.

vi teststats or less teststats

You will get all the information in the spammer account and email id.

Thursday, 5 January 2012

Whitelist a domain in ASSP spam filter

How to whitelist a domain in the ASSP spam filter? Also, how to whitelist a email account in the assp spam filter

My cPanel server is running with ASSP spam filter. A domain is blacklisted in the ASSP spam filter. How to whitelist it? Also if I want to whitelist a single email account of that domain how to I go about it?


Solution:

The solution is simple. You could have installed the ASSP spam filter in the default path like "/usr/local/assp".

Whitelisting a domain or whitelisting the email account are similar process.

1) Just vi the whitedomains.txt

i.e vi /usr/local/assp/files/whitedomains.txt

2) Add the domain name or email account to be whitelisted.

e.g :-

domain.com
hemanth@domain.com
admin@google.com

save and quit.

3) Rebuild the ASSP spam database

 Login to the cPanel and go to Grscripts ASSP Deluxe 


You can find the option "Rebuild SPAMdb". Click it.

That's it


or


Another method of whitelisting:


4.1) You have to login to the ASSP web inter face available in the cPanel.


4.2) Then go to Whitelisting domains option 


4.3) Add the domain names or email ID in the option "whitelist or Address"


4.4) Scroll down and click "Apply Changes"


4.5) logout of the ASSP web interface


4.6) Rebuild spamdb in the assp








Friday, 9 December 2011

Script to check the qmail queue

Script to check the email available in the qmail queue.
---------------------------------------------------------------------------

Use this script to find the emails available in the qmail queue.


#!/bin/bash
mails=`/var/qmail/bin/qmail-qstat |grep "messages in queue:"|awk '{print $4}'`
if [ $mails -gt 200 ]; then
SUBJECT="Please check mail queue in RM7"
EMAIL="USER@domain.com"
MESSAGE="/tmp/message.txt"
echo "Please Check mail queue in RM7..It's more than 750" > $MESSAGE
nomail=`/var/qmail/bin/qmail-qstat`
nom=`/var/qmail/bin/qmHandle -s`
echo $nomail >>$MESSAGE
echo $nom >>$MESSAGE
mail -s "$SUBJECT" "$EMAIL" < $MESSAGE
fi