mb2md command not found

In this troubleshooting guide we learn how to fix mb2md command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

mb2md: command not found

or when using sudo you get the following error message

sudo: mb2md: command not found

Solutions to mb2md: command not found

How To Fix mb2md: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu mb2md is provided by mb2md package.

mb2md is:

mb2md (mbox to maildir) takes one or more Mbox format mailbox files in a directory and convert them to Maildir format mailboxes.

As the Mbox format has some drawbacks, D. J. Bernstein created the Maildir format when he wrote Qmail. With the Mbox format all mail of a specific folder is stored as one large text file. The Maildir format stores each mail as a separate file. It is a faster and more efficient way to store mail. It works particularly well over NFS, which has a long history of locking-related woes.

The Mbox format is used by many POP3/IMAP servers, most mail servers (MTAs) and mail readers (MUAs). The Maildir format is used by Qmail, Courier-MTA and can be also used as a alternative mail storage format by Postfix and Exim or any MTA which can use procmail as MDA. POP3/IMAP servers which support Maildirs are e.g. Courier IMAP and Dovecot.

mb2md does not only convert Mbox mailbox files into a Maildir but can also convert the /var/spool/mail/$USER mailspool file. It is smart enough to not transfer a dummy message such as the UW IMAPD puts at the start of Mbox mailboxes - and you could add your own search terms into the script to make it ignore other forms of dummy first message.

To fix this problem, we can install more using the command below.

sudo apt-get -y install mb2md

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install mb2md.

sudo apt -y install mb2md

Or if you have aptitude installed you can use the following command.

sudo aptitude install mb2md

Summary

In this tutorial we learn how to fix mb2md command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.