There's 2 thing I was thinking of. Please could you let me know if there are any relevant examples.
Plugging it into an email classifier such as spamassassin/popfile/etc...
Forwarding received email to an HTTP endpoint (yes), so that the HTTP endpoint can decide what to do with it. Alternatively a simple function like process_email(email_object) should also be fine.
Motivation is to be able to store the received email in a custom format (possibly encrypt, etc...)
If this SMTP server is an EventEmitted (or an EventPipe), then things should be relatively smooth since the AV/anti-spam/delivery can just be handlers at various stages in the pipe. I was checking out some of the plugin examples such as https://github.com/baudehlo/Haraka/blob/master/plugins/clamd.js and it seems it is the way I am thinking it to be, but some documentation would be super helpful.
For example, it seems that the connection object has the entire email stored within it. Any docs. about the various fields here?
Hello,
There's 2 thing I was thinking of. Please could you let me know if there are any relevant examples.
process_email(email_object)
should also be fine.Motivation is to be able to store the received email in a custom format (possibly encrypt, etc...)
If this SMTP server is an EventEmitted (or an EventPipe), then things should be relatively smooth since the AV/anti-spam/delivery can just be handlers at various stages in the pipe. I was checking out some of the plugin examples such as https://github.com/baudehlo/Haraka/blob/master/plugins/clamd.js and it seems it is the way I am thinking it to be, but some documentation would be super helpful.
For example, it seems that the
connection
object has the entire email stored within it. Any docs. about the various fields here?