On Mon, Feb 23, 2015 at 05:07:04PM +0000, Alan Gilson wrote:
>
> [...]
>
> Question: currently if I send an email with a to: address of
> [email protected], and a CC: addresses of [email protected] and
> [email protected], the system currently writes three files that are identical
> with the exception of the Delivered-To: line. Is it possible to have all
> three of those files combined in to one file with 3 Delivered-To lines?
>
Nope this is not possible.
The message is only stored once during the SMTP transaction so that even
with a large number of recipients, you still get a single copy. The copy
doesn't have the Delivered-To header at this point.
Later, the scheduler will detect that a local delivery has to be done so
it will request a mda to be forked for each recipient. This is where the
Delivered-To header gets prepended... one in each mda.
> Ultimately I don't want to run the email through our analytics 3 times, I
> only want to process it once.
>
Each transaction in OpenSMTPD gets a unique msgid:
Received: from poolp.org (localhost [127.0.0.1]);
by poolp.org (OpenSMTPD) with SMTP id 89ebbe0f;
for <[email protected]>;
Mon, 23 Feb 2015 18:06:57 +0100 (CET)
This is the 89ebbe0f part in this Received line.
No matter how many recipients this part will be identical for all of the
ones that were part of the same SMTP transaction.
If you want to avoid your analytics running on each copy of the message,
what you can do is write a wrapper that extracts this msgid, check if it
was ran into the analytics already and write it to /dev/null otherwise.
Your issue is about deduping content at the MDA level so it can only be
fixed at that level
--
Gilles Chehade
https://www.poolp.org @poolpOrg
--
You received this mail because you are subscribed to [email protected]
To unsubscribe, send a mail to: [email protected]