develooper Front page | perl.qpsmtpd | Postings from March 2005

Plugin methods, bug fixes, log consistency patches

Thread Next
From:
Nick Leverton
Date:
March 3, 2005 02:56
Subject:
Plugin methods, bug fixes, log consistency patches
Message ID:
20050303104041.17938.qmail@lists.develooper.com
Here are my patches to (for the most part) tidy up the logging and
modernise some of the plugins.  A couple of bugfixes fell out of the
tidyup for free ! :-)  My manager asked only that the company be credited
for these, hence my posting from my work address.

I have endeavoured to use the log levels as follows:

LOGDEBUG: things you only need to know while debugging
LOGINFO: normal things happening during normal operation
LOGNOTICE: normal mail rejection during normal operation (RBLs etc)
LOGWARN: something minor has gone wrong that won't make mail be rejected.
LOGERROR: something has gone badly wrong though the server is still
         able to accept mail, but it may not go through any checks.
LOGCRIT: something wrong with the server config

There is still a little work to do yet, but the aim is that you can run
the server on LOGINFO if you like positive assurance that all is working,
or LOGNOTICE to just get a summary of successful mail yet fuller details
of reasons for rejection.  LOGWARN is for those who don't care about why
they reject things (or who have other logging) !

Check_badmailfromto did not work, it would block mail if any
lefthandside and any righthandside in its config file matched the current
sender/recipient.  I have altered this to what I assume was the intent,
to match both addresses on the same config line.

Greylisting I do not use, but updated the plugin to use $self->log
anyway; likewise the spamassassin plugin.

Log-deny.patch keeps a note of any recipient addresses which were
rejected; we use this in our custom logging plugin. I also have ideas
that this count could be useful to blacklist senders who do dictionary
attacks, though that's in the future.

Require-resolvable-fromhost was rejecting at MAIL FROM, we have discussed
before that some MTAs ignore errors at this stage so I moved the
rejection to RCPT TO.

None of these patches should significantly change the behaviour of
qpsmtpd.  I have some other changes which do, those I'm still evaluating
as they aren't all in production yet.  These will do for 0.29 though !

Nick
-- 
Critical Software Support Team
Technical Support: (International) +44 1782 714 122  (UK) 01782 714 122

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About