ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Linux之sendEmail安装和配置

Linux之sendEmail安装和配置

原创 Linux操作系统 作者:小dangdang 时间:2016-08-16 17:09:56 0 删除 编辑

1、下载

http://caspian.dotconf.net/menu/Software/SendEmail/sendEmail-v1.56.tar.gz
2、安装

tar zxvf sendEmail-v1.56.tar.gz

cd sendEmail-v1.56

cp sendEmail /usr/local/bin/

chmod 775 /usr/local/bin/sendEmail

chown infa:oinstall /usr/local/bin/sendEmail  
3、配置
cd ~
vi .bash_profile

# .bash_profile

# Get the aliases and functions

if [ -f ~/.bashrc ]; then

        . ~/.bashrc

fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin:/usr/local/bin

export PATH
(修改环境变量)
注:需要在邮件服务器中给当前主机授予发送、接受邮件的权限;
4、测试(默认用户)

sendEmail -f postmaster@crv.com.cn -t liuyxxxxx@crv.com.cn -s mail.crv.com.cn -u "test" -xu  -xp   -m "test" -o message-charset=UTF-8 
5、参数说明

-f 表示发送者的邮箱

-t 表示接收者的邮箱

-s 表示SMTP服务器的域名或者ip

-u 表示邮件的主题

-xu 表示SMTP验证的用户名

-xp 表示SMTP验证的密码(注意,这个密码貌似有限制,例如我用d!5neyland就不能被正确识别)

-m 表示邮件的内容

-cc 表示抄送

-bcc 表示暗抄送

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/31379016/viewspace-2123572/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2016-07-28

  • 博文量
    12
  • 访问量
    18203