sendmail の折檻

MASQUERADE_AS でヘッダが書きかわって、masquerade_envelope でエンベロープも書きかわるということだけど、逆はないみたい。

しかたないので、MASQUERADE_AS だけを書いた cf を手で修正。ヘッダ用のルールとエンベロープ用のルールを入れかえ。あと expose のルールを削除。

--- test.cf.orig        2007-08-22 17:42:17.000000000 +0900
+++ test.cf     2007-08-22 17:46:00.000000000 +0900
@@ -156,7 +156,6 @@
 # class M: domains that should be converted to $M
 # class N: domains that should not be converted to $M
 #CL root
-C{E}root
 C{M}hoge.example.co.jp

 # who I masquerade as (null for no masquerading) (see also $=M)
@@ -1004,12 +1003,13 @@

 # do not masquerade anything in class N
 R$* < @ $* $=N . >     $@ $1 < @ $2 $3 . >
+R$* < @ *LOCAL* > $*   $: $1 < @ $j . > $2

-# special case the users that should be exposed
-R$=E < @ *LOCAL* >     $@ $1 < @ $j . >                leave exposed
-R$=E < @ $=M . >       $@ $1 < @ $2 . >
-R$=E < @ $=w . >       $@ $1 < @ $2 . >
+###################################################################
+###  Ruleset 94 -- convert envelope names to masqueraded form  ###
+###################################################################

+SMasqEnv=94
 # handle domain-specific masquerading
 R$* < @ $=M . > $*     $: $1 < @ $2 . @ $M > $3        convert masqueraded doms
 R$* < @ $=w . > $*     $: $1 < @ $2 . @ $M > $3
@@ -1018,13 +1018,6 @@
 R$* < @ $+ @ $+ > $*   $: $1 < @ $3 . > $4             $M is not null

 ###################################################################
-###  Ruleset 94 -- convert envelope names to masqueraded form  ###
-###################################################################
-
-SMasqEnv=94
-R$* < @ *LOCAL* > $*   $: $1 < @ $j . > $2
-
-###################################################################
 ###  Ruleset 98 -- local part of ruleset zero (can be null)    ###
 ###################################################################