mirror of
https://github.com/axllent/mailpit.git
synced 2026-04-26 08:45:54 +03:00
[GH-ISSUE #235] Responses with different SMTP error codes #153
Labels
No labels
awaiting feedback
bug
docker
documentation
enhancement
github_actions
invalid
pull-request
question
stale
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/mailpit#153
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @DragoMlakar on GitHub (Jan 15, 2024).
Original GitHub issue: https://github.com/axllent/mailpit/issues/235
It would be convenient for testing that on some conditions response is SMTP error code.
Maybe some list of email addresses and error codes. Or even on mail content parsing.
Can this be done already and I'm missing something?
@axllent commented on GitHub (Jan 15, 2024):
@DragoMlakar There is currently no way to artificially return an SMTP error code, only if there is an actual error. You could for instance set the
--smtp-max-recipients 3and provide 4 addresses (which would return an error code).What exactly are you trying to test here?
@DragoMlakar commented on GitHub (Jan 16, 2024):
Testing how real postfix behave on SMTP errors. Currently if all different NDN bounce mails are DKIM signed. It would be also convenient to test application logic how it handles different SMTP responses.
@axllent commented on GitHub (Jan 16, 2024):
Unfortunately what you are describing is completely out of scope for Mailpit - can you imagine how much work it would be to implement a full postfix "clone" including Non Delivery Reports, DKIM etc? The whole idea of Mailpit it that it accepts everything (provided it is a valid message + SMTP transaction), and then allows you to see what was delivered. Simply put, Mailpit is not postfix.
I have also considered artificial SMTP errors, but this gets really complicated to do it properly. I've seen some solutions that just return random error responses, however it is important that these errors are returned at the correct stage during the SMTP transaction, and again gets very complicated to implement correctly, especially when different SMTP servers return very different error messages for the same things.
You may find your solution by delivering your emails directly to an actual postfix server which is then configured to relay messages to Mailpit, but that's about all I can suggest, sorry.
@DragoMlakar commented on GitHub (Jan 16, 2024):
Thnx for feedback.
Found one that looks promising.
https://medium.com/linagora-engineering/a-mock-smtp-server-for-remote-mail-delivery-testing-2d1a2cfd2798