在线等,sendmail启动后无法用outlook登录问题!

shenjf2000 2006-11-07 04:34:00
sendmail启动正常,但是无法用outlook登录发邮件。找了很多资料,试了很多次没有解决,请大虾们指教,急!
现象:
sendmail及dovecot设置并启动。使用outlook测试可以找到pop和stmp服务器,并且可以登录pop,但是最后一项发送测试邮件信息失败。 即无法从外部(内网)使用smtp登陆到server(192.168.1.1)。
但是在window上使用telnet 192.168.1.1 25 可以登陆到server,不过这个时间非常长(有好几分钟)。(因此可见smtp服务是成功的,另外pop服务也是成功的)

使用ssh可以登陆到server上发送邮件给其它用户,包括在本域(test@123.com)或者外域(test@456.com),就是无法使用window机器上的outlook发。

目前配置情况:
fedora core5+ sendmail8.13.8 linux防火墙关闭
-----------------------------------------------------
access 文件中已经添加了 192.1.1 replay

-----------------------------------------------------
local-host-names中添加了
123.com (server的公网域名)
server.123.com
-----------------------------------------------------
/etc/hosts 中添加了
192.168.1.1(server内网ip) server(server名).123.com server
222.111.10.1(内网所在外网IP) www.123.com test

-----------------------------------------------------
sendmail.mc如下:


