Replies: 29 comments
|
I'm looking for the same exact thing. +1 |
|
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? |
|
Yes, exactly On Tue, Feb 10, 2015 at 5:30 AM, Timo Röhling [email protected]
|
|
Yes! That would be very appreciated! +1 |
|
+1 |
|
+1 |
|
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. |
|
@roehling: Seems like srs-milter is also not able to work with multiple domains, right? |
|
@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. |
|
+1 |
|
+1 |
|
-0.01 source: http://mail-tester.com maybe +2 if possible :] |
|
+1+1+1+1 !!! |
|
+1+1+1+1+1+1+1! |
|
Do not let us down :-) |
|
Be nice if you could pull the domains out of LDAP, like how postfix and other things use LDAP for data. |
|
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. |
|
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. |
|
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): |
|
@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. |
|
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... |
|
It's not the setting of SRS_DOMAIN alone. The appended domain gets rewritten to the "main-domain" only! |
|
+1 |
|
+1 |
|
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). |
|
+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?? |
|
I am interested in this too. @roehling: would you take a bounty for this issue? |
|
+1 |
|
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? |
Uh oh!
There was an error while loading. Please reload this page.
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?
All reactions