[TriLUG] Email filtering script

Tanner Lovelace lovelace at wayfarer.org
Sat May 15 23:51:15 EDT 2004


Dean Price said the following on 5/15/04 3:25 PM:

> Unfortunately, it is a hosting company... and I do not have that access to the
> exim.conf file to make changes.
> 
> My dir is /home/user/
> 
> under that is mail/domain/users/
> 
> 
> I have determined however that I can read the exim.conf file.
> 
> userforward:
> #!!# filter renamed allow_filter
>   driver = redirect
>   allow_filter
>   check_ancestor
>   check_local_user
>   domains = ! lsearch;/etc/userdomains
>   no_expn
>   file = $home/.forward
>   file_transport = address_file
>   pipe_transport = address_pipe
>   reply_transport = address_reply
>   no_verify
> 
> It look to me that as long as a .forward file exists... 
> 
> Hmmmm,
> 

If you can use a .forward, you can invoke procmail like this:

"|IFS=' ' && exec /usr/local/bin/procmail -Yf- || exit 75 #youruserid"

Just put that in your .forward (substituting the correct location
for procmail and making sure you put your userid at the end) and
things should work.  If procmail can't write the mail out
it this will return 75 which should tell the mail program to
requeue it and try to deliver later.  (For more information
see this page: http://www.professional.org/procmail/).

Cheers,
Tanner
-- 
Tanner Lovelace       | Don't move! Or I'll fill ya full of... little
lovelace at wayfarer.org | yellow bolts of light! - Commander John Crichton



More information about the TriLUG mailing list