[Pymilter] getting started with milter-template.py

Tom Hendrikx tom at whyscream.net
Fri Nov 18 12:57:14 EST 2016


On 18-11-16 17:52, Alexander Vowinkel wrote:
> Hi,
> 
> 
> I am trying to create a milter with this library and postfix.
> 
> First I used the milter-template.py for testing.
> It is running an up:
> 
>> # python milter-template.py
>> 2016Nov18 17:34:13 milter startup
> 
> Postfix is configured to talk to the milter on the socket:
> 
>> milter_protocol = 6
>> milter_default_action = accept
>> smtpd_milters = unix:/home/avowinkel/pythonsock
>> unix:/var/run/opendkim/opendkim.sock
>> non_smtpd_milters = unix:/home/avowinkel/pythonsock
>> unix:/var/run/opendkim/opendkim.sock
> 
> Where /home/avowinkel/pythonsock is the socket, as defined in
> the milter-template.py
> 
>> # ll ~avowinkel/pythonsock
>> srwxr-xr-x 1 root root 0 Nov 18 17:34 /home/avowinkel/pythonsock
> 
> However, when sending an email via the server,
> I don't get any output from the milter process
> or any log entry in the mail.log
> 

Did you reload postfix after the config change? You should see messages
when postfix can't connect to your milter. Placing the socket under
/home/ seems a good reason to check whether postfix actually has access.
Try placing the socket in /tmp while testing stuff (and in /run/ when
you go in production).

Also, are you running the milter process in the foreground, or is it
already managed by some systemd/upstart/init script. Maybe the milter
produces a traceback on stderr which is caught (hidden in some
unexpected logfile) by the init script? Try running the milter from the
commandline, so you see the traceback immediately.

Kind regards,
	Tom

> 
> Any suggestions how I can get this to run?
> 
> 
> Thanks,
> Alexander
> _______________________________________________
> Pymilter mailing list
> Pymilter at gathman.org
> https://gathman.org/mailman/listinfo/pymilter


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://gathman.org/pipermail/pymilter/attachments/20161118/f2ccc049/attachment.sig>


More information about the Pymilter mailing list