---- On Mon, 18 Jul 2016 02:03:06 -0400 Joerg Jung <[email protected]>wrote 
---- 



Am 18.07.2016 um 02:15 schrieb Charleroi Vogt <[email protected]>:


System is OpenBSD 5.9 (all current patches applied), with the package 
opensmtpd-extras-python-201602042118.tgz installed.





This packaged version suffers from various issues, fixed in later commits.

I guess it is not working due to chroot enabled by default, see commit 

a2fc9c1631f6e84fba1c752394d8bd2fea80dade





Hmm, if it is due to chroot, the debug messages are not obviously suggesting 
it..  Snippet from smtpd -d -v , with the "-d" "-v" arguments supplied before 
the path to the filter code python file:



~ # smtpd -d -v

debug: init ssl-tree

debug: init ca-tree

debug: init ssl-tree

info: OpenSMTPD 5.9.1 starting

debug: bounce warning after 4h

debug: using "fs" queue backend

debug: using "ramqueue" scheduler backend

debug: using "ram" stat backend

debug: parent_send_config_ruleset: reloading

debug: parent_send_config: configuring pony process

debug: parent_send_config: configuring ca process

filter: building simple chains...

filter: building simple chain "testfilt"

debug: init private ssl-tree

filter: registering proc "testfilt"

debug: queue: done loading queue into scheduler

filter: building complex chains...

filter: done building complex chains

debug: ca_engine_init: using RSA privsep engine

testfilt[10765]: debug: starting...

debug: filter "testfilt": hooks 0xffffffff flags 0x0000

debug: smtp: listen on 192.168.0.1 port 25 flags 0x500 pki "" ca ""

debug: smtp: will accept at most 501 clients

debug: smtpd: scanning offline queue...

debug: smtpd: offline scanning done

debug: smtp: new client on listener: 0x132bbd658000

smtp-in: New session aee4f28528033bc4 from host x.lan [local]

smtp: 0x132c4dfb7000: fd 5 from queue

smtp: 0x132c4dfb7000: fd 7 from filter

debug: smtp: 0x132c4dfb7000: data io done (404 bytes)

filter: deferring eom query...

filter: running eom query...

debug: 0x132c4dfb7000: end of message, msgflags=0x0000



Following your note about that version, I fetched version 
https://www.opensmtpd.org/archives/opensmtpd-extras-201606062304.tar.gz , used 
the current bootstrap script, and was able to build the filter-python 
executable.  Using this version, the log printed to the console is virtually 
identical to the above.



Looking at main(),  there is an invocation



log_debug("debug: starting...");



which follows after a number of error messages that would be issued if the 
python code could not be loaded or compiled by calling into python.  None of 
those error messages get printed and the log above shows the "debug: 
starting..." message printed out from the process for the filter executable.  
So it looks like the python code is being loaded, compiled, and the module 
loaded, but the callbacks are not getting called for some reason?



Just to double-check, I added a log_debug(path) further above, and the path to 
the .py file is correct.



What else should I take a look at?



Thank you for your help.




Reply via email to