[GH-ISSUE #2521] Server only for sending mails #1622

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

Originally created by @blu-IT on GitHub (May 23, 2022).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/2521

Hello,

I have a modoboa mailserver successfully running for one domain, let's say domain1.com. On this domain1 mails are sent and receieved.

Now I want to configure a second domain, let's say domain2.com on this server, but only for sending mails via this server. The mailbox of that domain itself should stay at the webhoster system as it already is. So mails for domian2 should not be receieved and stored on this host.

I am not sure how to achieve this. Do I have to "fully" configure the new domain2.com in modoboa and only change SPF-records in the DNS system of the webhoster to allow sending from this host? Or do I have to configure a "relay-domain"?

Thanks!

Regards

Originally created by @blu-IT on GitHub (May 23, 2022). Original GitHub issue: https://github.com/modoboa/modoboa/issues/2521 Hello, I have a modoboa mailserver successfully running for one domain, let's say domain1.com. On this domain1 mails are sent and receieved. Now I want to configure a second domain, let's say domain2.com on this server, **but only for sending** mails via this server. The mailbox of that domain itself should stay at the webhoster system as it already is. **So mails for domian2 should not be receieved and stored on this host.** I am not sure how to achieve this. Do I have to "fully" configure the new domain2.com in modoboa and only change SPF-records in the DNS system of the webhoster to allow sending from this host? Or do I have to configure a "relay-domain"? Thanks! Regards
kerem 2026-02-27 11:18:10 +03:00
  • closed this issue
  • added the
    stale
    label
Author
Owner

@tonioo commented on GitHub (May 25, 2022):

@blu-IT I think this is pretty similar to #2450 ?

<!-- gh-comment-id:1137321408 --> @tonioo commented on GitHub (May 25, 2022): @blu-IT I think this is pretty similar to #2450 ?
Author
Owner

@blu-IT commented on GitHub (Jun 2, 2022):

@tonioo Yes, it is a little bit similar, but I want that people are able to respond. Mails still have to be accepted by the "old" existing mx-server for the domain.
So the already implemented "relay-domain" does not solve this? It only accepts mails and forwards to the destination server (here it would be my "old" already existing my-server) or can a relay-domain server also be used as a pure smtp-server for sending mails?

The problem is, that postfix at the moment only accepts sending mails for domain1.com. For domain2.com it does not work using domain1.com credentials - what is good for preventing sending spam or being abused as an open relay. But I am not sure in which restriction or table I would have to add to permit sending for domain2.com.

<!-- gh-comment-id:1145311029 --> @blu-IT commented on GitHub (Jun 2, 2022): @tonioo Yes, it is a little bit similar, but I want that people are able to respond. Mails still have to be accepted by the "old" existing mx-server for the domain. So the already implemented "relay-domain" does not solve this? It only accepts mails and forwards to the destination server (here it would be my "old" already existing my-server) or can a relay-domain server also be used as a pure smtp-server for sending mails? The problem is, that postfix at the moment only accepts sending mails for domain1.com. For domain2.com it does not work using domain1.com credentials - what is good for preventing sending spam or being abused as an open relay. But I am not sure in which restriction or table I would have to add to permit sending for domain2.com.
Author
Owner

@blu-IT commented on GitHub (Jun 2, 2022):

I think something like this will be a solution: https://www.linuxbabe.com/mail-server/postfix-send-only-multiple-domains-ubuntu

DKIM is important, so I will have to handle with "relay-domain" setup on modoboa I think...

<!-- gh-comment-id:1145321958 --> @blu-IT commented on GitHub (Jun 2, 2022): I think something like this will be a solution: https://www.linuxbabe.com/mail-server/postfix-send-only-multiple-domains-ubuntu DKIM is important, so I will have to handle with "relay-domain" setup on modoboa I think...
Author
Owner

@ksaadDE commented on GitHub (Jun 27, 2022):

I think something like this will be a solution: https://www.linuxbabe.com/mail-server/postfix-send-only-multiple-domains-ubuntu

DKIM is important, so I will have to handle with "relay-domain" setup on modoboa I think...

Is your issue solved? ^^

<!-- gh-comment-id:1167965199 --> @ksaadDE commented on GitHub (Jun 27, 2022): > I think something like this will be a solution: https://www.linuxbabe.com/mail-server/postfix-send-only-multiple-domains-ubuntu > > DKIM is important, so I will have to handle with "relay-domain" setup on modoboa I think... Is your issue solved? ^^
Author
Owner

@blu-IT commented on GitHub (Jul 25, 2022):

Sorry for the delay! I found another workaround for the moment. Only a temporary solution.

But I am still not sure what configuring a "relay-domain" in modoboa means? Does ist mean, that modoboa accepts mails for the relay domain and forwards the mail to the destination where the domain / mailboxes are really hosted or is a relay domain on modoba a sending gateway for the "real" mailserver somewhere else?

<!-- gh-comment-id:1194642773 --> @blu-IT commented on GitHub (Jul 25, 2022): Sorry for the delay! I found another workaround for the moment. Only a temporary solution. But I am still not sure what configuring a "relay-domain" in modoboa means? Does ist mean, that modoboa accepts mails for the relay domain and forwards the mail to the destination where the domain / mailboxes _are really hosted_ or is a relay domain on modoba a sending gateway for the "real" mailserver somewhere else?
Author
Owner

@stale[bot] commented on GitHub (Sep 24, 2022):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

<!-- gh-comment-id:1256842626 --> @stale[bot] commented on GitHub (Sep 24, 2022): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Author
Owner

@ksaadDE commented on GitHub (Sep 28, 2022):

Sorry for the delay! I found another workaround for the moment. Only a temporary solution.

But I am still not sure what configuring a "relay-domain" in modoboa means? Does ist mean, that modoboa accepts mails for the relay domain and forwards the mail to the destination where the domain / mailboxes are really hosted or is a relay domain on modoba a sending gateway for the "real" mailserver somewhere else?

hey, lets discuss on the discord about the other issues.

<!-- gh-comment-id:1261475604 --> @ksaadDE commented on GitHub (Sep 28, 2022): > Sorry for the delay! I found another workaround for the moment. Only a temporary solution. > > But I am still not sure what configuring a "relay-domain" in modoboa means? Does ist mean, that modoboa accepts mails for the relay domain and forwards the mail to the destination where the domain / mailboxes _are really hosted_ or is a relay domain on modoba a sending gateway for the "real" mailserver somewhere else? hey, lets discuss on the discord about the other issues.
Author
Owner

@stale[bot] commented on GitHub (Nov 28, 2022):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

<!-- gh-comment-id:1328567392 --> @stale[bot] commented on GitHub (Nov 28, 2022): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
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#1622
No description provided.