Filtering by hostmask best done with scrip?

Greetings from a new user.

I have rt-mailgate working and can generate tickets from emails. I’ve
read http://wiki.bestpractical.com/index.cgi?SpamFiltering And believe
that it would be overkill in our case. We’re a small shop and are
likely to have one queue per client and rarely add clients, so what
I’m about to describe doesn’t have to scale, anyway.

Say I have a client_foo queue. I want mail from *@client_foo.com to
that queue to get through, everything else gets dropped.

Am I correct in thinking that this is best done with a scrip and not
in postfix? (I’d like to have an RT admin who doesn’t touch the
configs of the box in question).

If so, has someone already put a scrip like this to use?

I saw http://wiki.bestpractical.com/index.cgi?AutoSetOwnerForQueue
(the section titled “Assigning owner conditionally based on ticket
creator”) but not anything closer to what I want. Perhaps I’m not
using the right search terms.

Any help appreciated.

Cristobal M. Palmer
UNC-CH SILS Student
cristobalpalmer@gmail.com
“Television-free since 2003”

iank has trouble with English. his native language is Python
Yeah
I’m forced
To indent
My sentences

Cristobal Palmer wrote:

Am I correct in thinking that this is best done with a scrip and not
in postfix? (I’d like to have an RT admin who doesn’t touch the
configs of the box in question).

Hi Cristobal.

To be honest, I’d lean towards using Postfix to take care of this, given
the specifications you put forth (one client per queue, relatively
static list of clients, and so forth.)

Putting this kind of check is dead-easy, and the best part is that you
can have Postfix reject the email before you even have to waste one CPU
cycle processing it through RT. And since you’re probably already
touching Postfix to handle the rt-mailgate commands, it’s not like you’d
be adding a whole new realm to the administrative work.

Barry