sanitize rcpt_to in greylisting_needed
This commit is contained in:
parent
18263c2fd5
commit
c48b5038f3
|
@ -95,13 +95,13 @@ def greylisting_needed_reply_phase(reply_email: str) -> bool:
|
||||||
|
|
||||||
def greylisting_needed(mail_from: str, rcpt_tos: [str]) -> bool:
|
def greylisting_needed(mail_from: str, rcpt_tos: [str]) -> bool:
|
||||||
for rcpt_to in rcpt_tos:
|
for rcpt_to in rcpt_tos:
|
||||||
|
rcpt_to = rcpt_to.lower().strip().replace(" ", "")
|
||||||
if rcpt_to.startswith("reply+") or rcpt_to.startswith("ra+"):
|
if rcpt_to.startswith("reply+") or rcpt_to.startswith("ra+"):
|
||||||
reply_email = rcpt_to.lower()
|
if greylisting_needed_reply_phase(rcpt_to):
|
||||||
if greylisting_needed_reply_phase(reply_email):
|
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
# Forward phase
|
# Forward phase
|
||||||
address = rcpt_to.lower() # alias@SL
|
address = rcpt_to # alias@SL
|
||||||
if greylisting_needed_forward_phase(address):
|
if greylisting_needed_forward_phase(address):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue