On Wed, Dec 10, 2008 at 11:44:23PM +0100, mouss wrote: > - 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.
That is it! Thank you. I have commented out lines: /.../ -o content_filter=filter:dummy /.../ filter unix - n n - - pipe flags=Rq user=vacation argv=/home/vacation/mail-filter -f ${sender} -- And emails are send only once. Now I have to analyse this vacation filter. But, as I understand it, according to master.cf it is run AFTER filtering, not before? > >> 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