Ok, having pulled out all of the recipient_delimiter values (main.cf
and amavisd.conf), and not actually sending spam, I can pretty
clearly see that postfix is handing the vacation.pl code two separate
addresses, because vacation.pl runs twice. (The only reason I don't
get two vacation response emails back is that the second response
trips over the fact that a response has been sent already (on the
first try microseconds before).)
2009/02/23 17:11:34 DEBUG> /var/spool/vacation/vacation.pl:479 main::
- Script argument SMTP recipient is :
'test222#int.example....@autoreply.int.example.com' and smtp_sender :
'rstee...@example.com'
2009/02/23 17:11:34 DEBUG> /var/spool/vacation/vacation.pl:505 main::
- Converted autoreply mailbox back to normal style - from
test222#int.example....@autoreply.int.example.com to test...@int.example.com
2009/02/23 17:11:34 DEBUG> /var/spool/vacation/vacation.pl:516 main::
- Email headers have to: '<test...@int.example.com>' and From: '"Rick
Steeves" <rstee...@example.com>'
2009/02/23 17:11:34 DEBUG> /var/spool/vacation/vacation.pl:479 main::
- Script argument SMTP recipient is :
'test222#int.example....@autoreply.int.example.com' and smtp_sender :
'rstee...@example.com'
2009/02/23 17:11:34 DEBUG> /var/spool/vacation/vacation.pl:505 main::
- Converted autoreply mailbox back to normal style - from
test222#int.example....@autoreply.int.example.com to test...@int.example.com
2009/02/23 17:11:34 DEBUG> /var/spool/vacation/vacation.pl:516 main::
- Email headers have to: '<test...@int.example.com>' and From: '"Rick
Steeves" <rstee...@example.com>'
2009/02/23 17:11:34 DEBUG> /var/spool/vacation/vacation.pl:306
main::find_real_address - Found test...@int.example.com has vacation active
2009/02/23 17:11:34 DEBUG> /var/spool/vacation/vacation.pl:551 main::
- Attempting to send vacation response for:
<e265ac6da349994f9ef439e2f724439f079f8...@nofexchange.int.example.com>
to: rstee...@example.com, test...@int.example.com,
test...@int.example.com (test_mode = 0)
2009/02/23 17:11:34 DEBUG> /var/spool/vacation/vacation.pl:364
main::send_vacation_email - Asked to send vacation reply to
test...@int.example.com thanks to
<e265ac6da349994f9ef439e2f724439f079f8...@nofexchange.int.example.com>
2009/02/23 17:11:34 DEBUG> /var/spool/vacation/vacation.pl:306
main::find_real_address - Found test...@int.example.com has vacation active
2009/02/23 17:11:34 DEBUG> /var/spool/vacation/vacation.pl:551 main::
- Attempting to send vacation response for:
<e265ac6da349994f9ef439e2f724439f079f8...@nofexchange.int.example.com>
to: rstee...@example.com, test...@int.example.com,
test...@int.example.com (test_mode = 0)
2009/02/23 17:11:34 DEBUG> /var/spool/vacation/vacation.pl:364
main::send_vacation_email - Asked to send vacation reply to
test...@int.example.com thanks to
<e265ac6da349994f9ef439e2f724439f079f8...@nofexchange.int.example.com>
2009/02/23 17:11:34 DEBUG> /var/spool/vacation/vacation.pl:372
main::send_vacation_email - Already notified test...@int.example.com,
or some error prevented us from doing so
2009/02/23 17:11:34 DEBUG> /var/spool/vacation/vacation.pl:376
main::send_vacation_email - Will send vacation response for
<e265ac6da349994f9ef439e2f724439f079f8...@nofexchange.int.example.com>:
FROM: test...@int.example.com (orig_to: test...@int.example.com), TO:
rstee...@example.com; VACATION SUBJECT: Out of Office 778 ; VACATION
BODY: I will be away from
At 04:19 PM 2/23/2009, mouss wrote:
> After some discussion on the postfixadmin list about virtual vacation,
> they indicated that what the logs look like is that postfix is actually
> responding twice for these messages.
This is non sense. postfix doesn't auto-respond to mail.
Apologies. It would have been better stated that vacation is
responding twice, because it's being handed two different addresses.
most probably, you omitted to read the docs and didn't disable address
rewrite before amavisd-new.
Certainly possible. I was at least trying to follow the instructions
for amavisd from the book of postfix. I don't see that directly in
that section, but I could have missed it.
reread the CONTENT FILTER README once more...
I read the content filter docs, and added to my main.cf
receive_override_options = no_address_mappings
(which appears to then break vacation so that mail isn't sent to it
at all, no log entries, no autoresponse). hmm. I'll bet that means I
need amavisd before the alias expansion, and vacation after alias
expansion. and that the order is currently reversed.
if it's not that, then let's please start from the beginning:
1- explain in _detail_ how mail reaches your vacation script.
That presumes I know :-) but I'll give it a try. When a user is on
vacation, they have an table entry in mysql, and an additional alias
that is something like:
test#example....@autoreply.example.com There is a transport defined
in /etc/postfix/transport (hashed to transport.db):
autoreply.example.com vacation:
so that mail addressed to autoreply.example.com is handed to the
vacation (as defined in master.cf). somewhere in there it also passes
through amavisd (setting recipient_delimiters).
vacation then processes the message (comparing the To: address in
mysql and responding as appropriate).
My guess for what's happening is that mail is having the address
expanded to the aliases of two addresses (default and
default#example....@autoreply.example.com). Both of them then get
passed back through vacation, causing my mail vacation duplication.
I'll bet that also means that right now if you have multiple aliases
each one gets passed through amavisd and it probably doesn't need to.
2- show your master.cf
(is there a ready way to output a clean master.cf?)
smtp inet n - n - - smtpd
pickup fifo n - n 60 1 pickup
cleanup unix n - n - 0 cleanup
qmgr fifo n - n 300 1 qmgr
tlsmgr unix - - n 1000? 1 tlsmgr
rewrite unix - - n - - trivial-rewrite
bounce unix - - n - 0 bounce
defer unix - - n - 0 bounce
trace unix - - n - 0 bounce
verify unix - - n - 1 verify
flush unix n - n 1000? 0 flush
proxymap unix - - n - - proxymap
proxywrite unix - - n - 1 proxymap
smtp unix - - n - - smtp
relay unix - - n - - smtp
-o smtp_fallback_relay=
showq unix n - n - - showq
error unix - - n - - error
retry unix - - n - - error
discard unix - - n - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
anvil unix - - n - 1 anvil
scache unix - - n - 1 scache
vacation unix - n
n - - pipe
flags=DRhu user=vacation argv=/var/spool/vacation/vacation.pl
-f ${sender} -- ${recipient}
amavisd-new unix - - n - 2 smtp
-o smtp_data_done_timeout=1200s
-o disable_dns_lookups=yes
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
as you can understand, there's no vacation service inside postfix.
Yup, 100% understand.
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 ?