cowgill / spamhaus

A shell script that grabs the latest Spamhaus DROP List and adds it to iptables.
48 stars 21 forks source link

Update spamhaus.sh #4

Open ShamimIslam opened 7 years ago

ShamimIslam commented 7 years ago

I have changed this to accept a few flags to make it runnable from cron quietly, runnable from rc.local with cached content, cached spamhous drop.lasso, and have allowed for a dry run of the downloaded file.

The previous version would automatically make the mail server unprotected should there be an error in downloading the spamhaus file.

The downloaded file can be further validated before it is moved but at this time, this is good enough. If the spamhaus file is empty, we ignore it. It should probably generate an email but I have not gotten to that yet.

ShamimIslam commented 7 years ago

I used your script for a while and found I needed to make these changes in order to run it on an unmonitored server so that I could be assured the mail server would stay protected and that I would not get a lot of unnecessary cron mail.