http proxy:suggestion

Glenn Steen glenn.steen at gmail.com
Tue Feb 26 14:45:10 GMT 2008


On 26/02/2008, Rick Cooper <rcooper at dwford.com> wrote:
>
>
>   > -----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
>
Correct me if I'm wrong, but this "issue" is only an issue on
platforms where the install will actually set up the cron jobs for
you, right? I don't think the stock source install does that... So
what Solaris or whatever use for cron is rather immaterial, since
it'll be you (as admin) that will be doing those entries anyway... And
the timetested sh -c "<set env>;<do command>" would work well
enough... Right?
Or am I missing something obvious? To my eyes, the http_proxy setting
for LWP could well go anywhere, on the installs that need them. Having
another conf file to massage afterwards would just confuse the matter
(IMO:-). So put it in the sysconfig file... commented out with
something nice above for us to read:-)... Less changes for Jules,
little real "semantic" problems...

Cheers
-- 
-- Glenn
email: glenn < dot > steen < at > gmail < dot > com
work: glenn < dot > steen < at > ap1 < dot > se


More information about the MailScanner mailing list