mirror of
https://github.com/mjl-/mox.git
synced 2025-07-12 17:04:39 +03:00
implement imap savedate extension, rfc 8514
it makes a new field available on stored messages. not when they they were received (over smtp) or appended to the mailbox (over imap), but when they were last "saved" in the mailbox. copy/move of a message (eg to the trash) resets the "savedate" value. this helps implement "remove messages from trash after X days".
This commit is contained in:
@ -424,8 +424,14 @@ type Message struct {
|
||||
MailboxOrigID int64
|
||||
MailboxDestinedID int64
|
||||
|
||||
// Received indicates time of receival over SMTP, or of IMAP APPEND.
|
||||
Received time.Time `bstore:"default now,index"`
|
||||
|
||||
// SaveDate is the time of copy/move/save to a mailbox, used with IMAP SAVEDATE
|
||||
// extension. Must be updated each time a message is copied/moved to another
|
||||
// mailbox. Can be nil for messages from before this functionality was introduced.
|
||||
SaveDate *time.Time `bstore:"default now"`
|
||||
|
||||
// Full IP address of remote SMTP server. Empty if not delivered over SMTP. The
|
||||
// masked IPs are used to classify incoming messages. They are left empty for
|
||||
// messages matching a ruleset for forwarded messages.
|
||||
|
Reference in New Issue
Block a user