LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 465|回复: 1

sendmail问题,请大侠们指教!!!

[复制链接]
发表于 2004-10-13 16:59:12 | 显示全部楼层 |阅读模式
我的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<TMPF> -o /etc/mail/access.db')dnl
     78 FEATURE(`blacklist_recipients')dnl
     79 EXPOSED_USER(`root')dnl
     80 dnl #
     81 dnl # The following causes sendmail to only listen on the IPv4 loopback         address
     82 dnl # 127.0.0.1 and not on any other network devices. Remove the loopbac        k
     83 dnl # address restriction to accept email from the internet or intranet.
     84 dnl #
     85 DAEMON_OPTIONS(`Port=smtp,Addr=203.187.179.76, Name=MTA')dnl
     86 dnl #
     87 dnl # The following causes sendmail to additionally listen to port 587 f        or
     88 dnl # mail from MUAs that authenticate. Roaming users who can't reach th        eir
     89 dnl # preferred sendmail daemon due to port 25 being blocked or redirect        ed find
     90 dnl # this useful.
     91 dnl #
     92 dnl DAEMON_OPTIONS(`Port=submission, Name=MSA, M=Ea')dnl
     93 dnl #
     94 dnl # The following causes sendmail to additionally listen to port 465,         but
     95 dnl # starting immediately in TLS mode upon connecting. Port 25 or 587 f        ollowed
     96 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.
    100 dnl #    101 dnl # For this to work your OpenSSL certificates must be configured.
    102 dnl #    103 dnl DAEMON_OPTIONS(`Port=smtps, Name=TLSMTA, M=s')dnl
    104 dnl #    105 dnl # The following causes sendmail to additionally listen on the IPv6 l        oopback    106 dnl # device. Remove the loopback address restriction listen to the netw        ork.
    107 dnl #
    108 dnl # NOTE: binding both IPv4 and IPv6 daemon to the same port requires    109 dnl #       a kernel patch
    110 dnl #    111 dnl DAEMON_OPTIONS(`port=smtp,Addr=::1, Name=MTA-v6, Family=inet6')dnl
    112 dnl #    113 dnl # We strongly recommend not accepting unresolvable domains if you wa        nt to    114 dnl # protect yourself from spam. However, the laptop and users on compu        ters    115 dnl # that do not have 24x7 DNS do need this.
    116 dnl #    117 FEATURE(`accept_unresolvable_domains')dnl
    118 dnl #
    119 dnl FEATURE(`relay_based_on_MX')dnl
    120 dnl #
    121 dnl # Also accept email sent to "localhost.localdomain" as local email.
    122 dnl #
    123 LOCAL_DOMAIN(`localhost.localdomain')dnl    124 dnl #
    125 dnl # The following example makes mail from this host and any additional    126 dnl # specified domains appear to be sent from mydomain.com
    127 dnl #
    128 dnl MASQUERADE_AS(`mydomain.com')dnl
    129 dnl #
    130 dnl # masquerade not just the headers, but the envelope as well
    131 dnl #
    132 dnl FEATURE(masquerade_envelope)dnl
    133 dnl #    134 dnl # masquerade not just @mydomainalias.com, but @*.mydomainalias.com a        s well    135 dnl #
    136 dnl FEATURE(masquerade_entire_domain)dnl
    137 dnl #
    138 dnl MASQUERADE_DOMAIN(localhost)dnl
    139 dnl MASQUERADE_DOMAIN(localhost.localdomain)dnl
    140 dnl MASQUERADE_DOMAIN(mydomainalias.com)dnl
    141 dnl MASQUERADE_DOMAIN(mydomain.lan)dnl
    142 MAILER(smtp)dnl
    143 MAILER(procmail)dnl
发表于 2004-10-15 09:45:50 | 显示全部楼层
有域名没
MX的
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表