At 06:41 PM 2/23/2009, Rick Steeves wrote:
So I would guess that how it should work is that it should be mail >
postfix > amavisd > expanding aliases > delivery and vacation >
vacation response delivery ?
Well, here at least is what seems to fix is based on all the guidance
I've received.
With my previous config, mail (master.cf and content_filter) was
processed postfix:25 > amavisd:10024 > postfix:10025
When mail was sent to a user on vacation, the user's address would be
expanded twice (once for each postfix instance). The second expansion
was also after amavis, and thus the autoreply wouldn't get checked
for spam, and would not be checked for spam (nor have the
recipient_delimiter ("+Spam") set).
But two expansions meant that the recipient because 3 recipients, as
each time the original address was expanded it added a vacation
address (user#dom...@autoreply.domain). Whee.
I added:
receive_override_options = no_address_mappings
to main.cf, but that then affected both postfix instances, and was
even more broken, as I'd stopped all expansion. Oops.
So I added:
-o
receive_override_options=no_unknown_recipient_checks,no_header_body_checks
to the second instance of postfix, the one that received the mail
back from amavisd, to override the setting in main.cf and have the
address expansion occur. (also added
no_unknown_recipient_checks,no_header_body_checks because those
checks shouldn't be necessary as they should have been checked as the
mail entered the system.)
That appears to fix it. woot!
With that new understanding, I added :
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o smtpd_data_restrictions=
to that same localhost:10025 instance, as, again, those checks have
already taken place once already, and there's no need to check again.
(Without that, I believe I was, for example, performing the RBL
checks defined in main.cf AGAIN, so I now have
127.0.0.1:10025 inet n - n - - smtpd
-o content_filter=
-o local_recipient_maps=
-o relay_recipient_maps=
-o smtpd_restriction_classes=
-o smtpd_client_restrictions=
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=permit_mynetworks,reject
-o mynetworks=127.0.0.0/8
-o strict_rfc821_envelopes=yes
-o
receive_override_options=no_unknown_recipient_checks,no_header_body_checks
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o smtpd_data_restrictions=
If I've missed anything please let me know, as everything appears to
be finally working.
I've added this for completeness for anyone else as I hadn't ever run
across the instructions for receive_override_options in the context of amavisd
Rick