GNU Mailutils |
|
General-Purpose Mail Package |
Official GNU Software |
Automatic expiration of messages allows you to limit the period of
time users are permitted to keep their messages on the server. It is
enabled by expire
configuration statement:
expire n;
Enable automatic expiration of messages after n days.
The current implementation works as follows. When a message is
downloaded by RETR
or TOP
command, it is marked with
‘X-Expire-Timestamp: n’ header, where n is current
value of UNIX timestamp. The exact expiration mechanism
depends on you. Mailutils allows you two options:
pop3d
upon closing the
mailbox. You specify this mechanism using delete-expired
configuration statement:
delete-expired bool;
If bool is ‘true’, delete expired messages after receiving
the QUIT
command.
sieve
from
GNU Mailutils and the following script:
require "timestamp";
# Replace "5" with the desired expiration period
if timestamp :before "X-Expire-Timestamp" "now - 5 days"
{
discard;
}
This script will remove expired messages 5 days after the
retrieval. Replace ‘5’ with the desired expiration period and
make sure it equals the argument to expire
configuration keyword.
The statement expire 0
means the client is not permitted to
leave mail on the server. It always implies delete-expired true
.
This document was generated on January 2, 2022 using makeinfo.
Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.