On May 02, 2013, at 04:03 PM, Spamm Azz wrote: >I wrote a function in C language that customizes an email body. My target is >to integrate this function inside mailman 3 to customize the email for each >recipient. To manage an input email is possible inserting an handler, but I >don't know how to do the same for an outgoing message.
You'll first have to expose your C function to Python. You can do this by writing an extension module or by providing shell access to your function. That's out of scope for this discussion. Once you've made your function callable from Python, you'll want to implement an IMailTransportAgentDelivery class that implements a deliver() method that calls your C function. Then in your mailman.cfg, set the [mta]output variale to point to your implementation of that interface. Take a look at src/mailman/mta/deliver.py for how VERP delivery is done. There may be opportunities to provide better extensibility of this basic functionality without having to rewrite it all. Please provide feedback. Cheers, -Barry _______________________________________________ Mailman-Developers mailing list [email protected] http://mail.python.org/mailman/listinfo/mailman-developers Mailman FAQ: http://wiki.list.org/x/AgA3 Searchable Archives: http://www.mail-archive.com/mailman-developers%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-developers/archive%40jab.org Security Policy: http://wiki.list.org/x/QIA9
