由 snoopyxp 在 01-18-2004 05:45 发表:
sendmail smtp认证的怪异问题
根据斑竹及网上其他的一些帖子设置了sendmail,但发现我明明在sendmail里
加入了smtp认证,为什么在客户端如oe中设置成服务器需要认证时反而通不过认证,怎么输密码都不对,而设置为不认证时则能正常收信,发信有时不正常,如发不到我163的信箱提示
引用:
由于服务器拒绝收件人之一,无法发送邮件。被拒绝的电子邮件地址是“yancy_[email protected]”。 主题 'test', 帐户: 'www.reggate.com (1)', 服务器: 'www.reggate.com', 协议: SMTP, 服务器响应: '550 5.7.1
1<yancy_zhang@sohu.com>... Relaying denied. IP name lookup failed [192.168.0.23]', 端口: 25, 安全(SSL): 否, 服务器错误: 550, 错误号: 0x800CCC79
2
3
4
5奇怪的是这里拒收的ip怎么是我的内网ip,我的网关是192.168.0.1通过它做nat上网。
6
7下面是我的access文件
8
9
10
11> quote:
12>
13> * * *
14>
15>
16>
17>
18>
19> # Check the /usr/share/doc/sendmail/README.cf file for a description
20>
21> # of the format of this file. (search for access_db in that file)
22>
23> # The /usr/share/doc/sendmail/README.cf is part of the sendmail-doc
24>
25> # package.
26>
27> #
28>
29> # by default we allow relaying from localhost...
30>
31> localhost.localdomain RELAY
32>
33> localhost RELAY
34>
35> 127.0.0.1 RELAY
36>
37> 0.0.0.0 RELAY
38>
39>
40>
41> * * *
42
43
44
45
46
47
48
49sendmail.mc
50
51
52
53
54
55> quote:
56>
57> * * *
58>
59>
60>
61> divert(-1)dnl
62>
63> dnl #
64>
65> dnl # This is the sendmail macro config file for m4. If you make changes to
66>
67> dnl # /etc/mail/sendmail.mc, you will need to regenerate the
68>
69> dnl # /etc/mail/sendmail.cf file by confirming that the sendmail-cf package is
70>
71> dnl # installed and then performing a
72>
73> dnl #
74>
75> dnl # make -C /etc/mail
76>
77> dnl #
78>
79> include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
80>
81> VERSIONID(`setup for Red Hat Linux')dnl
82>
83> OSTYPE(`linux')dnl
84>
85> dnl #
86>
87> dnl # Uncomment and edit the following line if your outgoing mail needs to
88>
89> dnl # be sent out through an external mail server:
90>
91> dnl #
92>
93> dnl define(`SMART_HOST',`smtp.your.provider')
94>
95> define(`SMART_HOST',` www.reggate.com ')
96>
97> dnl #
98>
99> define(`confDEF_USER_ID',``8:12'')dnl
100>
101> dnl define(`confAUTO_REBUILD')dnl
102>
103> define(`confTO_CONNECT', `1m')dnl
104>
105> define(`confTRY_NULL_MX_LIST',true)dnl
106>
107> define(`confDONT_PROBE_INTERFACES',true)dnl
108>
109> define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')dnl
110>
111> define(`ALIAS_FILE', `/etc/aliases')dnl
112>
113> dnl define(`STATUS_FILE', `/etc/mail/statistics')dnl
114>
115> define(`UUCP_MAILER_MAX', `2000000')dnl
116>
117> define(`confUSERDB_SPEC', `/etc/mail/userdb.db')dnl
118>
119> define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun')dnl
120>
121> define(`confAUTH_OPTIONS', `A')dnl
122>
123> dnl #
124>
125> dnl # The following allows relaying if the user authenticates, and disallows
126>
127> dnl # plaintext authentication (PLAIN/LOGIN) on non-TLS links
128>
129> dnl #
130>
131> dnl define(`confAUTH_OPTIONS', `A p')dnl
132>
133> dnl #
134>
135> dnl # PLAIN is the preferred plaintext authentication method and used by
136>
137> dnl # Mozilla Mail and Evolution, though Outlook Express and other MUAs do
138>
139> dnl # use LOGIN. Other mechanisms should be used if the connection is not
140>
141> dnl # guaranteed secure.
142>
143> dnl #
144>
145> dnl TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
146>
147> TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
148>
149> dnl define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
150>
151> define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
152>
153> dnl #
154>
155> dnl # Rudimentary information on creating certificates for sendmail TLS:
156>
157> dnl # make -C /usr/share/ssl/certs usage
158>
159> dnl #
160>
161> dnl define(`confCACERT_PATH',`/usr/share/ssl/certs')
162>
163> dnl define(`confCACERT',`/usr/share/ssl/certs/ca-bundle.crt')
164>
165> dnl define(`confSERVER_CERT',`/usr/share/ssl/certs/sendmail.pem')
166>
167> dnl define(`confSERVER_KEY',`/usr/share/ssl/certs/sendmail.pem')
168>
169> dnl #
170>
171> dnl # This allows sendmail to use a keyfile that is shared with OpenLDAP's
172>
173> dnl # slapd, which requires the file to be readble by group ldap
174>
175> dnl #
176>
177> dnl define(`confDONT_BLAME_SENDMAIL',`groupreadablekeyfile')dnl
178>
179> dnl #
180>
181> dnl define(`confTO_QUEUEWARN', `4h')dnl
182>
183> dnl define(`confTO_QUEUERETURN', `5d')dnl
184>
185> dnl define(`confQUEUE_LA', `12')dnl
186>
187> dnl define(`confREFUSE_LA', `18')dnl
188>
189> define(`confTO_IDENT', `0')dnl
190>
191> dnl FEATURE(delay_checks)dnl
192>
193> FEATURE(`no_default_msa',`dnl')dnl
194>
195> FEATURE(`smrsh',`/usr/sbin/smrsh')dnl
196>
197> FEATURE(`mailertable',`hash -o /etc/mail/mailertable.db')dnl
198>
199> FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable.db')dnl
200>
201> FEATURE(redirect)dnl
202>
203> FEATURE(always_add_domain)dnl
204>
205> FEATURE(use_cw_file)dnl
206>
207> FEATURE(use_ct_file)dnl
208>
209> dnl #
210>
211> dnl # The -t option will retry delivery if e.g. the user runs over his quota.
212>
213> dnl #
214>
215> FEATURE(local_procmail,`',`procmail -t -Y -a $h -d $u')dnl
216>
217> FEATURE(`access_db',`hash -T<tmpf> -o /etc/mail/access.db')dnl
218>
219> FEATURE(`blacklist_recipients')dnl
220>
221> EXPOSED_USER(`root')dnl
222>
223> dnl #
224>
225> dnl # The following causes sendmail to only listen on the IPv4 loopback address
226>
227> dnl # 127.0.0.1 and not on any other network devices. Remove the loopback
228>
229> dnl # address restriction to accept email from the internet or intranet.
230>
231> dnl #
232>
233> dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
234>
235> DAEMON_OPTIONS(`Port=smtp, Name=MTA')dnl
236>
237> dnl #
238>
239> dnl # The following causes sendmail to additionally listen to port 587 for
240>
241> dnl # mail from MUAs that authenticate. Roaming users who can't reach their
242>
243> dnl # preferred sendmail daemon due to port 25 being blocked or redirected find
244>
245> dnl # this useful.
246>
247> dnl #
248>
249> dnl DAEMON_OPTIONS(`Port=submission, Name=MSA, M=Ea')dnl
250>
251> dnl #
252>
253> dnl # The following causes sendmail to additionally listen to port 465, but
254>
255> dnl # starting immediately in TLS mode upon connecting. Port 25 or 587 followed
256>
257> dnl # by STARTTLS is preferred, but roaming clients using Outlook Express can't
258>
259> dnl # do STARTTLS on ports other than 25. Mozilla Mail can ONLY use STARTTLS
260>
261> dnl # and doesn't support the deprecated smtps; Evolution <1.1.1 uses smtps
262>
263> dnl # when SSL is enabled-- STARTTLS support is available in version 1.1.1.
264>
265> dnl #
266>
267> dnl # For this to work your OpenSSL certificates must be configured.
268>
269> dnl #
270>
271> dnl DAEMON_OPTIONS(`Port=smtps, Name=TLSMTA, M=s')dnl
272>
273> dnl #
274>
275> dnl # The following causes sendmail to additionally listen on the IPv6 loopback
276>
277> dnl # device. Remove the loopback address restriction listen to the network.
278>
279> dnl #
280>
281> dnl # NOTE: binding both IPv4 and IPv6 daemon to the same port requires
282>
283> dnl # a kernel patch
284>
285> dnl #
286>
287> dnl DAEMON_OPTIONS(`port=smtp,Addr=::1, Name=MTA-v6, Family=inet6')dnl
288>
289> dnl #
290>
291> dnl # We strongly recommend not accepting unresolvable domains if you want to
292>
293> dnl # protect yourself from spam. However, the laptop and users on computers
294>
295> dnl # that do not have 24x7 DNS do need this.
296>
297> dnl #
298>
299> dnl FEATURE(`accept_unresolvable_domains')dnl
300>
301> FEATURE(`accept_unresolvable_domains')dnl
302>
303> dnl #
304>
305> dnl FEATURE(`relay_based_on_MX')dnl
306>
307> dnl #
308>
309> dnl # Also accept email sent to "localhost.localdomain" as local email.
310>
311> dnl #
312>
313> LOCAL_DOMAIN(`localhost.localdomain')dnl
314>
315> dnl #
316>
317> dnl # The following example makes mail from this host and any additional
318>
319> dnl # specified domains appear to be sent from mydomain.com
320>
321> dnl #
322>
323> dnl MASQUERADE_AS(`mydomain.com')dnl
324>
325> MASQUERADE_AS(`mydomain.com')dnl
326>
327> dnl #
328>
329> dnl # masquerade not just the headers, but the envelope as well
330>
331> dnl #
332>
333> dnl FEATURE(masquerade_envelope)dnl
334>
335> dnl #
336>
337> dn</tmpf></yancy_zhang@sohu.com>