This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author yonas
Recipients abo, astrand, benjamin.peterson, christian.heimes, djc, dsagal, exarkun, gjb1002, gregory.p.smith, grossetti, gvanrossum, nnorwitz, oefe, r.david.murray, siemer, tom_culliton, yonas
Date 2009-05-31.23:22:55
SpamBayes Score 0.021454174
Marked as misclassified No
Message-id <1243812177.26.0.865615403534.issue1731717@psf.upfronthosting.co.za>
In-reply-to
Content
To test with exim4 is easy. To reproduce on Ubuntu Jaunty:

1. apt-get install exim4-daemon-heavy

2. echo "local_scan = /usr/lib/exim4/local_scan/libpyexim.so" >
/etc/exim4/conf.d/main/15_py-exim_plugin_path

3. cd /usr/lib/exim4/local_scan

4. Compile mylib, output will be "libpyexim.so":

gcc `python2.6-config --cflags` -c -fPIC mylib.c -o mylib.o 
gcc -Xlinker -export-dynamic -lpython2.6 -lnsl -lpthread -ldl -lutil -lm
-lz -shared -Wl,-soname,libpyexim.so -o libpyexim.so  mylib.o

5. Restart server:
/etc/init.d/exim4 restart

6. Send some mail:
cat mail.txt | sendmail -t

(contents of mail.txt):
Content-type: text/plain
To: your_username@localhost
From: foobar@example.com
Subject: test

Hello world.
History
Date User Action Args
2009-05-31 23:22:57yonassetrecipients: + yonas, gvanrossum, nnorwitz, abo, gregory.p.smith, astrand, siemer, exarkun, gjb1002, oefe, christian.heimes, dsagal, tom_culliton, benjamin.peterson, djc, grossetti, r.david.murray
2009-05-31 23:22:57yonassetmessageid: <1243812177.26.0.865615403534.issue1731717@psf.upfronthosting.co.za>
2009-05-31 23:22:56yonaslinkissue1731717 messages
2009-05-31 23:22:55yonascreate