Skip to content

Commit 4d40339

Browse files
committed
Add spam block
Added spam block from known list.
1 parent 149d1ad commit 4d40339

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

regex.custom.pm

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,13 @@ sub custom_line {
260260
# return ("Client host rejected: hostname not found",$1,"smtphostname","4","","86400","0");
261261
# }
262262

263+
# Spammer blocked from known spamlist
264+
if (($config{LF_SMTPAUTH}) and ($globlogs{SMTPAUTH_LOG}{$lgfile}) and ($line =~ /^\S+\s+\d+\s+\S+ \S+ postfix\/smtpd\[\d+\]: NOQUEUE: reject: RCPT from \S+\[(\S+)\]: 554 5.7.1 Service unavailable; Client host \[(\S+)\] blocked using (\S+)/)) {
265+
$ip = $1; $acc = "";
266+
$ip =~ s/^::ffff://;
267+
if (&checkip($ip)) {return ("Email Spam: blocked using $4 ","$ip|$acc","Email Spam - Spoofing")} else {return}
268+
}
269+
263270
# If the matches in this file are not syntactically correct for perl then lfd
264271
# will fail with an error. You are responsible for the security of any regex
265272
# expressions you use. Remember that log file spoofing can exploit poorly

0 commit comments

Comments
 (0)