Code: Select all
if (($lgfile eq $config{CUSTOM2_LOG}) and ($line =~ /^\S+\s+\S+\s+\S+\s+(\S+)+\s+info: found invalid helo 'ylmf-pc'/g)) {
return ("smtp_auth attack",$1,"SecmasYLMF","1","1");
}
Code: Select all
if (($lgfile eq $config{CUSTOM2_LOG}) and ($line =~ /^\S+\s+\S+\s+\S+\s+(\S+)+\s+info: found invalid helo 'ylmf-pc'/g)) {
return ("smtp_auth attack",$1,"SecmasYLMF","1","1");
}
Code: Select all
Feb 16 08:13:32 mail02 postfix/submission/smtpd[4312]: warning: unknown[85.219.80.99]: SASL PLAIN authentication failed:
Code: Select all
CUSTOM1_LOG = "/var/log/mail.log"
Code: Select all
if (($globlogs{CUSTOM1_LOG} {$lgfile}) and ($line =~ /^\S+\s+\d+\s+\S+ \S+ postfix\/submission\/smtpd\[\d+\]: warning:.*\[(\d+\.\d+\.\d+\.\d+)\]: SASL [A-Z]*? authentication failed/)) {
return ("Failed SASL login from",$1,"mysaslmatch","10","25,465,587","1");
}
Code: Select all
# MJ12-Bot / Baidu / Ahrefs
if (($globlogs{CUSTOM2_LOG}{$lgfile}) and ($line =~ /(\S+).*\"*(?:GET|POST|HEAD).* (MJ12bot|Baiduspider|AhrefsBot|UptimeRobot).*/)) {
return ("LFD - MJ12-Baidu-Ahrefs-bot Overuse",$1,"BOTOVERUSE","15","80,443,21,25,22,23","48800");
}
Code: Select all
# RBL Mailer
# 1 try; 3 day ban
# CUSTOM1_LOG = "/var/log/exim_rejectlog"
# Works on CentOS6/7, exim MTA, cPanel
if (($globlogs{CUSTOM1_LOG}{$lgfile}) and ($line =~ /^.*\[(\S+)\]:\d+\s+.*is in an RBL.*/)) {
return ("RBL sender",$1,"RBLmailer","1","","259200");
}
I't not quite the same thing as having access to the entire RBL, but it's close! This approach won't catch the first one, but it will catch subsequent ones. And it's fine if they want to roll their IPs; it just works toward a netblock.2019-08-11 13:50:13 H=(papa.goldi.live) [67.198.188.218]:41133 F=<13333-59-58683-2647-user=example.com@mail.goldi.live> rejected RCPT <user@example.com>: "JunkMail rejected - (papa.goldi.live) [67.198.188.218]:41133 is in an RBL: listed, see https://spameatingmonkey.com/lookup/67.198.188.218"
2019-08-11 15:35:02 H=(moreno.eractiithatoun250505h.top) [67.198.188.219]:40207 F=<13335-59-58683-2830-user=example.com@mail.eractiithatoun250505h.top> rejected RCPT <user@example.com>: "JunkMail rejected - (moreno.eractiithatoun250505h.top) [67.198.188.219]:40207 is in an RBL: listed, see https://spameatingmonkey.com/lookup/67.198.188.219"
2019-08-13 05:10:47 H=(grid.rounhatsrovbanhs5f0.top) [67.198.188.168]:48147 F=<13397-8410-74129-2876-user=example.com@mail.rounhatsrovbanhs5f0.top> rejected RCPT <user@example.com>: "JunkMail rejected - (grid.rounhatsrovbanhs5f0.top) [67.198.188.168]:48147 is in an RBL: listed, see https://spameatingmonkey.com/lookup/67.198.188.168"
2019-08-13 14:47:05 H=(rouge.tingdrivi.trade) [67.198.130.45]:44267 F=<7139-26-981051-1853-user=example.com@mail.tingdrivi.trade> rejected RCPT <user@example.com>: "JunkMail rejected - (rouge.tingdrivi.trade) [67.198.130.45]:44267 is in an RBL: Listed in PSBL, see http://psbl.org/listing?ip=67.198.130.45"
2019-07-14 09:48:59 H=xdavp.multiplyallown.com (stream.betwwn210uhd.xyz) [67.198.130.58]:55949 F=<19014-97-14183219-4030-user=example.com@mail.betwwn210uhd.xyz> rejected RCPT <user@example.com>: "JunkMail rejected - xdavp.multiplyallown.com (stream.betwwn210uhd.xyz) [67.198.130.58]:55949 is in an RBL: Client host blocked using Barracuda Reputation, see http://www.barracudanetworks.com/reputa ... 198.130.58"