1999年6月27日

sendmail.cfの設定

天気:雨
体重:88.0Kg
# 作業に疲れて、やや痩せたか・・・・

今朝、起きてメールのチェック・・・・
!!!!!
メールが1通も届いていない!!!

これはどうしたことか。

確認してみると、わたし宛てに届いたメールまで
550 Relaying Denied: Authenticate with POP first.
とのエラーメッセージと共にrejectされていたのだ。

もう一度sendmail.cfを確認。
良くわからないながらも何とか動く設定が出来た。
CFの設定だけではうまく行かなかった。
sendmail.cfを直接編集するしかないのか。

CF-3.7Wpl2の
Standards/sendmail-v8.def
をもとにsendmail.cfを作成

 #POP Auth 
 K popauth hash /etc/mail/popauth
 F{LocalIP} /etc/mail/localip
を追加

Scheck_rcptのセクションをすべて削除したのが 間違い
一部修正した。
 Scheck_rcpt
 R<$+>                   $:$1                            strip angle brackets
 R$+.                    $:$1                            strip trailing dot
 # deny with recrcpt DB
 R$+                     $: $1 $| $(rejrcpt $1$)
 R$+ $| errmsg $* @rej@  $#error $@ 5.7.1 $: $2
 R$+ $| discard @rej@    $#discard $: discard
 R$+ $| $+ @rej@         $#error $@ 5.7.1 $: 550 User unknown
 R$+ $| $*               $: $1 $| $>3 $1                 canonicalize
 R$+ $| $*<@$+>$*        $: $1 $| $(rejrcpt $3$)
 R$+ $| errmsg $* @rej@  $#error $@ 5.7.1 $: $2
 R$+ $| discard @rej@    $#discard $: discard
 R$+ $| $+ @rej@         $#error $@ 5.7.1 $: 550 Host unknown
 R$+ $| $*               $: $1
 
 # prepending client address information
 R$*                     $: $&{client_name} $| $1
 R$*                     $: $&{client_addr} $| $1
 # Now, we have "${client_addr} $| ${client_name} $| original_token"
 R0 $| $* $| $*          $@ OK                           no addr (may be -bs)
 
 # pairing with sender address
 R$* $| $* $| $*         $: $1 $| $2 $| $&f $| $3
 # now, we can check c_addr-c_name-sender-recipient quad
 
 # client address check -- accept messages from hosts within allowed domain
 # ROAMは使用しないしLocal Domainも無視。コメントアウト。
 # R$={RoamIP}$* $| $* $| $* $| $*         $@ $>Check_rcpt_roam $4 $| $5
 # R$* $| $*$={RoamDom} $| $* $| $*        $@ $>Check_rcpt_roam $4 $| $5
 # R$={LocalIP}$* $| $* $| $* $| $*        $@ $>Check_rcpt_inside $4 $| $5
 # R$* $| $*$={LocalDom} $| $* $| $*       $@ $>Check_rcpt_inside $4 $| $5
 # R$={ClientIP}$* $| $* $| $* $| $*       $@ $>Check_rcpt_inside $4 $| $5
 # R$* $| $*$={ClientDom} $| $* $| $*      $@ $>Check_rcpt_inside $4 $| $5
 R$* $| $* $| $* $| $*   $: $>Check_rcpt_local $3 $| $4  remove client info
 R                   $@ OK                           destination is local
 # R$*                     $@ $>Check_rcpt_outside $1  <--コメントアウト
 
 # 以下が追加分
 R<$+ @ $=w >		$@ OK	# if it is to domain delivered by us
 R$+			$: $(dequote "" $&{client_addr} $) $| $1	# get addr
 R0 $| $*		$@ OK		# OK if sendmail run locally
 R$={LocalIP}$* $| $*	$@ OK		# OK if from our address space
 R$* $| $*		$: $(popauth $1 $) # OK if from a POP-authed address
 ROK			$@ OK
 R$*			$#error $@ 5.5.0 $: "550 Relaying Denied: Authenticate with POP first."
 # Scheck_rcptのセクションここまで

これで何とか意図したとおりの動きをするようになった。

参加しているメーリングリストの管理者様には大変な迷惑をかけて
しまいました。
どうも済みませんでした。これからは気をつけます。

trackbacks

trackbackURL:

comments

comment form
comment form