[GH-ISSUE #2985] Modoboa should allow the use of an external SMTP #1720

Closed
opened 2026-02-27 11:18:46 +03:00 by kerem · 3 comments
Owner

Originally created by @Toniob on GitHub (Apr 27, 2023).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/2985

Currently, Modoboa considers that the SMTP server is available on localhost. That’s a good assumption for most of the setups. But with bigger networks, it might not be the case. And if no SMTP server is available, some functions are failing : autoreply for example, and mail notifications too.

It should be allowed to configure an external SMTP for all those cases. I’m thinking about some configuration options in the settings file.

Originally created by @Toniob on GitHub (Apr 27, 2023). Original GitHub issue: https://github.com/modoboa/modoboa/issues/2985 Currently, Modoboa considers that the SMTP server is available on localhost. That’s a good assumption for most of the setups. But with bigger networks, it might not be the case. And if no SMTP server is available, some functions are failing : autoreply for example, and mail notifications too. It should be allowed to configure an external SMTP for all those cases. I’m thinking about some configuration options in the settings file.
kerem closed this issue 2026-02-27 11:18:46 +03:00
Author
Owner

@fpiccinali commented on GitHub (Oct 26, 2023):

And what about to have a list of domains and select a smtp dedicated.

Postfix can select a transport based on the author of the message.

Another idea :
We could also have a list of SMTP. We try to send a message with the first domain, and if it fail, we try we the second smtp , and so on.

<!-- gh-comment-id:1781139882 --> @fpiccinali commented on GitHub (Oct 26, 2023): And what about to have a list of domains and select a smtp dedicated. Postfix can select a transport based on the author of the message. Another idea : We could also have a list of SMTP. We try to send a message with the first domain, and if it fail, we try we the second smtp , and so on.
Author
Owner

@sabo14 commented on GitHub (Jan 28, 2024):

Modoboa should allow to use separate smtp setting for each domain

<!-- gh-comment-id:1913648359 --> @sabo14 commented on GitHub (Jan 28, 2024): Modoboa should allow to use separate smtp setting for each domain
Author
Owner

@tonioo commented on GitHub (Jul 15, 2025):

To reply to original question, which is related to Modoboa sending emails in some cases (mostly notifications), it's actually possible to configure a different SMTP server thanks to Django: https://docs.djangoproject.com/en/5.2/topics/email/.

@fpiccinali @sabo14 What you're suggesting might be achieved using sender_dependent_relayhost_maps setting in postfix, and a bit of work to make that customizable directly from the UI.

<!-- gh-comment-id:3074210022 --> @tonioo commented on GitHub (Jul 15, 2025): To reply to original question, which is related to Modoboa sending emails in some cases (mostly notifications), it's actually possible to configure a different SMTP server thanks to Django: https://docs.djangoproject.com/en/5.2/topics/email/. @fpiccinali @sabo14 What you're suggesting might be achieved using sender_dependent_relayhost_maps setting in postfix, and a bit of work to make that customizable directly from the UI.
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/modoboa-modoboa#1720
No description provided.