On Mon, Nov 24, 2008 at 11:04:40AM +0000, Ian Eiloart wrote:
> > I have an email alias [EMAIL PROTECTED] that contains all the staff member
> > email addresses of the company. However, only the company bosses
> > [EMAIL PROTECTED] and [EMAIL PROTECTED] are allowed to send email to
> > [EMAIL PROTECTED]
> >
> > if $h_to:,$h_Cc: matches "[EMAIL PROTECTED]" and ($h_from does not match
> > "eric|[EMAIL PROTECTED]") then
> > fail text "You are not allowed to send mail to this address"
> > endif
> >
> > It works fine for rejecting normal staff members from sending messages to
> > [EMAIL PROTECTED] using TO or CC. However if a normal staff sends email to
> > [EMAIL PROTECTED] using BCC, my filter failed to work.
> >
> > Is there a way to stop people sending to [EMAIL PROTECTED] using BCC?
> 
> You can use $local_part and $domain. The message headers don't necessarily 
> bear any relationship to the message recipients.

Well, you can't use $local_part or $domain in a system filter, since
it's a per-message filter, not per-recipient.

But you can do something like this instead:

if foranyaddress $recipients ($thisaddress is "[EMAIL PROTECTED]") and
  ($h_from does not match "eric|[EMAIL PROTECTED]")
then
   fail text "You are not allowed to send mail to this address"
endif

--
Dean Brooks
[EMAIL PROTECTED]

-- 
## List details at http://lists.exim.org/mailman/listinfo/exim-users 
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

Reply via email to