Mail delivery location issue - procmailrc

Following an update the /etc/procmailrc file was overwritten causing mail to be delivered to /var/mail/ directory rather than the users home directory. I’ve resolved the original issue so mail is now being delivered to the users home however can anyone advise how I can get the mail from /var/mail/ out/forwarded/copied etc so that my user can access?

I’m being pushed by my end user for their missing email has anyone got any suggestions of how I move/copy/merge the email from /var/mail/ into the users actual mail box?


The trouble there is that email stored in /var/mail is typically a single file, in mbox format.

But email in $HOME/Maildir is in one file per email, using the Maildir format.

To merge those, you would need a way to first convert the mbox mailboxes over to maildir.

I haven’t used this before, but it appears that there’s a way to do that using the Virtualmin command line tools.

If you run this command, you’ll see the available options:

virtualmin copy-mailbox

You should be able to use that to convert email to the Maildir format your current account is using.