alert phishing attempt

This commit is contained in:
Son Nguyen Kim 2021-07-11 08:40:10 +02:00
parent f59651045d
commit 7ae60b9d82
1 changed files with 4 additions and 0 deletions

View File

@ -507,6 +507,10 @@ def handle_forward(envelope, msg: Message, rcpt_to: str) -> List[Tuple[bool, str
if msg["Reply-To"]:
# force convert header to string, sometimes contact_from_header is Header object
from_header = str(msg["Reply-To"])
# alert phishing attempt when reply-to = alias
if from_header == alias.email:
LOG.e("Reply-to same as alias %s", alias)
else:
from_header = str(msg["From"])