[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mail message filter for zmailer?



On Wed, 15 Nov 1995, Trevor Paquette wrote:

> I know about the intercept function in crossbar.cf with it's drop, file
> and error "functions".. but would it be possible to add a filter function
> to zmailer??

Actually, I have something like this in mind myself, specifically for 
delivery of local mail with an internal procmail-like functionality. 
The two could serve the same purpose except, I would imagine, you'd be 
doing it on a system-wide basis rather than a per-user basis.

After looking at the mechanics, I came to the conclusion that a user's 
.zmailerrc (a la .procmailrc) and the system .zmailerrc or equivalent 
should be handed by the router, allowing far more efficient re-delivery, 
rerouting and forwarding without ever needing to invoke additional 
processes unless the .zmailerrc did it explicitly. Mailbox would not need 
to be modified since it would always be handling local delivery to its 
full-resolved and processed end-point.


> Basically I need to be able to 'rewrite' ANY incoming/outgoing headers and
> possibly scan a message for specific contents (ie uuencoded/mime
> attachments and decode them and test for a virus).. what I am thinking is the
> following:

Procmail's current functionality does not allow header rewriting, so maybe
your requirement goes a little further than I had inteded (I hadn't thought
about it). The mechanics are the same though.  Procmail *does* allow
filtering of the header and message body through other arbitrary programs. 

I've gotten as far as working on a new "lookup" type for the .zmailerrc, 
and then implementing new router verbs to handle it. There are obviously 
going to be some security concerns. Lack of time to work on this to put 
code to keyboard is a problem right at the moment though, but I hope to 
get started before the new year.


> You should be able to get the idea of what I am trying to do. Can this be
> done? It would add ALOT of functionality to zmailer. Which is already a great
> system.

Absolutely.

For the interim, you can probably do something like this fairly easily using
procmail and/or perl, but on a user-by-user basis. I don't believe that there
exist any system-wide hooks unless you look at replacing mailbox and
funneling all of the local delivery though something of your own creation. 


  Regards,
  David