http://www.sendmail.org/~ca/email/restrict.html
http://www.sendmail.org/m4/intro.html
So place it at the end of the sendmail.mc.
Don't edit the sendmail.cf!
When adding the LOCAL_RULESET to the sendmail.mc take care to use
tabstops between the LHS and RHS entries. So for the first line for
example
R$* <here are tabstops - no spaces> $: $1 $| $>3 $&f
thanks :-))
# tail -18 sendmail.mc
dnl MASQUERADE_DOMAIN(mydomain.lan)dnl
MAILER(smtp)dnl
MAILER(procmail)dnl
LOCAL_CONFIG
F{Internal}/etc/mail/intern.only
LOCAL_RULESETS
SLocal_check_rcpt
dnl # get sender address and canonify it
R$* $: $1 $| $>3 $&f
R$* $| <> $@ OK <> is always ok
R$* $| $={Internal} <@$=w.> $: $1 luser@xxxxxxxxxx?
R$* $| $={Internal} $: $1 luser?
R$* $| $* $@ OK someone else
R$* $: $>3 $1 check recipient
R$+<@$=w.> $@ OK local? ok
R$+<@$+> $#error $@ 5.1.8 $: "551 sorry luser
your boss does not like you"
$ cat intern.only
dummy
dau
joe
apropos:
2 external adresses are allowed via /etc/aliases
support: support@xxxxxxxxxxxxx
info: info@xxxxxxxxxxxxx
# newaliases
bingo :-))
--
shrek-m