On 2023/10/20 21:52:41 +0200, Sagar Acharya <sagaracha...@tutanota.com> wrote:
> I'm simply unable to start.
> I have to know where to get the mail from, format of text, which process to 
> give the return to, in what format, i.e. are there any standard return values 
> for accept or reject mail.

I'd like to stress the point that a key difference of OpenSMTPD'
filters is that they DO NOT EXIT.  A filter is just a program (or a
script) that is executed by smtpd at start and never exits.  If a
filter quits, it's a non-recoverable failure and smtpd dies too.

The filter and smtpd talk via a simple protocol: smtpd writes lines to
the filter standard input and the filter writes its responses to the
standard output.

Tassilo already shared some very sample code to get you started, for
the rest you can refer to smtpd-filters[0] which describes the
protocol.  Feel free (of course!) to ask for clarification for any
aspect not clearly covered in the manual page.


Omar Polo

[0]: https://man.openbsd.org/smtpd-filters.7

Reply via email to