MailScanner: extracting attachments
Jason Ede
J.Ede at birchenallhowden.co.uk
Mon Mar 17 07:55:35 GMT 2008
________________________________________
From: mailscanner-bounces at lists.mailscanner.info [mailscanner-bounces at lists.mailscanner.info] On Behalf Of Julian Field [MailScanner at ecs.soton.ac.uk]
Sent: 16 March 2008 22:28
To: MailScanner discussion
Subject: Re: MailScanner: extracting attachments
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Julian Field wrote:
> * PGP Signed: 03/16/08 at 20:47:50
>
>
>
> Devon Harding wrote:
>>
>>
>> > The usual way for me to restart MailScanner after a change is
>> >
>> > service MailScaner restart;tail -f /var/log/maillog
>> >
>> > Then the output of the syslog file will show wether or not
>> MailScanner
>> > was happy or if I had my fingers all thumbled up again and made
>> some
>> > horrible typos.
>> >
>>
>>
>> I too have to start MailScanner with tail as sometimes sendmail
>> doesn't dire gracefully and you end up with port in use.
>>
>>
>> Unfortunately, I read the config after I've forked, unlike Apache
>> which
>> appears to read it first. So by the time I've read the config it's
>> already too late.
>> I'll take a look, but don't hold out much hope other than reading
>> the
>> conf then throwing it away, just to syntax check it before
>> starting up.
>> That might be possible.
>>
>>
>> This would be really slick and save some time troubleshooting.
> I've just spent the last 3 hours or so trying to implement this :-(
> Because of the fact that I read the configuration template data from a
> Perl source file itself, I can't read it in twice, I can't rewind the
> filehandle as Perl won't let me.
>
> So, at the moment, no can do. Sorry.
>
> It is surely good practice to do a "MailScanner --lint" after changing
> stuff anyway, isn't it?
My lodger had a good idea on a cheeky way to implement it, and so I've
done that. The new "automatic syntax check" setting is set to "yes" by
default. It will slightly slow down the startup, and MailScanner *will*
still start up, regardless of syntax errors, but it will clearly let you
know if it doesn't like your setup. Output goes to the console (STDERR)
and the mail log too.
Jules
Jules,
Could you make the upgrade_mailscanner_conf file do a --lint on the new config file it generates automatically after doing the upgrade? It wouldn't then stop people from messing it up, but would make sure at that stage that it was correct?
Jason
More information about the MailScanner
mailing list