Fruneau / pfixtools

The pfixtools project is a collection of postfix-related tools. The pfixtools are written in C.
Other
26 stars 7 forks source link

pfix-srsd bounces not handled when using postfix virtual #9

Open caffeinejolt opened 10 years ago

caffeinejolt commented 10 years ago

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 (user1@originaldomain.com) emails User 2 (user2@forwardingdomain.com) where user2@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, user2@forwardingdomain.com forwards to badaddress@gmail.com which does not exist (will result in a 550 from gmail on attempted delivery).

So, given the above, here is what I am seeing:

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?

caffeinejolt commented 10 years ago

Fixed per patch referenced here: http://article.gmane.org/gmane.mail.postfix.user/241722