http proxy:suggestion

Rick Cooper rcooper at dwford.com
Tue Feb 26 12:54:34 GMT 2008


 

 > -----Original Message-----
 > From: mailscanner-bounces at lists.mailscanner.info 
 > [mailto:mailscanner-bounces at lists.mailscanner.info] On 
 > Behalf Of David Lee
 > Sent: Tuesday, February 26, 2008 5:29 AM
 > To: MailScanner discussion
 > Subject: RE: http proxy:suggestion
 > 
 > On Fri, 22 Feb 2008, Rick Cooper wrote:
 > 
 > >  > <t.d.lee at durham.ac.uk> wrote:
 > >  > >  [...]
 > >  > >>  What still seems absent is recognising "http_proxy" when
 > >  > run under "cron".
 > >  > >>
 > >  > >>  Those scripts already do:
 > >  > >>    if [ -f /etc/sysconfig/MailScanner ] ; then
 > >  > >>         . /etc/sysconfig/MailScanner
 > >  > >>    fi
 > >  > >>
 > >  > >>  But that file seems oriented to variables specific to
 > >  > "MailScanner.conf".
 > >  > >>
 > >  > >>  Could there also be a "/etc/sysconfig/MailScannerEnv"
 > >  > (or similar) whose
 > >  > >>  purpose would be for environment variables for scripts?
 > >
 > > [...] That said, why not use the (.)?wgetrc and (.)?curlrc files to
 > > enter the default proxy/user/password information on 
 > systems that need this
 > > information? I have done this in the past for a specific 
 > server for a
 > > specific reason.
 > 
 > Good idea.  Thanks. I've just tried it (/etc/wgetrc) and it seems to
 > work... for the 'update_phishing_sites' and 
 > 'update_bad_phishing_sites'
 > cron jobs.
 > 
 > That just leaves the MS 'update_spamassassin' cron job; is 
 > there some way
 > to arrange for it, when run under 'cron', to obtain 
 > 'http_proxy' somehow
 > from somewhere?
 > 
 > 

Well if you are running linux you can just add the ENV item at the top of
the correct user's crontab. It seems like solaris doesn't allow for that.
Remember it's not exported though, it's in the format of

VAR=VALUE

Since sa-update uses LWP I don't believe there are any rc files to handle
that.

Rick


--
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