lmco / laikaboss

Laika BOSS: Object Scanning System
Apache License 2.0
732 stars 155 forks source link

Basic Postfix Configuration #64

Closed kingaling closed 7 years ago

kingaling commented 7 years ago

So I was having an issue with getting Postfix to talk to Laika but I have fixed that and updated this comment. I was trying to spawn laikamilter.py from master.cf and that was a failure. Setting the py script to execute on system boot and then throwing this into the main.cf solved my initial issue:

smtpd_milters = inet:<my hosts IP>:7226

If there is any detailed documents on setup, examples, etc, I would be interested in seeing those. Thanks! :)

marnao commented 7 years ago

Sorry for the lack of documentation. It's something we hope to improve on.

It sounds like you're on the right track. At a high level, you need laikamilter and laikad running as services. The best way to do this largely depends on what OS you're using.

Postfix talks to laikamilter via milter protocol (you configured this above), which keeps allowing call backs all the way until the end of the message. At this point laikamilter needs to send the email to laikad via ZeroMQ. If you have laikad running on the same host, the default laikamilter configuration should work just fine. Both laikad.conf and laikamilter.conf have some limited documentation. Feel free to ask any questions about them. Laikad scans the message and returns a disposition to laikamilter which then allows or blocks the email based on that result.

I'm not sure of the size of your environment but if you need to scale this up past a single server you could use DNS with multiple A records for the same hostname. You could also use a TCP load balancer. Lots of options exist.

Hope this helps.

kingaling commented 7 years ago

Yeah before yesterday I was a Milter noob but I finally got it working last night the way you describe before I went to sleep. :) I appreciate you getting back to me. Thanks again! Take care.