I read and write mail on the phone, and every now and then I move the mails in my “INBOX” folder to my laptop using POP3, and read and write some more, there.
Yeah, it’s confusing. Here’s what I want:
Therefore, every time I use Rmail, I run “mpop” to move all my mail from the IMAP’s INBOX to “*/mail/inbox”. Rmail then sees new mail in that file and moves it to “*/mail/current”. This is the mbox I work with. From there, mail is moved to “*/mail/trash” or to “*/mail/archive” or to a few other files.
When I send an email from Emacs, a copy gets saved to “~/mail/sent”. But what happens to mail I send on my phone? It’s stored in the “Sent” folder on the server. I can’t get it via “mpop”. How annoying!
I can always start Evolution on the laptop and manually move my sent mail from the server to an mbox. Unfortunately, Evolution writes a corrupt mbox: every now and then, there’s no empty line between two mails, resulting in one “mail” actually containing three of them, all of them concatenated together. That’s terrible!
To fix the mess Evolution creates, I’ve had to open the mbox file in Emacs and do some global searching and replacing. Awkward!
So here’s what I’m using right now.
A Makefile to split my “*/mail/archive” and “*/mail/sent” files into smaller files, to delete older mails from my “~/mail/trash” file, and a way to get mail from the “Sent” folder on my IMAP server using “fetchmail” and delivering it using “maildrop”.
all: mail-expire 30 archive sent mail-expire --delete 30 trash get-sent: fetchmail --folder Sent --all --proto IMAP --ssl \ --user alex@alexschroeder.ch \ --mda "maildrop /home/alex/mail/.maildrop-sent" \ imap.migadu.com
The file “~/mail/.maildrop-sent” controls how the mails are dropped. It is very simple:
to /home/alex/mail/sent
Therefore, if I run “make get-sent” it fetches all the mail I recently sent on the phone and puts it in the right folder.
#Mail #Administration
(Please contact me if you want to remove your comment.)
⁂
Why not save a lot of hassle and use Maildir format? It’s a lot more reliable than mbox and easier to sync from place to place.
– mathew 2021-07-01 12:57 UTC
---
Because Rmail only supports mbox.
– Alex 2021-07-01 13:49 UTC