Lloyd Zusman [EMAIL PROTECTED] wrote: > Lloyd Zusman <[EMAIL PROTECTED]> writes: > > I just realized that there is a minor flaw in the courierfilter > > implementation of SPF.
It's actually a limitation in Courier's courierfilter interface. > > But as far as I know, it's not possible to add a header to an email > > message from within a courierfilter module, [ ... ] Yes. > > Also, I'm hoping that there's some sort of hack^H^H^H^Htrick to get > > this behavior that doesn't involve changing the Courier source code. > > I just thought of a possible hack to handle this case. What do you > folks think of this idea? ... > > I create a directory called, for example, /var/messageids. In the SPF > courier-pythonfilter, if the message is not rejected, create a file in > /var/messageids whose name is the Message-ID of the currently processed > message. In this file, write the extra header(s) before returning '' or > '200 Ok' from the filter step. > > Then, very early in the subsequent maildrop step (which is set up for > all mail passing through my system), pipe each message through a program > which reads its message ID, and if a file with that name exists in > /var/messageids, appends any headers in this file to the message. This > message will then be processed by any other maildrop rules that might > exist. > > That header-appending program will delete the file in /var/messageids > after adding the headers, and also, a cron-based cleanup script can > periodically delete old files from /var/messageids. > > The advantage of this is that the SPF testing takes place during the > SMTP dialog, and the headers are added a bit later, before any further > rules are processed. > > How does this sound? This is roughly what I'm planning to do in the *second* release of my Courier::Filter filter module framework, the *first* release of which I will finally release this week. I haven't decided yet what kind of modifications to allow (just adding headers, or replacing the whole header, or even replacing the whole message), and how to store the modification information (separate files, DBM database file, whatever). But I, too, think this is the best we can do to work around the limitation in the courierfilter interface. ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ courier-users mailing list [EMAIL PROTECTED] Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users
