[Pymilter] getting started with milter-template.py

Alexander Vowinkel lists at alexandervowinkel.de
Fri Nov 18 13:11:44 EST 2016


Yes, I did reload postfix. I just overlooked the " No such file or 
directory" warning.

However, your message opened my eyes.
Postfix runs in a chroot, so I put the socket in /var/spool/postfix/var/run/
and set the permissions correctly.

Now it works and I can write my milter :D

Thanks!

Am 18.11.2016 um 18:57 schrieb Tom Hendrikx:
> 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
>
>
>
> _______________________________________________
> Pymilter mailing list
> Pymilter at gathman.org
> https://gathman.org/mailman/listinfo/pymilter




More information about the Pymilter mailing list