设置Linux的mailx收发邮件

CentOS自带的mailx为版本8,比较旧。

cvs -d:pserver:[email protected]:/cvsroot/nail login
直接回车

cvs -d:pserver:[email protected]:/cvsroot/nail co nail

或者到http://download.csdn.net/detail/hansel/4379403 处下载。


cd nail
make
vi Makefile
    UCBINSTALL      = /usr/bin/install
sudo make install

sudo mv /bin/mailx /bin/mailx8
sudo ln -s /usr/local/bin/mailx /bin/mailx


#vim .mailrc
根据你的SMTP服务器设置,添加内容
set from="Test <[email protected]>"
set [email protected]
set smtp=smtp.test.net
set [email protected]
set smtp-auth-password=123456
set smtp-auth=login

上面的内容也可以直接增加到/etc/nail.rc中。


测试:
mailx -v -s "Test"  [email protected]

你可能感兴趣的:(linux,centos,服务器,cvs,login,makefile)