0

I want to write own miter, but I have problem. I have installed postfix, libmilter and python module Milter.

I try to run sample.py milter which I found in pymilter-0.9.7.tar.gz (from http://bmsi.com/python/milter.html ) but I don't now how to add them to postfix.

I've tried set smtpd_milters = unix:/tmp/pythonsock but postfix wrote to log connect to Milter service unix:/tmp/pythonsock : No such file or directory

python code http://pastebin.com/DXG0LFDU

Please help me, what i should do?

infernox
  • 29
  • 1
  • 4

3 Answers3

2

Postfix probably runs in a chrooot environment.

Then you would have to put the socket in a place like this: /var/spool/postfix/var/run/pythonsock

Then also make sure that the permissions are correct. However, you would get a different message in the mail.log.

Alexander
  • 277
  • 2
  • 8
1

You need to read the postfix Milter page before anything else, but if you're trying to use the smtpd_milters setting, either your milter doesn't talk in that manner, or you've configured the path to the file incorrectly.

I'd say by the pymilter FAQ page, the first case is the correct example, as they offer up the inet:host:port configuration example (in sendmail syntax).

NickW
  • 10,263
  • 1
  • 20
  • 27
0

This may sound obvious, but it did confuse me for a while. Your Milter has to run (and open the socket) before Postfix can connect to it. Essentially, you need each Milter to run as a dæmon outside of Postfix.

I had thought that Postfix would call the Milter on-demand for each message, like a Sendmail script.

palswim
  • 442
  • 2
  • 6
  • 24