Ubuntu uses mutt to receive, send, and reply to E-mails (mutt+msmtp+fetchmail+procmail):
Description
Mutt is a text-based mail client, acting as the Mail user Agent role, the role of MSMTP is to send e-mail (including replies), the role of Fetchmail is to save the message to the local mailbox, the role of Procmail is to do mail filtering (based on the sender, subject, keywords, etc. to sort messages, Sorting and sorting).
Software Installation:
$ sudo apt-get install mutt
$ sudo apt-get install MSMTP
$ sudo apt-get install Fetchmail
$ sudo apt-get install Procmail
Mutt Configuration:
$ CP–RV/ETC/MUTTRC ~/.MUTTRC
$ VI ~/.MUTTRC
Set sendmail= "/usr/bin/msmtp"
Set Use_from=yes
Set Realname= "Zhi.yang"
Set [email protected]
Set Envelope_from=yes
: Wq
MSMTP configuration:
$ VI ~/.MSMTPRC
Account Default
Host Smtp.ming.com
Port 587
From [email protected]
User [email protected]
Password xxxxx
Auth NTLM (auth mode depends on Mailbox server support)
TLS off
LogFile ~/.msmtp.log
: Wq
$ msmtp--host=smtp.ming.com--port 587--serverinfo (view Mailbox server supported Auth mode)
Fetchmail configuration:
$ cp–rv/usr/share/doc/fetchmail/examples/fetchmailrc.example ~/.FETCHMAILRC
$ VI ~/.FETCHMAILRC
Poll smtp.ming.com with protocol POP3
Username "[Email protected]"
Password "xxxxxx"
MDA "/usr/bin/procmail-d%T"
No keep
: Wq
Procmail configuration:
$ VI ~/.PROCMAILRC
Verbose=yes
Default=/var/spool/mail/aa
maildir= $HOME/mail
logfile= $HOME/.procmail.log
: Wq
$ sudo touch/var/spool/mail/aa (aa here is free to write, can be defined by itself)
$ sudo chown zhi.yang/var/spool/mail/aa
Use:
$ fetchmail–v (for mail synchronization)
$ mutt (you can see the Inbox mail)
Q: Exit, R: Reply (Follow the instructions)
Send 1 People:
$ echo "Hello" | Mutt-s "title" [Email protected]
$ mutt–s "title" [Email protected] < ~/aa.txt
Send multiple people:
$ echo "Hello" | Mutt-s "title" [email protected] [email protected]
CC Mail:
$ echo "Hello" | Mutt-s "title" [email protected]-c [email protected]
BCC Email:
$ echo "Hello" | Mutt-s "title" [email protected]-b [email protected]
Send attachments:
$ echo "Hello" | Mutt-s "title" [email protected]-a ~/aa.txt
Ubuntu uses mutt to receive, send, and reply to E-mails (mutt+msmtp+fetchmail+procmail