Centos6.5- configuration mailx (required for zabbix shipping)
Centos6.5- configuration mailx (required for zabbix shipping)
1. First check whether mailx is installed.
[root@localhost ~] # whereis mailxmailx: / bin/mailx / usr/share/man/man1p/mailx.1p.gz / usr/share/man/man1/mailx.1.gz
Or
[root@localhost ~] # rpm-qa | grep mailxlibreport-plugin-mailx-2.0.9-19.el6.centos.x86_64mailx-12.4-8.el6_6.x86_64
2. Query mailx version
[root@localhost] # mailx-V12.4 7-29-08
3. Modify the mailx configuration file and add the following content to save.
[root@localhost ~] # vim / etc/mail.rcset from=vino3k@utcip.com.cn # (to be modified) the sender name displayed by the recipient You can fill in your name and other set smtp=smtp.utcip.com.cn # (to be modified) the smtp server address of the external mailbox you are using set smtp-auth-user=vino3k@utcip.com.cn # (to be modified) the user name of the external mailbox you are using, set smtp-auth-password=* # (to be modified) the external mailbox password set smtp-auth=login you are using
4. Test whether the email can be sent normally.
[root@localhost ~] # echo content | mailx-v-s "title" * @ qq.com # (to be modified) you can fill in the content of your email at content, enter the subject of the email on title, and finally change * * @ .qq.com to a mailbox where you receive your email.