divert(-1)dnl
dnl #
dnl # This is the sendmail macro config file for m4. If you make changes to
dnl # /etc/mail/sendmail.mc, you will need to regenerate the
dnl # /etc/mail/sendmail.cf file by confirming that the sendmail-cf package is
dnl # installed and then performing a
dnl #
dnl # make -C /etc/mail
dnl #
include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
VERSIONID(`setup for Red Hat Linux')dnl
OSTYPE(`linux')dnl
dnl #
dnl # default logging level is 9, you might want to set it higher to
dnl # debug the configuration
dnl #
dnl define(`confLOG_LEVEL', `9')dnl
dnl #
dnl # Uncomment and edit the following line if your outgoing mail needs to
dnl # be sent out through an external mail server:
dnl #
dnl define(`SMART_HOST',`smtp.your.provider')
dnl #
define(`confDEF_USER_ID',``8:12'')dnl
dnl define(`confAUTO_REBUILD')dnl
define(`confTO_CONNECT', `10m')dnl
define(`confTRY_NULL_MX_LIST',true)dnl
define(`confDONT_PROBE_INTERFACES',true)dnl
define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')dnl
define(`ALIAS_FILE', `/etc/aliases')dnl
define(`STATUS_FILE', `/var/log/mail/statistics')dnl
define(`UUCP_MAILER_MAX', `2000000')dnl
define(`confUSERDB_SPEC', `/etc/mail/userdb.db')dnl
define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun')dnl
define(`confAUTH_OPTIONS', `A')dnl
dnl #
dnl # The following allows relaying if the user authenticates, and disallows
dnl # plaintext authentication (PLAIN/LOGIN) on non-TLS links
dnl #
dnl define(`confAUTH_OPTIONS', `A p')dnl
dnl #
dnl # PLAIN is the preferred plaintext authentication method and used by
dnl # Mozilla Mail and Evolution, though Outlook Express and other MUAs do
dnl # use LOGIN. Other mechanisms should be used if the connection is not
dnl # guaranteed secure.
dnl # Please remember that saslauthd needs to be running for AUTH.
dnl #
TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
...全文
579 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
paul_allen 2006-12-27
  • 打赏
  • 举报
回复
第一次配置sendmail,一天半的时间DNS+Sendmail配置完成,用thunderbird和outlook收发正常。
sendmail的配置网上很多,查一下,把DNS里面你的zone配置好就应该没问题了。祝早日解决。
shenjf2000 2006-12-22
  • 打赏
  • 举报
回复
access 文件中已经添加了 192.1.1 replay
还要make map -v hash access.db <access

这个没有打开的话,邮件应该是发不了。

找了一些资料,说是DNS反查问题,目前将就用着。
harbor1981 2006-12-21
  • 打赏
  • 举报
回复
access 文件中已经添加了 192.1.1 replay
还要make map -v hash access.db <access
shenjf2000 2006-12-21
  • 打赏
  • 举报
回复
不知楼上兄弟的问题解决没有?我的问题自己解决了,是太相信outlook了,后来发现虽然outlook测试不成,收发邮件还是成功的,只是发邮件比较慢,这可能就是outlook测试不成功的原因。
grant523 2006-11-08
  • 打赏
  • 举报
回复
祝问题早日解决!
同 等!在线 无人理
shenjf2000 2006-11-08
  • 打赏
  • 举报
回复
哪位高手帮忙解决一下?
shenjf2000 2006-11-07
  • 打赏
  • 举报
回复
dnl #
dnl # Rudimentary information on creating certificates for sendmail TLS:
dnl # cd /usr/share/ssl/certs; make sendmail.pem
dnl # Complete usage:
dnl # make -C /usr/share/ssl/certs usage
dnl #
dnl define(`confCACERT_PATH',`/etc/pki/tls/certs')dnl
dnl define(`confCACERT',`/etc/pki/tls/certs/ca-bundle.crt')dnl
dnl define(`confSERVER_CERT',`/etc/pki/tls/certs/sendmail.pem')dnl
dnl define(`confSERVER_KEY',`/etc/pki/tls/certs/sendmail.pem')dnl
dnl #
dnl # This allows sendmail to use a keyfile that is shared with OpenLDAP's
dnl # slapd, which requires the file to be readble by group ldap
dnl #
dnl define(`confDONT_BLAME_SENDMAIL',`groupreadablekeyfile')dnl
dnl #
dnl define(`confTO_QUEUEWARN', `4h')dnl
dnl define(`confTO_QUEUERETURN', `5d')dnl
dnl define(`confQUEUE_LA', `12')dnl
dnl define(`confREFUSE_LA', `18')dnl
define(`confTO_IDENT', `0')dnl
dnl FEATURE(delay_checks)dnl
FEATURE(`no_default_msa',`dnl')dnl
FEATURE(`smrsh',`/usr/sbin/smrsh')dnl
FEATURE(`mailertable',`hash -o /etc/mail/mailertable.db')dnl
FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable.db')dnl
FEATURE(redirect)dnl
FEATURE(always_add_domain)dnl
FEATURE(use_cw_file)dnl
FEATURE(use_ct_file)dnl
dnl #
dnl # The following limits the number of processes sendmail can fork to accept
dnl # incoming messages or process its message queues to 12.) sendmail refuses
dnl # to accept connections once it has reached its quota of child processes.
dnl #
dnl define(`confMAX_DAEMON_CHILDREN', 12)dnl
dnl #
dnl # Limits the number of new connections per second. This caps the overhead
dnl # incurred due to forking new sendmail processes. May be useful against
dnl # DoS attacks or barrages of spam. (As mentioned below, a per-IP address
dnl # limit would be useful but is not available as an option at this writing.)
dnl #
dnl define(`confCONNECTION_RATE_THROTTLE', 3)dnl
dnl #
dnl # The -t option will retry delivery if e.g. the user runs over his quota.
dnl #
FEATURE(local_procmail,`',`procmail -t -Y -a $h -d $u')dnl
FEATURE(`access_db',`hash -T<TMPF> -o /etc/mail/access.db')dnl
FEATURE(`blacklist_recipients')dnl
EXPOSED_USER(`root')dnl
dnl #
dnl # For using Cyrus-IMAPd as POP3/IMAP server through LMTP delivery uncomment
dnl # the following 2 definitions and activate below in the MAILER section the
dnl # cyrusv2 mailer.
dnl #
dnl define(`confLOCAL_MAILER', `cyrusv2')dnl
dnl define(`CYRUSV2_MAILER_ARGS', `FILE /var/lib/imap/socket/lmtp')dnl
dnl #
dnl # The following causes sendmail to only listen on the IPv4 loopback address
dnl # 127.0.0.1 and not on any other network devices. Remove the loopback
dnl # address restriction to accept email from the internet or intranet.
dnl #
DAEMON_OPTIONS(`Port=smtp,Addr=0.0.0.0, Name=MTA')dnl
dnl #
dnl # The following causes sendmail to additionally listen to port 587 for
dnl # mail from MUAs that authenticate. Roaming users who can't reach their
dnl # preferred sendmail daemon due to port 25 being blocked or redirected find
dnl # this useful.
dnl #
dnl DAEMON_OPTIONS(`Port=submission, Name=MSA, M=Ea')dnl
dnl #
dnl # The following causes sendmail to additionally listen to port 465, but
dnl # starting immediately in TLS mode upon connecting. Port 25 or 587 followed
dnl # by STARTTLS is preferred, but roaming clients using Outlook Express can't
dnl # do STARTTLS on ports other than 25. Mozilla Mail can ONLY use STARTTLS
dnl # and doesn't support the deprecated smtps; Evolution <1.1.1 uses smtps
dnl # when SSL is enabled-- STARTTLS support is available in version 1.1.1.
dnl #
dnl # For this to work your OpenSSL certificates must be configured.
dnl #
dnl DAEMON_OPTIONS(`Port=smtps, Name=TLSMTA, M=s')dnl
dnl #
dnl # The following causes sendmail to additionally listen on the IPv6 loopback
dnl # device. Remove the loopback address restriction listen to the network.
dnl #
dnl DAEMON_OPTIONS(`port=smtp,Addr=::1, Name=MTA-v6, Family=inet6')dnl
dnl #
dnl # enable both ipv6 and ipv4 in sendmail:
dnl #
dnl DAEMON_OPTIONS(`Name=MTA-v4, Family=inet, Name=MTA-v6, Family=inet6')
dnl #
dnl # We strongly recommend not accepting unresolvable domains if you want to
dnl # protect yourself from spam. However, the laptop and users on computers
dnl # that do not have 24x7 DNS do need this.
dnl #
FEATURE(`accept_unresolvable_domains')dnl
dnl #
dnl FEATURE(`relay_based_on_MX')dnl
dnl #
dnl # Also accept email sent to "localhost.localdomain" as local email.
dnl #
LOCAL_DOMAIN(`localhost.localdomain')dnl
dnl #
dnl # The following example makes mail from this host and any additional
dnl # specified domains appear to be sent from mydomain.com
dnl #
dnl MASQUERADE_AS(`mydomain.com')dnl
dnl #
dnl # masquerade not just the headers, but the envelope as well
dnl #
dnl FEATURE(masquerade_envelope)dnl
dnl #
dnl # masquerade not just @mydomainalias.com, but @*.mydomainalias.com as well
dnl #
dnl FEATURE(masquerade_entire_domain)dnl
dnl #
dnl MASQUERADE_DOMAIN(localhost)dnl
dnl MASQUERADE_DOMAIN(localhost.localdomain)dnl
dnl MASQUERADE_DOMAIN(mydomainalias.com)dnl
dnl MASQUERADE_DOMAIN(mydomain.lan)dnl
MAILER(smtp)dnl
MAILER(procmail)dnl
dnl MAILER(cyrusv2)dnl
CentOS 6.5 Sendmail邮件服务器配置实例 【例题】 在服务器上配置sendmail服务器。发送服务器是smtp.test.com,接收邮件服务器为pop 3.test.com。创建两个邮件账户mail1和mail2,密码均为admin12345。配置完毕后在ou tlook上两个账户能够相互收发邮件。服务器IP:192.168.1.168。 【配置】 1. 安装dns服务为域名解析: yum install bind –y # yum 安装dns服务 2. 在DNS服务器上添加以下正向解析和反向解析: 正向解析: mail A 192.168.1.168 #mail域名解析 @ MX 5 mail #邮件交换记录 pop3 CNAME mail #添加别名解析 # smtp CNAME mail 反向解析: 168 PTR mail.test.com. #添加PTR指针,域名后面不要忘记加小数点 168 PTR pop3.test.com. 168 PTR smtp.test.com. 3. 安装sendmail服务 (提供发送服务smtp 工作端口:25): yum install sendmail –y #一般centos6.5默认是已经安装了postfix服务器并已经启动了的。 4. 安装dovecot服务 (提供接收服务 pop3 工作端口:110): yum install dovecot –y #安装dovecot服务 提供接收服务。 5. 配置sendmail服务的主配置文件 /etc/mail/sendmail.mc修改下面字段: myhostname = sample.test.com #置系统的主机名 mydomain = test.com #设置域名(此处设置将成为E- mail地址"@"后面的部分) myorigin = $mydomain  #设置发信地址 inet_interfaces = all  #监听所有地址 (一定要把inet_interfaces = localhost给注释掉) mydestination = $myhostname, $mydomain #指定发给本地邮件的域名 relay_domains = $mydestination #设置可以转发那些域的邮件 6. 配置dove cot服务器的主配置文件 /etc/dovecot/dovecot.conf 修改下面字段: protocols = imap pop3 lmtp #把这一行的注释去掉(约在20行 开启pop3认证方式) 7. 配置dovecot服务器配置文件 /etc/dovecot/conf.d/10-mail.conf 修改下面字段: mail_localtion = mbox:~/mail:INBOX=/val/mail/%u #把这一行的注释去掉(约在25行 指定账户邮箱目录) 8. 配置dovecot服务器配置文件 /etc/dovecot/conf.d/10-auth.conf 修改下面字段: disable_plaintext_auth = no #把这一行注释去掉yes改为no (约在9行 开启认证) 9. 创建邮件账户(邮件账户就是Linux系统的系统用户: useradd mail1 #创建mail1用户 useradd mail2 #创建mail2用户 passwd mail1 #设置mail1用户的密码(根据提示输入两遍) passwd mail2 #设置mail2用户的密码(根据提示输入两遍) 10、设置邮件账户目录的权限: chmod –R 777 /var #设置var目录的权限为777 -R是递归 11、启动服务: service postfix restart #重启postfix服务器 service dovecot start #启动dovecot服务器 【测试】 DNS地址设置为服务器的IP使用outlook等邮箱工具,进行登录测试,互相能收发邮件即 可。 【小结】 1. 查找pop3服务器成功但提示pop3登录失败,可能是/var目录下的邮件账户目录权限不够 。 2. 提示找不到smtp 和pop3服务器可能是dns解析有问题。 3. 查找smtp服务器成功但提示发送测试邮件失败,检查一下监听地址字段是否是监听所有 ,监听本地的字段项是否已经注释。 ----------------------- CentOS-6全文共3页,当前为第1页。 CentOS-6全文共3页,当前为第2页。 CentOS-6全文共3页,当前为第3页。

19,611

社区成员

发帖
与我相关
我的任务
社区描述
系统使用、管理、维护问题。可以是Ubuntu, Fedora, Unix等等
社区管理员
  • 系统维护与使用区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