On Fri, 7 May 2010 19:34:19 +0200 Stevan Bajić <[email protected]> wrote:
> On Fri, 7 May 2010 17:38:38 +0100 > Martin Wheldon <[email protected]> wrote: > > > Hi, > > > Hello Martin, > > > > I've been following this thread with extreme interest as I am > > currently designing a solution containing DSPAM. After reading and re > > reading the README I hadn't realised that the following was possible. > > > > > Look it from that point: Something like ClamAV is able to work in > > > client/server mode. You can open a socket to the >ClamAV daemon and send > > > stuff to it and it will respond if the message is OK or not. DSPAM offers > > > the same. It is >capable to tell you if a message is SPAM or not. > > > > Could some one point me in the right direction on how it is implemented. > > > you mean the client/server thing in DSPAM? You can talk directly to the DSPAM > socket or TCP address and port (if you don't use ServerDomainSocketPath). > Here an example with TCP against a DSPAM server that has "auto" as ServerMode: > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= > nyx ~ # telnet localhost 24 > Trying 127.0.0.1... > Connected to localhost. > Escape character is '^]'. > 220 DSPAM LMTP GIT Ready > LHLO myident > 250-nyx.vunet.local > 250-PIPELINING > 250-ENHANCEDSTATUSCODES > 250-DSPAMPROCESSMODE > 250-8BITMIME > 250 SIZE > MAIL FROM: <mypassw...@myident> DSPAMPROCESSMODE="--client --classify > --deliver=innocent,spam" > 250 2.1.0 OK > RCPT TO: <[email protected]> > 250 2.1.5 OK > DATA > 354 Enter mail, end with "." on a line by itself > Testing something... nothing important. > . > X-DSPAM-Result: [email protected]; result="Innocent"; class="Innocent"; > probability=0.0807; confidence=1.00; signature=N/A > . > QUIT > 221 2.0.0 OK > Connection closed by foreign host. > nyx ~ # > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= > > Read the README how to setup DSPAM in daemon mode and configure dspam.conf > and add an ident and a password for that ident. You can ad as many > ident/password combinations as you like. > > The communication to the DSPAM daemon in client/server mode is using DLMTP > (this is DSPAM-proprietary LMTP dialect). > btw: You can even use the above client/server mode for training. Here an example using a signature: =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= nyx ~ # telnet localhost 24 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. 220 DSPAM LMTP GIT Ready LHLO myident 250-nyx.vunet.local 250-PIPELINING 250-ENHANCEDSTATUSCODES 250-DSPAMPROCESSMODE 250-8BITMIME 250 SIZE MAIL FROM: <mypassw...@myident> DSPAMPROCESSMODE="--client --source=error --class=innocent --stdout --signature=4,4bd34767155854303915187" 250 2.1.0 OK RCPT TO: <[email protected]> 250 2.1.5 OK DATA 354 Enter mail, end with "." on a line by itself - . 250 2.6.0 <[email protected]> Message accepted for delivery: INNOCENT RSET 250 OK MAIL FROM: <mypassw...@myident> DSPAMPROCESSMODE="--client --source=error --class=spam --stdout --signature=4,4bd34767155854303915187" 250 2.1.0 OK RCPT TO: <[email protected]> 250 2.1.5 OK DATA 354 Enter mail, end with "." on a line by itself - . 250 2.6.0 <[email protected]> Message accepted for delivery: SPAM QUIT 221 2.0.0 OK Connection closed by foreign host. nyx ~ # grep "4,4bd34767155854303915187" $(awk '$1~/^Home$/{print $2"/system.log"}' $(dspam --version|sed -n "s:^.*\-\-sysconfdir=\([^ ']*\).*:\1/dspam.conf:gp")) 1272137575 S [email protected] 4,4bd34767155854303915187 Auto-discard notification 0.410540 [email protected] Quarantined <[email protected]> 1273255294 F <None Specified> 4,4bd34767155854303915187 <None Specified> 0.777631 [email protected] Retrained 1273255306 M <None Specified> 4,4bd34767155854303915187 <None Specified> 0.726019 [email protected] Retrained nyx ~ # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= The client/server mode is very flexible. You could even use the above mechanism to implement a SPAM/HAM button inside a mail client. Even without the need to have the DSPAM WebUI installed or enabled. All you need is to open up that server ip and port to the client and add a ident/password pair into dspam.conf and add code to the mail client to speak directly with the DSPAM daemon using the ident/password from dspam.conf. That's all. > > > Best Regards > > > -- > Kind Regards from Switzerland, > > > > Martin > > > Stevan Bajić > > ------------------------------------------------------------------------------ > > _______________________________________________ > Dspam-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/dspam-user ------------------------------------------------------------------------------ _______________________________________________ Dspam-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dspam-user
