If you want to download mail (e.g. from a remote imap or pop mail server), you need to use a program such as fetchmail or getmail. Both of these are available as packages for Ubuntu, so can be installed with apt.
These programs can be configured to connect to your remote mail server(s), authenticate with your username and password, download mail and either store it in a specified directory, or pipe it into an external program such as procmail for further processing.
As for the programs you mentioned:
mutt is a full-featured mail client or Mail User Agent (MUA). It can be configured to connect to a remote pop or imap mail server (allowing you to read and send mail, or save specific messages to local storage), but isn't really suitable for automated mail download & processing.
procmail is a Mail Delivery Agent (MDA). It is used to deliver mail to particular files, directories, or even forward them to other email addresses depending on matching rules in a .procmailrc file.
procmail is mostly used with Mail Transfer Agents (like postfix or exim or sendmail etc) but is often used with programs like fetchmail - fetchmail does the fetching, and procmail rules examine the headers and/or the body of each message to decide whether to save each message to a file, pipe it to one or more other programs (e.g. ripmime), and/or forward it to another address.
ripmime is a tool used to extract MIME attachments from a message you have already read. you can use it on files containing saved messages, or pipe messages to it from an MUA like mutt.