MailScanner: extracting attachments

Julian Field MailScanner at ecs.soton.ac.uk
Mon Mar 17 12:28:19 GMT 2008



Julian Field wrote:
>
>
> Jason Ede wrote:
>> ________________________________________
>> 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?
>>   
> No, because the output of upgrade_MailScanner_conf goes into a 
> filename of your choosing after a ">" on the command-line. The script 
> can't get at the name of that file you have chosen, so there is no way 
> to run MailScanner on it at all.
>
> Sorry. You'll just have to type "MailScanner --lint" yourself :-)
By the way, I published a new beta last night with the 'automatic syntax 
check' stuff all in it.

Jules

-- 
Julian Field MEng CITP CEng
www.MailScanner.info
Buy the MailScanner book at www.MailScanner.info/store

Need help customising MailScanner?
Contact me!
Need help fixing or optimising your systems?
Contact me!
Need help getting you started solving new requirements from your boss?
Contact me!

PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the MailScanner mailing list