Phishing Update Service
Jerry Benton
jerry.benton at mailborder.com
Sun Jun 22 23:36:58 IST 2014
Rick,
I will update it later. For now I would suggest just updating the links in the script for you /opt install.
-
Jerry Benton
www.mailborder.com
On Jun 23, 2014, at 12:00 AM, Rick Cooper <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
> [mailto: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
> http://lists.mailscanner.info/mailman/listinfo/mailscanner
>
> Before posting, read http://wiki.mailscanner.info/posting
>
> Support MailScanner development - buy the book off the website!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.mailscanner.info/pipermail/mailscanner/attachments/20140623/5cb004e4/attachment.html
More information about the MailScanner
mailing list