You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Christopher Dobbs <cr...@lybredyne.net> on 2010/07/25 18:39:26 UTC

Writing an MTA

I am writing an MTA that uses mysql as a backend for storage.
I want to integrate spamassis into my mta.

Is there some C code that I can look at to understand howto do this.

Thaks in advance.

-- 
Christopher Dobbs
Software Developer
LybreDyne Technologies
(503) 914-0799 x2213
http://www.lybredyne.net/

NOTICE: The information contained in this e-mail is confidential and may be
privileged or otherwise protected from disclosure. This e-mail is intended
solely for the use of the named addressee. Please be aware that any other
use, printing, copying, disclosure or dissemination may be subject to legal
restriction. If you are not the intended recipient, please notify us
immediately by return e-mail to the sender and delete from your computer.
Although we attempt to sweep e-mail attachments for viruses, it does not
guarantee that either are virus-free and accepts no liability for any damage
sustained as a result of viruses.

Re: Writing an MTA

Posted by Martin Gregorie <ma...@gregorie.org>.
On Sun, 2010-07-25 at 09:39 -0700, Christopher Dobbs wrote:
> I am writing an MTA that uses mysql as a backend for storage.
> I want to integrate spamassis into my mta.
> 
> Is there some C code that I can look at to understand howto do this.
> 
The usual approach is to exec(), possibly via popen(), a script that
passes a single message into spamc and pipes the output into sendmail to
feed the result back into the MTA - at least that's how Postfix does it.
There's no reason you shouldn't fork spamc directly, though: I imagine
the script-as-service approach is used is for flexibility since that
makes it possible to bolt almost any spam or virus scanner onto the MTA.
For that matter, there's no reason you couldn't get xinetd into the act
if you want. Setting up an xinetd service to run spamc and then talking
to it over a socket is about as simple as it gets.

Look at the source for spamc if you want to see how to talk directly to
spamd - its a small and fairly simple program.


Martin





Re: Writing an MTA

Posted by Benny Pedersen <me...@junc.org>.
On søn 25 jul 2010 18:39:26 CEST, Christopher Dobbs wrote

> I am writing an MTA that uses mysql as a backend for storage.
> I want to integrate spamassis into my mta.
>
> Is there some C code that I can look at to understand howto do this.

will you commit code back to the sources or not ?

but here my best bet combine dbmail and postfix to find why others  
have not combined it long time ago :)

> NOTICE: The information contained in this e-mail is confidential and may be
[snip]]

this is a public maillist

-- 
xpoint http://www.unicom.com/pw/reply-to-harmful.html


Re: Writing an MTA

Posted by Emin Akbulut <em...@gmail.com>.
I know one; hMailServer has a wrapper like thing which one
integrates itself with Spamassassin, written in C# and source
is public available.


On Sun, Jul 25, 2010 at 7:39 PM, Christopher Dobbs <cr...@lybredyne.net>wrote:

> I am writing an MTA that uses mysql as a backend for storage.
> I want to integrate spamassis into my mta.
>
> Is there some C code that I can look at to understand howto do this.
>
> Thaks in advance.
>
> --
> Christopher Dobbs
> Software Developer
> LybreDyne Technologies
> (503) 914-0799 x2213
> http://www.lybredyne.net/
>
> NOTICE: The information contained in this e-mail is confidential and may be
> privileged or otherwise protected from disclosure. This e-mail is intended
> solely for the use of the named addressee. Please be aware that any other
> use, printing, copying, disclosure or dissemination may be subject to legal
> restriction. If you are not the intended recipient, please notify us
> immediately by return e-mail to the sender and delete from your computer.
> Although we attempt to sweep e-mail attachments for viruses, it does not
> guarantee that either are virus-free and accepts no liability for any damage
> sustained as a result of viruses.
>

RE: Writing an MTA

Posted by Brian Bebeau <BB...@trustwave.com>.
Look in the source directory for spamc. Use the libspamc API. That’s what I do. It’s pretty simple.

From: Christopher Dobbs [mailto:crdobbs@lybredyne.net]
Sent: Sunday, July 25, 2010 12:39 PM
To: users@spamassassin.apache.org
Subject: Writing an MTA

I am writing an MTA that uses mysql as a backend for storage.
I want to integrate spamassis into my mta.

