[Dspam-user] Question about dspam/dspamc

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Dspam-user] Question about dspam/dspamc

Raphaël Halimi
Hi,

I use DSPAM in server mode for some years now and relied on LMTP between
Postfix/DSPAM/Cyrus to communicate with each other, so I didn't really
look into the different modes of operation of the dspam binary itself;
but recently it occurred to me that I was calling dspam in
self-contained mode for retraining, whereas I could just call it as a
thin client which would communicate with the already-running server
instance.

So I have a question about the difference between dspam and dspamc
because the README isn't quite clear on this: it gives two contradicting
affirmations.

Between lines 1771 and 1784 we have:

>   The DSPAM agent can then be called the same as if you were running in
>   standard (non-client/server) mode and adding --client to the set of
>   parameters. Running dspam without --client specified will cause DSPAM to
>   revert to its normal non-daemon behavior and establish database connections
>   on its own. The client settings will be loaded from dspam.conf, and the
>   agent will act as a thin client instead. For example:
>
>         dspam --client --user dick jane --deliver=innocent -d %u
>
>   Alternatively, if you'd like to use a thinner client, dspamc is identical
>   to the dspam binary in behavior, but has been stripped down to only include
>   the lightweight client.
>
>         dspamc --user dick jane --deliver=innocent -d %u
...which seems to imply that "dspamc" is equivalent to "dspam --client".

But later, between lines 1892 and 1895, we can read:

>   "dspam" mode notes.
>   In dspam mode, only the dspam client will be connecting to your LMTP server.
>   This can be dspamc (a thin-client) or the dspam binary. In either case,
>   you'll need to specify --client to tell DSPAM to act as a client. DLMTP

...which says that dspamc still needs the "--client" option.

The logic would dictate that the first affirmation is true, and the
second one is false; if that's the case, then the README should be
fixed, as well as dspamc man page (if it can work only as a thin client,
the man page shouldn't mention the --server option, and stress out that
the --client option is useless).

To be clear, in main.cf (Postfix), I had:

> dspam-retrain   unix    -       n       n       -       10      pipe
>   flags=Ru user=dspam argv=/usr/bin/dspam --user ${sender} --class=${nexthop} --source=error

If I replace /usr/bin/dspam with /usr/bin/dspamc, do I have to use the
--client option ? I don't think so, but could someone familiar with the
source code confirm ?

Thanks :)

--
Raphaël Halimi


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Dspam-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dspam-user

signature.asc (968 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Dspam-user] Question about dspam/dspamc

Eric Broch

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
 
Raphaël,

I think 'dspamc' and 'dspam --client' are the same thing.
I don't think one uses dspamc with the --client option. Someone with more experience can correct me if I'm wrong.
I would not use dspamc as there is a dot-stuffing problem with it which truncates email.

Eric



On 12/5/2014 6:32 PM, Raphaël Halimi wrote:
> Hi,
>
> I use DSPAM in server mode for some years now and relied on LMTP between
> Postfix/DSPAM/Cyrus to communicate with each other, so I didn't really
> look into the different modes of operation of the dspam binary itself;
> but recently it occurred to me that I was calling dspam in
> self-contained mode for retraining, whereas I could just call it as a
> thin client which would communicate with the already-running server
> instance.
>
> So I have a question about the difference between dspam and dspamc
> because the README isn't quite clear on this: it gives two contradicting
> affirmations.
>
> Between lines 1771 and 1784 we have:
>
>>   The DSPAM agent can then be called the same as if you were running in
>>   standard (non-client/server) mode and adding --client to the set of
>>   parameters. Running dspam without --client specified will cause DSPAM to
>>   revert to its normal non-daemon behavior and establish database connections
>>   on its own. The client settings will be loaded from dspam.conf, and the
>>   agent will act as a thin client instead. For example:
>>
>>         dspam --client --user dick jane --deliver=innocent -d %u
>>
>>   Alternatively, if you'd like to use a thinner client, dspamc is identical
>>   to the dspam binary in behavior, but has been stripped down to only include
>>   the lightweight client.
>>
>>         dspamc --user dick jane --deliver=innocent -d %u
>
> ...which seems to imply that "dspamc" is equivalent to "dspam --client".
>
> But later, between lines 1892 and 1895, we can read:
>
>>   "dspam" mode notes.
>>   In dspam mode, only the dspam client will be connecting to your LMTP server.
>>   This can be dspamc (a thin-client) or the dspam binary. In either case,
>>   you'll need to specify --client to tell DSPAM to act as a client. DLMTP
>
> ...which says that dspamc still needs the "--client" option.
>
> The logic would dictate that the first affirmation is true, and the
> second one is false; if that's the case, then the README should be
> fixed, as well as dspamc man page (if it can work only as a thin client,
> the man page shouldn't mention the --server option, and stress out that
> the --client option is useless).
>
> To be clear, in main.cf (Postfix), I had:
>
>> dspam-retrain   unix    -       n       n       -       10      pipe
>>   flags=Ru user=dspam argv=/usr/bin/dspam --user ${sender} --class=${nexthop} --source=error
>
> If I replace /usr/bin/dspam with /usr/bin/dspamc, do I have to use the
> --client option ? I don't think so, but could someone familiar with the
> source code confirm ?
>
> Thanks :)
>
>
>
> ------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
>
>
> _______________________________________________
> Dspam-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dspam-user


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (MingW32)
 
