Phishing Update Service

Rick Cooper rcooper at dwford.com
Mon Jun 23 18:44:57 IST 2014


I am going to be tied up tight for a while, had a major server drop and am
placing the backup as I type so I dunno how long I am going to be with a new
template server and data backups

  _____  

From: mailscanner-bounces at lists.mailscanner.info
[mailto:mailscanner-bounces at lists.mailscanner.info] On Behalf Of Jerry
Benton
Sent: Monday, June 23, 2014 4:10 AM
To: MailScanner discussion
Subject: Phishing Update Service


Rick, 

Can you email me the complete script you came up with please? Would save me
some time. 


-
Jerry Benton
www.mailborder.com



On Jun 23, 2014, at 12:00 AM, Rick Cooper <rcooper at dwford.com
<javascript:_e(%7B%7D,'cvml','rcooper at dwford.com');> > wrote:


Could I suggest the following, it will accomidate /opt/MailScanner installs
as well as /etc/MailScanner installs, and it also will not overwright the
files if there is not a successful download. It also leaves the temp file
there if there is an issue. I removed the --no-check-certificate part
because it's not an ssl site so there is no point in the parameter. Of
course this could be greatly shortened by just checking for the files and
creating the links in the same fashion as the directory and if you really
want to be clean

MS_DIR=
If [ -f /opt/MailScanner/etc/phishing.safe.sites.conf ]; then
MS_DIR=/opt/MailScanner/etc/phishing.safe.sites.conf
fi
If [ -f /etc/MailScanner/phishing.safe.sites.conf ]; then
MS_DIR=/etc/MailScanner/phishing.safe.sites.conf
Fi

If [ "${MS_DIR}" == "" ]; then
echo phishing.safe.sites.conf cannot be found
echo EXITING
exit 1
fi

Then use MS_DIR in a mv command since there is no chance of over writing a
symlink

#!/bin/bash
# # Mailborder update safe phishing sites
# v4.1.3 # 20 June 2014
# # Run this script as a user with write permissions
# to /etc/MailScanner/phishing.safe.sites.conf
if [ ! -d /etc/MailScanner ]; then
echo etc/MailScanner does not exist, creating it
mkdir /etc/MailScanner
chmod 0644 /etc/MailScanner
fi

if [ -f  /etc/MailScanner/phishing.safe.sites.conf ]; then
/usr/bin/wget -O /tmp/phishing.safe.sites.conf
http://phishing.mailborder.com/phishing.safe.sites.conf
ERR_CODE=$?
if [ "$ERR_CODE" == "0" ]; then
 cp -f /tmp/phishing.safe.sites.conf
/etc/MailScanner/phishing.safe.sites.conf
 chmod 0644 /etc/MailScanner/phishing.bad.sites.conf
 rm -f /tmp/phishing.safe.sites.conf
else
 echo Had a problem downloading phishing.safe.sites.conf error code was
$ERR_CODE
fi
else
echo Linking opt Based MailScanner Files
ln -s /opt/MailScanner/etc/phishing.safe.sites.conf /etc/MailScanner/
/usr/bin/wget -O /tmp/phishing.safe.sites.conf
http://phishing.mailborder.com/phishing.safe.sites.conf
ERR_CODE=$?
if [ "$ERR_CODE" == "0" ]; then
 cp -f /tmp/phishing.safe.sites.conf
/etc/MailScanner/phishing.safe.sites.conf
 chmod 0644 /etc/MailScanner/phishing.bad.sites.conf
 rm -f /tmp/phishing.safe.sites.conf
else
 echo Had a problem downloading phishing.safe.sites.conf error code was
$ERR_CODE
fi
fi

________________________________

From: mailscanner-bounces at lists.mailscanner.info
<javascript:_e(%7B%7D,'cvml','mailscanner-bounces at lists.mailscanner.info');>

[mailto:mailscanner-bounces at lists.mailscanner.info
<javascript:_e(%7B%7D,'cvml','mailscanner-bounces at lists.mailscanner.info');>
] On Behalf Of Jerry
Benton
Sent: Friday, June 20, 2014 9:23 PM
To: MailScanner discussion
Subject: Phishing Update Service


Ok, I went a little further. There are now updated "safe" and "bad" phishing
sites once per day. Read more and get the scripts here if you want them. 

http://phishing.mailborder.com/



-
Jerry Benton
www.mailborder.com



-- 
MailScanner mailing list
mailscanner at lists.mailscanner.info
<javascript:_e(%7B%7D,'cvml','mailscanner at lists.mailscanner.info');> 
http://lists.mailscanner.info/mailman/listinfo/mailscanner

Before posting, read http://wiki.mailscanner.info/posting

Support MailScanner development - buy the book off the website! 





-- 


--

Jerry Benton

Mailborder Systems
www.mailborder.com


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.mailscanner.info/pipermail/mailscanner/attachments/20140623/723884ea/attachment-0001.html 


More information about the MailScanner mailing list