Linux uses mail to send external SMTP messages

Source: Internet
Author: User
Tags auth

Linux uses mail to send external SMTP messages the first chapter explains

Resources:

Http://coolnull.com/2614.html

Linux comes with mail that allows external SMTP to be sent. There is no need to configure postfixlocally,sendmail mail server, configure the whole set down really takes some time.

Environment:

Ip

Host Name

Operating system

Note

192.168.120.130

db130

CentOS Release 6.10 (Final)

Chapter II Implementation of the 2.1 shutdown of the SendMail service or Postfix
service SendMail stopchkconfig sendmail offservice postfix stopchkconfig postfix off# need to install this tool Yum Install Mail
2.2 Modifying/etc/mail.rc
server address: POP3 server: Pop. 163 . COMSMTP server: SMTP. 163 . COMIMAP server: IMAP. 163. com

add a bit like N rows, specify the external SMTP server address, account password, and so on.

CP/etc/mail.rc/etc/mail.rc.bak. 'Date+%y%m%d%H ' [[email protected]~]#Cat/etc/Mail.rc# added the following ################# add new Context:set from=13439017540@163. Comset SMTP=smtp.163. Comset SMTP-auth-user=13439017540@163. Comset SMTP-auth-password=xxxxxset SMTP-auth=Login# exit after saving, test send messageEcho "Hello"| Mail-s"Title" 13439017540@163. com depending on the speed of the network, carrier, SMTP, mail delivery will have a delay phenomenon. # no attachments sent [[email protected]Yum. repos.d]#EchoHello Word | Mailx-v-S"title" 13439017540@163. comresolving host SMTP.163. com ... Done. Connecting to220.181.12.17... connected . ->>>EHLO db130 --Mail --pipelining --AUTH LOGIN PLAIN --auth=LOGIN PLAIN --Xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxa --XXXXXXXB -8BITMIME>>>AUTH LOGIN334Dxnlcm5hbwu6>>> mtm0mzkwmtc1ndbamtyzlmnvbq==334Ugfzc3dvcmq6>>>TFDXMTM0NTQW235Authentication Successful>>> MAIL from:<13439017540@163.com> -Mail OK>>> RCPT to:<13439017540@163.com> -Mail OK>>>DATA354End Data with <CR><LF>.<CR><LF>>>> . -Mail OK queued as SMTP13,ECCOWAD3RB23TI9BPLOFDA--. 36134s21536117944>>>QUIT221Bye[[email protected]Yum. repos.d]# #带有附件的发送方式mailx-v-s"Title3"  13439017540@163. com </root/install.mysql.SH

Linux uses mail to send external SMTP messages

Related Article

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.