1

I've postfix on my server, I'm using procmail and customized shell script to process incoming emails for one of user accounts on my local domain/machine. ([email protected])

Everything was just working fine when I had only one recipient in email, but as soon as I add another recipient in email list .. I get same message twice ! (ex: sending message to [email protected], [email protected])

There is no special configuration on main.cf, but:

mailbox_command = /usr/bin/procmail -a "EXTENSION"

and .procmailrc is as follow:

TO=`formail -xTo:`
SUBJECT=`formail -xSubject: \
| expand | sed -e 's/^[ ]*//g' -e 's/[ ]*$//g'`
SENDER=`formail -xFrom: \
| expand | sed -e 's/^[ ]*//g' -e 's/[ ]*$//g'`
BODY=`formail -I "" \
| expand | sed -e '1,/^$/ d' -e '1,/^$/ d'`
BODY=`formail -I "" `
SENDER=`formail -rtzxTo:`
:0 
| $HOME/bin/work.sh "$TO" "$BODY"

I was thinking to manage this issue in procmailrc , but my knowledge is so low in this case.

1 Answer 1

2

Well, obviously the solution is lock/cache file to filter duplicate Message-IDs :

:0 Wh: msgid.lock
| formail -D 8192 msgid.cache

Thanks everyone :)

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .