免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
楼主: anthonyfeng

[Mail] 原创:在RHEL 4 上配置全功能的Postfix 服务器 [复制链接]

论坛徽章:
0
发表于 2006-01-02 20:32 |显示全部楼层
另个请教一下,如何设置F-PROT自动过几个小时更新呢?
那个 http://localhost/pa这个进行管理的WEB是不用密码就可以进去修改的,这个怎么修改呢?

论坛徽章:
0
发表于 2006-01-02 20:37 |显示全部楼层
另外请问一下,如果有两个虚拟域名d1.com 和 d2.com的话,这个要怎么修改呢?
myhostname = mail.d1.com
mydomain = d1.com
myorigin = $mydomain
mydestination = $myhostname localhost localhost.$mydomain
mynetworks = 192.168.1.0/24 127.0.0.0/8
inet_interfaces = all

论坛徽章:
0
发表于 2006-01-02 21:05 |显示全部楼层
根据“在RHEL 4 上配置全功能的Postfix 服务器”这一篇文章操作过程时,我遇到了认证不能通过的问题!

在localhost时可以正常的收发电子邮件!
在客户端时(Outlook)时可以正常的收电子邮件,但是不能发送,真是被批打败啦!,请大家帮助一下小弟!

日志以下:

[root@ldap ~]# tail /var/log/maillog
Jan 2 21:15:51 ldap postfix/master[3949]: terminating on signal 15
Jan 2 21:15:54 ldap postfix/postfix-script: starting the Postfix mail system
Jan 2 21:15:54 ldap postfix/master[4018]: daemon started -- version 2.2.7, configuration /etc/postfix
Jan 2 21:16:14 ldap postfix/smtpd[4022]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Jan 2 21:16:32 ldap postfix/smtpd[4022]: connect from unknown[192.168.1.2]
Jan 2 21:16:35 ldap postfix/smtpd[4022]: warning: SASL authentication failure: could not verify password
Jan 2 21:16:35 ldap postfix/smtpd[4022]: warning: unknown[192.168.1.2]: SASL LOGIN authentication failed
Jan 2 21:16:35 ldap authdaemond: failed to connect to mysql server (server=localhost., userid=postfix.): Unknown MySQL server host 'localhost.' (1)
Jan 2 21:16:35 ldap postfix/smtpd[4022]: lost connection after AUTH from unknown[192.168.1.2]
Jan 2 21:16:35 ldap postfix/smtpd[4022]: disconnect from unknown[192.168.1.2]

[ 本帖最后由 fandy 于 2006-1-2 21:46 编辑 ]

论坛徽章:
0
发表于 2006-01-02 22:57 |显示全部楼层
f-prot 应该已经自动update 了,可以检查
/etc/cron.hourly 内的 update_virus_scanners 脚本
及运行
# cat /var/log/maillog|grep update

Jan  3 01:01:02 localhost update.virus.scanners: Delaying cron job up to 600 seconds
Jan  3 01:07:55 localhost update.virus.scanners: Found f-prot installed
Jan  3 01:07:55 localhost update.virus.scanners: Running autoupdate for f-prot
Jan  3 01:08:00 localhost F-Prot autoupdate[3736]: F-Prot did not need updating.
Jan  3 01:08:00 localhost update.virus.scanners: Found generic installed
Jan  3 01:08:00 localhost update.virus.scanners: Running autoupdate for generic

至于http://localhost/pa 的问题,可请教www.toping.net 的Jackey,本人的想法是可以配置apache 达至访问前要输入密码的功能,这样可能是最简单的,详细怎做忘记了,请自行查找相关文档。

原帖由 yijiande 于 2006-1-2 20:32 发表
另个请教一下,如何设置F-PROT自动过几个小时更新呢?
那个 http://localhost/pa这个进行管理的WEB是不用密码就可以进去修改的,这个怎么修改呢?

论坛徽章:
0
发表于 2006-01-02 23:00 |显示全部楼层
按本例操作,就已经完全支持d1.com 和 d2.com 虚拟域名,你的不支持吗?

原帖由 yijiande 于 2006-1-2 20:37 发表
另外请问一下,如果有两个虚拟域名d1.com 和 d2.com的话,这个要怎么修改呢?
myhostname = mail.d1.com
mydomain = d1.com
myorigin = $mydomain
mydestination = $myhostname localhost localhost.$mydomai ...

论坛徽章:
0
发表于 2006-01-02 23:11 |显示全部楼层
你运行下面的看一下是什么结果,如果不是类似的,就是authlib 配置有错误。

# cd /usr/local/courier-authlib/sbin
# ./authtest a@d1.com
Authentication succeeded.

     Authenticated: a@d1.com  (uid 501, gid 502)
    Home Directory: /var/spool/mail/a@d1.com/
           Maildir: /var/spool/mail/a@d1.com/
             Quota: (none)
Encrypted Password: $1$117dec81$gkX1cdZlkJZy3surMCFAS0
Cleartext Password: (none)
           Options: (none)


原帖由 fandy 于 2006-1-2 21:05 发表
根据“在RHEL 4 上配置全功能的Postfix 服务器”这一篇文章操作过程时,我遇到了认证不能通过的问题!

在localhost时可以正常的收发电子邮件!
在客户端时(Outlook)时可以正常的收电子邮件,但是不能发送, ...

论坛徽章:
0
发表于 2006-01-03 09:01 |显示全部楼层
请问运行这个是有什么作用啦!

还有如果我在main.cnf不加以下的信息,客户端就可以正常的收发啊!

broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_invalid_hostname,reject_non_fqdn_hostname,reject_unknown_sender_domain,reject_non_fqdn_sender,reject_non_fqdn_recipient,reject_unknown_recipient_domain,reject_unauth_pipelining,reject_unauth_destination,permit
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_security_options = noanonymous
smtpd_sasl_application_name = smtpd
smtpd_banner=$myhostname ESMTP "Version not Available"

[ 本帖最后由 fandy 于 2006-1-3 09:11 编辑 ]

论坛徽章:
0
发表于 2006-01-03 10:17 |显示全部楼层
谢谢,楼主的解答!!!问题已经解决,但是还有一个问题,请教一下,我通过FOXMAIL发信时,SMTP上无论是否选上需要认证,都可以发信,不知道怎么回事呢?能否做到一定要进行认证才能发信呢?

[ 本帖最后由 yijiande 于 2006-1-3 11:16 编辑 ]

论坛徽章:
0
发表于 2006-01-03 11:13 |显示全部楼层
两位检查一下与authlib  相关的文件,我的是这样的。重启一下authlib,再运行一下上面说过的,才能继续判断:

# cat /usr/lib/sasl2/smtpd.conf
pwcheck_method: authdaemond
log_level: 3
mech_list: plain login
authdaemond_path: /usr/local/courier-authlib/var/spool/authdaemon/socket

# cat /usr/local/courier-authlib/etc/authdaemonrc |grep -v ^#|grep -v ^$
authmodulelist="authmysql"
authmodulelistorig="authmysq"
daemons=15
authdaemonvar=/usr/local/courier-authlib/var/spool/authdaemon
DEBUG_LOGIN=0
DEFAULTOPTIONS=""
LOGGEROPTS=""

# cat /usr/local/courier-authlib/etc/authmysqlrc
MYSQL_SERVER         localhost
MYSQL_USERNAME       postfix
MYSQL_PASSWORD       postfix
MYSQL_SOCKET         /var/lib/mysql/mysql.sock
MYSQL_DATABASE       postfix
MYSQL_USER_TABLE     mailbox
MYSQL_CRYPT_PWFIELD   password
MYSQL_UID_FIELD       '501'
MYSQL_GID_FIELD       '502'
MYSQL_LOGIN_FIELD     username
MYSQL_HOME_FIELD     concat('/var/spool/mail/',maildir)
MYSQL_MAILDIR_FIELD   concat('/var/spool/mail/',maildir)
MYSQL_NAME_FIELD     name

[ 本帖最后由 anthonyfeng 于 2006-1-3 11:16 编辑 ]

论坛徽章:
0
发表于 2006-01-03 11:25 |显示全部楼层
楼主请查一下这两句中的下面那句,
authmodulelist="authmysql"
authmodulelistorig="authmysq"
是否应该是
authmodulelist="authmysql"
authmodulelistorig="authmysql"

另外就是那个通过FOXMAIL发信时,SMTP上无论是否选上需要认证,都可以发信,不知道怎么回事呢?能否做到一定要进行认证才能发信呢?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP