mailx mailx-8.1.1-44.2.2 # ll/bin/mail *-rwxr-xr-x 1 root mail 84856 Jun 6 2007/bin/mail lrwxrwx Rwx 1 root 4 Apr 12/bin/mailx-> mail # mail-V this operation will cause an error. If the-V parameter is not specified, that is, in RHEL6 \ 5, running mail and mailx is actually a command, but different mail versions make t
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
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 |
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 "$ $
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
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
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
Send alert email settings using an external email accountOne, close sendmail or postfix1 service SendMail Stop #关闭 2 chkconfig sendmail off #禁止开机启动 3 service Postfix Stop 4 chkconfig postfix offNote: When using an external mailbox account, you do not need to start sendmail or postfix if you send an alert message using an external mailbox while sendmail or Postfix is started, the external mailbox configuration information is read first. Second, install
name, even behavior password, multiple users write multiple lines, the content format is as follows:TestUser1AminglinuxUser1987654321Edit Change Permissions: chmod 600/etc/vsftpd/vsftpd_login cannot be read by all usersConvert the text password file to a computer-recognized binary: db_load-t-T hash-f/etc/vsftpd/vsftpd_login/etc/vsftpd/vsftpd_login.dbdirectory where the virtual user configuration file is created: mkdir/etc/vsftpd/vsftpd_user_confThis
Hostname configuration/etc/sysconfig/network hostname can not be changed to the form of the domain nameShell>vim/etc/sysconfig/networkNetworking=yesNetworking_ipv6=noHostname=mail1.gz.comLocal domain name resolution configuration is often used for testing, of course, in a system of their own internal use is also very commonShell>vim/etc/hosts192.168.2.10 mail1.gz.com192.168.2.20 mail2.gz.comDNS
Regular backup of gadgets in configuration files and configuration tables, configuration file configuration backup
The currently maintained configuration files/tables are all manually backed up by people. The last time a machine went down, I wanted to pull the application o
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.