imapfilter
imapfilter copied to clipboard
Add/remove/update header fields
Add functionality for adding, removing and updating header fields, with updating the headers in the messages on the IMAP server.
Currently, the only means to persist state from Lua processing is via custom flags/keywords, however that is not guaranteed to be supported by all MTAs, I think. (New keywords are "MAY" in RFC 3501.)
Would it work to fetch the whole message, modify it locally using Lua, then re-upload it?
There's an example at:
https://github.com/lefcha/imapfilter/blob/9e6661278572009a92a8e125c9b339232a9735a1/samples/extend.lua#L103-L118