On Thu, Jul 31, 2008 at 01:28:06PM -0700, Jérôme Blion wrote: > Richard Guy Briggs a écrit : > > On Thu, Jul 31, 2008 at 11:45:17AM -0700, Jérôme Blion wrote: > > > >> Richard Guy Briggs a écrit : > >> > >>> I'm looking for a way to modify (delete and add) standard headers > >>> (Return-Path: and Reply-To:) for all relayed mail through courier. I > >>> have only a certain type of traffic transitting a specific courier MTA > >>> and want to apply the same rules to all of it. > >>> > >>> What I'm looking for appears to be headerdel and headeradd that are > >>> provided for couriermlm, except I need this for general email and not > >>> just mailing lists. > >>> > >>> I've also looked at reformail as a potential way to implement it, but > >>> again, it is for general email being relayed and not per user that could > >>> be accomplished with local delivery. > >>> > >>> Is there a straight-forward way to do this? > >> > >> Courier-Pythonfilter + Homemade plugin. > >> Use Xfilter, and then, modify your mail with such thing: > >> > >> del msg['theheaderyouwanttoremove'] > >> > >> msg.add_header(.....) > >> > >> I don't know wether it works or not. > > > > Interesting. My understanding of filters was that they took in the data > > and only returned a result code and didn't have the capacity to modify > > and/or pass back the data. How does it pass back the data? > > Indeed, since 0.57.1, it's now possible to modify contents of the mail > without having to create a new mail ! > Before this version, we have to generate a new mail and then send it to > the queue. On these old versions, you need these kind of filters to act > at the end of the filters list. > > The process of modifying mail's contents (including headers) is managed > by Xfilter... Just modify the mail the way you need, and submit it. > Xfilter does the rest and will do necessary steps :)
Is Xfilter part of courier or part of courier-pythonfilter? Will courier-pythonfilter work with python-2.3? > 1 - Maildrop won't fit your needs here, if you want your outgoing mail > to be modified too. DEFAULTDELIVERY will be used for incoming mails. Ok, so as I suspected, it is for local mail delivery only. Thanks. > 2 - Rejecting mails after SMTP transaction is bad : > - either you drop them silently, which is bad > - either you take the risk to spam forged senders I don't need to worry about spam through this relay since all emails are strongly authenticated from our senders. > > In looking for courier-pythonfilter packages, I see some available for > > FreeBSD, but nothing for Debian or RedHat(ES5). > > Even if you found some packages for Debian, they are outdated :-) Some > recents changes add important features. You have to install it manually > from the sources available at the URI: > http://www.dragonsdawn.net/~gordon/courier-pythonfilter/ > > If your Courier's version is under 0.57.1, wait few days, Gordon will > soon release 1.4 version, which will fix some issues with old versions > of Courier. > If your version is newer, you can take 1.3 version, I use it on several > Debian servers. Ugh, worse than this, I just checked and it is ES4, courier-0.45.4 . :( I'd found the archive with versions up to 1.3. Thanks for the confirmation of latest version. Perhaps 1.4 will work with something this old? With a courier version that old, I'm assuming I'll need to generate and submit a new mail? > Perhaps you will find some another nice filters in pythonfilter :-) Perhaps... > HTH. Thanks very much for your help so far! > Jerome Blion. Richard Guy Briggs ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ courier-users mailing list [email protected] Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users
