In LINUX, why does mail \ mailx fail to use external SMTP to send mails? Sometimes, to meet certain requirements, a single SMTP server is used as the mail report. Generally, disable the sendmail service on the local machine, modify/etc/mail. rc, and add two lines to specify the external smtp server address and account password. Www.2cto.com # vi/etc/mail. rc set from = demo@qq.com smtp = smtp.qq.com set smtp-auth-user = demo smtp-auth-password = ithf
System:CentOS 6.4 default mail is pointing to MailxCentOS 5 Series is not clearRequired Packages: mailx-12.4.tar.bz2
1. Uninstall SendMail or Postfix
The code is as follows
Copy Code
Yum Remove sendmail-yYum Remove postfix-y
2. Download and install MAILX
The code is as follows
Copy Code
wget ftp://ftp.lt.freebsd.org/pub/FreeBSD/ports/distf
Configure mailx in Centos to send emails using external smtpConfigure mailx in Centos to use external smtp to send mail to install mailx
yum install mailxConfigure mailx
I recommend 163 mail, of course, QQ mail is also acceptable, PS: Remember to enter the mailbox to open SMTP
Vi/etc/mail. rc // if it does not exist, e
A first delete the system, SendMail#yum Remove Sendmail-yBcd/opt/llwgethttp://sourceforge.net/projects /heirloom/files/latest/download?source=fileslldu-sh Mailx-12.4.tar.bz2tarjxvfmailx-12.4.tar.bz2cd mailx-12.4makemakeinstallucbinstall=/usr/bin/install mailx-Vvi/etc/nail.rc#Only Includeselectedheaderfieldswhenforwardingmessages.fwdretainsubject datefromtoset[ema
Mailx is a tool used on UNIX systems to process emails. It can be used to send and read emails. Next let's take a look at how to use it to send emails.
Sending format
User@xxx.com of mailx-s subject
If the mail content is stored in the MSG file, you can use the following method:
Mailx-s "test mail" zdd@163.com
Or
Cat MSG |
In linux bash, if you use mailx to send Chinese content and display it as an attachment, the mailx version is resolved. Here, mail is directed to the mailx Program # ll/bin/mail lrwxrwxrwx by default. 1 root 5 October 2011/bin/mail-> mailx www.2cto.com # mail-V 12.4 7/29/08 mail. rc configuration, set the external smtp
Recently Naigos modified contact, need to send test mail manually Centos (other versions can refer to man mail, man mailx for more information)Create a message content file Mail.txt[email protected] ~]# Touch mail.txt[Email protected] ~]# VI mail.txtSend mail after editing contentMailx-s ' Test a Simple mail ' [email protected] [email protected] to accept email addressIf multiple addresses can be separated by commasSpecify Sender Address:Mailx-r $from
MAILX is a tool used on UNIX systems to process messages, and it can be used to send and read messages. Let's see how you can use it to send messages.
Send format
Mailx-s Subject User@xxx.com
If the message content is stored in a msg file, you can use the following method:
Mailx-s "Test Mail" zdd@163.com
Or
Cat msg |
After installing the Zabbix, set the mail script alarm, the sent alarm content becomes tcmime.1278.1278.1724.bin or att00001.bin.Yum-y Install MAILX Dos2unix//Installation MAILX tools and Dos2unix conversion toolsHere is the script content:[email protected] alertscripts]# cat sendmail.sh#!/bin/bash#export LANG=ZH_CN. UTF-8 //solve the problem of sending the Chinese into garbledFile=/tmp/mailtmp.txtecho "$ $
Mailx is a tool used on UNIX systems to process emails. It can be used to send and read emails. Next let's take a look at how to use it to send emails. The sending format mailx-s subject user@xxx.com
Recently, it is quite new to see that the report generated by the Java program is often sent with the MAIL/MAILX command in the project. The following is a brief introduction to the following MAIL/MAILX command usage. This article has the same effect as the Mail command Example (MAIL/MAILX). Send the printed content as standard input to the Mail command[Email pro
There is a mail service function inside the Linux system/var/spool/mailCentOS6, 7 The default is to open the mail service-s Specifies the subject of the message-A file_name adding attachments-R Specify the message source-U Specify the purpose of the messageHello World is the subject of the message this message is sent to root. EoT above, that is, on behalf of the message content input completed.Mail is querying your own message 1 means you need to see the first messageQ is to exit the programInf
designated mailbox.
First: Send mail using Zabbix service-side Local mailbox account
First, install SendMail or postfix
Yum install sendmail #安装
Service SendMail start #启动
Chkconfig sendmail on #设置开机启动
Yum install Postfix
Service Postfix start
Chkconfig Postfix on
CentOS 5.x is installed by default SendMail
CentOS 6.x is installed by default Postfix
SendMail and postfix only need to install one and open the service.
Second, the installation of mail delivery tool
-mail accounts (such as:
xxx@163.com), through the Zabbix server set up to enable it to send alarm messages to the designated mailbox.
First: Send mail using Zabbix service-side Local mailbox account
First, install SendMail or postfix
Yum Install SendMail #安装
Service SendMail Start #启动
Chkconfig SendMail on #设置开机启动
Yum install Postfix
Service Postfix start
Chkconfig Postfix on
CentOS 5.x is installed by defau
[Email protected]/]# mail-s "Message" [email protected] The system by default to "[email protected] hostname" To send mail, receive mail directly to be considered as spam, it can be customized mailbox to send mail?The answer is sure to do.Download MAILX PackageMAILX Official Site http://heirloom.sourceforge.net/Download latest Version mailx-12.4.tar.bz2 (271.5 KB)Http://sourceforge.net/projects/heirloom/fil
The original use of Linux SendMail e-mail, and then do a safe time to turn off a sendmail service, resulting in the Mail has been unable to send. Now I'm going to configure the use of external SMTP to send mail, so you don't have to sendmail.
Originally the system comes with MAILX program, because I am REDHAT5 system so can't send mail directly with external SMTP, only upgrade MAILX program can use. So f
In linux, how does one send emails to external mailboxes and use linux? sometimes, if we want to send emails to friends or colleagues, can we send them directly through the command line? How can I use a script to send an email to an external mailbox if I want to monitor the website or system status through linux and automatically trigger an alarm? I do not need to register public... information n how does linux send emails to external mailboxes when using linux? sometimes we want to send emails
stopchkconfig sendmail off # postfixservice postfix stopchkconfig postfix off # uninstall them if you want to find it again .. yum remove sendmailyum remove postfix www.2cto.com and then modify/etc/mail. rc: add N lines to specify the external smtp server address and account password. 1 # vi/etc/mail. rc 2 set from = 123456@qq.com3 set smtp = smtp.qq.com 4 set smtp-auth-user = 1234565 set smtp-auth-password = sbsbsbsb6 set smtp-auth = login and then send mail echo through command hello word | m
In linux, how does one send emails to external mailboxes and use linux? Sometimes, if we want to send emails to friends or colleagues, can we send them directly through the command line? How can I use a script to send an email to an external mailbox if I want to monitor the website or system status through linux and automatically trigger an alarm? You do not need to register a public domain name or MX record, that is, you do not need to set up a public email server. We can still achieve the abov
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.