Re: Obtaining the IMAP GUID from a sieve script

2021-02-01 Thread Stephan Bosch




On 15/01/2021 18:57, Ron Garret wrote:

Is there any way to obtain the IMAP GUiD of a message that is being processed 
by a sieve script?  I’m writing a filter that needs to to keep track of message 
identities as they are moved around between folders.  I could add my own id 
header, but I’d rather not have to reinvent that wheel.


There is no Sieve command/test that can do that currently.

Regards,

Stephan.


Re: Obtaining the IMAP GUID from a sieve script

2021-01-18 Thread Peter

On 18 Jan 2021, at 04:12, Jochen Bern  wrote:

(Also, you can legally have several e-mails with the same Message-ID in
your mailbox; e.g., someone addressed it to two aliases that both expand
to you, just to name one possibilty where *both* go through *sieve* as
well.)
On 18.01.21 12:18, @lbutlr wrote:

I delete duplicates before they are delivered to a mailbox.
From using doveadm-deduplicate, I remember that with message-Id as 
criterion, it would delete too much for my taste, of what makes a duplicate.


--
peter


Re: Obtaining the IMAP GUID from a sieve script

2021-01-18 Thread Jochen Bern
On 18.01.21 12:18, @lbutlr wrote:
> On 18 Jan 2021, at 04:12, Jochen Bern  wrote:
>> (Also, you can legally have several e-mails with the same Message-ID in
>> your mailbox; e.g., someone addressed it to two aliases that both expand
>> to you, just to name one possibilty where *both* go through *sieve* as
>> well.)
> 
> I delete duplicates before they are delivered to a mailbox.

... do I really need to elaborate on why I wrote "just to name *one*
possibility"?

Your own mails to a (simple) mailinglist, given that you'll likely
already have a copy in your "Sent" folder as the on-list version comes
back to you?

Received mail matching several topics at once, and the user first copies
it to archive folder A, then moves the original to folder B, all via IMAP?

Versions of an e-mail that are *marked* deleted, but not yet expunged,
and can still be seen/accessed/undeleted/moved/copied/... in *some* IMAP
clients?

Regards,
-- 
Jochen Bern
Systemingenieur

Binect GmbH



smime.p7s
Description: S/MIME Cryptographic Signature


Re: Obtaining the IMAP GUID from a sieve script

2021-01-18 Thread @lbutlr
On 18 Jan 2021, at 04:12, Jochen Bern  wrote:
> On 16.01.21 07:42, Ron Garret wrote:
>> Because not every email has one.  RFC5322 doesn’t require them.
>> 
>> On Jan 15, 2021, at 6:30 PM, @lbutlr  wrote:
>>> Why not simply use the message-id?

> (Also, you can legally have several e-mails with the same Message-ID in
> your mailbox; e.g., someone addressed it to two aliases that both expand
> to you, just to name one possibilty where *both* go through *sieve* as
> well.)

I delete duplicates before they are delivered to a mailbox.



-- 




Re: Obtaining the IMAP GUID from a sieve script

2021-01-18 Thread Jochen Bern
On 16.01.21 07:42, Ron Garret wrote:
> Because not every email has one.  RFC5322 doesn’t require them.
> 
> On Jan 15, 2021, at 6:30 PM, @lbutlr  wrote:
>> Why not simply use the message-id?

(Also, you can legally have several e-mails with the same Message-ID in
your mailbox; e.g., someone addressed it to two aliases that both expand
to you, just to name one possibilty where *both* go through *sieve* as
well.)

Regards,
-- 
Jochen Bern
Systemingenieur

Binect GmbH



smime.p7s
Description: S/MIME Cryptographic Signature


Re: Obtaining the IMAP GUID from a sieve script

2021-01-17 Thread Ron Garret
Just for the record, it turns out that doveadm is the key to happiness here.  
It lets me find and manipulate messages by message-id (or any other header) 
which is what I needed.

rg



Re: Obtaining the IMAP GUID from a sieve script

2021-01-16 Thread @lbutlr
On 15 Jan 2021, at 23:42, Ron Garret  wrote:
> Because not every email has one.  RFC5322 doesn’t require them.

And yet, I can tell you exactly how many messages on my mail server do not have 
a message-ID.

Zero.

-- 
'I'm a raven, aren't I?' it said. 'One of the few birds who speak.
The first thing people say is, oh, you're a raven, go on, say the
N word... If I had a penny for every time that's happened, I'd-'

Re: Obtaining the IMAP GUID from a sieve script

2021-01-16 Thread Ron Garret


On Jan 16, 2021, at 4:21 PM, Joseph Tam  wrote:

> On Fri, 15 Jan 2021, Ron Garret wrote:
> 
>>> Why not simply use the message-id?
>> 
>> Because not every email has one.  RFC5322 doesn?t require them.
> 
> Doesn't your MTA then insert one if it's missing?

As it happens, it does.  But there’s another reason I want the Dovecot UID: I 
want to be able to find the file in a user’s maildir corresponding to a 
particular message that passed through sieve so I can do forensic analysis in 
the event that the spam filter isn’t doing the right thing.

rg



Re: Obtaining the IMAP GUID from a sieve script

2021-01-16 Thread Joseph Tam

On Fri, 15 Jan 2021, Ron Garret wrote:


Why not simply use the message-id?


Because not every email has one.  RFC5322 doesn?t require them.


Doesn't your MTA then insert one if it's missing?

Joseph Tam 


Re: Obtaining the IMAP GUID from a sieve script

2021-01-15 Thread Ron Garret
Because not every email has one.  RFC5322 doesn’t require them.

On Jan 15, 2021, at 6:30 PM, @lbutlr  wrote:

> On 15 Jan 2021, at 10:57, Ron Garret  wrote:
>> Is there any way to obtain the IMAP GUiD of a message that is being 
>> processed by a sieve script?  I’m writing a filter that needs to to keep 
>> track of message identities as they are moved around between folders.  I 
>> could add my own id header, but I’d rather not have to reinvent that wheel.
> 
> Why not simply use the message-id?
> 
> 
> -- 
> If life were to suddenly get fair, I doubt it would happen in high school.
> 



Re: Obtaining the IMAP GUID from a sieve script

2021-01-15 Thread @lbutlr
On 15 Jan 2021, at 10:57, Ron Garret  wrote:
> Is there any way to obtain the IMAP GUiD of a message that is being processed 
> by a sieve script?  I’m writing a filter that needs to to keep track of 
> message identities as they are moved around between folders.  I could add my 
> own id header, but I’d rather not have to reinvent that wheel.

Why not simply use the message-id?


-- 
If life were to suddenly get fair, I doubt it would happen in high school.



Obtaining the IMAP GUID from a sieve script

2021-01-15 Thread Ron Garret
Is there any way to obtain the IMAP GUiD of a message that is being processed 
by a sieve script?  I’m writing a filter that needs to to keep track of message 
identities as they are moved around between folders.  I could add my own id 
header, but I’d rather not have to reinvent that wheel.

Thanks,
rg