Jakub Nadolny a écrit :
> On Wed, Dec 10, 2008 at 11:39:08AM +0100, mouss wrote:
>> Jakub Nadolny a écrit :
>>> That would be perfect solution, but as I have read it does not work for
>>> virtual
>>> domains unfortunatelly.
>> virtual_alias_maps is ok. you just need to find out what cause the dups.
>
> The only difference in duplicate e-mails headers are in X-Original-To, e.g.
> in first e-mail thereis:
> X-Original-To: [EMAIL PROTECTED]
> in second:
> X-Original-To: [EMAIL PROTECTED]
>
>> With a content_filter, you need to disable rewrite in all but one smtpd
>> in a chain (with -o receive_override_options=no_address_mappings).
>
> I have no_address_mappings in one smtpd only.
>
>> so you need to look at the logs and see what path the mail took (use the
>> message-id to correlate multiple logs).
>
> Dec 10 11:14:18 zonk postfix/smtpd[13071]: connect from
> host.domain.pl[xxx.yyy.zzz.66]
> Dec 10 11:14:18 zonk postfix/smtpd[13071]: 323AC160007:
> client=host.domain.pl[xxx.yyy.zzz.66]
> Dec 10 11:14:18 zonk postfix/cleanup[14614]: 323AC160007: message-id=<[EMAIL
> PROTECTED]>
> Dec 10 11:14:18 zonk postfix/qmgr[12831]: 323AC160007: from=<[EMAIL
> PROTECTED]>, size=829, nrcpt=1 (queue active)
> Dec 10 11:14:18 zonk postfix/smtpd[13071]: disconnect from
> host.domain.pl[xxx.yyy.zzz.66]
> Dec 10 11:14:18 zonk postfix/pickup[12830]: 4DC2B160008: uid=1001
> from=<[EMAIL PROTECTED]>
> Dec 10 11:14:18 zonk postfix/cleanup[13342]: warning: table
> "mysql:/etc/postfix/mysql_virtual_alias.cf": empty lookup result for: "[EMAIL
> PROTECTED]" -- ignored
> Dec 10 11:14:18 zonk postfix/cleanup[13342]: 4DC2B160008: message-id=<[EMAIL
> PROTECTED]>
> Dec 10 11:14:18 zonk postfix/pipe[12843]: 323AC160007: to=<[EMAIL
> PROTECTED]>, relay=filter, delay=0.14, delays=0.06/0/0/0.08, dsn=2.0.0,
> status=sent (delivered via filter service)
> Dec 10 11:14:18 zonk postfix/qmgr[12831]: 323AC160007: removed
> Dec 10 11:14:18 zonk postfix/qmgr[12831]: 4DC2B160008: from=<[EMAIL
> PROTECTED]>, size=939, nrcpt=5 (queue active)
> Dec 10 11:14:29 zonk postfix/smtpd[12874]: warning: table
> "mysql:/etc/postfix/mysql_virtual_alias.cf": empty lookup result for: "[EMAIL
> PROTECTED]" -- ignored
> Dec 10 11:14:29 zonk postfix/smtpd[12874]: 60C50160007:
> client=localhost[127.0.0.1]
> Dec 10 11:14:29 zonk postfix/cleanup[13319]: warning: table
> "mysql:/etc/postfix/mysql_virtual_alias.cf": empty lookup result for: "[EMAIL
> PROTECTED]" -- ignored
> Dec 10 11:14:29 zonk postfix/cleanup[13319]: warning: table
> "mysql:/etc/postfix/mysql_virtual_alias.cf": empty lookup result for: "[EMAIL
> PROTECTED]" -- ignored
> Dec 10 11:14:29 zonk postfix/cleanup[13319]: 60C50160007: message-id=<[EMAIL
> PROTECTED]>
> Dec 10 11:14:29 zonk postfix/qmgr[12831]: 60C50160007: from=<[EMAIL
> PROTECTED]>, size=1467, nrcpt=9 (queue active)
> Dec 10 11:14:29 zonk postfix/smtpd[12874]: disconnect from
> localhost[127.0.0.1]
> Dec 10 11:14:29 zonk amavis[14656]: (14656-03) Passed CLEAN, [xxx.yyy.zzz.66]
> <[EMAIL PROTECTED]> -> <[EMAIL PROTECTED]>,<[EMAIL PROTECTED]>,<[EMAIL
> PROTECTED]>,<[EMAIL PROTECTED]>,<[EMAIL PROTECTED]>, Message-ID: <[EMAIL
> PROTECTED]>, mail_id: iKWtqliXIgH5, Hits: -1.694, queued_as: 60C50160007,
> 11129 ms
> Dec 10 11:14:29 zonk postfix/smtp[14102]: 4DC2B160008: to=<[EMAIL
> PROTECTED]>, orig_to=<[EMAIL PROTECTED]>, relay=127.0.0.1[127.0.0.1]:10024,
> delay=11, delays=0.02/0/0/11, dsn=2.6.0, status=sent (250 2.6.0 Ok,
> id=14656-03, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 60C50160007)
> Dec 10 11:14:29 zonk postfix/smtp[14102]: 4DC2B160008: to=<[EMAIL
> PROTECTED]>, relay=127.0.0.1[127.0.0.1]:10024, delay=11, delays=0.02/0/0/11,
> dsn=2.6.0, status=sent (250 2.6.0 Ok, id=14656-03, from
> MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 60C50160007)
> Dec 10 11:14:29 zonk postfix/smtp[14102]: 4DC2B160008: to=<[EMAIL
> PROTECTED]>, relay=127.0.0.1[127.0.0.1]:10024, delay=11, delays=0.02/0/0/11,
> dsn=2.6.0, status=sent (250 2.6.0 Ok, id=14656-03, from
> MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 60C50160007)
> Dec 10 11:14:29 zonk postfix/smtp[14102]: 4DC2B160008: to=<[EMAIL
> PROTECTED]>, relay=127.0.0.1[127.0.0.1]:10024, delay=11, delays=0.02/0/0/11,
> dsn=2.6.0, status=sent (250 2.6.0 Ok, id=14656-03, from
> MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 60C50160007)
> Dec 10 11:14:29 zonk postfix/smtp[14102]: 4DC2B160008: to=<[EMAIL
> PROTECTED]>, orig_to=<[EMAIL PROTECTED]>, relay=127.0.0.1[127.0.0.1]:10024,
> delay=11, delays=0.02/0/0/11, dsn=2.6.0, status=sent (250 2.6.0 Ok,
> id=14656-03, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 60C50160007)
> Dec 10 11:14:29 zonk postfix/qmgr[12831]: 4DC2B160008: removed
> Dec 10 11:14:29 zonk postfix/virtual[14639]: 60C50160007: to=<[EMAIL
> PROTECTED]>, relay=virtual, delay=0.09, delays=0.06/0.02/0/0.01, dsn=2.0.0,
> status=sent (delivered to maildir)
> Dec 10 11:14:29 zonk postfix/virtual[14685]: 60C50160007: to=<[EMAIL
> PROTECTED]>, orig_to=<[EMAIL PROTECTED]>, relay=virtual, delay=0.09,
> delays=0.06/0.02/0/0.01, dsn=2.0.0, status=sent (delivered to maildir)
> Dec 10 11:14:29 zonk postfix/virtual[14639]: 60C50160007: to=<[EMAIL
> PROTECTED]>, orig_to=<[EMAIL PROTECTED]>, relay=virtual, delay=0.1,
> delays=0.06/0.02/0/0.02, dsn=2.0.0, status=sent (delivered to maildir)
> Dec 10 11:14:29 zonk postfix/virtual[14685]: 60C50160007: to=<[EMAIL
> PROTECTED]>, relay=virtual, delay=0.1, delays=0.06/0.02/0/0.02, dsn=2.0.0,
> status=sent (delivered to maildir)
> Dec 10 11:14:29 zonk postfix/virtual[14639]: 60C50160007: to=<[EMAIL
> PROTECTED]>, relay=virtual, delay=0.18, delays=0.06/0.02/0/0.1, dsn=2.0.0,
> status=sent (delivered to maildir)
> Dec 10 11:14:29 zonk postfix/virtual[14639]: 60C50160007: to=<[EMAIL
> PROTECTED]>, relay=virtual, delay=0.2, delays=0.06/0.02/0/0.12, dsn=2.0.0,
> status=sent (delivered to maildir)
> Dec 10 11:14:29 zonk postfix/virtual[14639]: 60C50160007: to=<[EMAIL
> PROTECTED]>, relay=virtual, delay=0.22, delays=0.06/0.02/0/0.14, dsn=2.0.0,
> status=sent (delivered to maildir)
> Dec 10 11:14:29 zonk postfix/virtual[14639]: 60C50160007: to=<[EMAIL
> PROTECTED]>, relay=virtual, delay=0.22, delays=0.06/0.02/0/0.14, dsn=2.0.0,
> status=sent (delivered to maildir)
> Dec 10 11:14:29 zonk postfix/virtual[14639]: 60C50160007: to=<[EMAIL
> PROTECTED]>, relay=virtual, delay=0.22, delays=0.06/0.02/0/0.15, dsn=2.0.0,
> status=sent (delivered to maildir)
> Dec 10 11:14:29 zonk postfix/qmgr[12831]: 60C50160007: removed
>
- fix the mysql lookup problem. your quries should not return an empty
string. (when nothing should be returned, then return NULL, not the
"empty string". In short '' != NULL).
- what does your filter script do with mail? does it use the sendmail
command?
- what are the senderbcc and recipientbcc things? do you use sender or
recipient bcc? if so, this can explain the dups.
- it looks like your filter script is for vacation (judging by the
directory name). don't do it like that. do vacation _after_ filtering.
there is no point to handle viruses and spam in a vacation program.
>> if you can't find the culprit, post relevant logs and master.cf (or the
>> output of 'grep -v "^#" master.cf', but don't remove comments manually
>> as this may "fix" typos that you still have in the file).
>
> My master.cf:
>
> smtp inet n - n - - smtpd
> -o content_filter=filter:dummy -o
> receive_override_options=no_address_mappings
> pickup fifo n - n 60 1 pickup
> cleanup unix n - n - 0 cleanup
> qmgr fifo n - n 300 1 qmgr
> rewrite unix - - n - - trivial-rewrite
> bounce unix - - n - 0 bounce
> defer unix - - n - 0 bounce
> flush unix n - n 1000? 0 flush
> proxymap unix - - n - - proxymap
> smtp unix - - n - - smtp
> relay unix - - n - - smtp
> showq unix n - n - - showq
> error unix - - n - - error
> local unix - n n - - local
> virtual unix - n n - - virtual
> lmtp unix - - n - - lmtp
> maildrop unix - n n - - pipe
> flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
> old-cyrus unix - n n - - pipe
> flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}
> cyrus unix - n n - - pipe
> user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
> uucp unix - n n - - pipe
> flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail
> ($recipient)
> ifmail unix - n n - - pipe
> flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
> bsmtp unix - n n - - pipe
> flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient
> filter unix - n n - - pipe
> flags=Rq user=vacation argv=/home/vacation/mail-filter -f ${sender} --
> ${recipient}
> smtp-amavis unix - - n - 4 smtp
> -o smtp_data_done_timeout=2400
> -o smtp_connect_timeout=60
> -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=
> -o smtpd_recipient_restrictions=permit_mynetworks,reject
> -o mynetworks=127.0.0.0/8,xxx.yyy.zzz.0/24
> -o strict_rfc821_envelopes=yes
> -o smtpd_error_sleep_time=0
> -o smtpd_soft_error_limit=1001
> -o smtpd_hard_error_limit=1000
> trace unix - - - - 0 bounce
> verify unix - - - - 1 verify
> tlsmgr unix - - - 1000? 1 tlsmgr
> anvil unix - - - - 1 anvil
> scache unix - - - - 1 scache
> discard unix - - - - - discard
>