<div dir="ltr">Patch applied.<div><br></div><div>Updated script attached with very minor modifications. </div><div><br></div><div>Tested and preparing to pull into master branch as well (for 5.0.6-4).</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 23, 2017 at 11:40 AM, Thomas Lohman <span dir="ltr"><<a href="mailto:thomasl@mtl.mit.edu" target="_blank">thomasl@mtl.mit.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<p>Hi Thom,</p>
<p>Thanks for the quick updates. It is working for me. I've
attached a patch against v0.2.0 with a few more site changes that
may be of interest to be incorporated in some manner into the
project's script.</p>
<p>(1) Made the systemd service name settable at the top of the
script in case anyone has a different name for whatever reason.</p>
<p>(2) Added logic to determine what the syslog facility name should
be set to based on the MailScanner configuration files and changed
'mail' to $SYSLOG throughout the script.<br>
</p>
(3) Added additional logging if the either file downloaded is
possibly corrupt. Related to this, if the wget/curl combo fail for
whatever reason, I remove whatever may have been downloaded and log
an error. The script no longer exits and continues after setting a
"got an error" variable to 1. As currently written, the script
should drop down and get a another error when it sees that there is
no bad/safe master file. At that point, the {bad/safe}_updated
boolean is set back to 0. At the very end, exit returns whatever
"got an error" is set to. I made these changes since I wanted to be
alerted if the file downloaded is possibly corrupted but also wanted
to give the script a chance to process the safe sites even if the
bad sites file had problems. <br>
<br>
Anyhow, if you find any of this useful then feel free to incorporate
the changes in some manner.<br>
<br>
cheers,<br>
<br>
<br>
--tom<br>
<br>
<br>
<div class="m_8729890958518719649moz-cite-prefix">On 08/23/2017 12:46 AM, Thom van der
Boon wrote:<br>
</div>
<blockquote type="cite">
<div style="font-family:Helvetica;font-size:12pt;color:#000000">
<div>Hi all,<br>
</div>
<div><br>
</div>
<div>Attached a new version of the ms-phising-script for testing<br>
</div>
<div><br>
</div>
<div>What has changed:<br>
</div>
<ul>
<li>Serious typo in the restart Mailscanner part<br>
</li>
<li>If one of the two custom files is changed, the script will
regenerate the file and if configured restart mailscanner<br>
</li>
<li>Added support for restarting MailScanner on systemd
systems<br>
</li>
<li>And various minor other enhancements<br>
</li>
</ul>
<div>Any feedback is highly appriciated<br>
</div>
<div><br>
</div>
<div>
<div>Met vriendelijke groet, Best regards,</div>
<div><br>
</div>
<div><br style="font-family:helvetica">
<span style="font-family:helvetica">Thom van der Boon</span><br style="font-family:helvetica">
<span style="font-family:helvetica">E-Mail:
<a class="m_8729890958518719649moz-txt-link-abbreviated" href="mailto:thom@vdb.nl" target="_blank">thom@vdb.nl</a></span></div>
<div><br>
</div>
<div><br style="font-family:helvetica">
<br style="font-family:helvetica">
<span style="font-family:helvetica">=====</span></div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><span style="font-family:helvetica">Thom.H. van der
Boon b.v.</span><br style="font-family:helvetica">
<span style="font-family:helvetica"></span><span style="font-family:helvetica">Transito 4</span></div>
<div><span style="font-family:helvetica">6909 DA
Babberich<br style="font-family:helvetica">
</span><span style="font-family:helvetica">Tel.: +31 (0)88
4272727</span><br style="font-family:helvetica">
<span style="font-family:helvetica">Fax: +31 (0)88
4272789</span><br style="font-family:helvetica">
<span style="font-family:helvetica">Home Page:
<a class="m_8729890958518719649moz-txt-link-freetext" href="http://www.vdb.nl/" target="_blank">http://www.vdb.nl/</a></span></div>
</div>
<br>
<hr id="m_8729890958518719649zwchr">
<div><b>Van: </b>"Thomas Lohman"
<a class="m_8729890958518719649moz-txt-link-rfc2396E" href="mailto:thomasl@mtl.mit.edu" target="_blank"><thomasl@mtl.mit.edu></a><br>
<b>Aan: </b><a class="m_8729890958518719649moz-txt-link-abbreviated" href="mailto:mailscanner@lists.mailscanner.info" target="_blank">mailscanner@lists.mailscanner.<wbr>info</a><br>
<b>Verzonden: </b>Dinsdag 22 augustus 2017 19:06:16<br>
<b>Onderwerp: </b>Re: Phishing Server Change<br>
</div>
<br>
<div>
<p>Hi Thom,</p>
<p>I've attached a patch based off the copy of the script
downloaded from the site that seems to be working for me.
It should update the bad/safe conf files if either the date
of the master or the custom file is newer than the conf file
date.<br>
</p>
hopefully it is useful.<br>
<br>
<br>
--tom<br>
<br>
<br>
<div class="m_8729890958518719649moz-cite-prefix">On 08/22/2017 10:44 AM, Thom van
der Boon wrote:<br>
</div>
<blockquote>
<div style="font-family:Helvetica;font-size:12pt;color:#000000">
<div>Hi Tom,<br>
</div>
<div><br>
</div>
<div>It does not. Will incorporate that in the next
version.<br>
</div>
<div><br>
</div>
<div>
<div>Met vriendelijke groet, Best regards,</div>
<div><br>
</div>
<div><br style="font-family:helvetica">
<span style="font-family:helvetica">Thom van der
Boon</span><br style="font-family:helvetica">
<span style="font-family:helvetica">E-Mail: <a class="m_8729890958518719649moz-txt-link-abbreviated" href="mailto:thom@vdb.nl" target="_blank">thom@vdb.nl</a></span><br>
</div>
<div><br>
</div>
<div><br style="font-family:helvetica">
<br style="font-family:helvetica">
<span style="font-family:helvetica">=====</span></div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><span style="font-family:helvetica">Thom.H. van
der Boon b.v.</span><br style="font-family:helvetica">
<span style="font-family:helvetica"></span><span style="font-family:helvetica">Transito 4</span></div>
<div><span style="font-family:helvetica">6909 DA
Babberich<br style="font-family:helvetica">
</span><span style="font-family:helvetica">Tel.: +31
(0)88 4272727</span><br style="font-family:helvetica">
<span style="font-family:helvetica">Fax: +31 (0)88
4272789</span><br style="font-family:helvetica">
<span style="font-family:helvetica">Home Page: <a class="m_8729890958518719649moz-txt-link-freetext" href="http://www.vdb.nl/" target="_blank">http://www.vdb.nl/</a></span><br>
</div>
</div>
<br>
<hr id="m_8729890958518719649zwchr">
<div><b>Van: </b>"Thomas Lohman" <a class="m_8729890958518719649moz-txt-link-rfc2396E" href="mailto:thomasl@mtl.mit.edu" target="_blank"><thomasl@mtl.mit.edu></a><br>
<b>Aan: </b><a class="m_8729890958518719649moz-txt-link-abbreviated" href="mailto:mailscanner@lists.mailscanner.info" target="_blank">mailscanner@lists.mailscanner.<wbr>info</a><br>
<b>Verzonden: </b>Dinsdag 22 augustus 2017 16:41:59<br>
<b>Onderwerp: </b>Re: Phishing Server Change<br>
</div>
<br>
<div>Hi,<br>
<br>
how does the script deal with the use case where the
master has not <br>
changed on the remote site (thus no new copy is
downloaded) but the <br>
custom file has changed since the last run? It looks
like the changes <br>
to the custom file will not be merged into the <br>
phishing.safe.sites.conf/<wbr>phishing.bad.sites.conf file
unless <br>
safe_updated/bad_updated has been set to 1.<br>
<br>
thanks,<br>
<br>
<br>
--tom<br>
<br>
<br>
<br><span class="HOEnZb"><font color="#888888">
<br>
-- <br>
MailScanner mailing list<br>
<a class="m_8729890958518719649moz-txt-link-abbreviated" href="mailto:mailscanner@lists.mailscanner.info" target="_blank">mailscanner@lists.mailscanner.<wbr>info</a><br>
<a class="m_8729890958518719649moz-txt-link-freetext" href="http://lists.mailscanner.info/mailman/listinfo/mailscanner" target="_blank">http://lists.mailscanner.info/<wbr>mailman/listinfo/mailscanner</a><br>
</font></span></div><span class="HOEnZb"><font color="#888888">
</font></span></div><span class="HOEnZb"><font color="#888888">
<br>
<fieldset class="m_8729890958518719649mimeAttachmentHeader"></fieldset>
<br>
</font></span></blockquote><span class="HOEnZb"><font color="#888888">
<br>
<br>
<br>
<br>
-- <br>
MailScanner mailing list<br>
<a class="m_8729890958518719649moz-txt-link-abbreviated" href="mailto:mailscanner@lists.mailscanner.info" target="_blank">mailscanner@lists.mailscanner.<wbr>info</a><br>
<a class="m_8729890958518719649moz-txt-link-freetext" href="http://lists.mailscanner.info/mailman/listinfo/mailscanner" target="_blank">http://lists.mailscanner.info/<wbr>mailman/listinfo/mailscanner</a><br>
</font></span></div><span class="HOEnZb"><font color="#888888">
</font></span></div><span class="HOEnZb"><font color="#888888">
<br>
<fieldset class="m_8729890958518719649mimeAttachmentHeader"></fieldset>
<br>
<pre>
</pre>
</font></span></blockquote>
<br>
</div>
<br><br>
<br>
--<br>
MailScanner mailing list<br>
<a href="mailto:mailscanner@lists.mailscanner.info">mailscanner@lists.mailscanner.<wbr>info</a><br>
<a href="http://lists.mailscanner.info/mailman/listinfo/mailscanner" rel="noreferrer" target="_blank">http://lists.mailscanner.info/<wbr>mailman/listinfo/mailscanner</a><br>
<br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr">Shawn Iverson, CETL<div>Director of Technology</div><div>Rush County Schools</div><div>765-932-3901 x271</div><div><a href="mailto:iversons@rushville.k12.in.us" target="_blank">iversons@rushville.k12.in.us</a></div><div><br></div><div><img src="https://docs.google.com/uc?export=download&id=0Bw5iD0ToYvs_cy1OZFNIZ0drYVU&revid=0Bw5iD0ToYvs_UitIcHVIWkJVVTl2VGpxVUE0d0FQcHBIRXk4PQ" width="96" height="96" style="font-size:12.8px"><img src="https://docs.google.com/uc?export=download&id=0Bw5iD0ToYvs_Zkh4eEs3R01yWXc&revid=0Bw5iD0ToYvs_QWpBK2Y2ajJtYjhOMDRFekZwK2xOamk5Q3Y0PQ"><br></div></div></div></div></div></div></div></div></div></div></div>
</div>