Is there some C code that I can look at to understand howto do this.



Re: Writing an MTA

Posted by Marc Perkel <su...@junkemailfilter.com>.
It may be that Exim is capable of doing the job. You might not need to 
start from scratch. Or Exim might be modified to suit your needs. No 
point in starting from scratch. Exim is extremely powerful.

On 7/26/2010 7:00 AM, Christopher Dobbs wrote:
> never have looked at exim.  I will tho.
>
> This project is to fufill a verry specific need ofr a client.
> It is part of an entire messaging system.
>
> Because of the work they do, certian procedures must be met when 
> handling the emails, especialy the internal ones.
>
> I will check out exim to see how it interfaces with spamassasin.
>
> Thankyou
> Chris
>
>
> On Mon, Jul 26, 2010 at 6:38 AM, Marc Perkel 
> <support@junkemailfilter.com <ma...@junkemailfilter.com>> wrote:
>
>     I don't know if uou have looked at Exim but it interfaces with
>     SpamAssassin and it talks to MySql. Write something as versitile
>     as Exim and I'm interested. Have you looked at Exim?
>
>
>     On 7/25/2010 9:39 AM, Christopher Dobbs wrote:
>
>         I am writing an MTA that uses mysql as a backend for storage.
>         I want to integrate spamassis into my mta.
>
>         Is there some C code that I can look at to understand howto do
>         this.
>
>         Thaks in advance.
>
>         -- 
>         Christopher Dobbs
>         Software Developer
>         LybreDyne Technologies
>         (503) 914-0799 x2213
>         http://www.lybredyne.net/
>
>         NOTICE: The information contained in this e-mail is
>         confidential and may be privileged or otherwise protected from
>         disclosure. This e-mail is intended solely for the use of the
>         named addressee. Please be aware that any other use, printing,
>         copying, disclosure or dissemination may be subject to legal
>         restriction. If you are not the intended recipient, please
>         notify us immediately by return e-mail to the sender and
>         delete from your computer. Although we attempt to sweep e-mail
>         attachments for viruses, it does not guarantee that either are
>         virus-free and accepts no liability for any damage sustained
>         as a result of viruses.
>
>
>     -- 
>     Marc Perkel - Sales/Support
>     support@junkemailfilter.com <ma...@junkemailfilter.com>
>     http://www.junkemailfilter.com
>     Junk Email Filter dot com
>     415-992-3400
>
>
>
>
> -- 
> Christopher Dobbs
> Software Developer
> LybreDyne Technologies
> (503) 914-0799 x2213
> http://www.lybredyne.net/
>
> NOTICE: The information contained in this e-mail is confidential and 
> may be privileged or otherwise protected from disclosure. This e-mail 
> is intended solely for the use of the named addressee. Please be aware 
> that any other use, printing, copying, disclosure or dissemination may 
> be subject to legal restriction. If you are not the intended 
> recipient, please notify us immediately by return e-mail to the sender 
> and delete from your computer. Although we attempt to sweep e-mail 
> attachments for viruses, it does not guarantee that either are 
> virus-free and accepts no liability for any damage sustained as a 
> result of viruses.

-- 
Marc Perkel - Sales/Support
support@junkemailfilter.com
http://www.junkemailfilter.com
Junk Email Filter dot com
415-992-3400


Re: Writing an MTA

Posted by Christopher Dobbs <cr...@lybredyne.net>.
never have looked at exim.  I will tho.

This project is to fufill a verry specific need ofr a client.
It is part of an entire messaging system.

Because of the work they do, certian procedures must be met when handling
the emails, especialy the internal ones.

I will check out exim to see how it interfaces with spamassasin.

Thankyou
Chris


On Mon, Jul 26, 2010 at 6:38 AM, Marc Perkel <su...@junkemailfilter.com>wrote:

