Ubuntu uses mutt to receive, send, and reply to E-mails (mutt+msmtp+fetchmail+procmail

Source: Internet
Author: User
Tags auth ming

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.