Hello everyone,

I'm writing this message to ask for advice on a filter i'm writing.

The thing is that I've got a server running postfix in which i already have a postfix filter written in Perl. When i have to reinject the message into postfix, i do it with the SMTP class from Perl, which doesn't give me any problem at all.

However, i have to write a new one in C/C++ and I'm getting some trouble with the "dot" indicating the "end-of-message". The problem is that when i send the message back from the filter written in C/C++ anyone can perform a spam injection by sending messages with this content:

.
MAIL FROM: unremit...@mydomain.com
RCPT TO: vic...@otherdomain.com
DATA
spam spam spam
.


and vic...@otherdomain.com will get a message from unremit...@mydomain.com containing "spam spam spam" I've tried with different implementations in C and also C++. Some people have developed SMTP classes for C++ which I've tried, but none can't stop this spam injection from happening.

So.. my first question would be... how does postfix itself handle this? Or... what can i do in my filter to tell postfix that doesn't have to take CR LF.CR LF as the end of the message?

Has anyone found a solution for this while using postfix filters?


Thanks in advance for your help.


Reply via email to