Hi Michael, I did some tweaks on pfixtools I will have to have a look and check for you (I use it too.)
It's not the ideal method though and a milter is really the correct way to do SRS as the canonical filters, although giving almost desired effect, aren't ideal or intended for this. I'm eventually switching to srs-milter and will be improving it. Can you provide the pfixtools options you are using, and contents if the pfix-no-srs? Also the full bounce log entry including the user it showed could prove useful. Thanks Jason > On 2 Feb 2014, at 22:57, Michael McCallister > <mikemc-post...@terabytemedia.com> wrote: > > Hi, > > I am having some difficulty getting SRS to work properly with postfix and was > hoping someone here might be able to shed some light on my issue. Some quick > background on the problem: > > * Almost all email on this system just gets forwarded on elsewhere (no > local deliveries). This is implemented via virtual > (virtual_alias_domains and virtual_alias_maps). > * I am using pfix-srsd to handle envelope address rewriting: > https://github.com/Fruneau/pfixtools I am not sure if this is the > recommended tool to implement SRS within postfix - I am open to > alternatives. > * SRS deliveries work fine - it sends the email just like I would > expect and passes SPF tests > * The problem I am having is with SRS bounces (i.e. a SRS delivery > results in a bounce - which must then be sent back to the original > sender). Here is an example of the problem (please note that in the > below example, srsdomain.com is in mydestination): > > User 1 (us...@originaldomain.com) emails User 2 > (us...@forwardingdomain.com) where us...@forwardingdomain.com is > configured in virtual_alias_maps and forwardingdomain.com is > configured in virtual_alias_domains. pfix-srsd is running fine on > srsdomain.com (same result with or without -I). However, > us...@forwardingdomain.com forwards to badaddr...@gmail.com which > does not exist (will result in a 550 from gmail on attempted delivery). > o When us...@originaldomain.com sends an email to > us...@forwardingdomain.com, the sender address is rewritten to > srs0=pl7i=xe=originaldomain.com=us...@srsdomain.com as expected > o postfix determines, via virtual_alias_maps, to deliver the mail > to badaddr...@gmail.com > o The delivery to gmail.com results in a 550 and postfix then > bounces to srs0=pl7i=xe=originaldomain.com=us...@srsdomain.com > instead of us...@originaldomain.com. And here lies the problem - > I assumed it would bounce to us...@originaldomain.com (after > magically being rewritten by pfix-srsd) thereby alerting that > user of the problem, but instead when it delivers the bounce to > srs0=pl7i=xe=originaldomain.com=us...@srsdomain.com, postfix > issues a "status=bounced (unknown user:" error and deletes the > bounce. > * pfix-srsd is configured as such in main.cf > recipient_canonical_maps = cdb:/etc/postfix/pfix-no-srs.cf, > tcp:127.0.0.1:10002 > recipient_canonical_classes = envelope_recipient > sender_canonical_maps = cdb:/etc/postfix/pfix-no-srs.cf, > tcp:127.0.0.1:10001 > sender_canonical_classes = envelope_sender > > It of course should be noted that I am a postfix noob - I have always used > qmail in the past for my MTA needs, but I am required to use postfix for this > - seems like a nice MTA btw :-) > > Any advice on how to get bounces working? Am I using the wrong tool? It > seems to be the most widely referenced SRS option for postfix and has active > development so I went with it. I am running postfix 2.11 from source with > cdb db support added. Am I better off running an older version? > > Any help/advice is greatly appreciated. My apologies if I missed something > obvious - I tried multiple different options before asking the list. I of > course tried asking the pfixtools community about this first - but I think it > is really just one guy and have not heard anything back. > > Michael > >