Hi John,
I'm not sure the DB lookup key includes the username ("resposit" in my case)
I tried to see what gets written in .dovecot.lda-dupes but it looks like
a binary file (doveadm dump does not help). This is what I see after
sending the same message to both aliases:
[root@imap1 ~]# hexdump -C /mail/resposit/.dovecot.lda-dupes
00000000 02 00 00 00 5f c9 a0 66 10 00 00 00 1b 00 00 00
|...._..f........|
00000010 bc 34 2f 26 82 bd 69 6d e7 a0 79 da 28 d7 4a 82
|.4/&..im..y.(.J.|
00000020 72 6f 73 61 72 69 6f 2e 65 73 70 6f 73 69 74 6f
|rosario.esposito|
00000030 40 6e 61 2e 69 6e 66 6e 2e 69 74 5f c9 a0 66 10
|@na.infn.it_..f.|
00000040 00 00 00 13 00 00 00 bc 34 2f 26 82 bd 69 6d e7
|........4/&..im.|
00000050 a0 79 da 28 d7 4a 82 72 65 73 70 6f 73 69 74 40
|.y.(.J.resposit@|
00000060 6e 61 2e 69 6e 66 6e 2e 69 74 |na.infn.it|
0000006a
It doesn't seem "resposit" appears in it.
Doveadm fetch shows the messages has the same message-id but I still get
two copies with different guid/uid:
[root@imap1 ~]# doveadm -f table fetch -u resposit 'guid uid
hdr.message-id date.received' mailbox INBOX | grep 2024-07-24
60525f254fbba0666221000091d3cd3c 18010
<8803feb5-7c3e-4f04-b8ea-62761787e...@gmail.com> 2024-07-24 10:29:03
28e634264fbba0666221000091d3cd3c 18011
<8803feb5-7c3e-4f04-b8ea-62761787e...@gmail.com> 2024-07-24 10:29:03
Doing what you suggest (manage aliases in the MTA rather than
dovecot/ldap) would not be so easy in my case as it requires a lot of
changes on a production system.
Currently I have a Proxmox Mail Gatway server (based on Postfix) which
gets mail from outside, applies filters (greylisting, antispam,
antivirus etc...) and delivers anything directed to my domain to a
Dovecot server via LMTP transport. Dovecot knows LDAP aliases/usernames.
Do you think there might be any other workarounds to make the duplicate
sieve extension work properly ?
Thanks,
Rosario
Il 19/07/2024 22:37, John Fawcett via dovecot ha scritto:
On 18/07/2024 15:37, Rosario Esposito via dovecot wrote:
Hi,
On a dovecot server (2.3.21) I have a simple sieve script:
require ["duplicate"];
# rule:[duplicate]
if duplicate {
discard;
stop;
}
I use virtual users with mail aliases on a LDAP backend.
I have user "resposit" having 2 mail aliases:
- respo...@na.infn.it
- rosario.espos...@na.infn.it
If I send a single message to both aliases I still receive 2 copies as
you can see from the attached log.
Is the "duplicate" sieve extension supposed to work this way ?
Any help would be much appreciated !
Hi Rosario
I guess the duplicate db lookup key includes both message id and
username so the same message id for different users will not be flagged
as a duplicate.
If you define the aliases in the mta rather than via the dovecot ldap
lookup, so that the username that comes into dovecot is the same one for
both aliases I suspect it will work.
John
_______________________________________________
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org
--
Rosario Esposito
System Administrator
INFN Napoli
Email: rosario.espos...@na.infn.it
Phone: +39 081 676170
_______________________________________________
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org