<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Message</TITLE>
<META content="MSHTML 6.00.2800.1400" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=339385208-24032004><FONT face=Arial color=#0000ff size=2>The
problem with doping it automatically when a mail is received is that it doesn't
scale well and it becomes very easy to DOS your server. Sending a
mail causing a HUP a couple of times a minute would pretty quickly stop any mail
from getting processed at all. Much better to just do it
periodically, even maybe craft an auto-reply to the message that says 'your
request has been processed, changes will be effective from
<time>'</FONT></SPAN></DIV>
<DIV><SPAN class=339385208-24032004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=339385208-24032004><FONT face=Arial color=#0000ff
size=2>However, if you do use sudo its worth noting that sudo can be configured
to restrict the exact commandline not just the program name, so you could give
the mail user only permission to run 'pkill -HUP MailScanner' for
example.</FONT></SPAN></DIV>
<DIV><SPAN class=339385208-24032004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=339385208-24032004><FONT face=Arial color=#0000ff
size=2>Depending on how many settings you need to access a better solution may
be to use a custom config function to look up the blacklist values in a
database, and just have your scripts update the database. This would
probably scale better, and avoids the DOS risk.</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Max Kipness
[mailto:mkipness@GENIANT.COM]<BR><B>Sent:</B> 23 March 2004
22:15<BR><B>To:</B> MAILSCANNER@JISCMAIL.AC.UK<BR><B>Subject:</B> Re:
Reloading MS service via email?<BR><BR></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=562371122-23032004>I dont' like this method because if a user is looking
to whitelist someone quick, they need to wait for an hour. If I was going to
go this route, I would create a script that reloads MS every 5 minutes, but
only after it reads the white and blacklist and verifies that there
are additions to the files.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=562371122-23032004></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=562371122-23032004>Max</SPAN></FONT></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> MailScanner mailing list
[mailto:MAILSCANNER@JISCMAIL.AC.UK] <B>On Behalf Of </B>Alex
Neuman<BR><B>Sent:</B> Tuesday, March 23, 2004 4:10 PM<BR><B>To:</B>
MAILSCANNER@JISCMAIL.AC.UK<BR><B>Subject:</B> Re: Reloading MS service via
email?<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><SPAN class=302041022-23032004><FONT face=Arial color=#0000ff size=2>Even
better idea... thanks!</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
face=Tahoma size=2>-----Original Message-----<BR><B>From:</B> MailScanner
mailing list [mailto:MAILSCANNER@JISCMAIL.AC.UK] <B>On Behalf Of </B>Derek
Winkler<BR><B>Sent:</B> Tuesday, March 23, 2004 4:36 PM<BR><B>To:</B>
MAILSCANNER@JISCMAIL.AC.UK<BR><B>Subject:</B> Re: Reloading MS service via
email?<BR><BR></FONT></DIV>
<DIV><SPAN class=500053821-23032004><FONT face=Arial color=#0000ff size=2>I
just lowered my MailScanner restarts to an hour and took users it can take
an hour or two to take effect.</FONT></SPAN></DIV>
<DIV><SPAN class=500053821-23032004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=500053821-23032004><FONT face=Arial color=#0000ff
size=2>See Restart Every in config file.</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> MailScanner mailing list
[mailto:MAILSCANNER@JISCMAIL.AC.UK]<B>On Behalf Of </B>Alex
Neuman<BR><B>Sent:</B> Tuesday, March 23, 2004 4:35 PM<BR><B>To:</B>
MAILSCANNER@JISCMAIL.AC.UK<BR><B>Subject:</B> Re: Reloading MS service via
email?<BR><BR></FONT></DIV>
<DIV><SPAN class=591043021-23032004><FONT face=Arial color=#0000ff
size=2>You could always set up a cronjob to killall -HUP MailScanner every
other hour, for example. Settings would be reloaded, wouldn't
they?</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
face=Tahoma size=2>-----Original Message-----<BR><B>From:</B>
MailScanner mailing list [mailto:MAILSCANNER@JISCMAIL.AC.UK] <B>On
Behalf Of </B>Max Kipness<BR><B>Sent:</B> Tuesday, March 23, 2004 3:11
PM<BR><B>To:</B> MAILSCANNER@JISCMAIL.AC.UK<BR><B>Subject:</B> Reloading
MS service via email?<BR><BR></FONT></DIV>
<DIV><SPAN class=453380720-23032004><FONT face=Arial size=2>I've got my
scripts pretty much ironed out so that a user can simply forward a spam
message to an email address, have the spam email added to the blacklist
and then sent a confirmation. What I'd like to also do is have the
script reload the MailScanner service. Since this is being done via the
user 'mail', can anyone give me some tips on the best way to accomplish
this. So far I'm thinking of using SUDO to allow 'mail' to run 'kill'
and /etc/init.d/MailScanner? Is there a better and/or more secure
way?</FONT></SPAN></DIV>
<DIV><SPAN class=453380720-23032004><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=453380720-23032004><FONT face=Arial
size=2>Thanks,</FONT></SPAN></DIV>
<DIV><SPAN class=453380720-23032004><FONT face=Arial
size=2>Max</FONT></SPAN></DIV></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BODY><br />
<br />
<br />BMRB International
<br /><a href="http://www.bmrb.co.uk">http://www.bmrb.co.uk</a>
<br />+44 (0)20 8566 5000
<br />
<br />This message (and any attachment) is intended only for the recipient and may contain confidential and/or privileged material. If you have received this in error, please contact the sender and delete this message immediately. Disclosure, copying or other action taken in respect of this email or in reliance on it is prohibited. BMRB International Limited accept no liability in relation to any personal emails, or content of any email which does not directly relate to our business.
<br />
</HTML>