[TLUG] sendmail 的問題請教~

Yu-Feng Chou tlug@linux.org.tw
Mon, 18 Oct 1999 10:26:56 +0800


Yu-Feng Chou 寫道:

> 看了一些 mail relay 的討論,都針對寄件者的位置做限制,
>
> 那有沒有辦法對收件者的位置做限制呢??
>
> 一個 Sendmail 的問題請教大家:
>
>     在 DNS 裡的設定 :
>
>           MX     0    aaa.ccc.ddd.eee
>           MX    10    bbb.ccc.ddd.eee
>
>     所有的 帳號皆在 aaa 這台主機裡,平常也是用這台收發信,
>
>     但是當 aaa 主機掛點的時候,
>
>     外來的信件不是該由 bbb 暫時代收再轉寄給 aaa 嗎??
>
>     如果我在 bbb 這台主機對寄件者的位置作限制, 那就玩完了!!
>
>     要在 bbb 上只代收轉寄收件者 Domain 為 ccc.ddd.eee 的信件,
>
>     其它一概不接受, 要如何做設定呢??
>
>     意思就是說無論是誰都可以利用 bbb 來發信,
>
>     但是只能發給收件者的 Domain 為 ccc.ddd.eee 的人啦!!
>
>     sendmail 版本為 8.8.7, 是否該升級到 8.9 以上才做的到??
>
>     感謝~~~~

嗯~ 似乎找到解決的方法了~

在 sendmail 的網頁裡 http://www.sendmail.org/tips/relaying.html

找到這一段:

    FEATURE(relay_based_on_MX). Setting this feature permits relaying
for any
    domain that is directed to your host.

另外,在 sendmail 8.9.3 的原始檔解開後, 在

 ........./sendmail-8.9.3/cf/Readme 裡的 FEATURE 項目下有這一段:

relay_based_on_MX

  Turns on the ability to allow relaying based on the MX
  records of the host portion of an incoming recipient; that
  is, if an MX record for host foo.com points to your site,
  you will accept and relay mail addressed to foo.com.  See
  description below for more information before using this
  feature.  Also, see the KNOWNBUGS entry regarding bestmx
  map lookups.

  FEATURE(`relay_based_on_MX') does not necessarily allow
  routing of these messages which you expect to be allowed,
  if route address syntax (or %-hack syntax) is used.  If
  this is a problem, add entries to the access-table or use
  FEATURE(`loose_relay_check').

這應該可以解決問題了,但是 sendmail-8.8.x 版呢?? 有沒有辦法呢??