- 论坛徽章:
- 0
|
配置smtp
[root@mail ~]# rpm -qa | grep sasl
cyrus-sasl-plain-2.1.22-5.el5_4.3
cyrus-sasl-lib-2.1.22-5.el5_4.3
cyrus-sasl-2.1.22-5.el5_4.3
[root@mail ~]# saslauthd -v
saslauthd 2.1.22
authentication mechanisms: getpwent kerberos5 pam rimap shadow ldap
[root@mail ~]# vi /etc/sysconfig/saslauthd
MECH=shadow //将认证方式改为shadow
[root@mail ~]# /etc/init.d/saslauthd start
Starting saslauthd: [ OK ]
[root@mail ~]# chkconfig --level 35 saslauthd on
[root@mail ~]# useradd mail1 //创建一个mail1用户,用来测试
[root@mail ~]# passwd mail1
Changing password for user mail1.
New UNIX password:123456.
BAD PASSWORD: it is too simplistic/systematic
Retype new UNIX password:123456.
passwd: all authentication tokens updated successfully.
[root@localhost Server]# service saslauthd stop
/etc/sysconfig/saslauthd: line 1: unexpected EOF while looking for matching `''
/etc/sysconfig/saslauthd: line 12: syntax error: unexpected end of file
Stopping saslauthd: [ OK ]
[root@localhost Server]# saslauthd -a shadow
[root@mail ~]# testsaslauthd -u mail1 -p '123456'
0: OK "Success." //验证成功
[root@localhost ~]# vi /etc/postfix/main.cf
在main.cf 中加入如下配置。
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = ''
smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated, reject_unauth_destination
broken_sasl_auth_clients = yes
smtpd_client_restrictions = permit_sasl_authenticated
smtpd_sasl_security_options = noanonymous
[root@mail ~]# postfix reload //重新加载postfix
postfix/postfix-script: refreshing the Postfix mail system
[root@mail ~]# telnet 192.168.42.106 25 //测试
telnet: connect to address 192.168.42.106: Connection refused
telnet: Unable to connect to remote host: Connection refused
测试失败了 不知问题出在哪,求各路大神指教,菜鸟飘过~~~ |
|