Am 05.02.2015 um 12:18 schrieb Steffen Kaiser:> On Thu, 5 Feb 2015, Thomas G?ttler wrote: >>> What specific action shall be done via IMAP? The move? >>> Then use any IMAP client library, use the LIST command to get the mailboxes, FETCH to get the messages and COPY/EXPUNGE >>> to move them. > >> You are right moving the mail should be simple. > >> I ask myself it is possible to store the date of the resubmission in the mail itself. > > How shall the date be visible to the user? > > Remember that altering the message may invalidate DKIM and other security / verification stuff. > > Instead of a simple "mv" you can prefix the message with "X-Date: " header, so you mark the message, but it is not visible to the user. > > If your goal is to have the message "up" according the client side message sorting by date, you would need to alter the Date: header and possibly break message verification. > > What's your goal in order to " store the date of the resubmission "?My goal is to use IMAP only, not external database. But I guess this is not possible. I could alter the subject of the mail. What kind of message verification could break? Regards, Thomas G?ttler -- http://www.thomas-guettler.de/
On 05. feb. 2015 22:29, Thomas G?ttler wrote:> Am 05.02.2015 um 12:18 schrieb Steffen Kaiser: >> On Thu, 5 Feb 2015, Thomas G?ttler wrote: >>>> What specific action shall be done via IMAP? The move? >>>> Then use any IMAP client library, use the LIST command to get the mailboxes, FETCH to get the messages and COPY/EXPUNGE >>>> to move them. >>> You are right moving the mail should be simple. >>> I ask myself it is possible to store the date of the resubmission in the mail itself. >> How shall the date be visible to the user? >> >> Remember that altering the message may invalidate DKIM and other security / verification stuff. >> >> Instead of a simple "mv" you can prefix the message with "X-Date: " header, so you mark the message, but it is not visible to the user. >> >> If your goal is to have the message "up" according the client side message sorting by date, you would need to alter the Date: header and possibly break message verification. >> >> What's your goal in order to " store the date of the resubmission "? > > My goal is to use IMAP only, not external database. But I guess this is not possible. > > I could alter the subject of the mail. What kind of message verification could break? > > Regards, > Thomas G?ttler >(code samples are for bash. untested.) Putting data in the mail is hard without violating mail integrity. If you really want this, an easy way would be to have doveadm create a <code> mailbox "resubmit"</code> folder, and subfolders under there with names like "date --iso" gives you, eg with <code> mailbox "resubmit."$(date -d "next week" +"%F")</code> . Note: "next week" , with the quotes, literally is a valid value for date -d . Then have a cron job moving from <code>mailbox "resubmit."$(date --iso)</code> to inbox. Remember to remove the \Seen flag from the mail. If you do not want to see the mails before next week, just do not subscribe to those folders (see -s flag to doveadm mailbox create ) Now, pick a scripting-language and start coding :-) . -- H?kon Alstadheim / N-7510 Skatval / email: hakon at alstadheim.priv.no tlf: 74 82 60 27 mob: 47 35 39 38 http://alstadheim.priv.no/hakon/
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thu, 5 Feb 2015, Thomas G?ttler wrote:> Am 05.02.2015 um 12:18 schrieb Steffen Kaiser: >> On Thu, 5 Feb 2015, Thomas G?ttler wrote: >>>> What specific action shall be done via IMAP? The move? >>>> Then use any IMAP client library, use the LIST command to get the mailboxes, FETCH to get the messages and COPY/EXPUNGE >>>> to move them. >> >>> You are right moving the mail should be simple. >> >>> I ask myself it is possible to store the date of the resubmission in the mail itself. >> >> How shall the date be visible to the user? >> >> Remember that altering the message may invalidate DKIM and other security / verification stuff. >> >> Instead of a simple "mv" you can prefix the message with "X-Date: " header, so you mark the message, but it is not visible to the user. >> >> If your goal is to have the message "up" according the client side message sorting by date, you would need to alter the Date: header and possibly break message verification. >> >> What's your goal in order to " store the date of the resubmission "? > > My goal is to use IMAP only, not external database. But I guess this is not possible.Maybe I rephrase: How should the Resubmission interfaces to the users, how shall the users work with it? The first sentence of the quoted text contains an IMAP-only variant. However, pick up H?kon's advice and use STORE to remove the SEEN flag. So I wonder how the Resubmission shall work.> I could alter the subject of the mail. What kind of message verification could break?For instance DKIM, it may (or may not) sign Date, Subject and other headers. - -- Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEVAwUBVNRyxXz1H7kL/d9rAQIiFgf/XUcOFxGgUcdCXGDHMTDsa4nFr+gqwMAl 8fzztuKeheqrsGpGKpYb9lwg5oq0N7Q+Otnj0TSgZ2+JkpOdCDFxVLHyYJoxM4/a mSSGm8XHekiI9IKxzSV8Ojplx26vev/4vxvHJgoGNukstHiFzI4tTE0OpiI2E3eg +HUltwwZey57JIS1hHIr33lvJsgLwsBjBkgiOU0+Lkurh7/8HLXP0Z/UKeuL9cib 6E7ZiiV0EhYjkP6urQFxWNfrt7OnhFtQlbI9Dwkirf630cn053/m9Em+vBu5DEcq CAJSTLAMf6z8EPWkUstlq3WMsGUxVYPXTEy5+Nv0Lb8RS9OJyWSSOw==yk7F -----END PGP SIGNATURE-----
Am 06.02.2015 um 08:52 schrieb Steffen Kaiser:> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Thu, 5 Feb 2015, Thomas G?ttler wrote: >> Am 05.02.2015 um 12:18 schrieb Steffen Kaiser: >>> On Thu, 5 Feb 2015, Thomas G?ttler wrote: >>>>> What specific action shall be done via IMAP? The move? >>>>> Then use any IMAP client library, use the LIST command to get the mailboxes, FETCH to get the messages and >>>>> COPY/EXPUNGE >>>>> to move them. >>> >>>> You are right moving the mail should be simple. >>> >>>> I ask myself it is possible to store the date of the resubmission in the mail itself. >>> >>> How shall the date be visible to the user? >>> >>> Remember that altering the message may invalidate DKIM and other security / verification stuff. >>> >>> Instead of a simple "mv" you can prefix the message with "X-Date: " header, so you mark the message, but it is not >>> visible to the user. >>> >>> If your goal is to have the message "up" according the client side message sorting by date, you would need to alter >>> the Date: header and possibly break message verification. >>> >>> What's your goal in order to " store the date of the resubmission "? >> >> My goal is to use IMAP only, not external database. But I guess this is not possible. > > Maybe I rephrase: How should the Resubmission interfaces to the users, how shall the users work with it? > The first sentence of the quoted text contains an IMAP-only variant. However, pick up H?kon's advice and use STORE to > remove the SEEN flag. > So I wonder how the Resubmission shall work.me too. That's why I asked the question on this list. Sad but true, I guess there is no solution. Thank you very much for your feedback. Regards, Thomas