Re: [exim] BCC filtering in system_filter.exim

Góra strony
Delete this message
Reply to this message
Autor: WICA
Data:  
Dla: 'Exim Mailing List'
Temat: Re: [exim] BCC filtering in system_filter.exim
Dear Dean,

Your suggestion works!
Thanks a ton!

Regards,
Will L

-----Original Message-----
From: exim-users-bounces@??? [mailto:exim-users-bounces@exim.org] On
Behalf Of Dean Brooks
Sent: Monday, November 24, 2008 11:15 PM
To: exim-users@???
Subject: Re: [exim] BCC filtering in system_filter.exim

On Mon, Nov 24, 2008 at 11:04:40AM +0000, Ian Eiloart wrote:
> > I have an email alias staff@??? that contains all the staff

member
> > email addresses of the company. However, only the company bosses
> > eric@??? and john@??? are allowed to send email to
> > staff@???.
> >
> > if $h_to:,$h_Cc: matches "staff@???" and ($h_from does not match
> > "eric|john@???") 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
> > staff@??? using TO or CC. However if a normal staff sends email

to
> > staff@??? using BCC, my filter failed to work.
> >
> > Is there a way to stop people sending to staff@??? 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 "staff@???") and
($h_from does not match "eric|john@???")
then
fail text "You are not allowed to send mail to this address"
endif

--
Dean Brooks
dean@???

--
## 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/