reddit / emacs

How to configure mbsync to limit the number of emails downloaded to local?

ndpian · 2022-03-20 00:12
I'm in the process of shifting my mail clients to Emacs, and have mostly configured the full setup (mbsync+mu4e). Initially, running `mbsync -aV` would just download all emails from the remote. While this wasn't a problem for my work email (a relatively new mailbox), I suspect this would be of a greater issue for my personal gmail as I have thousands of useless/spam/marketing emails which just eats up space. Given the download rate limit from gmail (2.5GB per day) and my limited local drive space, I was wondering if there is any setup in mbsync to only download N number of recent emails, or download emails after a specific year. (I could, alternatively, just cleanup my gmail inbox. Maybe that will be the last option!)
licht1nstein · 2022-03-20 05:08
MaxSize 1m MaxMessages 10000 You can use `MaxSize` and `MaxMessages` settings for that.
ndpian · 2022-03-20 20:49
thanks! I'll try this! :)