<html><body><div style="font-family: Helvetica; font-size: 12pt; color: #000000"><div>Jerry,<br></div><div><br data-mce-bogus="1"></div><div><div>>> The logic of the script does not work as the current script. The current script downloads the file as .master and uses that file plus a .custom file to build the final list. It looks like this script was based on a very old version of the update script.</div><div><br data-mce-bogus="1"></div><div>>> The script would have to keep a copy of the .master file instead of deleting it as it does in the current script in order to determine if the file on the update server has changed.<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>The problem is wget. To save bandwidth you want to run wget with the -N option (wget will only download if the remote file is newer than the local file), but the -O does not work together with the -N (curl does not have this problem)<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>To put it simple:<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>curl -z $CONFIGDIR/phishing.bad.sites.conf --compressed -o $CONFIGDIR/phishing.bad.sites.conf.master $THEURL</div><div><br data-mce-bogus="1"></div><div>curl only downloads the remote phishing.bad.sites.conf to the local file to $CONFIGDIR/phishing.bad.sites.conf.master if the remote file is newer than the local phishing.bad.sites.conf<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>(curl is great) <br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>wget does not support checking against an other file<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>If you want the script to work like you want it to work, there are two options:<br></div><div>a) we have to drop wget support because you can't check wether a newer version of the file is available<br data-mce-bogus="1"></div><div>b) on the server there need to be both a phishing.bad.sites.conf but also a phishing.bad.sites.conf.master (same file, but wget needs to check against something with the same filename wether it has changed)<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>>> The script should not restart mailscanner if mailscanner has been manually stopped. (mailscanner.off file is present.)</div><div>>> The existence of /etc/init.d/mailscanner needs to be validated before being used. This file will not exist on a fully implemented systemd server and thus will not work across all platforms.</div></div><div><br data-mce-bogus="1"></div><div>Will add this to the script<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div data-marker="__SIG_PRE__"><div>Met vriendelijke groet, Best regards,</div><div><br></div><div><br style="font-family: helvetica;" data-mce-style="font-family: helvetica;"><span style="font-family: helvetica;" data-mce-style="font-family: helvetica;">Thom van der Boon</span><br style="font-family: helvetica;" data-mce-style="font-family: helvetica;"><span style="font-family: helvetica;" data-mce-style="font-family: helvetica;">E-Mail: thom@vdb.nl</span></div><div><br></div><div><br style="font-family: helvetica;" data-mce-style="font-family: helvetica;"><br style="font-family: helvetica;" data-mce-style="font-family: helvetica;"><span style="font-family: helvetica;" data-mce-style="font-family: helvetica;">=====</span></div><div><br></div><div><br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div><span style="font-family: helvetica;" data-mce-style="font-family: helvetica;">Thom.H. van der Boon b.v.</span><br style="font-family: helvetica;" data-mce-style="font-family: helvetica;"><span style="font-family: helvetica;" data-mce-style="font-family: helvetica;"></span><span style="font-family: helvetica;" data-mce-style="font-family: helvetica;">Transito 4</span></div><div><span style="font-family: helvetica;" data-mce-style="font-family: helvetica;">6909 DA  Babberich<br style="font-family: helvetica;" data-mce-style="font-family: helvetica;"></span><span style="font-family: helvetica;" data-mce-style="font-family: helvetica;">Tel.: +31 (0)88 4272727</span><br style="font-family: helvetica;" data-mce-style="font-family: helvetica;"><span style="font-family: helvetica;" data-mce-style="font-family: helvetica;">Fax: +31 (0)88 4272789</span><br style="font-family: helvetica;" data-mce-style="font-family: helvetica;"><span style="font-family: helvetica;" data-mce-style="font-family: helvetica;">Home Page: http://www.vdb.nl/</span></div></div><div><br></div><hr id="zwchr" data-marker="__DIVIDER__"><div data-marker="__HEADERS__"><b>Van: </b>"Jerry Benton" <jerry.benton@mailborder.com><br><b>Aan: </b>"MailScanner Discussion" <mailscanner@lists.mailscanner.info><br><b>Verzonden: </b>Vrijdag 4 augustus 2017 17:18:03<br><b>Onderwerp: </b>RE: Phishing Server Change<br></div><div><br></div><div data-marker="__QUOTED_TEXT__"><style><!--

@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}

p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}

