For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

SMTP Stream catching unapproved domains

Problem this snippet solves:

Use the default Stream profile and filter out mail to unapproved domains, and send to a bucket, the code is basic but the regex is very useful. 'mydomain' = the approved domain, everything else is matched.

Code :

when CLIENT_ACCEPTED {
log local0. "client accepted"
STREAM::expression {=RCPT TO:<[A-Za-z0-9._%+-]+@(?!(myOKDomain|myOtherOKDomain))[A-Za-z0-9.-]+\.[A-Za-z]{2,4}>=RCPT TO:=}
STREAM::enable
}
when STREAM_MATCHED {
log local0. "Stream filter matched: [STREAM::match]"
}
Published Mar 18, 2015
Version 1.0
No CommentsBe the first to comment