Mail send QMail Server get Greylisted

when we try to send mails to qmail servers we get this response:
450 4.7.1 : Recipient address rejected: Greylisted for 300 seconds


Greylisting is an anti-spam measure employed by some email providers like Gmail.

http://en.wikipedia.org/wiki/Greylisting

The receiving server rejects the message and waits for the sending server to re-send it for a time interval (5 minutes for Gmail). If it receives it for a second time inside this interval, then it whitelists the sending server, which from then onwards can send emails to the receiving server without further rejections.

If the receiving server does not receive the message for a second time inside the predetermined time interval, it rejects the message and the whole procedure repeats itself. It looks like this is the case with your problem, you got these messages stuck in a loop.

Try to find out the greylisting timeframe for Qmail, then adjust your Exchange server's re-send period accordingly (by default it is 10 mins.)

Working with qmail logs files

I have just sent a mail, can you check if mail has gone? A user ask me....Opps...How can i check this? which file should i check first?


Yeah, there many case when you need to check if mail has gone or not? Here qmail Log files which you need to check.


vi /var/qmail/supervise/qmail-send/log/main/current | tai64nlocal

this file logs all send mail & using tai64nlocal you can convert qmail log time to local time zone.

a sample output is here

.......
...
2005-02-12 18:17:18.381291500 delivery 16691: success: 68.17.2.4_accepted_message./Remote_host_said:_75_42.0.0_Message_recd_OK/
....
...

Above sample log tell the a message on date 12th Feb 2005 on 06:17 PM was sent to 68.17.2.4 IP ( a remote mail server IP) successfully.

How to disable the web access in Squirrel Mail?

Open the Vqadmin page, tick on "Disable web access" and "Disable IMAP access". Thats it. This will disable web access for that user.

Alternatively you can use squirrel mail plugins to do the same. Check for plugins like Lockout,

How to separate Spamassassin log files

Is there any way of getting Spamassassin logging into a separate file instead of putting it into syslog?


YES ! Here it is...

Pick an unused local facility ie local5.

Configure SA log to that facility by using the -s parameter.

         spamd -s local5

Configure your syslogd to dump local5.* into a separate file, and exclude it from your other logs. Here's a quick syslog.conf example:

         *.info;mail.none;authpriv.none;cron.none;local5.none;    /var/log/messages
local5.*; /var/log/spamassassin

Spamassassin Log File

SpamAssassin logs generated by the 'spamd' server thru SA analyze SpamAssassin logs and generate reports. Here are list SA tools :

  • logreport.org apparently has a syslog analyzer that can grok SpamAssassin logs:

  • mailgraph: Generates graphs from syslogs. demo available.

  • mailscanner-mrtg -- demo available

  • mailwatch -- no demo, but the previous link has screenshots

  • monkeynoodle.org spamassassin MRTG scripts: Scans the maillog/syslog and feeds the SA results into a format from which MRTG is used to create graphs. demo available

  • munin: Munin is a tool for graphing all sorts of information about one or more servers and displaying it in a web interface. It uses the excellent RRDTool (written by Tobi Oetiker) and is written in Perl. demo available

  • qmailmrtg -- example available

  • sa-stats.pl (Dallas Engelken's version) : Generates a report in text or HTML from a spamd log file or from syslog. not to be confused with the "sa-stats.pl" in the SpamAssassin distribution; it's entirely different

  • sa-exim-stats : Generates rrdtool graphs from sa-exim log files.

  • spamdstats: Continuously parses spamd's log file in the background and stores various data in one Berkely DB file to be read by a second script.

  • vispan -- demo available

  • sa-daily-report: Generates and mails a report of all the email quarantined as spam the previous day, to allow checking for false positives.

  • spamness: An extension for Mozilla Thunderbird 2.0 that gives visual feedback on each message's SpamAssassin score. Screenshots available. Contributors especially welcome, please contact the author if you might be interested in helping improve and maintain the addon.


But what if you dont have any SA tools, then where you can find your SpamAssassin logs.

Simple, open /etc/syslog.conf file & check in which file syslogd is putting SpamAssassin logs.
Here is example:

*.info;authpriv.none;cron.none;local5.none;    /var/log/messages
mail.*; /var/log/mail

Just vi /var/log/mail to read all mail + SpamAssassin logs.