[Feature request] Add rejected mails to system stats

Hi,

showing spam and virus mail counts in the system stats is nice, but most of them will be rejected before they actually end up in the delivery queue. Any chance I could have the amount of NOQUEUE lines in the mail log visible in the system statistics?

[Mail server is Postfix]

Regards,

Christian

Status: 
Active

Comments

+1 for this idea. It would be very useful.

So are you looking for a count of messages that were rejected due to invalid addresses?

If so, that would be a nice idea.. and I could include greylisted counts too.

Not only invalid addresses, but also failure to meet SMTP constraints of all kinds. Examples:

root@big:~# tail -n 200 /var/log/mail.info | grep NOQUEUE Aug 3 15:42:36 big postfix/smtpd[15774]: NOQUEUE: reject: RCPT from unknown[69.27.85.65]: 450 4.7.1 Client host rejected: cannot find your hostname, [69.27.85.65]; from=<> to=<antajiin1959@somedomain.com> proto=ESMTP helo=<argo.hapco.com> Aug 3 15:42:38 big postfix/smtpd[19753]: NOQUEUE: reject: RCPT from unknown[81.211.57.244]: 450 4.7.1 Client host rejected: cannot find your reverse hostname, [81.211.57.244]; from=<aceuie@blokker.com> to=<christian@somedomain.com> proto=ESMTP helo=<[81.211.57.244]> Aug 3 15:44:42 big postfix/smtpd[18529]: NOQUEUE: reject: RCPT from mail.perucchini.ch[212.147.29.218]: 554 5.7.1 Service unavailable; Client host [212.147.29.218] blocked using zen.spamhaus.org; http://www.spamhaus.org/query/bl?ip=212.147.29.218; from=<teioh@rock.interq.or.jp> to=<christian@somedomain.com> proto=ESMTP helo=<mail.perucchini.ch>

I'm seeing literally thousands of those in the log files each day. And that's good because Postfix helps me to fight loads of spam before they actually are delivered to my users inboxes.

That's a good idea .. I'll add this to my TODO list.

Hey Jamie,

This might be too involved for you to want to do, but how about adding lists something like "domains greylisted in last day/week/month', and/or 'domains rejected by in the last day/week/month' (with the reason why they were rejected).

I think this would be useful as it would give a way to see what might have been rejected that shouldn't have been, and, if there were any, then those domains could be manually added to either the greylist's whitelist or SpamAssassin's whitelist.

Also, having lists of domains, maybe sortable by the number of rejections for each domain rejected, rather than lists of individual emails will keep the lists more manageable and readable (I can imagine that lists of individually rejected emails will get to be enormously long and unwieldy)

Anyway, I'm just chucking ideas about. You know what you are doing no doubt.

R.