Multi-domain support #75
Replies: 12 comments
-
The same problem/question here. I have done quite some research and I cannot seem to find a SRS solution for shared mail hosting with postfix. It would be really great if postsrsd supported this, especially now that more and more mail servers use SPF. |
Beta Was this translation helpful? Give feedback.
-
+1 , google has a -all in SPF (hotmail is still ~all) |
Beta Was this translation helpful? Give feedback.
-
For what it is worth: this is technically not possible. Postsrsd is a TCP-based lookup table for Postfix. From the Postfix TCP_TABLE man page:
So basically what this means is that no state is sent to postsrsd. It is impossible for postsrsd to know what the original recipient address was and so has no way of selecting a correct domain to use for rewriting. This limitation is not inherent to tcp based lookup tables. Lookup tables in general cannot provide what you want because there is no way to retreive the original recipient. If you really want this you'll have to look elsewhere. Maybe a milter or have a look at the postfix pipe manual. The environment of the pipe command does contain the original recipient:
|
Beta Was this translation helpful? Give feedback.
-
@dpavlotzky, thanks a lot for taking the time to give such a detailed answer. I guess I will have to find a solution elsewhere... |
Beta Was this translation helpful? Give feedback.
-
Since there is no technical reason to use the forwarder's domain for the SRS rewrite, my favorite solution so far is using a dedicated SRS domain which is independent of any customer domains (e.g. |
Beta Was this translation helpful? Give feedback.
-
@roehling, would you mind elaborating a little on your solution? |
Beta Was this translation helpful? Give feedback.
-
The SRS rewrite is the process of turning If you need to forward a mail for any of your customer's domains, you can simply forward it with the |
Beta Was this translation helpful? Give feedback.
-
@roehling thanks a lot for the explanation. This sounds promising, so I will give it a try, as soon as I get some time. |
Beta Was this translation helpful? Give feedback.
-
is it still not possible? |
Beta Was this translation helpful? Give feedback.
-
Same problem also here. My hostname is e.g. webXX.mydomain.tld and now, since we host multiple domains under the same mail server, SRS rewrites email from [email protected] into "SRS0=thk5=O4=second.tld=[email protected]" - and when email is sent to recipient server which checks for SPF/TXT records - this fails, because this server is not allowed to send email in name of my primary domain "mydomain.tld" - this domain should have SRS rewritten to the origin sender domain, not output of "postconf -h mydomain". |
Beta Was this translation helpful? Give feedback.
-
Per the "srs.mailhoster.org" discussion/suggestion: I'm in the same boat as the rest of the folks. It SOUNDS like I need only add whatever my "srs.mailhoster.org" domain is to the SPF record of all the domains I support. Is this correct? FWIW, my mail gateway is MailGun..., so as a result of the SRS rewrite, I see all forwarded traffic submitted via the credentials of the single domain (i.e., more or less the mydomain config val). |
Beta Was this translation helpful? Give feedback.
-
If I understand correctly PostSRSd can only handle one domain. Is this correct? If not can please someone update the documentation to include an example on how to handle a postfix mail server which handles multiple domains.
Nowadays I don't know of any postfix mail server which only hosts one single domain. For example my postfix servers have hundred of domains which would all require SRS.
Beta Was this translation helpful? Give feedback.
All reactions