> I don't know if uou have looked at Exim but it interfaces with SpamAssassin
> and it talks to MySql. Write something as versitile as Exim and I'm
> interested. Have you looked at Exim?
>
>
> On 7/25/2010 9:39 AM, Christopher Dobbs wrote:
>
>> I am writing an MTA that uses mysql as a backend for storage.
>> I want to integrate spamassis into my mta.
>>
>> Is there some C code that I can look at to understand howto do this.
>>
>> Thaks in advance.
>>
>> --
>> Christopher Dobbs
>> Software Developer
>> LybreDyne Technologies
>> (503) 914-0799 x2213
>> http://www.lybredyne.net/
>>
>> NOTICE: The information contained in this e-mail is confidential and may
>> be privileged or otherwise protected from disclosure. This e-mail is
>> intended solely for the use of the named addressee. Please be aware that any
>> other use, printing, copying, disclosure or dissemination may be subject to
>> legal restriction. If you are not the intended recipient, please notify us
>> immediately by return e-mail to the sender and delete from your computer.
>> Although we attempt to sweep e-mail attachments for viruses, it does not
>> guarantee that either are virus-free and accepts no liability for any damage
>> sustained as a result of viruses.
>>
>
> --
> Marc Perkel - Sales/Support
> support@junkemailfilter.com
> http://www.junkemailfilter.com
> Junk Email Filter dot com
> 415-992-3400
>
>


-- 
Christopher Dobbs
Software Developer
LybreDyne Technologies
(503) 914-0799 x2213
http://www.lybredyne.net/

NOTICE: The information contained in this e-mail is confidential and may be
privileged or otherwise protected from disclosure. This e-mail is intended
solely for the use of the named addressee. Please be aware that any other
use, printing, copying, disclosure or dissemination may be subject to legal
restriction. If you are not the intended recipient, please notify us
immediately by return e-mail to the sender and delete from your computer.
Although we attempt to sweep e-mail attachments for viruses, it does not
guarantee that either are virus-free and accepts no liability for any damage
sustained as a result of viruses.

Re: Writing an MTA

Posted by Marc Perkel <su...@junkemailfilter.com>.
I don't know if uou have looked at Exim but it interfaces with 
SpamAssassin and it talks to MySql. Write something as versitile as Exim 
and I'm interested. Have you looked at Exim?

On 7/25/2010 9:39 AM, Christopher Dobbs wrote:
> I am writing an MTA that uses mysql as a backend for storage.
> I want to integrate spamassis into my mta.
>
> Is there some C code that I can look at to understand howto do this.
>
> Thaks in advance.
>
> -- 
> Christopher Dobbs
> Software Developer
> LybreDyne Technologies
> (503) 914-0799 x2213
> http://www.lybredyne.net/
>
> NOTICE: The information contained in this e-mail is confidential and 
> may be privileged or otherwise protected from disclosure. This e-mail 
> is intended solely for the use of the named addressee. Please be aware 
> that any other use, printing, copying, disclosure or dissemination may 
> be subject to legal restriction. If you are not the intended 
> recipient, please notify us immediately by return e-mail to the sender 
> and delete from your computer. Although we attempt to sweep e-mail 
> attachments for viruses, it does not guarantee that either are 
> virus-free and accepts no liability for any damage sustained as a 
> result of viruses.

-- 
Marc Perkel - Sales/Support
support@junkemailfilter.com
http://www.junkemailfilter.com
Junk Email Filter dot com
415-992-3400


Re: Writing an MTA

Posted by Matus UHLAR - fantomas <uh...@fantomas.sk>.
On 25.07.10 12:25, Christopher Dobbs wrote:
> Thanks for all the advice, I will look at spamc.
> 
> I am working on a generic plugin type interface for the mta that will allow
> me to call out to spam/av/etc to handle mail filtering.

you mean, milter?
It has known API and many programs using it.

-- 
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
I don't have lysdexia. The Dog wouldn't allow that.

Re: Writing an MTA

Posted by Dave Funk <db...@engineering.uiowa.edu>.
On Sun, 25 Jul 2010, Christopher Dobbs wrote:

> Thanks for all the advice, I will look at spamc.
>
> I am working on a generic plugin type interface for the mta that will allow
> me to call out to spam/av/etc to handle mail filtering.

It may not be the best in the world, but look at the sendmail 'milter'
interface. Currently it's implemented in two different MTAs (sendmail & 
postfix) and has a whole bunch of different client plugins (for all kinds 
of spam, av, reputation, etc) filtering.

The API has public documentation & source code available.

So if you implement that interface in your MTA you'll auto-magically
have a wealth of filters available for no further effort.

