nnmail-expiry-wait-function

nnmail-expiry-wait-function is a variable defined in `nnmail.el'.
Its value is
nil

  • This variable may be risky if used as a file-local variable.

Documentation:
Variable that holds function to specify how old articles should be before they are expired.
The function will be called with the name of the group that the expiry
is to be performed in, and it should return an integer that says how
many days an article can be stored before it is considered "old".
It can also return the values `never' and `immediate'.

E.g.:

(setq nnmail-expiry-wait-function
(lambda (newsgroup)
(cond ((string-match "private" newsgroup) 31)
((string-match "junk" newsgroup) 1)
((string-match "important" newsgroup) 'never)
(t 7))))

You can customize this variable.