sender rewriting when using external SMTP
-
I want to use the external SMTP option for the built-in Cloudron mail server. The server which I want to use as a relay server only accepts specific sender addresses though. I think this is the case for many mailservers nowadays.
In the past, when I set up simple app servers, I configured postfix to use a smarthost and used the generic_maps-feature to rewrite the sender address of all outgoing emails. I don't know if that is possible with the built-in mailserver of cloudron. If it is possible, an option in the Cloudron Email relay dialog for a fixed sender address which configures the mailserver that way would be great.
-
@hendrikvl Since Cloudron hosts multiple apps, our mail server is designed to forward emails to a relay preserving the sender address. Each app is given a from address which is configurable through the App's mail UI.
Is your relay able to forward based on IP whitelist instead? If so, you can whitelist the Cloudron IP in the relay.
Also, does the generic_maps feature overwrite just the envelope from or the mail from as well? Cloudron mail server currently passes through both these to the relay (after auth).
-
The postfix generic_maps feature only overwrites the envelope-from.
I actually installed Postfix on my Cloudron Host, listening on the gateway address of the Cloudron-network and used that address as mail server in the Cloudron mail settings. The setup works, but it seems a bit odd to have an extra postfix running just to do the address rewriting.
But using this setup, all my apps can send mails which have the app-specific sender in the From-Header. Only the envelope-from is rewritten to the generic address.
And no, my mail relay does not accept IP whitelisting. It's not a proper mail relay service to be exact, but just a regular mail service with outgoing smtp for authenticated users.
-
@hendrikvl said in sender rewriting when using external SMTP:
And no, my mail relay does not accept IP whitelisting. It's not a proper mail relay service to be exact, but just a regular mail service with outgoing smtp for authenticated users.
Ah yes, someone was trying to do this with a gmail account as well sometime back (and more recently with a mailbox.org account). I think we have to implement this feature in Cloudron to make this use case work.