How to aggregate local system mail in KMail?

I’d like to add /var/mail or /var/mail/$USER as a mailbox/folder in kmail. How might I go about this? By the way, I’d like to automate this process in a script, so I’d like to, if possible, use $USER rather than actual username of my user, but either is fine ultimately.

All that I know of this topic is from What is the "You have new mail" message in Linux/UNIX? - Super User

2 Likes

I’m AFK but I’m pretty sure Kmail supports maildir format and it’s already added by default when you first set up Kmail.

Perhaps that’s the problem. I am never prompted to complete a setup process when I launch kmail.


The relevant mailbox doesn’t appear to be automatically available.

If you go under Settings > Configure Kmail… > Accounts > Recieving you can modify the local mail account and point it to wherever you want. Note that I think this only supports maildir, not the old-style mbox.

Any idea of how to do so more specifically? I ask because I still don’t see any mail:



Whereas I should see at least one:


By the way, a cursory glance demonstrates that mbox is indeed supported, even though it’s irrelevant to this since kmail appears to believe that /var/spool/mail is a valid maildir directory.

I feel like this should be so simple, and I share your pain.

I’m using a new debian system, and my local system emails go to /var/mail/mike mbox file. I can read emails in that file with mail or mutt.

My local system email is mike@mikedebianlaptop.local.

Under ‘Accounts’ → ‘Receiving’ I have created a custom account using the ‘Mbox - loads data from a local mbox file’, and added the settings below.

No emails can be seen when I hit ‘Check Mail’.

I’ve tried all sorts of things with no success.

Can someone please give a simple guide on how to open the default local mail file (/var/mail/) with kmail?

1 Like

I have exactly same problem. It seems Mbox just doesn’t work :frowning:

Anyone figured this out?

1 Like