kekahuna
19th August 2007, 06:42
Hi,
Hope there's someone out there that can help on this. I am trying to use pcre header_checks to filter a great deal of email going to one user on my mail server.
I tried reading the man pcre_table 5 docs and the description is a little vague but I came up with this:
if /^X-Original-To:.*user@/
!/^From:.*(friend1@foo1|friend2@foo2|etc...@fooetc.. )/ REJECT You shall not pass
endif
It doesn't seem to work. I know I can do this in the .procmailrc file, but the mail to this specific user is so huge that I would rather reject everyone that is not listed as a friend right up front. Fortunately there aren't too many friends 10 to be accurate with no need to grow the list.
Would appreciate some direction there.
Hope there's someone out there that can help on this. I am trying to use pcre header_checks to filter a great deal of email going to one user on my mail server.
I tried reading the man pcre_table 5 docs and the description is a little vague but I came up with this:
if /^X-Original-To:.*user@/
!/^From:.*(friend1@foo1|friend2@foo2|etc...@fooetc.. )/ REJECT You shall not pass
endif
It doesn't seem to work. I know I can do this in the .procmailrc file, but the mail to this specific user is so huge that I would rather reject everyone that is not listed as a friend right up front. Fortunately there aren't too many friends 10 to be accurate with no need to grow the list.
Would appreciate some direction there.