iQIcBAEBAgAGBQJUgoKcAAoJEJStyR+XOvDp8iMP/2+p8wHfuMqasmVAVdp4ec0n
xitL7gyEP0FGkOqzxSLR8Yynrm8fWOP5MF4bXBcdpmv5S2+wTENiIgscl/XU6PnK
m4rE35rJJKJ+v6bSrruSOYknKBAgi9zv+mZ5JKZt8+9UDrUoagBqAe/cV25bY1Of
SPA6UAZwpC5Gp4vYvwF0ZxxhHECMrkuTle1JVkVzxjXdzTwtXgTR7VWK1xWQ4YMh
N6g5lsI6vTn4Bx+dT8SBFFoJmHhyT296KcZZ1XPgD7Q6hJ0gxpKVUxdvOP/x+Ijf
la4x4MwKOzlZ+oQxh3+hwDPcesJ2DnHxj3sLRVMFERRur3zaxEdy+jnkmNiIjXGe
eZPeq34ntrvBuvB+8jLANUN07XHtjdLrfwLjjW50tKAGpZLQNiqBK/xN9Vq3FfWS
QmJVKhHaxPsAwvhD85s1g9EIMkpUhGWYF4fiTjDHEioLJiaEYjftEsaQfudJPDhz
kkX9vFXhFBu4qztQYvH468ruas6DuXIIory19VapFVCUtFsugyiDFYwQlUJ/WO8/
GdDJN2qwNGOmgDKPY7qHEr1tM0Z7ABYBlNE+U3Vo358ro37e+4rI+LAL7PKCzc4Y
DJc3cb+ZbY+KBMvh+SdXPVqCSOUC+/du65KwT8mDwV+LW1ulx3kgRR2l3OFtqe3R
Pnc9+UI0TN8++Iymmrt9
=ddvk
-----END PGP SIGNATURE-----


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Dspam-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dspam-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Dspam-user] Question about dspam/dspamc

Stevan Bajić
On 06.12.2014 05:14, Eric Broch wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
 
Raphaël,

I think 'dspamc' and 'dspam --client' are the same thing.
I don't think one uses dspamc with the --client option. Someone with more experience can correct me if I'm wrong.
I would not use dspamc as there is a dot-stuffing problem with it which truncates email.

What dot-stuffig issue are you talking about?



Eric


-- 
 Kind Regards from Switzerland,

 Stevan Bajić


