Re: suggestion: message filtering hooks

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: Rahul Dhesi
CC: exim-users
Subject: Re: suggestion: message filtering hooks
On Wed, 5 Nov 1997, Rahul Dhesi wrote:

> I would like to make this suggestion to Philip Hazel for future
> consideration. It would be nice to have some hooks in Exim for calling
> customized filtering routines. If enabled during compilation, a hook
> function would be called at the following stages while a message was
> being received via smtp:
>
> - After 'mail from' and 'rcpt to' smtp commands.
> - After headers have been read.
> - After message body has been read.


Thanks for the suggestion, but let me first say that

- After headers have been read.

is not sensible, because the headers and the body are read as one block
of data, and the SMTP receiver cannot send any response until both have
been read. (It could drop the call, but that isn't sensible, because the
sending host will just try again.)

> One argument to the hook function would tell it at what stage it is
> being called. Other arguments would give the function access to all
> defined portions of the message, in some documented format.


Access to the body of the message would not be easy, because Exim has
written it to disc. After all, it could be tens of megabytes long.

> Providing such a hook function would allow site-specific filtering code,
> written in C and to be linked with Exim, to be added without having to
> add unofficial patches to Exim.


I have made a note of this idea, but I am uneasy about it because of the
support implications. It might constrain my options for changing things
internally in the future, and there would be a lot of documentation
needed.

-- 
Philip Hazel                   University Computing Service,
ph10@???             New Museums Site, Cambridge CB2 3QG,
P.Hazel@???          England.  Phone: +44 1223 334714



--
* This is sent by the exim-users mailing list.  To unsubscribe send a
    mail with subject "unsubscribe" to exim-users-request@???
* Exim information can be found at http://www.exim.org/