OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: Catch-all

From: Bill Weiss (houdini+postfixclanspum.net)
Date: Thu Mar 06 2008 - 18:30:30 CST


Alexey Lobanov(A.Lobanovcro-rct.ru)Thu, Mar 06, 2008 at 05:05:23PM +0300:
> Hi.
>
> 06.03.2008 13:58, tomzubuu.lv ??????????:
>
> > Hi,
> >
> > Can't figure it out on myself so i decided to ask here :)
> >
> > I have a virtual domain (domain.com) with catch-all alias and only one
> > mailbox (adomain.com) that get all the mail.
> > But the thing is, if the mail has 3 recipients (bdomain.com, cdomain.com,
> > ddomain.com), the mail gets delivered 3 times.
> >
> > Is there a way to get around that, a get only one copy of mail?
>
> I know a workaround. Intelligent mail storage systems can suppress all
> duplicates while local delivery, by Message-ID. Cyrus IMAP is an example.

Procmail and formail can do this as well. Example from procmailex(5):

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

  :0 a:
  duplicates

Or, if you're sure you don't want those duplicates:

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

Please note that formail can't tell the difference between duplicate
messages and intentional Message-ID collisions. If that matters for you,
you might want to come up with some other solution.

--
Bill Weiss