On 12/5/2014 6:32 PM, Raphaël Halimi wrote:
> Hi,
>
> I use DSPAM in server mode for some years now and relied on LMTP between
> Postfix/DSPAM/Cyrus to communicate with each other, so I didn't really
> look into the different modes of operation of the dspam binary itself;
> but recently it occurred to me that I was calling dspam in
> self-contained mode for retraining, whereas I could just call it as a
> thin client which would communicate with the already-running server
> instance.
>
> So I have a question about the difference between dspam and dspamc
> because the README isn't quite clear on this: it gives two contradicting
> affirmations.
>
> Between lines 1771 and 1784 we have:
>
>>   The DSPAM agent can then be called the same as if you were running in
>>   standard (non-client/server) mode and adding --client to the set of
>>   parameters. Running dspam without --client specified will cause DSPAM to
>>   revert to its normal non-daemon behavior and establish database connections
>>   on its own. The client settings will be loaded from dspam.conf, and the
>>   agent will act as a thin client instead. For example:
>>
>>         dspam --client --user dick jane --deliver=innocent -d %u
>>
>>   Alternatively, if you'd like to use a thinner client, dspamc is identical
>>   to the dspam binary in behavior, but has been stripped down to only include
>>   the lightweight client.
>>
>>         dspamc --user dick jane --deliver=innocent -d %u
>
> ...which seems to imply that "dspamc" is equivalent to "dspam --client".
>
> But later, between lines 1892 and 1895, we can read:
>
>>   "dspam" mode notes.
>>   In dspam mode, only the dspam client will be connecting to your LMTP server.
>>   This can be dspamc (a thin-client) or the dspam binary. In either case,
>>   you'll need to specify --client to tell DSPAM to act as a client. DLMTP
>
> ...which says that dspamc still needs the "--client" option.
>
> The logic would dictate that the first affirmation is true, and the
> second one is false; if that's the case, then the README should be
> fixed, as well as dspamc man page (if it can work only as a thin client,
> the man page shouldn't mention the --server option, and stress out that
> the --client option is useless).
>
> To be clear, in main.cf (Postfix), I had:
>
>> dspam-retrain   unix    -       n       n       -       10      pipe
>>   flags=Ru user=dspam argv=/usr/bin/dspam --user ${sender} --class=${nexthop} --source=error
>
> If I replace /usr/bin/dspam with /usr/bin/dspamc, do I have to use the
> --client option ? I don't think so, but could someone familiar with the
> source code confirm ?
>
> Thanks :)
>
>
>
> ------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
>
>
> _______________________________________________
> Dspam-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dspam-user


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (MingW32)
 
iQIcBAEBAgAGBQJUgoKcAAoJEJStyR+XOvDp8iMP/2+p8wHfuMqasmVAVdp4ec0n
xitL7gyEP0FGkOqzxSLR8Yynrm8fWOP5MF4bXBcdpmv5S2+wTENiIgscl/XU6PnK
m4rE35rJJKJ+v6bSrruSOYknKBAgi9zv+mZ5JKZt8+9UDrUoagBqAe/cV25bY1Of
SPA6UAZwpC5Gp4vYvwF0ZxxhHECMrkuTle1JVkVzxjXdzTwtXgTR7VWK1xWQ4YMh
N6g5lsI6vTn4Bx+dT8SBFFoJmHhyT296KcZZ1XPgD7Q6hJ0gxpKVUxdvOP/x+Ijf
la4x4MwKOzlZ+oQxh3+hwDPcesJ2DnHxj3sLRVMFERRur3zaxEdy+jnkmNiIjXGe
eZPeq34ntrvBuvB+8jLANUN07XHtjdLrfwLjjW50tKAGpZLQNiqBK/xN9Vq3FfWS
QmJVKhHaxPsAwvhD85s1g9EIMkpUhGWYF4fiTjDHEioLJiaEYjftEsaQfudJPDhz
kkX9vFXhFBu4qztQYvH468ruas6DuXIIory19VapFVCUtFsugyiDFYwQlUJ/WO8/
GdDJN2qwNGOmgDKPY7qHEr1tM0Z7ABYBlNE+U3Vo358ro37e+4rI+LAL7PKCzc4Y
DJc3cb+ZbY+KBMvh+SdXPVqCSOUC+/du65KwT8mDwV+LW1ulx3kgRR2l3OFtqe3R
Pnc9+UI0TN8++Iymmrt9
=ddvk
-----END PGP SIGNATURE-----



------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk


_______________________________________________
Dspam-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dspam-user


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Dspam-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dspam-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Dspam-user] Question about dspam/dspamc

Eric Broch
Stevan,

It was the below exchange on 9/3/2014 between you and me:

Hi Stevan,

Hello Eric,

I sent the email you requested to your private email account in a zip file.

I got the mail. Tested the result with normal "dspam" and with "dspamc" and with "dspam --client". Using plain old "dspam" worked flawlessly while using "dspamc" and "dspam --client" resulted in stripping data from the mail.

Looking at the mail source the error occurred at line 3 (line numbering added by me):

