SMTP Plugin Implementation

Posts: 5
Joined: Sun Jan 27, 2013 4:57 pm

SMTP Plugin Implementation

Postby JanS » Thu Feb 23, 2017 2:37 pm


I have some questions about the SMTP plugin interface.

SMTP plugins should be DLLs that export a function named "Execute". This function is defined as:

long Execute(char *Configuration,char *Response);

I have three issues here:
* Which character set is being used for the parameters Configuration and Response? ASCII? UTF8? Unicode?
* What is the maximum length of the Response?
* Is it possible to get the whole mail content (if called after the "DATA" statement)?

What I want to do is to attach the spam filtering to the SMTP service. This way I want to reject incoming messages rather than moving them to the quarantine. Having a quarantine can be a showstopper for many customers. In Germany we are required to put every (accepted) incoming message into a persistent and unchangeable mail archive. If we accept spam mails, we have to archive them. If the server accepts a mail (false positive) and moves it to the quarantine, the message sender does not get notified. This is a big problem for us.


Posts: 5
Joined: Wed Nov 20, 2013 10:03 am

Re: SMTP Plugin Implementation

Postby lusu » Thu Feb 01, 2018 11:16 am


Sorry to bump this year old question...

I have the same question regarding "After DATA" event. From the documentation, it is unclear for me too if this can be achieved. I am also interested in filtering the body of the message during message receving.

Currently I'm filtering with an MTA pickup event (SNIMTA), but that's a little too late since the message was already accepted by the server; blocking SPAM at protocol level is much better.

(My setup requires that blacklisted senders to be marked as spam rather than rejected, so I need to have in place a mechanism to reject some specific spam messages before they come in.)

Best regards,

Who is online

Users browsing this forum: No registered users and 4 guests