Linux Mutt Mail Send configuration

Source: Internet
Author: User

First introduce mutt This software, it is a text-based interface of the mail client, very small, but powerful, you can use it to read and write, reply to save and delete your mail, can be in the Linux command line mode to send and receive mail attachments.

For more usage, please check the website: http://www.mutt.org

First, the installation of Mutt

Yum-y Install SendMail

#需要安装sendmail并开启防火墙的25端口, if you need to receive mail 110 port also to open

Yum-y Install Mutt

Second, configuration information

After the installation is complete, if the/root directory does not have a. muttrc this hidden file, you can copy it from somewhere else, or create a new file yourself.

The muttrc file can be found through the Find command, which is named after the Find/-name muttrc, and then renamed to./root after the command cp/etc/muttrc/root/.muttrc copied to MUTTRC, then you can edit the configuration file. 。

#如果你收到的邮件乱码, set the following information

Set charset= "Utf-8"

Set Rfc2047_parameters=yes

#如果你想自定义发件人信息, the following settings are required

Set Envelope_from=yes

Set Use_from=yes

Set [email protected]

Set Realname= "Licz"

After installing Mutt, there is a good manual under/usr/share/doc/mutt*, you can look at it.

Third, the Mail sent

Syntax

Mutt [-hnprvxz][-a< Files >][-b< addresses >][-c< addresses >][-f< mail files >][-F< profiles >][-H< mail drafts >][-i < file >][-m< type;] [-s< topic >][Email Address]

Parameters

-A < File > add additional files to the message.

-B < address > Specify the recipient address of the blind copy.

-C < address > The recipient address of the specified copy.

-F < mail file > Specify the message file to load.

-F < profile > Specifies the settings file for the Mutt program without reading the preset. muttrc file.

-h displays Help.

-H < Mail draft > send a draft of the specified message.

-I < files > inserts the specified file into the message text.

-M < type > Specify the default mail mailbox type.

-N Do not read the program planting file (/ETC/MUTTRC).

-p After you finish editing the message in Mutt and don't want to send the message immediately, you can send the message in a reprieve.

-R opens the mail file in a read-only manner.

-S < subject > Specify the subject of the message.

-V Displays the version information for Mutt and the parameters given when the file was compiled.

-X simulates the way Mailx is edited.

-Z with the-f parameter, if there is no mail in the message file will not start mutt.

Iv. Examples of

Example to illustrate

Mutt [email protected]-S "Licz data backup"-a/home/backup/master_bak.sql </root/readme.txt

Or

echo "Test" | Mutt [email protected]-S "Licz data Backup"-a/home/backup/master_bak.sql

This code indicates, send the mail to [email protected] This mailbox, the message subject is "Licz data backup", the message content in/root/readme.txt, the message contains the attachment/home/backup/licz.sql. If you want to send multiple attachments, you need to add the-a parameter before each attachment.

Linux Mutt Mail Send configuration

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.