Linux Automatic Logon email

Source: Internet
Author: User
Linux Automatic Logon email

20:49:04 label: Linux

Mutt + msmtp Linux Mail Client Configuration
Leisure
Workplace

The MAIL command is often used to send emails when writing shell scripts. However, emails sent directly are often rejected as spam because they are invalid. Is there a similar Foxmail in Linux, the mail client software such as outlook has a command line to send emails. Mutt and msmtp provide a good solution.
The configuration scheme is as follows:
1) download msmtp
Wget

Http://downloads.sourceforge.net/msmtp/msmtp-1.4.16.tar.bz2? Modtime = 1217206451 & big_mirror = 0

2) decompress:
Tar jxvf msmtp-1.4.16.tar.bz2
3) installation:
./Configure -- prefix =/usr/local/msmtp
Make & make install
4) configure the msmtp account:
Create a file/usr/local/msmtp/etc/msmtprc (you can also create a. msmtprc file in the main directory, if it is only for your own use)
Edit content:
Ults
Account Test
Host sending email server name or IP address
Email address sent from
AUTH LOGIN
User email server Logon account
Password email server login password
Account default: Test // set the default account
5) test whether the client is available
/Usr/local/msmtp/bin/msmtp target email address
Enter some characters and press Ctrl + D to exit. Go to the target email address and check whether the email is received.
6) Configure mutt. Mutt is usually installed by default in Linux.
Edit the mutt configuration file:/etc/muttrc and modify the following lines: (you can also create a file in the main directory. edit the muttrc file, if only used by yourself) set Sendmail = "/usr/local/msmtp/bin/msmtp"
Set use_from = Yes
Set realname = "sending email address"
Set Editor = "Vi"
7) Save and exit, and test whether mutt is valid:
Echo "Test content" | mutt-s "Test Topic" target email address

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.