由 ghs008 在 10-13-2004 16:59 发表:
sendmail问题,请大侠们指教!!!
我的SENDMAIL只能给我自己的域里的用户收发信,不能给和公网上的IP收发信。
下面是我的sendmail.mc文件,请指教 !!!!!!!
1 divert(-1)dnl
2 dnl #
3 dnl # This is the sendmail macro config file for m4. If you make changes to
4 dnl # /etc/mail/sendmail.mc, you will need to regenerate the
5 dnl # /etc/mail/sendmail.cf file by confirming that the sendmail-cf pack age is
6 dnl # installed and then performing a
7 dnl #
8 dnl # make -C /etc/mail
9 dnl #
10 include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
11 VERSIONID(`setup for Red Hat Linux')dnl
12 OSTYPE(`linux')dnl
13 dnl #
14 dnl # Uncomment and edit the following line if your outgoing mail needs to
15 dnl # be sent out through an external mail server:
16 dnl #
17 dnl define(SMART_HOST',smtp.your.provider')
18 dnl #
19 define(`confDEF_USER_ID',``8:12'')dnl
20 define(confTRUSTED_USER', smmsp')dnl
21 dnl define(`confAUTO_REBUILD')dnl
22 define(confTO_CONNECT', 1m')dnl
23 define(`confTRY_NULL_MX_LIST',true)dnl
24 define(`confDONT_PROBE_INTERFACES',true)dnl
25 define(PROCMAIL_MAILER_PATH',/usr/bin/procmail')dnl
26 define(ALIAS_FILE', /etc/aliases')dnl
27 dnl define(STATUS_FILE', /etc/mail/statistics')dnl
28 define(UUCP_MAILER_MAX', 2000000')dnl
29 define(confUSERDB_SPEC', /etc/mail/userdb.db')dnl
30 define(confPRIVACY_FLAGS', authwarnings,novrfy,noexpn,restrictqrun')dn l
31 define(confAUTH_OPTIONS', A')dnl
32 dnl #
33 dnl # The following allows relaying if the user authenticates, and disal lows
34 dnl # plaintext authentication (PLAIN/LOGIN) on non-TLS links
35 dnl #
36 dnl define(confAUTH_OPTIONS', A p')dnl
37 dnl #
38 dnl # PLAIN is the preferred plaintext authentication method and used by
39 dnl # Mozilla Mail and Evolution, though Outlook Express and other MUAs do
40 dnl # use LOGIN. Other mechanisms should be used if the connection is no t
41 dnl # guaranteed secure.
42 dnl #
43 TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
44 define(confAUTH_MECHANISMS', EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
45 dnl #
46 dnl # Rudimentary information on creating certificates for sendmail TLS:
47 dnl # make -C /usr/share/ssl/certs usage
48 dnl #
49 dnl define(confCACERT_PATH',/usr/share/ssl/certs')
50 dnl define(confCACERT',/usr/share/ssl/certs/ca-bundle.crt')
51 dnl define(confSERVER_CERT',/usr/share/ssl/certs/sendmail.pem')
52 dnl define(confSERVER_KEY',/usr/share/ssl/certs/sendmail.pem')
53 dnl #
54 dnl # This allows sendmail to use a keyfile that is shared with OpenLDAP 's
55 dnl # slapd, which requires the file to be readble by group ldap
56 dnl #
57 dnl define(confDONT_BLAME_SENDMAIL',groupreadablekeyfile')dnl
58 dnl #
59 dnl define(confTO_QUEUEWARN', 4h')dnl
60 dnl define(confTO_QUEUERETURN', 5d')dnl
61 dnl define(confQUEUE_LA', 12')dnl
62 dnl define(confREFUSE_LA', 18')dnl
63 define(confTO_IDENT', 0')dnl
64 dnl FEATURE(delay_checks)dnl
65 FEATURE(no_default_msa',dnl')dnl
66 FEATURE(smrsh',/usr/sbin/smrsh')dnl
67 FEATURE(mailertable',hash -o /etc/mail/mailertable.db')dnl
68 FEATURE(virtusertable',hash -o /etc/mail/virtusertable.db')dnl
69 FEATURE(redirect)dnl
70 FEATURE(always_add_domain)dnl
71 FEATURE(use_cw_file)dnl
72 FEATURE(use_ct_file)dnl
73 dnl #
74 dnl # The -t option will retry delivery if e.g. the user runs over his q uota.
75 dnl #
76 FEATURE(local_procmail,',procmail -t -Y -a $h -d $u')dnl
77 FEATURE(access_db',hash -T
1<tmpf> -o /etc/mail/access.db')dnl
2
378 FEATURE(`blacklist_recipients')dnl
4
579 EXPOSED_USER(`root')dnl
6
780 dnl #
8
981 dnl # The following causes sendmail to only listen on the IPv4 loopback address
10
1182 dnl # 127.0.0.1 and not on any other network devices. Remove the loopbac k
12
1383 dnl # address restriction to accept email from the internet or intranet.
14
1584 dnl #
16
1785 DAEMON_OPTIONS(`Port=smtp,Addr=203.187.179.76, Name=MTA')dnl
18
1986 dnl #
20
2187 dnl # The following causes sendmail to additionally listen to port 587 f or
22
2388 dnl # mail from MUAs that authenticate. Roaming users who can't reach th eir
24
2589 dnl # preferred sendmail daemon due to port 25 being blocked or redirect ed find
26
2790 dnl # this useful.
28
2991 dnl #
30
3192 dnl DAEMON_OPTIONS(`Port=submission, Name=MSA, M=Ea')dnl
32
3393 dnl #
34
3594 dnl # The following causes sendmail to additionally listen to port 465, but
36
3795 dnl # starting immediately in TLS mode upon connecting. Port 25 or 587 f ollowed
38
3996 dnl # by STARTTLS is preferred, but roaming clients using Outlook Expres s can't 97 dnl # do STARTTLS on ports other than 25. Mozilla Mail can ONLY use STAR TTLS 98 dnl # and doesn't support the deprecated smtps; Evolution <1.1.1 uses sm tps 99 dnl # when SSL is enabled-- STARTTLS support is available in version 1.1 .1.
40
41100 dnl # 101 dnl # For this to work your OpenSSL certificates must be configured.
42
43102 dnl # 103 dnl DAEMON_OPTIONS(`Port=smtps, Name=TLSMTA, M=s')dnl
44
45104 dnl # 105 dnl # The foll</tmpf>