[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Expiring nnimap messages automatically

From: Nicolas Cavigneaux
Subject: Re: Expiring nnimap messages automatically
Date: Wed, 08 Apr 2020 10:38:18 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (darwin)

Eric Abrahamsen <> writes:

> Whoa hang on, why did explicitly asking for the 'expiry-wait parameter
> return nil before, then? Can you test that again? If 'expiry-wait is
> present in the alist, we should have gotten 2 from the earlier call.

Ok my bad, sorry. You were right I did a typo in the first call so here
are the actual values:

(gnus-group-find-parameter "nnimap+home:INBOX" 'expiry-wait)
2 (#o2, #x2, ?\C-b)

(gnus-group-find-parameter "nnimap+home:INBOX")
((display . all) (expiry-wait . 2) (gnus-use-scoring nil) (permanent-flags 
%Answered %Flagged %Draft %Deleted %Seen $Forwarded $Junk $NotJunk $NotPhishing 
$Phishing Forwarded ...) (active 1 . 95606) (uidvalidity . "2") (modseq . 

Much more consistent :)

> Anyway, something is setting this parameter to two days, so I'm guessing
> that your imap messages are getting expired, but not until two days
> later, so it might look like nothing is happening. Is that possible?

If I check the nnimap+work:INBOX group I do only have emails that are
at most two days old, so it seems you're right.

To be sure it's working as expected I did:

(gnus-group-set-parameter "nnimap+home:INBOX" 'expiry-wait 1)

then enter the nnimap+home:INBOX group, exit it and enter it again.
Expired emails older than one day were gone (moved to Trash). Hooray!

> Have you configured the `gnus-parameters' option? Or set an
> `expiry-wait' parameter for this group in particular? Two days isn't a
> default value anywhere...

I didn't set gnus-parameters. It's value is nil.

I can't remember having explicitly set `expiry-wait` to two so I started
a new instance of Emacs and checked. The value is still 2. I checked my
whole config file for an hard-coded 2 value and nothing. Weird.

To gather more info I also checked other groups:

(gnus-group-find-parameter "nnimap+work:INBOX" 'expiry-wait)

nnimap+home:INBOX is *the only one* with a value for expiry-wait. I
don't understand why so I'll paste configuration regarding expiry again
so you can double check:

(setq gnus-secondary-select-methods
      '((nnimap "home"
                (nnimap-address "")
                (nnimap-server-port "imaps")
                (nnimap-stream ssl)
                (nnir-search-engine imap)
                ;; @see
                ;; press 'E' to expire email
                (nnmail-expiry-target "nnimap+home:[Gmail]/Trash")
                (nnmail-expiry-wait 'immediate))
        (nnimap "work"
                (nnimap-address "")
                (nnimap-server-port "imaps")
                (nnimap-stream ssl)
                (nnir-search-engine imap)
                (nnmail-expiry-target "nnimap+work:[Gmail]/Trash")
                (nnmail-expiry-wait 'immediate))))

My full Emacs config can be found at but it's quite long. All config
related to Gnus is in gnus.el.

So there are two questions left:

- Why does nnimap+home:INBOX has a value of 2 rather than immediate or nil?
- How to apply expiry-wait on all nnimap groups?

Thanks again for your help Eric, I really appreciate.
Nicolas Cavigneaux

reply via email to

[Prev in Thread] Current Thread [Next in Thread]