mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-27 12:16:42 +00:00
Prefer From header instead of MAIL FROM address
This commit is contained in:
@ -17,7 +17,7 @@ Feature: SMTP initiation
|
||||
Given there is connected user "user"
|
||||
When SMTP client authenticates "user"
|
||||
Then SMTP response is "OK"
|
||||
When SMTP client sends "MAIL FROM:<user@pm.me>"
|
||||
When SMTP client sends "MAIL FROM:<[userAddress]>"
|
||||
Then SMTP response is "OK"
|
||||
When SMTP client sends "RCPT TO:<user@pm.me>"
|
||||
Then SMTP response is "OK"
|
||||
@ -37,7 +37,7 @@ Feature: SMTP initiation
|
||||
Given there is connected user "user"
|
||||
When SMTP client authenticates "user"
|
||||
Then SMTP response is "OK"
|
||||
When SMTP client sends "MAIL FROM:<user@pm.me>"
|
||||
When SMTP client sends "MAIL FROM:<[userAddress]>"
|
||||
Then SMTP response is "OK"
|
||||
When SMTP client sends "DATA"
|
||||
Then SMTP response is "SMTP error: 502 5.5.1 Missing RCPT TO command."
|
||||
@ -53,13 +53,13 @@ Feature: SMTP initiation
|
||||
When SMTP client sends "DATA"
|
||||
Then SMTP response is "OK"
|
||||
When SMTP client sends "hello\r\n."
|
||||
Then SMTP response is "SMTP error: 554 5.0.0 Error: transaction failed, blame it on the weather: missing sender"
|
||||
Then SMTP response is "SMTP error: 554 5.0.0 Error: transaction failed, blame it on the weather: missing return path"
|
||||
|
||||
Scenario: Send with empty TO
|
||||
Given there is connected user "user"
|
||||
When SMTP client authenticates "user"
|
||||
Then SMTP response is "OK"
|
||||
When SMTP client sends "MAIL FROM:<user@pm.me>"
|
||||
When SMTP client sends "MAIL FROM:<[userAddress]>"
|
||||
Then SMTP response is "OK"
|
||||
When SMTP client sends "RCPT TO:<>"
|
||||
Then SMTP response is "OK"
|
||||
@ -72,12 +72,19 @@ Feature: SMTP initiation
|
||||
Given there is connected user "user"
|
||||
When SMTP client authenticates "user"
|
||||
Then SMTP response is "OK"
|
||||
When SMTP client sends "MAIL FROM:<user@pm.me> BODY=7BIT"
|
||||
When SMTP client sends "MAIL FROM:<[userAddress]> BODY=7BIT"
|
||||
Then SMTP response is "OK"
|
||||
|
||||
Scenario: Allow AUTH parameter of MAIL FROM command
|
||||
Given there is connected user "user"
|
||||
When SMTP client authenticates "user"
|
||||
Then SMTP response is "OK"
|
||||
When SMTP client sends "MAIL FROM:<user@pm.me> AUTH=<>"
|
||||
When SMTP client sends "MAIL FROM:<[userAddress]> AUTH=<>"
|
||||
Then SMTP response is "OK"
|
||||
|
||||
Scenario: FROM not owned by user
|
||||
Given there is connected user "user"
|
||||
When SMTP client authenticates "user"
|
||||
Then SMTP response is "OK"
|
||||
When SMTP client sends "MAIL FROM:<user@pm.test>"
|
||||
Then SMTP response is "SMTP error: 451 4.0.0 backend: invalid return path: not owned by user"
|
||||
|
||||
Reference in New Issue
Block a user