Another other option would be something like the postfix 'pipe' filters.
They're simpler to implement & use but more difficult to do some things
such as SMTP rejects of unwanted messages.

Look at existing MTAs and "borrow" good ideas. ;)

FWIW, I'm prejudiced as I've only ever worked with sendmail & postfix.
Other people can chime in about other MTAs.

-- 
Dave Funk                                  University of Iowa
<dbfunk (at) engineering.uiowa.edu>        College of Engineering
319/335-5751   FAX: 319/384-0549           1256 Seamans Center
Sys_admin/Postmaster/cell_admin            Iowa City, IA 52242-1527
#include <std_disclaimer.h>
Better is not better, 'standard' is better. B{

Re: Writing an MTA

Posted by Christopher Dobbs <cr...@lybredyne.net>.
Thanks for all the advice, I will look at spamc.

I am working on a generic plugin type interface for the mta that will allow
me to call out to spam/av/etc to handle mail filtering.

On Sun, Jul 25, 2010 at 11:36 AM, jdow <jd...@earthlink.net> wrote:

> You might consider looking at the source for the spamc component.
>
> {^_^}
> ----- Original Message ----- From: "Christopher Dobbs" <
> crdobbs@lybredyne.net>
> To: <us...@spamassassin.apache.org>
> Sent: Sunday, 2010/July/25 09:39
> Subject: Writing an MTA
>
>
>
>  I am writing an MTA that uses mysql as a backend for storage.
>> I want to integrate spamassis into my mta.
>>
>> Is there some C code that I can look at to understand howto do this.
>>
>> Thaks in advance.
>>
>> --
>> Christopher Dobbs
>> Software Developer
>> LybreDyne Technologies
>> (503) 914-0799 x2213
>> http://www.lybredyne.net/
>>
>> NOTICE: The information contained in this e-mail is confidential and may
>> be
>> privileged or otherwise protected from disclosure. This e-mail is intended
>> solely for the use of the named addressee. Please be aware that any other
>> use, printing, copying, disclosure or dissemination may be subject to
>> legal
>> restriction. If you are not the intended recipient, please notify us
>> immediately by return e-mail to the sender and delete from your computer.
>> Although we attempt to sweep e-mail attachments for viruses, it does not
>> guarantee that either are virus-free and accepts no liability for any
>> damage
>> sustained as a result of viruses.
>>
>>
>


-- 
Christopher Dobbs
Software Developer
LybreDyne Technologies
(503) 914-0799 x2213
http://www.lybredyne.net/

NOTICE: The information contained in this e-mail is confidential and may be
privileged or otherwise protected from disclosure. This e-mail is intended
solely for the use of the named addressee. Please be aware that any other
use, printing, copying, disclosure or dissemination may be subject to legal
restriction. If you are not the intended recipient, please notify us
immediately by return e-mail to the sender and delete from your computer.
Although we attempt to sweep e-mail attachments for viruses, it does not
guarantee that either are virus-free and accepts no liability for any damage
sustained as a result of viruses.

Re: Writing an MTA

Posted by jdow <jd...@earthlink.net>.
You might consider looking at the source for the spamc component.

{^_^}
----- Original Message ----- 
From: "Christopher Dobbs" <cr...@lybredyne.net>
To: <us...@spamassassin.apache.org>
Sent: Sunday, 2010/July/25 09:39
Subject: Writing an MTA


>I am writing an MTA that uses mysql as a backend for storage.
> I want to integrate spamassis into my mta.
>
> Is there some C code that I can look at to understand howto do this.
>
> Thaks in advance.
>
> -- 
> Christopher Dobbs
> Software Developer
> LybreDyne Technologies
> (503) 914-0799 x2213
> http://www.lybredyne.net/
>
> NOTICE: The information contained in this e-mail is confidential and may 
> be
> privileged or otherwise protected from disclosure. This e-mail is intended
> solely for the use of the named addressee. Please be aware that any other
> use, printing, copying, disclosure or dissemination may be subject to 
> legal
> restriction. If you are not the intended recipient, please notify us
> immediately by return e-mail to the sender and delete from your computer.
> Although we attempt to sweep e-mail attachments for viruses, it does not
> guarantee that either are virus-free and accepts no liability for any 
> damage
> sustained as a result of viruses.
>