@list l0
        {mso-list-id:41028918;
        mso-list-type:hybrid;
        mso-list-template-ids:-1518686772 257874752 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
        {mso-level-start-at:198;
        mso-level-number-format:bullet;
        mso-level-text:-;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:"Calibri",sans-serif;
        mso-fareast-font-family:Calibri;}
@list l0:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:"Courier New";}
@list l0:level3
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;}
@list l0:level4
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Symbol;}
@list l0:level5
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:"Courier New";}
@list l0:level6
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;}
@list l0:level7
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Symbol;}
@list l0:level8
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:"Courier New";}
@list l0:level9
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></style><div class="WordSection1"><p class="MsoNormal">I briefly reviewed this script. A couple of problems:</p><p class="MsoNormal"> </p><ul style="margin-top:0in" type="disc"><li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1">The logic of the script does not work as the current script. The current script downloads the file as .master and uses that file plus a .custom file to build the final list. It looks like this script was based on a very old version of the update script. </li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1">The script should not restart mailscanner if mailscanner has been manually stopped. (mailscanner.off file is present.)</li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1">The existence of /etc/init.d/mailscanner needs to be validated before being used. This file will not exist on a fully implemented systemd server and thus will not work across all platforms. </li></ul><p class="MsoNormal"> </p><div><p class="MsoNormal"> </p><p class="MsoNormal">--</p><p class="MsoNormal">Jerry Benton</p><p class="MsoNormal"><a href="http://www.mailborder.com/" target="_blank"><span style="color:#0563C1">www.mailborder.com</span></a><br>+1   (843) 800-8605</p><p class="MsoNormal">+44 (020) 3883-8605<br><br></p></div><p class="MsoNormal"> </p><div><div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in"><p class="MsoNormal"><b>From:</b> MailScanner [mailto:mailscanner-bounces+jerry.benton=mailborder.com@lists.mailscanner.info] <b>On Behalf Of </b>Thom van der Boon<br><b>Sent:</b> Friday, August 4, 2017 1:52 AM<br><b>To:</b> MailScanner Discussion <mailscanner@lists.mailscanner.info><br><b>Subject:</b> Re: Phishing Server Change</p></div></div><p class="MsoNormal"> </p><div><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black">Jerry,</span></p></div><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black"> </span></p></div><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black">Attached a almost totally rewritten update_bad_phishing_sites script.It uses curl and as a fallback wget. If the remote file is not updated, it will not download (with both curl and wget).</span></p></div><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black"> </span></p></div><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black">New function: If a new phishing.bad.sites.conf is downloaded, mailscanner is reloaded (if that fails, mailscanner will be restarted)</span></p></div><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black"> </span></p></div><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black">Testing of the script and feedback is highly appriciated.</span></p></div><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black"> </span></p></div><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black">I will do the same for the other script in the upcoming day.</span></p></div><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black"> </span></p></div><div><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black">Met vriendelijke groet, Best regards,</span></p></div><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black"> </span></p></div><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black"><br>Thom van der Boon<br>E-Mail: <a href="mailto:thom@vdb.nl" target="_blank">thom@vdb.nl</a></span><br data-mce-bogus="1"></p></div><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black"> </span></p></div><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black"><br><br>=====</span></p></div><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black"> </span></p></div><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black"> </span></p></div><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black"> </span></p></div><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black">Thom.H. van der Boon b.v.<br>Transito 4</span></p></div><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black">6909 DA  Babberich<br>Tel.: +31 (0)88 4272727<br>Fax: +31 (0)88 4272789<br>Home Page: <a href="http://www.vdb.nl/" target="_blank">http://www.vdb.nl/</a></span><br data-mce-bogus="1"></p></div></div><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black"> </span></p></div><div class="MsoNormal" style="text-align:center" align="center"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black"><hr id="zwchr" align="center" width="100%" size="2"></span></div><div><p class="MsoNormal"><b><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black">Van: </span></b><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black">"Jerry Benton" <<a href="mailto:jerry.benton@mailborder.com" target="_blank">jerry.benton@mailborder.com</a>><br><b>Aan: </b>"MailScanner Discussion" <<a href="mailto:mailscanner@lists.mailscanner.info" target="_blank">mailscanner@lists.mailscanner.info</a>><br><b>Verzonden: </b>Donderdag 3 augustus 2017 16:42:51<br><b>Onderwerp: </b>RE: Phishing Server Change</span></p></div><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black"> </span></p></div><div><p class="MsoNormal"><span style="color:black">Thom,</span></p><p class="MsoNormal"><span style="color:black"> </span></p><p class="MsoNormal"><span style="color:black">Yes, that is correct. I can disable the rejections so you can do your testing. </span></p><p class="MsoNormal"><span style="color:black"> </span></p><p class="MsoNormal"><span style="color:black">Ok … done. I disabled the rejects. </span></p><p class="MsoNormal"><span style="color:black"> </span></p><div><p class="MsoNormal"><span style="color:black"> </span></p><p class="MsoNormal"><span style="color:black">--</span></p><p class="MsoNormal"><span style="color:black">Jerry Benton</span></p><p class="MsoNormal"><span style="color:black"><a href="http://www.mailborder.com/" target="_blank">www.mailborder.com</a><br>+1   (843) 800-8605</span></p><p class="MsoNormal" style="margin-bottom:12.0pt"><span style="color:black">+44 (020) 3883-8605</span></p></div><p class="MsoNormal"><span style="color:black"> </span></p><div><div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in"><p class="MsoNormal"><b><span style="color:black">From:</span></b><span style="color:black"> MailScanner [<a href="mailto:mailscanner-bounces+jerry.benton=mailborder.com@lists.mailscanner.info" target="_blank">mailto:mailscanner-bounces+jerry.benton=mailborder.com@lists.mailscanner.info</a>] <b>On Behalf Of </b>Thom van der Boon<br><b>Sent:</b> Thursday, August 3, 2017 9:46 AM<br><b>To:</b> MailScanner Discussion <<a href="mailto:mailscanner@lists.mailscanner.info" target="_blank">mailscanner@lists.mailscanner.info</a>><br><b>Subject:</b> Re: Phishing Server Change</span></p></div></div><p class="MsoNormal"><span style="color:black"> </span></p><div><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black">Jerry,</span><span style="color:black"></span></p></div><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black"> </span><span style="color:black"></span></p></div><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black">I am currently debugging a update to the script </span><span style="color:black"></span></p></div><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black"> </span><span style="color:black"></span></p></div><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black">I am currently trying to get the wget part working that i only downloads when the remote file is newer... but the server refuses wget... is that correct?</span><span style="color:black"></span></p></div><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black"> </span><span style="color:black"></span></p></div><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black"> </span><span style="color:black"></span></p></div><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black"> </span><span style="color:black"></span></p></div><div><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black">Met vriendelijke groet, Best regards,</span><span style="color:black"></span></p></div><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black"> </span><span style="color:black"></span></p></div><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black"><br>Thom van der Boon<br>E-Mail: <a href="mailto:thom@vdb.nl" target="_blank">thom@vdb.nl</a></span><span style="color:black"></span></p></div><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black"> </span><span style="color:black"></span></p></div><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black"><br><br>=====</span><span style="color:black"></span></p></div><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black"> </span><span style="color:black"></span></p></div><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black"> </span><span style="color:black"></span></p></div><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black"> </span><span style="color:black"></span></p></div><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black">Thom.H. van der Boon b.v.<br>Transito 4</span><span style="color:black"></span></p></div><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black">6909 DA  Babberich<br>Tel.: +31 (0)88 4272727<br>Fax: +31 (0)88 4272789<br>Home Page: <a href="http://www.vdb.nl/" target="_blank">http://www.vdb.nl/</a></span><span style="color:black"></span></p></div></div><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black"> </span><span style="color:black"></span></p></div><div class="MsoNormal" style="text-align:center" align="center"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black"><hr align="center" width="100%" size="2"></span></div><div><p class="MsoNormal"><b><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black">Van: </span></b><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black">"Jerry Benton" <<a href="mailto:jerry.benton@mailborder.com" target="_blank">jerry.benton@mailborder.com</a>><br><b>Aan: </b>"MailScanner Discussion" <<a href="mailto:mailscanner@lists.mailscanner.info" target="_blank">mailscanner@lists.mailscanner.info</a>><br><b>Verzonden: </b>Donderdag 3 augustus 2017 07:03:07<br><b>Onderwerp: </b>Phishing Server Change</span><span style="color:black"></span></p></div><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black"> </span><span style="color:black"></span></p></div><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black">Please use the updated version of the phishing updates script from<br><a href="http://phishing.mailscanner.info/" target="_blank">http://phishing.mailscanner.info/</a><br><br>I am trying to reduce bandwidth and the new script uses curl as the primary<br>method, which support gzip by default. The fallback is wget, which uses more<br>bandwidth. Most servers are still using the older update script version that<br>uses wget as the primary method. (You cannot just tell wget to use gzip<br>because the downloaded file ends up staying compressed and thus useless.) <br><br>The phishing server does about 550GB per month in transfers. Using wget the<br>bad phishing file transfer size is 280081 and with curl it is 119027. That<br>is almost half the transfer size. I would like to try to get that 550GB<br>number down. I don't want to have to pull out the big stick and start<br>blocking wget user agents, so please help me out here. <br><br>As a side note, there is no point in updating the phishing files every hour.<br>They get updated six times per day. If you are running every hour, please<br>change your cron settings to something less taxing. Again, I don't want to<br>pull out the big stick and start throttling IPs that are updating too often.<br><br><br>--<br>Jerry Benton<br><a href="http://www.mailborder.com" target="_blank">www.mailborder.com</a><br>+1   (843) 800-8605<br>+44 (020) 3883-8605<br><br><br><br><br><br>-- <br>MailScanner mailing list<br><a href="mailto:mailscanner@lists.mailscanner.info" target="_blank">mailscanner@lists.mailscanner.info</a><br><a href="http://lists.mailscanner.info/mailman/listinfo/mailscanner" target="_blank">http://lists.mailscanner.info/mailman/listinfo/mailscanner</a></span><span style="color:black"></span></p></div></div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black"><br><br><br>-- <br>MailScanner mailing list<br><a href="mailto:mailscanner@lists.mailscanner.info" target="_blank">mailscanner@lists.mailscanner.info</a><br><a href="http://lists.mailscanner.info/mailman/listinfo/mailscanner" target="_blank">http://lists.mailscanner.info/mailman/listinfo/mailscanner</a></span><br data-mce-bogus="1"></p></div></div></div><br><br><br>-- <br>MailScanner mailing list<br>mailscanner@lists.mailscanner.info<br>http://lists.mailscanner.info/mailman/listinfo/mailscanner<br></div></div></body></html>