mu4e and POP

72 views
Skip to first unread message

Xavier Maillard

unread,
Feb 7, 2018, 9:28:50 AM2/7/18
to mu-discuss
Hello,

long time I did not post here.

I recently decided to stop using IMAP and switch back to POP to
stop wasting resources.

So far, it works for me; getting mail (via fetchmail currently),
filtering (via my good ol' friend procmail) and displaying them
with *mu/mu4e*.

I have a simple question concerning mu4e and POP setups: when I
was using IMAP, I used to mark my go-to-trash messages with 'd'
and letting the IMAP server get rid of them automatically. This is
no longer possible this way thus, I was just asking how is it
supposed to trash all the 'T'rashed messages now ?

Cheers,
--
Xavier

Dirk-Jan C. Binnema

unread,
Feb 7, 2018, 2:52:24 PM2/7/18
to mu-di...@googlegroups.com
Hi Xavier,
I'm using POP as well for some account (with fetchmail/procmail, too).
For messages I'd like to delete, I use 'D' or <delete>'.

If you want to "trash" them, it works as you describe; the idea of
"trashing" is that you perhaps want to double-check whether you really
want to delete them.

Kind regards,
Dirk.

--
Dirk-Jan C. Binnema Helsinki, Finland
e:dj...@djcbsoftware.nl w:www.djcbsoftware.nl
pgp: D09C E664 897D 7D39 5047 A178 E96A C7A1 017D DA3C

Joost Kremers

unread,
Feb 7, 2018, 3:38:52 PM2/7/18
to mu-di...@googlegroups.com

On Wed, Feb 07 2018, Xavier Maillard wrote:

> I have a simple question concerning mu4e and POP setups: when I
> was using IMAP, I used to mark my go-to-trash messages with 'd'
> and letting the IMAP server get rid of them automatically. This
> is no longer possible this way thus, I was just asking how is it
> supposed to trash all the 'T'rashed messages now ?

You could do it manually, by going into the Trash mailbox and
hard-delete them ('D': `mu4e-headers-mark-for-delete'). That's a
bit cumbersome, of course. More straightforward, do it from the
command line: `rm /path/to/Mail/Trash/cur/*' and then reindex.

With a little scripting fu, you could set up a cron job to
automatically delete trashed mails once a day or once a week, or
whenever you like.

Using mu-find, you could even search for messages older than a
specific date and delete only those, giving yourself a safety
margin. That's something I've been meaning to set up myself (I do
use IMAP, but I don't sync my Trash folder back to the server),
but I haven't gotten round to it yet, so I can't help with the
details...


--
Joost Kremers
Life has its moments

Ken Mankoff

unread,
Feb 7, 2018, 4:04:01 PM2/7/18
to mu-di...@googlegroups.com
I have a cron job (actually LaunchAgent on OS X) that runs the following once a day. It deletes all trash >90 days old.

/opt/local/bin/mu find maildir:/trash AND date:100y..90d --sortfield=date --fields=l | xargs -J {} rm {}

-k.

Joost Kremers

unread,
Feb 7, 2018, 5:02:12 PM2/7/18
to mu-di...@googlegroups.com
Hey, thanks! Saves me some experimenting. Why do you add the
--sortfield option, if I may ask?

It may be worth pointing out, for those who want to try this at
home, that GNU xargs, which is what's usually found on Linux, uses
-I instead of -J.

Xavier Maillard

unread,
Feb 7, 2018, 5:18:24 PM2/7/18
to mu-di...@googlegroups.com

Dirk-Jan C. Binnema <dj...@djcbsoftware.nl> writes:

> On Wednesday Feb 07 2018, Xavier Maillard wrote:
>
>> I have a simple question concerning mu4e and POP setups: when I
>> was
>> using IMAP, I used to mark my go-to-trash messages with 'd' and
>> letting the IMAP server get rid of them automatically. This is
>> no
>> longer possible this way thus, I was just asking how is it
>> supposed to
>> trash all the 'T'rashed messages now ?
>
> I'm using POP as well for some account (with fetchmail/procmail,
> too).
> For messages I'd like to delete, I use 'D' or <delete>'.

I am always reluctant 'D'eleting directly my messages. Dunno why
though.

--
Xavier

Xavier Maillard

unread,
Feb 7, 2018, 5:20:25 PM2/7/18
to mu-di...@googlegroups.com

Joost Kremers <joostk...@fastmail.fm> writes:

> On Wed, Feb 07 2018, Xavier Maillard wrote:
>
>> I have a simple question concerning mu4e and POP setups: when I
>> was using IMAP, I used to mark my go-to-trash messages with 'd'
>> and letting the IMAP server get rid of them automatically. This
>> is no longer possible this way thus, I was just asking how is
>> it
>> supposed to trash all the 'T'rashed messages now ?
>
> You could do it manually, by going into the Trash mailbox and
> hard-delete them ('D': `mu4e-headers-mark-for-delete'). That's a
> bit cumbersome, of course. More straightforward, do it from the
> command line: `rm /path/to/Mail/Trash/cur/*' and then reindex.

Not a big fan of the manual way since I have already accumulated
tons of trashed messages since I switched over to POP (I had to
delete my xapian database and such...)

I will give a go to the scripting-fu, that should not be a big
deal using mu-find, right ?

Regards
--
Xavier

Xavier Maillard

unread,
Feb 7, 2018, 5:27:01 PM2/7/18
to mu-di...@googlegroups.com
Wow, you've done it. Thank you. Adopted.

Regards
--
Xavier

Joost Kremers

unread,
Feb 7, 2018, 5:28:51 PM2/7/18
to mu-di...@googlegroups.com

On Wed, Feb 07 2018, Xavier Maillard wrote:
> I am always reluctant 'D'eleting directly my messages. Dunno why
> though.

I used to use 'D' instead of 'd', but I shot myself in the foot
with that a few times. Like hitting 'D' on the email above or
below the one I actually wanted to delete, or absentmindedly
hitting 'D' when I really wanted to do something else with the
message. This wasn't made any better by the fact that I tend to
hit 'x' quickly and without thinking...

So at some point I decided to use 'd' instead and I haven't
regretted it.

Ken Mankoff

unread,
Feb 7, 2018, 6:06:34 PM2/7/18
to mu-di...@googlegroups.com

On 2018-02-07 at 22:02, Joost Kremers <joostk...@fastmail.fm> wrote:
>> /opt/local/bin/mu find maildir:/trash AND date:100y..90d
>> --sortfield=date --fields=l | xargs -J {} rm {}
>
> Hey, thanks! Saves me some experimenting. Why do you add the
> --sortfield option, if I may ask?

Not sure, but I'd guess that it was left in from debugging. Sorting and then piping to head or tail or less instead of xargs lets you check the dates of emails that you will be deleting.

-k.

Charles-H. Schulz

unread,
Feb 8, 2018, 11:25:04 AM2/8/18
to mu-di...@googlegroups.com
Hello,
Slightly off topic but I am curious as to what the use case for POP would be nowadays . Could anyone elaborate?

Thanks,

Charles. 

Xavier Maillard

unread,
Feb 8, 2018, 5:19:49 PM2/8/18
to mu-di...@googlegroups.com
The reason I switched back to POP vs IMAP is just that I recently
feel the need to just "centralize" my emails on one single
device. I do not want to be disturbed anymore with emails hitting
my smartphone, my tablet, etc. So removing my email account from
these devices means I do not need IMAP anymore.

Regards
--
Xavier

Charles-H. Schulz

unread,
Feb 9, 2018, 5:10:57 PM2/9/18
to mu-di...@googlegroups.com
Hello Xavier,
I see. 

Thank you for your answer,

Charles.
Reply all
Reply to author
Forward
0 new messages