001 has low airflow of 92 cfm for exhaust down low which equates to .4 cfm/ft2=
002 .
003 <b>I suggest that this ducting be modified before I return. Another low duc=

So it is clearly a dot stuffing issue. I don't know who is to blame here. Usually the client/sender is supposed to do the dot stuffing. The 'cut' command is not intelligent enough to do this. A small SED command however could do that:
( sed '/^$/q' 'email' ; echo ; sed '1,/^$/d' 'email' | sed 's:^\.$:..:g' ) | dspamc --user user@domain --stdout --deliver=innocent,spam

I don't know how to intelligently catch this issue in the code (it has been a while since I looked or touched the code). IMHO piping data to the DSPAM binary should not suffer from this dot stuffing. If you would send that directly to LMTP/DLMTP socket then I would say that it is clearly your problem but piping? I don't know.

Thanks!

Eric


Eric


On 12/6/2014 12:15 AM, Stevan Bajić wrote:
> On 06.12.2014 05:14, Eric Broch wrote:
>>

Raphaël,

I think 'dspamc' and 'dspam --client' are the same thing.
I don't think one uses dspamc with the --client option. Someone with more experience can correct me if I'm wrong.
I would not use dspamc as there is a dot-stuffing problem with it which truncates email.

> What dot-stuffig issue are you talking about?



Eric


> --
>  Kind Regards from Switzerland,

>  Stevan Bajić


On 12/5/2014 6:32 PM, Raphaël Halimi wrote:
> Hi,

> I use DSPAM in server mode for some years now and relied on LMTP between
> Postfix/DSPAM/Cyrus to communicate with each other, so I didn't really
> look into the different modes of operation of the dspam binary itself;
> but recently it occurred to me that I was calling dspam in
> self-contained mode for retraining, whereas I could just call it as a
> thin client which would communicate with the already-running server
> instance.

> So I have a question about the difference between dspam and dspamc
> because the README isn't quite clear on this: it gives two contradicting
> affirmations.

> Between lines 1771 and 1784 we have:

>>   The DSPAM agent can then be called the same as if you were running in
>>   standard (non-client/server) mode and adding --client to the set of
>>   parameters. Running dspam without --client specified will cause DSPAM to
>>   revert to its normal non-daemon behavior and establish database connections
>>   on its own. The client settings will be loaded from dspam.conf, and the
>>   agent will act as a thin client instead. For example:

>>         dspam --client --user dick jane --deliver=innocent -d %u

>>   Alternatively, if you'd like to use a thinner client, dspamc is identical
>>   to the dspam binary in behavior, but has been stripped down to only include
>>   the lightweight client.

>>         dspamc --user dick jane --deliver=innocent -d %u

> ...which seems to imply that "dspamc" is equivalent to "dspam --client".

> But later, between lines 1892 and 1895, we can read:

>>   "dspam" mode notes.
>>   In dspam mode, only the dspam client will be connecting to your LMTP server.
>>   This can be dspamc (a thin-client) or the dspam binary. In either case,
>>   you'll need to specify --client to tell DSPAM to act as a client. DLMTP

> ...which says that dspamc still needs the "--client" option.

> The logic would dictate that the first affirmation is true, and the
> second one is false; if that's the case, then the README should be
> fixed, as well as dspamc man page (if it can work only as a thin client,
> the man page shouldn't mention the --server option, and stress out that
> the --client option is useless).

> To be clear, in main.cf (Postfix), I had:

>> dspam-retrain   unix    -       n       n       -       10      pipe
>>   flags=Ru user=dspam argv=/usr/bin/dspam --user ${sender} --class=${nexthop} --source=error

> If I replace /usr/bin/dspam with /usr/bin/dspamc, do I have to use the
> --client option ? I don't think so, but could someone familiar with the
> source code confirm ?

> Thanks :)



> ------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk


> _______________________________________________
> Dspam-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dspam-user

>>
>>
>>
>> ------------------------------------------------------------------------------
>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
>> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
>> with Interactivity, Sharing, Native Excel Exports, App Integration & more
>> Get technology previously reserved for billion-dollar corporations, FREE
>> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
>>
>>
>> _______________________________________________
>> Dspam-user mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/dspam-user
>
>
>
> ------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
>
>
> _______________________________________________
> Dspam-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dspam-user




------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Dspam-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dspam-user
Loading...