[转] RedHat邮件程序mutt的设置
2013-07-03 17:35
453 查看
由于需要使用git发邮件,在配置的过程中出现了一些错误,后来找到了这篇文章,感觉不错,转载过来了
======== 以下是转载内容,转自: /article/1873935.html ==========
在linux发送邮件需要两个程序,分别是mutt和smstp。前者是mail的客户端User,后者则是个smtp的简易服务器,要发邮件两者不可或缺(当然也可以通过其他工具来发送)
可以通过以下方式查看
[root@localhost ~]# rpm -qa|grep mutt
mutt-1.4.2.2-3.0.2.el5
[root@localhost ~]#
smstp一般去/usr/local/bin或者/usr/bin等路径下find一把
[root@localhost bin]# ll
total 240
-rwxr-xr-x 1 root root 237267 Apr 10 03:36 msmtp
如果没有安装,则可以用rpm -ivh mutt-1.4.2.2-3.0.2.el5.x86_64.rpm
来安装
smstp则可以在http://download.chinaunix.net/download/0008000/7048.shtml下载。
系统这边已经安装了mutt,只需要下载个smstp然后安装即可。
安装的步骤是
[root@localhost ~]# cd msmtp-1.4.5
[root@localhost ~]# ./configure
[root@localhost ~]# make
[root@localhost ~]# make install
本次安装开始下载的是msmtp-1.4.27版本,但是编译的时候报了一个错误:
[root@localhost msmtp-1.4.27]# make
make all-recursive
make[1]: Entering directory `/root/msmtp-1.4.27'
Making all in src
make[2]: Entering directory `/root/msmtp-1.4.27/src'
CCLD msmtp
tls.o: In function
`tls_init':/root/msmtp-1.4.27/src/tls.c:1100: undefined reference
to `gnutls_priority_set_direct' collect2: ld returned 1 exit
status
make[2]: *** [msmtp] Error 1
make[2]: Leaving directory `/root/msmtp-1.4.27/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/msmtp-1.4.27'
make: *** [all] Error 2
无解,后来听朋友说换一个低版本的安装,结果未报错。选择了版本msmtp-1.4.5
邮件的发送:
[root@localhost ~]# echo "Believing the god with U"|mutt -s
"keyon's mail" lqchenzjut@163.com
[root@localhost ~]#
去指定的邮箱查看,收到了主题为keyon's mail,内容为Believing the god with
U的邮件。
若要增加附件,则加上-a参数,如当前目录:
[root@localhost ~]# ll
total 584
-rw------- 1 root root 1464 Apr
9 05:55 anaconda-ks.cfg
drwxr-xr-x 2 root root 4096 Apr
9 22:44 Desktop
-rw-r--r-- 1 root root 52465 Apr
9 05:55 install.log
-rw-r--r-- 1 root root 4728 Apr
9 05:55 install.log.syslog
drwxrwxrwx 6 1000 1000 4096 Apr 10 03:36
msmtp-1.4.5
-rw-r--r-- 1 root root 489336 Apr 9 19:37
msmtp-1.4.5.tar.bz2
发送install.log.syslog文件出去。
[root@localhost ~]# echo "Believing the god with U"|mutt -a
install.log.syslog -s "keyon's mail" lqchenzjut@163.com
[root@localhost ~]#
检查,OK。
若要发送多人,则可以在各个收件人邮箱之间以逗号区分即可。
======== 以下是转载内容,转自: /article/1873935.html ==========
在linux发送邮件需要两个程序,分别是mutt和smstp。前者是mail的客户端User,后者则是个smtp的简易服务器,要发邮件两者不可或缺(当然也可以通过其他工具来发送)
可以通过以下方式查看
[root@localhost ~]# rpm -qa|grep mutt
mutt-1.4.2.2-3.0.2.el5
[root@localhost ~]#
smstp一般去/usr/local/bin或者/usr/bin等路径下find一把
[root@localhost bin]# ll
total 240
-rwxr-xr-x 1 root root 237267 Apr 10 03:36 msmtp
如果没有安装,则可以用rpm -ivh mutt-1.4.2.2-3.0.2.el5.x86_64.rpm
来安装
smstp则可以在http://download.chinaunix.net/download/0008000/7048.shtml下载。
系统这边已经安装了mutt,只需要下载个smstp然后安装即可。
安装的步骤是
[root@localhost ~]# cd msmtp-1.4.5
[root@localhost ~]# ./configure
[root@localhost ~]# make
[root@localhost ~]# make install
本次安装开始下载的是msmtp-1.4.27版本,但是编译的时候报了一个错误:
[root@localhost msmtp-1.4.27]# make
make all-recursive
make[1]: Entering directory `/root/msmtp-1.4.27'
Making all in src
make[2]: Entering directory `/root/msmtp-1.4.27/src'
CCLD msmtp
tls.o: In function
`tls_init':/root/msmtp-1.4.27/src/tls.c:1100: undefined reference
to `gnutls_priority_set_direct' collect2: ld returned 1 exit
status
make[2]: *** [msmtp] Error 1
make[2]: Leaving directory `/root/msmtp-1.4.27/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/msmtp-1.4.27'
make: *** [all] Error 2
无解,后来听朋友说换一个低版本的安装,结果未报错。选择了版本msmtp-1.4.5
邮件的发送:
[root@localhost ~]# echo "Believing the god with U"|mutt -s
"keyon's mail" lqchenzjut@163.com
[root@localhost ~]#
去指定的邮箱查看,收到了主题为keyon's mail,内容为Believing the god with
U的邮件。
若要增加附件,则加上-a参数,如当前目录:
[root@localhost ~]# ll
total 584
-rw------- 1 root root 1464 Apr
9 05:55 anaconda-ks.cfg
drwxr-xr-x 2 root root 4096 Apr
9 22:44 Desktop
-rw-r--r-- 1 root root 52465 Apr
9 05:55 install.log
-rw-r--r-- 1 root root 4728 Apr
9 05:55 install.log.syslog
drwxrwxrwx 6 1000 1000 4096 Apr 10 03:36
msmtp-1.4.5
-rw-r--r-- 1 root root 489336 Apr 9 19:37
msmtp-1.4.5.tar.bz2
发送install.log.syslog文件出去。
[root@localhost ~]# echo "Believing the god with U"|mutt -a
install.log.syslog -s "keyon's mail" lqchenzjut@163.com
[root@localhost ~]#
检查,OK。
若要发送多人,则可以在各个收件人邮箱之间以逗号区分即可。
相关文章推荐
- [转] RedHat邮件程序mutt的设置
- mysql 用户管理和权限设置
- 增加工具栏提示&修改程序字体&设置文档标题&控制窗口显示&更新菜单选中/不选中状态
- Android 在TextView里设置HTM…
- Adobe Dreamweaver CS5 中设置本地…
- redhat enterprise linux 4上搭建o…
- ORA-12528: TNS: 监听程序: 所有适…
- Tribon Vitesse程序中的run()函数
- Tribon Vitesse程序路径查找顺序
- CE builder 选项设置
- Mongodb 启动关闭脚本并设置…
- 如何手动同步Chrome浏览器的设置&手动安装扩展程序
- Eclipse 智能优化设置
- IAR for STM8 程序…
- java socket的超时设置
- Eclipse 设置(转)
- redhat下配置vncserver 以及…
- Android testDemo 实现全屏等设置
- linux 中查看某个单进程程序运行所…
- ckeditor 开发者文档配置设置