>Новые правила надо "вплетать" в старые.
>Покажите, что у вас было Ниже как у меня щас работает:
(попутно вопрос: Почему в правиле которое я нашел SLocal_check_mail пишется так: Slocal_check_mail - нет разницы?)
######################################################################
### check_mail -- check SMTP `MAIL FROM:' command argument
######################################################################
SLocal_check_mail
Scheck_mail
R$* $: $1 $| $>"Local_check_mail" $1
R$* $| $#$* $#$2
R$* $| $* $@ $>"Basic_check_mail" $1
SBasic_check_mail
# check for deferred delivery mode
R$* $: < $&{deliveryMode} > $1
R< d > $* $@ deferred
R< $* > $* $: $2
# authenticated?
R$* $: $1 $| $>"tls_client" $&{verify} $| MAIL
R$* $| $#$+ $#$2
R$* $| $* $: $1
R<> $@ <OK> we MUST accept <> (RFC 1123)
R$+ $: <?> $1
R<?><$+> $: <@> <$1>
R<?>$+ $: <@> <$1>
R$* $: $&{daemon_flags} $| $1
R$* f $* $| <@> < $* @ $- > $: < ? $&{client_name} > < $3 @ $4 >
R$* u $* $| <@> < $* > $: <?> < $3 >
R$* $| $* $: $2
# handle case of @localhost on address
R<@> < $* @ localhost > $: < ? $&{client_name} > < $1 @ localhost >
R<@> < $* @ [127.0.0.1] >
$: < ? $&{client_name} > < $1 @ [127.0.0.1] >
R<@> < $* @ localhost.$m >
$: < ? $&{client_name} > < $1 @ localhost.$m >
R<@> < $* @ localhost.UUCP >
$: < ? $&{client_name} > < $1 @ localhost.UUCP >
R<@> $* $: $1 no localhost as domain
R<? $=w> $* $: $2 local client: ok
R<? $+> <$+> $#error $@ 5.5.4 $: "553 Real domain name required for sender address"
R<?> $* $: $1
R$* $: <?> $>CanonAddr $1 canonify sender address and mark it
R<?> $* < @ $+ . > <?> $1 < @ $2 > strip trailing dots
# handle non-DNS hostnames (*.bitnet, *.decnet, *.uucp, etc)
R<?> $* < @ $* $=P > $: <OKR> $1 < @ $2 $3 >
R<?> $* < @ $j > $: <OKR> $1 < @ $j >
R<?> $* < @ $+ > $: <? $(resolve $2 $: $2 <PERM> $) > $1 < @ $2 >
R<? $* <$->> $* < @ $+ >
$: <$2> $3 < @ $4 >
# check sender address: user@address, user@, address
R<$+> $+ < @ $* > $: @<$1> <$2 < @ $3 >> $| <F:$2@$3> <U:$2@> <D:$3>
R<$+> $+ $: @<$1> <$2> $| <U:$2@>
R@ <$+> <$*> $| <$+> $: <@> <$1> <$2> $| $>SearchList <+ From> $| <$3> <>
R<@> <$+> <$*> $| <$*> $: <$3> <$1> <$2> reverse result
# retransform for further use
R<?> <$+> <$*> $: <$1> $2 no match
R<$+> <$+> <$*> $: <$1> $3 relevant result, keep it
# handle case of no @domain on address
R<?> $* $: $&{daemon_flags} $| <?> $1
R$* u $* $| <?> $* $: <OKR> $3
R$* $| $* $: $2
R<?> $* $: < ? $&{client_addr} > $1
R<?> $* $@ <OKR> ...local unqualed ok
R<? $+> $* $#error $@ 5.5.4 $: "553 Domain name required for sender address " $&f
...remote is not
# check results
R<?> $* $: @ $1 mark address: nothing known about it
R<$={ResOk}> $* $@ <OKR> domain ok: stop
R<TEMP> $* $#error $@ 4.1.8 $: "451 Domain of sender address " $&f " does not resolve"
R<PERM> $* $#error $@ 5.1.8 $: "553 Domain of sender address " $&f " does not exist"
R<$={Accept}> $* $# $1 accept from access map
R<DISCARD> $* $#discard $: discard
R<QUARANTINE:$+> $* $#error $@ quarantine $: $1
R<REJECT> $* $#error $@ 5.7.1 $: "550 Access denied"
R<ERROR:$-.$-.$-:$+> $* $#error $@ $1.$2.$3 $: $4
R<ERROR:$+> $* $#error $: $1
R<<TMPF>> $* $#error $@ 4.3.0 $: "451 Temporary system failure. Please try again later."
R<$+> $* $#error $: $1 error from access db
######################################################################
### check_rcpt -- check SMTP `RCPT TO:' command argument
######################################################################
Так выглядит cf после генерации из mc:
Верхний блок остался и добавилось ниже это:
######################################################################
### authinfo: lookup authinfo in the access map
###
### Parameters:
### $1: {server_name}
### $2: {server_addr}
######################################################################
Sauthinfo
R$* $: $1 $| $>D <$&{server_name}> <?> <! AuthInfo> <>
R$* $| <?>$* $: $1 $| $>A <$&{server_addr}> <?> <! AuthInfo> <>
R$* $| <?>$* $: $1 $| <$(access AuthInfo: $: ? $)> <>
R$* $| <?>$* $@ no no authinfo available
R$* $| <$*> <> $# $2
SLocal_check_mail
R$+ $1 $| $&{client_name}
R$+ $| $=w $@ $1 # local connection
R$+ $| # local mail
R $* $| $* $: $1 $| $>CheckLocalNet $2
R $* $| $* $: $1 $| $2 $>CheckLocalUser $1
R $* $| $* $* $: $1 $| $3 $2
R $* $| CONN_REMOTE USER_REMOTE $@ $1
R $* $| CONN_LOCAL USER_REMOTE $@ $1
R $* $| CONN_LOCAL USER_LOCAL $@ $1
R $* $| CONN_REMOTE USER_LOCAL $#error $@ 5.7.1 $: "571 foreign host " $&{client_name} " can not send mail from local user " $>decanonify $1
R $* $#error $@ 4.5.1 $: "451 unknown internal error"
SCheckLocalNet
R $=w $@ CONN_LOCAL
R $=R $@ CONN_LOCAL
R $+. $=R $@ CONN_LOCAL
R $* $@ CONN_REMOTE
SCheckLocalUser
R $* $: $>canonify $1
R $* < @ $=w . > $@ USER_LOCAL
R $* < @ $=R . > $@ USER_LOCAL
R $* < @ $+ . $=w . > $@ USER_LOCAL
R $* < @ $+ . $=R . > $@ USER_LOCAL
R $* < @ $+ . > $@ USER_REMOTE
R $* $@ USER_LOCAL
#
######################################################################
######################################################################
#####
##### MAIL FILTER DEFINITIONS
#####
######################################################################
######################################################################
При попытке запустить Sendmail с новым конфигом ошибка в логах messages, ругается одинаково на SCheckLocalNet и SCheckLocalUser: ..../sendmail.cf: line 1172: unknown configuration line "\n SCheckLocalNet\n R \001=w.......
Если не хватает информации по конфигу скажите скину весь..