From: gx Deng on
Hi,

I am newbie in the sendmail rule. I need to write a rule as below
requirement.

-- usera(a)abc.com can only send mail to usera(a)def.abc.com

Is it require to change the "check_compat" rule set ??

I am using sendmail 8.12.11

Any comments are appreciated.

Thanks.
From: gx Deng on
On Mar 18, 4:35 pm, Loki Harfagr <l...(a)thedarkdesign.free.fr.INVALID>
wrote:
> Wed, 17 Mar 2010 21:49:46 -0700, gx Deng did cat :
>
> > Hi,
>
> > I am newbie in the sendmail rule. I need to write a rule as below
> > requirement.
>
> > --  us...(a)abc.com can only send mail to us...(a)def.abc.com
>
> > Is it require to change the "check_compat" rule set ??
>
> > I am using sendmail 8.12.11
>
> the check_compat is exactly the opposite of what you described, it'd
> allow you to deny some pairs of sender-recipients.
>  What I understand of what you described would be:
>
> senderX -> recipientY is allowed
> senderX -> anyotherrecipient is rejected
>
> if that's correct then yes you'd have to rewrite some check_compat
> ruleset in the like of:
>
> -------
> LOCAL_CONFIG
> Kbannish regex -a(a)MATCH ^user[axz]@abc.com$
>
> LOCAL_RULESETS
> Scheck_compat
> R< $+ > $| $+           $: $1 $| $2
> R$+ $| < $+ >           $: $1 $| $2
> R$+ $| $+               $: $1 $| $(access ABCcage:$2 $:@NOTCH $)
> R$+ $| $+               $: $(bannish $1 $:@NOTCH $) $| $2
> R(a)MATCH $| @NOTCH       $#error $: 553 You cant get there from here
> -------
>
> and populate your access map with the allowed recipient
> -------
> ABCcage:        us...(a)def.abc.com      OK
> -------
>
>  Note that's only an example and there are other simpler rulesets possible
> and much more intricate too, depending on how many special pairs you need
> and especially how many separated pair-sets you'll need, simmer slightly
> til ready ,-)

Hi,

Thanks for your posting. I'm sorry that I haven't specified clearly in
the above requirement.
Actually, I also need to check....

1. Sender name and recipient name must be the same.
2 .All sender must send to a specific domain ( e.g @def.abc.com)

That is, each user can only send mail to one email address

Therefore, only accept the following mail....

usera(a)abc.com --> usera(a)def.abc.com
userb(a)abc.com --> userb(a)def.abc.com
userc(a)abc.com --> userc(a)def.abc.com ... etc.

Would you pls give suggestion ?? How to modify the above example to
fullfil this requirement ??

Many thanks.