Replies: 29 comments
-
I'm looking for the same exact thing. +1 |
Beta Was this translation helpful? Give feedback.
-
Just making sure I understood this right: you have a mail server serving multiple domains and you wish for PostSRSd to rewrite the address with the matching domain name for each forwarded domain? |
Beta Was this translation helpful? Give feedback.
-
Yes, exactly On Tue, Feb 10, 2015 at 5:30 AM, Timo Röhling [email protected]
|
Beta Was this translation helpful? Give feedback.
-
Yes! That would be very appreciated! +1 |
Beta Was this translation helpful? Give feedback.
-
+1 |
Beta Was this translation helpful? Give feedback.
-
I see the usefulness, but I'm afraid it won't be easy, because PostSRSd only talks to Postfix via the canonical map lookup query, so it only gets the sender's email address without any context (especially without the recipient). It might be possible if I completely rewrote PostSRSd to act as a milter (like https://github.com/emsearcy/srs-milter does), but this is not without issues. I will continue to look into this; if anyone has a good idea, I am open to suggestions. |
Beta Was this translation helpful? Give feedback.
-
@roehling: Seems like srs-milter is also not able to work with multiple domains, right? |
Beta Was this translation helpful? Give feedback.
-
@flokii No, and according to the README, you need to set up a second smtpd instance for the milter if you use virtual maps, or the milter won't see those rewrites. |
Beta Was this translation helpful? Give feedback.
-
-0.01 source: http://mail-tester.com maybe +2 if possible :] |
Beta Was this translation helpful? Give feedback.
-
+1+1+1+1 !!! |
Beta Was this translation helpful? Give feedback.
-
+1+1+1+1+1+1+1! |
Beta Was this translation helpful? Give feedback.
-
Do not let us down :-) |
Beta Was this translation helpful? Give feedback.
-
Be nice if you could pull the domains out of LDAP, like how postfix and other things use LDAP for data. |
Beta Was this translation helpful? Give feedback.
-
Just as an example, we have customers that host > 1000 domains. It's fairly trivial to construct an LDAP query that contains the list of "my domains". Much harder to try and maintain this in a flat file. |
Beta Was this translation helpful? Give feedback.
-
hm, and the config file only takes a single domain anyhow, so even if I could write it out into a flat file, it wouldn't help the problem. |
Beta Was this translation helpful? Give feedback.
-
Using SRS_EXCLUDE_DOMAINS and a script in */5 cron pulling domains from SQL/LDAP can do the job. I did so. Something like this (done for amavis, but easily adaptible to PostSRSd): |
Beta Was this translation helpful? Give feedback.
-
@emibcn The (very reasonable) request is for DYNAMIC handling of domains. A cron job that runs periodically is by definition not dynamic. Yes, there are any number of "poor mans" solutions to the problem. That's not what this request is about. |
Beta Was this translation helpful? Give feedback.
-
Then it will be needed to add all the possibilities for dynamic handling of domains in Postfix: MySQL, PostgreSQL, LDAP, static, tcp, etc Another aproach is to execute (somewhere inside PostSRSd): To verify if DOMAIN is internal. But this escalates other issues, for example if PostSRSd has access to execute correctly postconf and postmap, or if even those executables exist in the same -virtual- machine than PostSRSd. I suppose we will need to wait until PostSRSd turns into a real milter, if it ever occurs... |
Beta Was this translation helpful? Give feedback.
-
It's not the setting of SRS_DOMAIN alone. The appended domain gets rewritten to the "main-domain" only! |
Beta Was this translation helpful? Give feedback.
-
I'm not sure if this helps anyone but the way we work around this limit is as follows. We did setup one domain just for SRS rewrite like srs.masterdomain.com and MX for this domain is actually the same server that all our customer uses for their domain. The only problem we have right now is if bounced email is returned back to our server after customer switched provider (not our customer anymore). |
Beta Was this translation helpful? Give feedback.
-
+1 !!! Any update on this old issue? We have a mail relay server, that runs postfix, opendkim and postsrsd. This server is relaying, signing and rewriting mails for multiple domains. All mail sent thru this server is tagged with "T_HEADER_FROM_DIFFERENT_DOMAINS" with a downgrade of the score on mail-tester.com. How can we solve this?? |
Beta Was this translation helpful? Give feedback.
-
I am interested in this too. @roehling: would you take a bounty for this issue? |
Beta Was this translation helpful? Give feedback.
-
A scalable approach might be to replicate the Postsrsd process e.g. to then be able to run systemctl enable postsrsd1, systemctl enable postsrsd2, etc and then utilize the postfix pipe command under sender_canonical_maps and recipient_canonical_map to map to tcp:localhost:10001 and tcp:localhost:1002, tcp:localhost:1003 and tcp:localhost:1004 respectively, depending on the domain relevant to SRS_DOMAIN? Parsing out the relevant domain via Pipe(8) to map to a separate Postsrsd process for each domain? |
Beta Was this translation helpful? Give feedback.
-
The mail is delivered and SRS is working but gmail still includes a "mailed-by: example.com" which does not always match the domain in question in the case where the mailserver handles mail for multiple domains.
I'd like the appended SRS_DOMAIN to match the recipient's domain rather than the main mailserver domain (specified as "mydomain" in main.cf). Is this possible?
Beta Was this translation helpful? Give feedback.
All reactions