Deliver same E-Mail in same Mailbox only once ?
Hi there,
I have a customer with domain a@tld and domain b@tld.
b.tld is an alias for a.tld
The Server is using virtual users based on mysql, dovecot for delivery and Maildir for Mail-Storage.
If someone writes an e-mail to a.tld with a cc: to b.tld the customer receives the E-Mail twice.
Is there a way to deliver the same Mail in the same Mailbox only once ?
-- Christoph Adomeit GATWORKS GmbH Reststrauch 191 41199 Moenchengladbach Sitz: Moenchengladbach Amtsgericht Moenchengladbach, HRB 6303 Geschaeftsfuehrer: Christoph Adomeit, Hans Wilhelm Terstappen
Christoph.Adomeit@gatworks.de Internetloesungen vom Feinsten Fon. +49 2166 9149-32 Fax. +49 2166 9149-10
- Christoph Adomeit <Christoph.Adomeit@gatworks.de> 2016.04.20 10:29:
Is there a way to deliver the same Mail in the same Mailbox only once ?
Yes this case is supported via an sieve extension:
require ["duplicate"];
#Deduplicate mails sent to aliases for same mailbox using the msgid
if duplicate { discard; }
Hi,
Thomas Leuxner <tlx@leuxner.net> (Mi 20 Apr 2016 11:04:22 CEST):
- Christoph Adomeit <Christoph.Adomeit@gatworks.de> 2016.04.20 10:29:
Is there a way to deliver the same Mail in the same Mailbox only once ?
Yes this case is supported via an sieve extension: require ["duplicate"];
#Deduplicate mails sent to aliases for same mailbox using the msgid if duplicate { discard; }
I wouldn't do that. Message with the same message id doesn't need to be duplicates. See the difference between this message (I put you on BCC), you'll receive it via the mailing list AND directly. Depending on the ML configuration the messages are NOT identical.
(ML signature, replaced Reply-To, added header lines, …)
Best regards from Dresden/Germany
Viele Grüße aus Dresden
Heiko Schlittermann
-- SCHLITTERMANN.de ---------------------------- internet & unix support - Heiko Schlittermann, Dipl.-Ing. (TU) - {fon,fax}: +49.351.802998{1,3} - gnupg encrypted messages are welcome --------------- key ID: F69376CE - ! key id 7CBF764A and 972EAC9F are revoked since 2015-01 ------------ -
- Heiko Schlittermann <hs@schlittermann.de> 2016.04.20 19:31:
- Christoph Adomeit <Christoph.Adomeit@gatworks.de> 2016.04.20 10:29: #Deduplicate mails sent to aliases for same mailbox using the msgid if duplicate { discard; }
I wouldn't do that. Message with the same message id doesn't need to be duplicates. See the difference between this message (I put you on BCC), you'll receive it via the mailing list AND directly. Depending on the ML configuration the messages are NOT identical.
It really depends on the OPs requirements. The task was to filter cc: mails. Anyway if that is your concern, no message was discarded using bcc:
Apr 20 19:31:13 nihlus dovecot: lmtp(27566): Connect from local Apr 20 19:31:13 nihlus dovecot: lmtp(tlx@leuxner.net): NbCKIuG8F1euawAAgUOSbA: sieve: msgid=<20160420173100.GR14754@jumper.schlittermann.de>, time=115ms, status=stored mail into mailbox 'INBOX' Apr 20 19:31:13 nihlus dovecot: lmtp(27566): Disconnect from local: Successful quit Apr 20 19:31:24 nihlus dovecot: lmtp(27566): Connect from local Apr 20 19:31:25 nihlus dovecot: lmtp(tlx@leuxner.net): OrCKIuG8F1euawAAgUOSbA: sieve: msgid=<20160420173100.GR14754@jumper.schlittermann.de>, time=117ms, status=stored mail into mailbox ':public/Mailing-Lists/Dovecot' Apr 20 19:31:25 nihlus dovecot: lmtp(tlx@leuxner.net): OrCKIuG8F1euawAAgUOSbA: sieve: msgid=<20160420173100.GR14754@jumper.schlittermann.de>, time=117ms, status=marked message to be discarded if not explicitly delivered (discard action) Apr 20 19:31:25 nihlus dovecot: lmtp(27566): Disconnect from local: Successful quit
Regards Thomas
Op 4/20/2016 om 7:31 PM schreef Heiko Schlittermann:
Hi,
Thomas Leuxner <tlx@leuxner.net> (Mi 20 Apr 2016 11:04:22 CEST):
- Christoph Adomeit <Christoph.Adomeit@gatworks.de> 2016.04.20 10:29:
Is there a way to deliver the same Mail in the same Mailbox only once ? Yes this case is supported via an sieve extension: require ["duplicate"];
#Deduplicate mails sent to aliases for same mailbox using the msgid if duplicate { discard; } I wouldn't do that. Message with the same message id doesn't need to be duplicates. See the difference between this message (I put you on BCC), you'll receive it via the mailing list AND directly. Depending on the ML configuration the messages are NOT identical.
The "duplicate" test allows more complex arguments to handle such concerns. This way, for example, the list-id header (if present) can also be part of the unique ID used for duplicate tracking.
https://tools.ietf.org/html/rfc7352#section-3.1
Regards,
Stephan.
Il 20/04/2016 11:04, Thomas Leuxner ha scritto:
- Christoph Adomeit <Christoph.Adomeit@gatworks.de> 2016.04.20 10:29:
Is there a way to deliver the same Mail in the same Mailbox only once ?
Yes this case is supported via an sieve extension:
require ["duplicate"];
#Deduplicate mails sent to aliases for same mailbox using the msgid
if duplicate { discard; }
Hi,
instead of discard I suggest to move the duplicate messagge in a folder:
if duplicate { fileinto "Trash"; }
so in case of necessity can be recovered.
Alessio Cecchi Postmaster @ http://www.qboxmail.it https://www.linkedin.com/in/alessice
participants (5)
-
Alessio Cecchi
-
Christoph Adomeit
-
Heiko Schlittermann
-
Stephan Bosch
-
Thomas Leuxner