Marelay P=[IPC],
F=mDFMuX,
S=AnotherRelay, R=EnvToSMTP, E=\r\n, L=990, T=DNS/RFC822/SMTP, M=1000000, A=TCP $h |
D{anotherdomain} | 書き換えられる他組織ドメイン名 |
C{anothermasq} | 書き換え対象とするFromドメイン名 |
SAnotherRelay R$+<@$={anothermasq}$*> $@ $1 @ ${anotherdomain} rewrite R$+<@$={anothermasq}> $@ $1 @ ${anotherdomain} not dot R$* $@ $1 not change |
Mlrelay P=[IPC],
F=mDFMuX,
S=EnvFromSMTP/HdrFromSMTP, R=Rewrite_another, E=\r\n, L=990, T=DNS/RFC822/SMTP, A=TCP $h |
D{anothernet} | 別経路であるネットワークアドレス |
SParseLocal=98 ##################################### # from another_relay ##################################### R$* $: [$(dequote "" $&{client_addr} $)] $1 [IP] addr R[$={anothernet}] $* $@ $>Rewrite_another $2 rewrite ip R[$={anothernet}.$-] $* $@ $>Rewrite_another $3 rewrite net R[$*] $* $@ $2 delete [IP] R$* $@ $1 return addr SRewrite_another R$+ < @ $={anothermasq} $* > $@ $1 < @ $m . > another --> localdomain R$+ < @ $={anothermasq} > $@ $1 < @ $m . > not dot R$* $@ $1 not change |
HACK(another_relay) |
devirt(-1) | コメントとして展開しないように指示 |
devirt(0) | そのまますぐ展開するように指示 |
devirt(3) | メーラ定義に展開するように指示 |
devirt(7) | ParseLocal(ルールセット98)へ展開するように指示 |
define(`_ANOTHER_RELAY_', `') divert(0) |
divert(0)dnl FEATURE(`mailertable',`hash -o /etc/mail/mailertable')dnl FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable')dnl FEATURE(`access_db', `hash -o /etc/mail/access')dnl FEATURE(`use_cw_file')dnl FEATURE(`accept_unresolvable_domains') dnl # this is for localrelay dnl define(`MAIL_HUB', lrelay:[192.168.1.25]) dnl # this is another relay mailer HACK(`another_relay') MAILER(local)dnl MAILER(smtp)dnl dnl # this is another relay mailer definition ### Another Routings # anotherdomain masq for another route MAIL FROM: # anothermasq masq target domain for another route # anothernet network address on another route D{anotherdomain}another.net C{anothermasq}main.net another.net C{anothernet}192.168.2 |
another.net
arelay:[192.168.2.25] main.net lrelay:[192.168.1.25] |
localhost localhost.main.net mx.main.net main.net |
any.domain | ドメインに正確にマッチしたものはこのメーラを使う |
.any.domain |
配下のドメインにはこのメーラを使う (any.domainそのものはマッチしない) |
+any.domain |
トップも含めた配下ドメインにはこのメーラを使う (any.domainそのものもマッチする) |
################################################################### ### Ruleset 90 -- try domain part of mailertable entry ### ################################################################### SMailertable=90 ### for WIDE extension R$*<$-.$+> $* $: $1 < $(mailertable +$2.$3 $) > $4 challenge +entry R$*<+$-.$+> $* $: $1 <$2.$3> $4 restore if match ### R$* <$- . $+ > $* $: $1$2 < $(mailertable .$3 $@ $1$2 $@ $2 $) > $4 R$* <$~[ : $* > $* $>MailerToTriple < $2 : $3 > $4 check -- resolved? R$* < . $+ > $* $@ $>Mailertable $1 . <$2> $3 no -- strip & try again R$* < $* > $* $: < $(mailertable . $@ $1$2 $) > $3 try "." R< $~[ : $* > $* $>MailerToTriple < $1 : $2 > $3 "." found? R< $* > $* $@ $2 no mailertable match |
################################################################### |
define(`_MAILER_TABLE_CF_EX_')dnl # これを定義すると拡張が利用できる |