[GH-ISSUE #325] There's a way to configure SCP, DKIM and DMARC in Mailpit? #214

Closed
opened 2026-03-15 13:15:32 +03:00 by kerem · 5 comments
Owner

Originally created by @zJvco on GitHub (Jun 28, 2024).
Original GitHub issue: https://github.com/axllent/mailpit/issues/325

I'm trying to configurate the SCP, DKIM and DMARC in mailpit, but I didn't find anything helpful about it on documentation. My goal is to use mailpit as a MTA (relay smtp server) only to relay the messages.

Originally created by @zJvco on GitHub (Jun 28, 2024). Original GitHub issue: https://github.com/axllent/mailpit/issues/325 I'm trying to configurate the SCP, DKIM and DMARC in mailpit, but I didn't find anything helpful about it on documentation. My goal is to use mailpit as a MTA (relay smtp server) only to relay the messages.
kerem closed this issue 2026-03-15 13:15:37 +03:00
Author
Owner

@axllent commented on GitHub (Jun 28, 2024):

Hi @zJvco . Whilst Mailpit can relay messages via another SMTP server, Mailpit itself does not deliver messages directly to the individual MX servers to whom the emails are addressed. If you are wanting to add SPF/DMARC/DKIM then you will need to add this functionality to the relay SMTP server (which Mailpit is configured to relay through) as that is the server delivering the messages directly to the individual MX servers configured by their domain names.

So if Mailpit is configured to use a specific postfix server to relay messages, then that postfix server will need to be configured.

<!-- gh-comment-id:2196127623 --> @axllent commented on GitHub (Jun 28, 2024): Hi @zJvco . Whilst Mailpit can relay messages via another SMTP server, Mailpit itself does not deliver messages directly to the individual MX servers to whom the emails are addressed. If you are wanting to add SPF/DMARC/DKIM then you will need to add this functionality to the relay SMTP server (which Mailpit is configured to relay through) as that is the server delivering the messages directly to the individual MX servers configured by their domain names. So if Mailpit is configured to use a specific postfix server to relay messages, then that postfix server will need to be configured.
Author
Owner

@zJvco commented on GitHub (Jun 29, 2024):

Hi!

In that case, Mailpit can't send e-mails to mail providers like Gmail or Outlook?

My Scenario is: I have one application (in one AWS EC2) that connects to Mailpit (which is in other AWS EC2) to relay e-mail to providers like Gmail.

relay smtp file:

host: mail.example.com.br
port: 25
starttls: true
allow-insecure: false
auth: login
username: test
password: test
secret:
return-path:
allowed-recipients:

It works?

<!-- gh-comment-id:2197864158 --> @zJvco commented on GitHub (Jun 29, 2024): Hi! In that case, Mailpit can't send e-mails to mail providers like Gmail or Outlook? My Scenario is: I have one application (in one AWS EC2) that connects to Mailpit (which is in other AWS EC2) to relay e-mail to providers like Gmail. relay smtp file: host: mail.example.com.br port: 25 starttls: true allow-insecure: false auth: login username: test password: test secret: return-path: allowed-recipients: It works?
Author
Owner

@axllent commented on GitHub (Jun 29, 2024):

Mailpit will "resend" (route) your email via mail.example.com.br - and it is mail.example.com.br that then delivers the messages to providers like Gmail & Outlook, not Mailpit. If you need SPF etc, then this needs to be configured on mail.example.com.br. Does that make sense?

<!-- gh-comment-id:2197877183 --> @axllent commented on GitHub (Jun 29, 2024): Mailpit will "resend" (route) your email via `mail.example.com.br` - and it is `mail.example.com.br` that then delivers the messages to providers like Gmail & Outlook, not Mailpit. If you need SPF etc, then this needs to be configured on `mail.example.com.br`. Does that make sense?
Author
Owner

@zJvco commented on GitHub (Jun 29, 2024):

So it should be:

My application (EC2) > SMTP Server (Mailpit) > Postfix (SMTP Relay)?

That's right?

<!-- gh-comment-id:2198336208 --> @zJvco commented on GitHub (Jun 29, 2024): So it should be: My application (EC2) > SMTP Server (Mailpit) > Postfix (SMTP Relay)? That's right?
Author
Owner

@axllent commented on GitHub (Jun 30, 2024):

Exactly 👍

<!-- gh-comment-id:2198377185 --> @axllent commented on GitHub (Jun 30, 2024): Exactly 👍
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/mailpit#214
No description provided.