tiny, low priority patch for ZMailer
Mariano Absatz
mailscanner at LISTS.COM.AR
Fri Jun 4 23:32:57 IST 2004
Allright, here it comes...
Everything I've done and sent you in the last few months is at
http://baby.com.ar/MailScanner/MS-new/
(you've got a .tgz archive AND the same files open in case you want to browse them).
Since some of the things I did affect other files, they are included.
If you don't like the rest of the stuff, just use the ZMailer.pm and
ZMDiskStore.pm files and that's it.
Besides zmailer bug fixing, I did the following (I note the affected files
for every feature) in order of importance (that is I think the first one is
the one more people would like/want/use).
'Run In Foreground':
new option to enable MailScanner to run normally in foreground mode and thus
open the possibility to be monitored with HA tools or simple daemon managers
like DJB's supervise ( http://cr.yp.to/daemontools.html )
Affected files:
bin/MailScanner
etc/MailScanner.conf
lib/MailScanner/ConfigDefs.pl
'MailScanner-Id':
option to add a new 'X-MailScanner-Id:' header with a unique identifier. The
identifier may be used in logging custom functions, accessed like
$message->{md5msid}
e.g. to be able to have unique message identifiers, even with multiple
servers running in paralell. (**)
Requirements: Digest::MD5 must be installed (so the installer should be
modified to install this also).
Affected files:
etc/MailScanner.conf
lib/MailScanner/ConfigDefs.pl
lib/MailScanner/Message.pm
'Authbounce':
option to identify the authenticated user and bounce the message to him
instead of using the 'mail from'. It also allows you to match the
authenticated user in rulesets using 'Auth' or 'FromOrAuth' or 'AuthAndTo' or
'FromOrAuthAndTo' :-) (***)
Affected files:
etc/MailScanner.conf
lib/MailScanner/Config.pm
lib/MailScanner/ConfigDefs.pl
lib/MailScanner/Message.pm
If you want to wait for the other MTAs, you can simply erase the 'Domain
Auth' and 'Always Auth Bounce' options, and its associated comments from
MailScanner.conf and leave it hidden.
NOTES:
(**) if you want, I can also send you a module for lib/CustomFunctions that
does some fancy logging to files (it was originally adapted from the first
part of SQLLogging).
(***) developer notes: currently, this only works for zmailer, but can be
added to the other MTAs... what needs to be done is, within
MailScanner::Sendmail::ReadQf(), generate the '$message->{authenticateduser}'
attribute with the user that authenticated via SMTP AUTH (if any).
If the user authenticated doesn't have a '@domain' part AND
MailScanner::Config::Value('domainauth') is set to anything different to
'no', then you must add
'@' . MailScanner::Config::Value('domainauth')
to the authenticated username.
If there is an authenticated user but 'Domain Auth' is set to 'no', you can
still use the authenticated user name in rulesets.
PLEASE, if you want me to modify any of these in some way, in order to
include them, please tell me so (I won't be able to answer until Monday,
though).
Have a nice weekend.
El 3 Jun 2004 a las 8:58, Julian Field escribió:
> Can you take the latest published ZMailer code from the main distribution,
> apply all your changes and mail me the new files for the next distribution
> please?
>
> At 21:46 02/06/2004, you wrote:
> >Hi Julian,
> >
> >I just noticed a small bug (mostly invisible to everyone) that slipped thru
> >in the very first version of ZMailer support for MailScanner.
> >
> >It's a 'print STDERR' that should be commented out and is not.
> >
> >--- ZMDiskStore.pm.ORI Wed Jun 2 17:39:46 2004
> >+++ ZMDiskStore.pm Wed Jun 2 17:40:05 2004
> >@@ -219,7 +219,7 @@
> > my $b= Body->new( $this->{hdpath} );
> > $b->Start();
> > my $line;
> >- print STDERR "originalBody\n";
> >+ #print STDERR "originalBody\n";
> > while( $line= $b->Next() ) {
> > $Tf->print($line);
> > #print STDERR "BODY: $line";
> >
> >
> >See if you can add it so next version is OK...
> >
> >BTW, I noticed this after implementing what I posted in
> >http://tinyurl.com/2hpgn and logging MailScanner's STDOUT and STDERR...
> >suddenly, my logs got full of
> >'originalBody'
> >lines :-)
> >
> >Were you able to take a look at the patches I posted there?
> >
> >Do you think it has a chance of getting in the main trunk?
> >
> >FWIW, I have it working very smoothly on two production environments (one of
> >them is a 12-server border farm for a large ISP... I'll be reporting about
> >this next week)
> >
--
Mariano Absatz
El Baby
----------------------------------------------------------
I am not afraid of death, I just don't want to
be there when it happens.
-- Woody Allen
-------------------------- MailScanner list ----------------------
To leave, send leave mailscanner to jiscmail at jiscmail.ac.uk
Before posting, please see the Most Asked Questions at
http://www.mailscanner.biz/maq/ and the archives at
http://www.jiscmail.ac.uk/lists/mailscanner.html
More information about the MailScanner
mailing list