On 28/02/2008, Michael da Silva Pereira <michael@???> wrote:
>
> Hi there,
>
> I've having an issue with exim4 which is duplicating emails sent to a
> "catchall" mailbox, Basically any emails going to a specific domain land
> up in this mailbox.
> The only time I get a duplicate is if the email is sent to more than one
> recipient in that domain, then depending on the amount of recipients it
> duplicates into the box.
>
> Is there anyway to tell exim only to deliver that message once into the
> mailbox, instead of delivering into the mailbox for every recipient?
>
> Router
> # Routing method - catchalls
> catchallmailbox:
> driver = accept
> condition = ${if eq{${lookup mysql {SELECT COUNT(*) FROM
> `courier`.`mailboxes` WHERE `user` = 'catchall@${quote_mysql:$domain}'
> LIMIT 1}}}{1}{yes}{no}}
> transport = catchallmailbox
>
>
> Transport
> catchallmailbox:
> driver = appendfile
> directory = ${lookup mysql {SELECT `maildir` FROM
> `courier`.`mailboxes` WHERE `user` = 'catchall@${quote_mysql:$domain}'
> LIMIT 1}}
> maildir_format
> mode = 0777
> user = Debian-exim
> group = Debian-exim
> directory_mode = 0777
Check out the transport options batch_max and batch_id (
http://www.exim.org/exim-html-current/doc/html/spec_html/ch25.html).
Warren