-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Hello!
So, I have pfix-srsd up and running. All mail to the system is just forwarded on via virtual (virtual_alias_maps and virtual_alias_domains). It delivers mail just fine and gets around those pesky SPF delivery errors. However, it does not seem to handle bounces (i.e. rewriting back to the original sender to deliver the bounce). Here is an example of what I am describing:
User 1 ([email protected]) emails User 2 ([email protected]) where [email protected] 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, [email protected] forwards to [email protected] which does not exist (will result in a 550 from gmail on attempted delivery).
So, given the above, here is what I am seeing:
- When [email protected] sends an email to [email protected], the sender address is rewritten to srs0=pl7i=xe=originaldomain.com=[email protected] as expected
- postfix determines, via virtual_alias_maps, to deliver the mail to [email protected]
- The delivery to gmail.com results in a 550 and postfix then bounces to srs0=pl7i=xe=originaldomain.com=[email protected] instead of [email protected]. And here lies the problem - I assumed it would bounce to [email protected] (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=[email protected], postfix issues a "status=bounced (unknown user:" error and deletes the bounce.
The end result is that nobody ever gets any bounces (deliveries work fine though - just bounce handling that is problematic).
I am calling pfix-srsd like this (tried with -I and without -I):
/etc/postfix/pfix-srsd -I -p /var/lib/postfix/pfix-srsd.pid -U postfix -G postfix srsdomain.com /etc/postfix/pfix-srs.secrets
And have main.cf setup with these (bounces work as expected when I comment these out):
recipient_canonical_maps = hash:/etc/postfix/pfix-no-srs.cf, tcp:127.0.0.1:10002
recipient_canonical_classes = envelope_recipient
sender_canonical_maps = hash:/etc/postfix/pfix-no-srs.cf, tcp:127.0.0.1:10001
sender_canonical_classes = envelope_sender
Shouldn't pfix-srsd rewrite the address for correct bounce delivery in this case? Or is there something additional which must be done to facilitate bounce deliveries?