Sieve: adding Date: header when missing

Alex JOST jost+lists at dimejo.at
Thu Jul 17 14:51:02 UTC 2014


Am 17.07.2014 16:13, schrieb Daniele Nicolodi:
> Hello,
>
> there is a way with a sieve rule to add a Date: header when it is
> missing?  Adding one with the time of reception of the message or using
> the date from the the first Received: header would be good options.
>
> Unfortunately I'm receiving some useful automated messages that lack a
> Date header and this screws up the sorting in my imap clients.  I have a
> script to fix those acting on the Maildir storage, but I would prefer to
> have the thing solved more radically.
>
> Thanks. Cheers,
> Daniele
>

http://tools.ietf.org/html/rfc5260#section-5.1

Finally, currentdate can be used in conjunction with the editheader 
extension to insert a header-field containing date/time information:
	require ["variables", "date", "editheader"];
	if currentdate :matches "std11" "*"
	{addheader "Processing-date" "${0}";}

-- 
Alex JOST


More information about the dovecot mailing list