sendmail auth - restrict user to local-host-names
shrek-m at gmx.de
shrek-m at gmx.de
Wed Dec 29 22:09:09 UTC 2004
Alexander Dalloz wrote:
>>>>s it possible to restrict a user to send mails with smtp-auth only to
>>>>local-host-names ?
>>>>"dummy at shrek.local" should only be able to send mails to "shrek.local"
>>>>fc3, sendmail-8.13.1-2
>>>>
>>>>
>>>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 at local.host?
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
--
shrek-m
More information about the fedora-list
mailing list