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 :) > I've now found this thread > (http://wiki.apache.org/spamassassin/IntegratedInCourierUsingMaildrop) > that helps understand how to use some of this, but it still isn't clear > to me how this can be used. It appears I might be able to set some > value of DEFAULTDELIVERY in /etc/courier/courierd that might do what I > want, but again I wonder if that is only for local delivery and not for > any mail being relayed through this MTA to other destinations. > > In looking for courier-pythonfilter packages, I see some available for > FreeBSD, but nothing for Debian or RedHat(ES5). 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. 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 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. Perhaps you will find some another nice filters in pythonfilter :-) HTH. Jerome Blion. ------------------------------------------------------------------------- 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
