Jakub Nadolny a écrit : > 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? >
according to your previous master.cf, smtpd passes the mail to your vacation "filter", so this happens before amavisd-new sees the message. your script probably uses the sendmail command, so mail passes through: postfix/smtpd (25) -> yourscript -> postfix/sendmail (pickup) -> amavisd-new -> postfix/smtpd (10025).