Replies: 2 comments 1 reply
-
nearly 3 months over, and no ideas out there... I have exactly the same issue - I already used postsrsd in the past, for several months but I had problems with some Sieve-Rules because of the unnecessary rewritten emailadresses... In the end I had to disable it on most of my servers, since I really didn't find a solution... Few days ago I restartet the effort, but I came to the same unhappy ending as last time: My knowledge seems not to be enough to get it running... I also figured out: with the default-settings (no backend mailserver - only a single mailserver) also sent mails to external domains are rewritten. I also tried it with SRS_EXCLUDE_DOMAINS= - that was stupid - it exactly worked the way vice versa: only outgoing mails have been rewritten, but no forwarded Mails, because the To-Address was an exluded domain... but neighter local delivered nor locally forwarded mails (external or internal target). And even if there would be an "INCLUDE_DOMAINS" function it wouldn't work - because it cannot differentiate beween ingoing and outgoing mails... postforward would be an alternative, like it is mentioned in the known issues - but honestly - it's an ugly installation and it's an ugly configuration and yeah, using pipe-transport seems also to be ugly to me... I like the way postsrsd works in total. This exactly same discussion can be found over and over again in different boards and in different toolings that use postfix... What I don't understand: is there noone out there who found a solution and want's to share it? And if there is a solution by postfix-configuration - please add it to the config info of postsrsd... I always think "hey, there must be an idea how we can use a mysql-query to set or not set sender_canonical_maps"... What I'm dreaming about is kind of an mysql-query, that queries an empty string (default value of sender_canonical_maps is empty) if a domain is known, and the necessary config "tcp:localhost:10001" in all other cases... this one I guess could even be figured out by me - but I fear, it wouldn't solve the problem that sent emails are also rewritten, also if it isn't a forward... What I had the most execations in, is the regex-solution in #76 - but I didn't get it working... First issue is: i use amavisd that is already using 10025 and 10027 - if i integrate it, there is a problem with the content-filter that is empty in my configuration - so i tried another port like 10029 additionally, but it NEVER rewrote anything.... Other Idea: multi-postfix - why not? one instance that accepts mails from outside, checks for forwarding - nothing else, does srs if outgoing forward, in all other cases, forward to next postfix-instance and there everything is like now... why not? Could be an additional configuration idea for postsrsd - just run it in a separated postfix-instance... but - how to configure? What I understand is: I hope anybody finds a solution or can go on with my thoughs and bring it to life, and then comes back and shares his solution with us... Thanks in advance |
Beta Was this translation helpful? Give feedback.
-
Got it working |
Beta Was this translation helpful? Give feedback.
-
Hello Support,
I tested now 3 days to get postsrsd worked with my postfix, nothing will work fine. I want to differentiate between local and external domains for the postsrsd. I have the following system:
Now I have the following problem, I create some forwarding e.g. mydomain.de to gmail.com. If I send now some E-Mail to mydomain.de the E-Mails is correctly forwarded to gmail.com with SRS, GREAT so far!
BUT if I now write some E-Mail from mydomain.de to e.g. mypersonaldomain.de (this domains is also on my Postfix Server) postsrsd REWRITE this email. Is there any solution to disable this? I have also tested this here:
#76
But after the changes in master.cf my Postfix Server is down. I have also installed amavisd on the Postfix Server but I think this is not the problem? Only if I added the "sender_canonical_maps=mysql:/etc/postfix/mysql_virtual_local_email.cf" to my master.cf the Postfix Server have the problems.
My second problem is if I write an email from a backend Mailserver who is relaying over my Postfix Server, postsrsd also rewrite the address. e.g. email from mypersonaldomain.de to gmail.com. But this email from my backend mailserver who relayed over Postfix it not a forwarding and I don't need postsrsd at this case.
In this case my Mailserver relaying over the Postfix (with postsrsd) and the Postfix (with postsrsd) send the email out to gmail.com BUT with postsrsd.
I like postsrsd really, because I need it on my mailserver I have several forward email addresses to gmail.com but how we can differentiate between local and external domains? Any idea or anything what we can do?
I have also see this in my log file, but this is for some INCOMMING email which was relayed and delivered internal. My Postfix Server relay this E-Mail to some internal server e.g. Exchange Server. Which some MySQL maybe I can solve this problem. So postsrsd knows if it is needed or not ?
postsrsd[10041]: srs_forward: <[email protected]> rewritten as <[email protected]>
At the moment all E-Mails that come to my Postfix Server touched by postsrsd. I have also tested:
SRS_EXCLUDE_DOMAINS=
And this is my Postfix main.cf config:
Hope for any idea that would be so nice!
Regards,
Oliver
Beta Was this translation helpful? Give feedback.
All reactions