TBP API - need help!

2003-02-13 Thread Alexey N. Vinogradov
Hello TBDEV.

..Can anybody explain me the context and interface for the functions
in a plugin (well, I try to guess something myself):

function TBP_GetStatus: Integer; stdcall;
function TBP_NeedConfig: Integer; stdcall;
function TBP_NeedCOM: Integer; stdcall;
function TBP_Setup: Integer; stdcall;
  ...So, here do my questions begin: what is the meaning of every of this
  functions? As I guess it must return zero if all is right. How
  other results are interpreted? Just as non-zero, or an exact
  value is also important? And also what is the algorithm when The
  Bat! receives, for example TBP_NeedConfig=0? Does it mean that in this case the
  TBP_Setup will be called as the next function?

-- 
Sincerely,
 
  
  :/+--\ :
  :   / |   )  A L E X E Y   :
  :  /--|--( :
  : /   |   )  V I N O G R A D O V   :
  :   -/-   +--/ :
  :..:

   mailto:[EMAIL PROTECTED]



Current version is 1.62 | Using TBDEV information:
http://www.silverstones.com/thebat/TBUDLInfo.html



Re[2]: Regular expressions in AntiSpam: is it possible?

2003-02-21 Thread Alexey N. Vinogradov
Hello, Task.
You wrote in mid:[EMAIL PROTECTED]

TC En relación a lo que Alexey en su momento posteó:

TC   send the algoritm of your idea and i will make it!

ANV...is it possible to use the regular expression machine from
ANVTne Bat! in a custom antispam filter?..

I think this is not necessary now at all! I found the reference and
ready realization on http://www.pcre.org/ (as the pcre.dll, size
48kB). If you want, you can also use it! It makes a life much more
easy :). I think that The Bat uses the same one but statically
linked... If it is possible to ask the developers to use this library as
dynamically linked (i.e. as DLL file), then it would be possibly to
use in a custom plugin without specially deploying the dll.


-- 
Sincerely,
 Alexey.
Using TB 1.63b7 on WinXP SP1 Corp + MUI RU, spelling by ORFO2002
   mailto:[EMAIL PROTECTED]



Current version is 1.62 | Using TBDEV information:
http://www.silverstones.com/thebat/TBUDLInfo.html


Re[4]: Regular expressions in AntiSpam: is it possible?

2003-02-22 Thread Alexey N. Vinogradov
Hello, Task. 
You wrote in mid:[EMAIL PROTECTED]

TC and I don't undertand: what are you thinking men please, explain
TC you.
TC first question: what is a regular expression.

Well, the simplest example: you can see my letter-prefix:
You wrote in mid:[EMAIL PROTECTED]. This is
generated automatically by template using regular expression. Any
letter contain ID as [EMAIL PROTECTED]. You
need to insert the mid:; into the angle brackets. It realized by just
one line in the answer template:

%SetPattRegExp=\(.*)\ You wrote in mid:%RegExpMatch=%OMSGID;

The pattern for regular expression is \(.*)\. The first \ and
the last \ simple mean  and . Phrase in parentheses (.*)
means the very subsrting which will be returned as a result. Inside
the phrase: . called 'atom' and means any symbol, * called
'quantifier', is attached to . and means previous atom any times,
so .* means some symbols. By applying this whole regexp pattern to
a string enclosed in angle brackets, like
'[EMAIL PROTECTED]' you'll get the string
without brackets, ie. '[EMAIL PROTECTED]'
because the brackets in the pattern are outside the parentheses. So
the macros defines the pattern '\(.*)\' by %SetPattRegExp, then
applies it to message ID by %RegExpMatch='%OMSGID' and then places the
result between You wrote in mid:; and .


...just few more examples:

...if you have to find 'elephant' in a letter, you just need to define
appropriate pattern for recognizing by it different variants (let me
treat non-empty result as 'true' and empty string as 'false')

'\belephant\b'FALSE for 'my elephant red' and TRUE for 'telephantom'
'\Belephant\B'TRUE for 'my elephant red' and FALSE for 'telephantom'
'\W(elephant)\W'  TRUE for '$elephant#' and FALSE for '3elephants', 's elephant df'
'e\s+l\s+e\s+p\s+h\s+a\s+n\s+t' (the \s+ between every letters)
  TRUE for 'elephant' and 'e l e ph   a nt'
'(?s)e\.?l\.?e\.?p\.?h\.?a\.?n\.?t' (the \.? between every letters)
  TRUE for 'elephant', 'e.l.e.p.h.a.n.t' and
'e
l
p
h
a
n
t'

So, if you need to filter any specific variant you mus just construct
the regexp from your signal word by adding to it prefix and/or suffix
and (if necessary) by inserting something between letters.

That us take a line for search, for example our 'elephant'. We can
test a text for the line by two steps:

1. Construct a regexp pattern from signal line:

- for 'partial search' - leave the line:
  'elephant' -- 'elephant' (no change)
  
- for 'wholeword search', add '\b' before and after line;
  'elephant' -- '\belephant\b'
  
- for 'space-delimited search', add '\s+' between letters
  'elephant' -- 'e\s+l\s+e\s+p\s+h\s+a\s+n\s+t'

- for any other phantasy - just learn how to make appropriate regexp.

2. Just apply constructed pattern to a target text by calling
pcre.dll. That's all!



TC we can make a plug'in that call a dll, and use the dll in the bat!

I meant that The Bat! is already uses regular expressions! And if I
understand clear, it uses the same pcre.dll, but it is statically
linked into TheBat.exe (I think that Stefan Tanurkov knows it better :)
My point was if Tha Bat! developers make the library accessible for
sharing then it would not be necessary for 'outsiders' to deploy an
extra copy of the library with their plugins.


-- 
Sincerely,
 Alexey.
Using TB 1.63b7 on WinXP SP1 Corp + MUI RU, spelling by ORFO2002
   mailto:[EMAIL PROTECTED]



Current version is 1.62 | Using TBDEV information:
http://www.silverstones.com/thebat/TBUDLInfo.html


Baesyan filter - WORKING test pre-release

2003-03-29 Thread Alexey N. Vinogradov
Hello, Mark. 
You wrote in mid:[EMAIL PROTECTED]

MW Alexey-

MW What kind of error are you getting? Is your plugin not showing up in
MW the list of available plugins or are you getting an error on selecting
MW it? I'm assuming that use dynamic RTL is unchecked in the Linker
MW settings. I think that's the only setting I changed on my setup except
MW to make sure the Target file extension is set to tbp.

MW -Mark Wieder

MW  Using The Bat! v1.63 Beta/7 on Windows 2000 5.0 Build 2195 Service Pack 2

I have already localized this problem. It was the subsequence of
so-called name decoration. With one option it generate one names,
with other - others. The Bat! needs exactly named functions in TBP -
like TBP_GetSpamScore but not __TBP_GetSpamScore as it generated
according to C-decoration.

First, I recompiled all plugin in MS Visual C++ V6 SP4. It was the
simplest task because the plugin written in ANSI C++. Then I
investigated MSDN on name decoration. And finally added .def file with
exact names:

LIBRARY vsbaesyan
EXPORTS
TBP_Initialize  @1
TBP_NeedConfig  @2
TBP_GetName @3
TBP_GetVersion  @4
TBP_GetStatus   @5
TBP_GetSpamScore@6
TBP_Setup   @7
TBP_Finalize@8
TBP_NeedCOM @9


Now all is working. By using MS Visual Studio I also solved the
problem with run-time libraries at all. Compiled version includes all
what necessary. And this library takes only 274kb versus 854kb when I
compiled it by C++ Builder. After compressing with ASPack it became
131kb - only 3kb more than previous one WITHOUT runtimes.

Previous version (which needs libraries) still exist at
http://klirik.narod.ru/arc/baesyan.tbp (125kb)

NEW tester's build is avaliable at
http://klirik.narod.ru/arc/vsbaesyan.tbp (128kb)

This last one I ask you (and everybody who reads this posting)
to test.

All necessary information about what is necessary I described in
mid:[EMAIL PROTECTED]


-- 
Sincerely,
 Alexey.
Using TB 1.63b7 on WinXP SP1 Corp + MUI RU, spelling by ORFO2002
   mailto:[EMAIL PROTECTED]



Current version is 1.62 | Using TBDEV information:
http://www.silverstones.com/thebat/TBUDLInfo.html


Re[2]: Baesyan filter - WORKING test pre-release

2003-03-29 Thread Alexey N. Vinogradov
Hello, Kjartan. 
You wrote in mid:[EMAIL PROTECTED]

KÁ I tried using both versions of your plugin.

KÁ When I tried to install the first one (build using C++ builder) I got
KÁ error message telling me it couldnt find CC3260.DLL. I assume this DLL
KÁ comes with C++ Builder and is not statically linked to the plugin.

KÁ Anyhow. I tried the second version, which you compiled with VS. When i
KÁ load that one The Bat starts taking up more and more memory. I killed
KÁ it when it was consuming 400 MB in RAM (and still growing).

KÁ My regard.rbd file is around 1 MB in size. I built it using ~3000
KÁ spam mails and ~5000 real mails.

KÁ Any idea what may be wrong?

It's sounds strange... :(. But my mail corpus is more humble - I have
only 700 letters of spam and 1000 of non-spam. My regard.rbd contains
about 2 key tokens and takes around 400KB. I tried it on Windows
XP and Windows 98. In both cases all was o'key.

The first thing I think can be probed is to make smaller regard.rbd.
Can you make new rgd - with parameters like my own has - and try it
again? If all will be right then I will work on direction of memory
using. If all will go wrong I would like to have you regard.rbd to
touch it.

Second guess - may be it happens because of different locales. In this
case I will provide default options for it in release. Now plugin (and
regard base machine) depends (silently) also from the tables XLT which
I looked for in HKCU\Software\RIT\The Bat!\XLT.

Third, I also found one fantom error which arises from time to
time during mail checking. The error is that sometimes regarder method
in GetSpamScore does'nt be called or arise an error. I see in log that
all is right just to the moment of mail checking itself. Then in some
cases function is just stops and no regarding is returning.

Fourth - may be because of log-system itself. I use a simpliest way -
just create an instance of ostringstream at the TBInitialize and
append it to file in TBFinalize. If during work some eternal loop
arises (simple no guesses where it can be) it just fill the memory by
junk logs. In this case it can be good to turn log system off (just
for testing purposes).

To try last guess I maked a compilation without log system at all.
(And so it does not create or require c:\baesyan\baesyan.log at all).

Also I maked a compilation with very big log - it just logs all what
happens and it can help in locating of exact place where an error
occured. If you have a time, please, try them both.

http://klirik.narod.ru/arc/vsbaeslog.tbp (128kb)

http://klirik.narod.ru/arc/vsbaesnolog.tpb (126kb)

Also you can see the source for both compilation in attachment.


-- 
Sincerely,
 Alexey.
Using TB 1.63b7 on WinXP SP1 Corp + MUI RU, spelling by ORFO2002
   mailto:[EMAIL PROTECTED]

baesyan.cpp
Description: Binary data

Current version is 1.62 | Using TBDEV information:
http://www.silverstones.com/thebat/TBUDLInfo.html


Re[2]: Baesyan filter - WORKING test pre-release

2003-03-29 Thread Alexey N. Vinogradov
Hello, Kjartan. 
You wrote in mid:[EMAIL PROTECTED]

ANV http://klirik.narod.ru/arc/vsbaeslog.tbp (128kb)

ANV http://klirik.narod.ru/arc/vsbaesnolog.tpb (126kb)

KÁ Neither of these files are found when i try to download them, are you
KÁ sure the URLs are correct? Feel free to send them as an attachment in
KÁ the e-mail if you are having problem with your web site.

KÁ - kjarri

Sorry... I just forgot to upload them immediately. :) All is corrected
now...

-- 
Sincerely,
 Alexey.
Using TB 1.63b7 on WinXP SP1 Corp + MUI RU, spelling by ORFO2002
   mailto:[EMAIL PROTECTED]



Current version is 1.62 | Using TBDEV information:
http://www.silverstones.com/thebat/TBUDLInfo.html


Re[2]: Baesyan filter - WORKING test pre-release

2003-03-30 Thread Alexey N. Vinogradov
Hello, Kjartan. 
You wrote in mid:[EMAIL PROTECTED]


ANV It's sounds strange... :(. But my mail corpus is more humble - I have
ANV only 700 letters of spam and 1000 of non-spam. My regard.rbd contains
ANV about 2 key tokens and takes around 400KB. I tried it on Windows
ANV XP and Windows 98. In both cases all was o'key.

KÁ I did build a new regard file with ~200 spam mails and ~200 non spam
KÁ mails. The new regard.rdb file is around 100KB in size.

KÁ This gave the same result as before. The Bat! started to consume more
KÁ and more memory until i killed it.

KÁ Then I tried both of the new builds of the plugin you gave me (the one
KÁ w/o writing to log, and the other one which wrote alot of information
KÁ to the log file).

KÁ Both of the new builds failed the same way.

KÁ Another observation is that there is no log file created, so the
KÁ plugin must be failing before it tries to write the log file.

No, it can't. The log file is checked only when you finish your work
in The Bat! In no-log version it does'nt exist at all. If you say that
it doesn't work in other cases than it can't be a problem with
logfile.

My only guess is a bug which I described in describing the learning
machine - with quantity of tokens. Because of it you can build wrong
file with negative quantity - which regarded as very-very big
positive number. Then TBP_Initialize will try to read this huge number
of tokens...

Of course I corrected this bug and you can try to build regard.rbd
again by updated:

http://klirik.narod.ru/arc/baesyan.exe  (286KB)

If it doesn't help, I want to ask you two things.

At first, when exactly the problem arises? Variants is:

1. It happens when you try to install the plugin into The Bat! In
this case The Bat! calls the critical functions of the plugin in next order:

 1. TBP_Initialize (critical - opens and reads regard.rbd)

 2. TBP_GetStatus (non-critical)

 3. TBP_NeedConfig (non-critical - just stub always returned 0)

if NeedConfig returns wrong (-1) then
   
 3a. TBP_Setup (non-critical - never called because of TBP_NeedConfig)

 4. Two times TBP_GetName (non-critical)

 5. Two times TBP_GetVersion (non-critical)

So, if problem arises when you only try to install the plugin than
the only place where it can occur is TBP_Initialize. It can be because
of wrong regard.rbd. In this case I need you regard.rbd to touch.
Can you, please, send it to me?

2. Plugin is installed correctly and show himself in The Bat!. The
problem arises when you receive a letter - and real filtering actually
needed. In this case the critical section is TBP_GetSpamScore.

3. The problem arises when exiting The Bat!. Theoretically it can be
because of log. Theoretically - because if opening of logfile is
fail then the plugin doesn't try to write into it.


In attachment - real log created when I receive this your letter and
one spam.


KÁ My system is Windows XP with all service packs applied and with all,
KÁ except the very latest, critical updates applied.

KÁ Best regards,
KÁ Kjartan



-- 
Sincerely,
 Alexey.
Using TB 1.63b7 on WinXP SP1 Corp + MUI RU, spelling by ORFO2002
   mailto:[EMAIL PROTECTED]

***
  N E W   R E C O R D
***

Initialization completed.
NeedConfig called and returned 0.
1001: TBP_GetSpamScore called.. OK.
1001: Checking regarding table.. OK.
1001: Getting raw body message from The Bat!.. OK.
1001: Creating an instanse of frequency dictionary.. OK.
1001: Creatin an email parser instance for parsing the letter.. OK.
1001: Asigning the letter to emal parser.. OK.
1001: Parsing the letter.. OK.
1001: Receiving user info about the letter.. OK.
[EMAIL PROTECTED]
1001: Destroying email parser.. OK.
1001: Freeing processed raw email.. OK.
1001: Initializing the filter for 15 most interesting tokens.. OK.
1001: Regarding parsed frequency dictionary.. OK.
1001: Regarded value:  0.99
1001: Value for The Bat!: 99
1001: : ---
1001: services:  0.99
1001: request:  0.01
1001: private:  0.01
1001: performance:  0.99
1001: notified:  0.99
1001: information!:  0.99
1001: affiliate:  0.99
1001: _H Windows-1252:  0.99
1001: _H +0400:  0.01
1001: Submit:  0.01
1001: Special:  0.99
1001: Instructions:  0.99
1001: Help:  0.01
1001: Edition:  0.01
1001: AntiVirus:  0.01
1001: : ---
1001: Destroying used frequency dictionary.. OK.
1001: TBP_GetSpamScore successfully finished.
1002: TBP_GetSpamScore called.. OK.
1002: Checking regarding table.. OK.
1002: Getting raw body message from The Bat!.. OK.
1002: Creating an instanse of frequency dictionary.. OK.
1002: Creatin an email parser instance for parsing the letter.. OK.
1002: Asigning the letter to emal parser.. OK.
1002: Parsing the letter.. OK.
1002: Receiving user info about the letter.. OK.
[EMAIL PROTECTED]
1002: Destroying email parser.. OK.
1002: 

Re: problems with bayesian filter

2003-03-30 Thread Alexey N. Vinogradov
Hello, rhabib001. 
You wrote in mid:[EMAIL PROTECTED]

ryc Hello.  I've downloaded the new bayesian spam filter (the detailed
ryc logging version) and the machine generating engine (updated version)
ryc and have created a regard.rbd file and placed it in c:\baesyan.  The
ryc log file is generated correctly, however, no incoming emails seem to
ryc get filtered. I have attached the log file in case this can be
ryc informative.

Thank's to your attention! I investigated your log. One bug according
to this log I successfully localized. It is really my bug and I
mentioned it on one of last postings. Another - may be your mistake.
As you can see in your file, some letters were successfully filtered
and regarded as non-spam.

You can found their most interesting tokens and final regard
returned to The Bat, namely zero.

If any of them includes a spam then the really problem is in your
regarding base - either you confused spam and non-spam corpuses when
you create your regarding base, either your regarding base is not
enough yet. But first two of them seems to be the letters from The
Bat! conference, so, it isn't a spam.

The rest of regarded letters, as I say, is my error, and I am working
to fix it.


ryc Also, how is the junk folder created.  Does it have to be created
ryc manually and a flag set to identify it as the junk folder or will it
ryc be created automatically the first time an email is classified as
ryc junk?

Yes. Folder named Junk mail will be created in every mailbox when
some correctly-regarded spam will arise.




-- 
Sincerely,
 Alexey.
Using TB 1.63b7 on WinXP SP1 Corp + MUI RU, spelling by ORFO2002
   mailto:[EMAIL PROTECTED]



Current version is 1.62 | Using TBDEV information:
http://www.silverstones.com/thebat/TBUDLInfo.html


Re[2]: problems with bayesian filter

2003-03-30 Thread Alexey N. Vinogradov
Hello, rhabib001. 
You wrote in mid:[EMAIL PROTECTED]


ryc I have trained the good dictionary on 745 letters, but the spam
ryc dictionary on only 35 letters.  Could this be the problem (I have
ryc attached the regard.rdb file).

Wow!!! I will see to your file, but, please, in future - sent all big
attachment DIRECTLY to me, to my private address. Now you sent it to
everybody in this list. I think, somebody will angry to you for it :)

I will answer quite latter...


-- 
Sincerely,
 Alexey.
Using TB 1.63b7 on WinXP SP1 Corp + MUI RU, spelling by ORFO2002
   mailto:[EMAIL PROTECTED]



Current version is 1.62 | Using TBDEV information:
http://www.silverstones.com/thebat/TBUDLInfo.html


Baesyan filter - bug fixed (still test pre-release!)

2003-03-31 Thread Alexey N. Vinogradov
Hello, tbdev.

One bug has been fixed in filter baesyan.
The bug was that if a letter contain token consists whole from !
then during degeneration an error occured and the filter failed. So,
any letter includes this kind of tokens seemed to be non-spam
because of this fail.

Fixed version you can download here:

http://klirik.narod.ru/arc/baesnolog.tbp

http://klirik.narod.ru/arc/baes.tbp

(I still recommend you to use last (logged) version to send me a log
if any bug arises).

For this moment no other serious errors found.

In my own testing: since the first build I received 92 spam letters
and about 25 non-spam (understand now, why I began to write
the filter :). From these letters I has no false positives (i.e. none
of my good mail was accidentally deleted as spam) and 1 false negative
(i.e. one spam letter came to my mailbox). Also it were about 10 false
positives raised because of the just fixed bug. I refiltered these
letters after now and all of them were regarded as spam. So, total
effectivity (for the moment) is:

0%  (0 of 25) false positives and
1.1%(1 of 92) false negative.

I use the regarding base of 650 spam and about 800 non-spam letters.

In future:

   1. New rbd-generating engine (principle is same, but will be
   changed user interface and some options added). Also it seems to be
   good to automatically recognize and do something with PGP- or
   S-MIME- encrypted messages - throw them at all or at least keep
   them as hash values due to reduce a dictionary.

   2. Filter settings will be stored in the registry. Or - I found
   that if TBP_NeedConfig returns -1 then The Bat! himself adds a
   section [Filterdata] in TBPlugin.INI. Now this section is empty but
   I think in future The Bat! developers will give a possibility to
   store a settings locally for every mailbox (in registry it will be
   global settings).

   3. Adapt rbd-generating to other mailbase formats - because as I
   know SecureBat is also exist and has his mailbases encrypted.
   This problem for this very program can be solved by other mailbase
   imported formats, for example, unix-mailbox.

   4. Self-training feature. Now I guess it can be like a question to
   a user after every 50 received letters (for example) with asking
   him to confirm the grade of all letters - or, as a case - to
   confirm only questionable letters automatically regarded in some
   definite interval of spaminess (21-80% for example). After that
   new grade will be appended to regard.rbd. So, the base will be
   always fresh and it wouldn't be necessary to use rbd-generating
   engine to refresh it.

   This is my own ideas. If anyone else has some?
   

-- 
Sincerely,
 Alexey.
Using TB 1.63b7 on WinXP SP1 Corp + MUI RU, spelling by ORFO2002
  mailto:[EMAIL PROTECTED]



Current version is 1.62 | Using TBDEV information:
http://www.silverstones.com/thebat/TBUDLInfo.html


Re[2]: problems with bayesian filter

2003-03-31 Thread Alexey N. Vinogradov
Hello, rhabib001. 
You wrote in mid:[EMAIL PROTECTED]


ryc One thing I don't understand about the log is that if multiple
ryc messages are downloaded, the log doesn't reflect this.  Is this a bug?

As I understand myself, The Bat can call multiple instances of
filtering procedure in a time. For this reason it give to every call a
number, usually begins from 1001. By this reason I write into log also
this unique number (it is unique in the bounds of current The Bat!
session). You can see this numbers in the beginning of every line
logged during mailcheck. And there are no such lines for global plugin
functions like getname or getversion. Your log has combined the
logs of first version and last, so there are no such numbers at all
at the beginning of the log.

 If any of them includes a spam then the really problem is in your
 regarding base - either you confused spam and non-spam corpuses when
 you create your regarding base, either your regarding base is not
 enough yet.

ryc I have trained the good dictionary on 745 letters, but the spam
ryc dictionary on only 35 letters.  Could this be the problem (I have
ryc attached the regard.rdb file).

This is the feature of method itself - you can investigate it from
mathematically viewpoint - the numbers of spam and non-spam base
(counted in letters) ought to be equal. Simple speaking, your base
very well known what is not-spam, but has a relative hazy idea of
what is spam. You need more spam to work, - but this is total problem
with this method of filtering! You can, of course, download somewhere
a base with spam, but the problem is that in different countries spam
is different. Main grain of this method is that all user's regarding
bases are different, because their grades includes also knowledge of
concrete private user mail. So, it is very hard for spammers to cheat
many of such filters simultaneously. From the other hand, spam base
seems not to be such different from user to user, because spam is a
mass mailing. So you can ask a friend to send you many (real) spam and
make a better base. Or you can just take some good letters and make
a new base with relatively equal quantity of spam and non-spam.

-- 
Sincerely,
 Alexey.
Using TB 1.63b7 on WinXP SP1 Corp + MUI RU, spelling by ORFO2002
   mailto:[EMAIL PROTECTED]



Current version is 1.62 | Using TBDEV information:
http://www.silverstones.com/thebat/TBUDLInfo.html


Re[2]: Baesyan filter - bug fixed (still test pre-release!)

2003-04-01 Thread Alexey N. Vinogradov
Hello, rhabib001. 
You wrote in mid:[EMAIL PROTECTED]

 For this moment no other serious errors found.

ryc Hi Alexey.  The bug where the connection centre doesn't close down
ryc after retrieving mail still persists in both the log and no-log
ryc version of the filter.  So basically, when downloading mail, the last
ryc message is not fully retrieved and the connection centre hangs. Trying
ryc to delete the retrieval job or aborting it in the connection centre
ryc doesn't work and the only way to get out of tb is to kill its process
ryc through the windows task manager. This doesn't happen if the bayesian
ryc filter is not used.

Hm... A last message... It sounds strange...

1. Does it became after the fixing last bug or it were same before
(with the version wrote log you sent me before)?

2. Does this occur when this message is retrieving or when The Bat!
shows in connection center Importing mail...?

3. What is content of own log of The Bat! in these cases? Is it
created at all?

4. And also - to my PRIVATE mail ([EMAIL PROTECTED]) - can you
send your regard.rbd (only if it changed from your last posting,
because I've already have a one) and any of mail which got stuck? If you
can, please, save such mail in The Bat! as .EML file and send it to me
as attachment. It is necessary for me to exactly create your situation
on my computer.

5. Technical information: what kind of computer (main processor,
size of memory, version of Windows) do you use?

-- 
Sincerely,
 Alexey.
Using TB 1.63b7 on WinXP SP1 Corp + MUI RU, spelling by ORFO2002
   mailto:[EMAIL PROTECTED]



Current version is 1.62 | Using TBDEV information:
http://www.silverstones.com/thebat/TBUDLInfo.html


Baesyan filter - the bug fixed

2003-04-02 Thread Alexey N. Vinogradov
Hello, tbdev.

The bug discussed below in mid:[EMAIL PROTECTED] and
mid:[EMAIL PROTECTED] has been fixed.

It seems that it was because of function call convention. It worked
correctly in Windows XP and other systems (like Windows 9x) but cause
The Bat! to stuck on Windows 2000. Now it is fixed.

Thanks to Arkadiusz Gawlik, Reza Habib.

Now I am about to finish new regarding base generating engine which
will provide more options which now are ready but hidden.

Also I would like to see reports from any other tester, if any,
because if no other bugs are found then I can begin to write new
features for the plugin. The next one, I think, will be self-training
feature.

-- 
Sincerely,
 Alexey.
Using TB 1.63b7 on WinXP SP1 Corp + MUI RU, spelling by ORFO2002
  mailto:[EMAIL PROTECTED]



Current version is 1.62 | Using TBDEV information:
http://www.silverstones.com/thebat/TBUDLInfo.html


Re[2]: Baesyan filter - the bug fixed

2003-04-02 Thread Alexey N. Vinogradov
Hello, Marck. 
You wrote in mid:[EMAIL PROTECTED]

MDP I'd love to help, but I have not been able to install it. It
MDP produces the attached error when I try.

Which exact file do you try?

Current is:

http://klirik.narod.ru/arc/baes.tbp - logged version;

http://klirik.narod.ru/arc/baesnolog.tbp - unlogged version.

(I recommend to use logged version due to testing purpose).



-- 
Sincerely,
 Alexey.
Using TB 1.63b7 on WinXP SP1 Corp + MUI RU, spelling by ORFO2002
   mailto:[EMAIL PROTECTED]



Current version is 1.62 | Using TBDEV information:
http://www.silverstones.com/thebat/TBUDLInfo.html


Re: A bug in BayesIt! 0.3a

2003-05-27 Thread Alexey N. Vinogradov
Hello, Prezes. 
You wrote in mid:[EMAIL PROTECTED]

P Hello TBDEV list,

P   I use BayesIt! 0.3a. I installed the filter in directory C:\Programy\The
P   Bat!\baesyan\. Unfortunately the filter often return error, which I send in
P   attachement.

This is not error! The BayesIt manager stores in the registry the
path, where from you run it. This path is necessary when later
BayesIt! will ask you to start manual training now. So, if you have
two copies of learnengine.exe in different places, it just ask you
which one to use for manual training.

P   The second error is: I received for example 10 letters, I close The Bat!, run
P   learningengine.exe and the learningengine show, that in bank is for example 4
P   letter - in index.txt is 4 mails logged, but in baesyan.log is 10 letters.
P   What is this? This error introduced when I change Autostart manualy training
P   process to 15 letters. When it is 229 the error not exist.

This mean that the rest 6 letters were autotrained. So, it is no more
necessary to ask you about them. The number 15 which you set means,
than when it will be more than 15 letters still untrained in the
bank, the filter itself will ask you to start manual training (and if
you confirm it, it will itself run learnengine.exe from the path
described in previous question). So, because autotraining is very
effective, this number of untrained letters will grow very slow. The
example you give - is not usual. Usually when I receive about 50
letters, only 1 or 2 still be untrained and need to be trained
manually. The limit of 10 untrained letters before manual training
in my case usually fills during week or more.

May be, that initial number in autostart manually training process
of 229 is some kind of garbage in settings.ini, and I'll check it
(I think that it was 50...). In any case, setting of this value to
more than 10 is not appropriate. But the error in this value is really
small bug - because it touch only service feature and never touch
filtering process itself.

Also I must say one more thing about autotraing. The scenario by which
the filter works is here: when you run The Bat!, the idle background
process starts, which at begin loads all regarding base into the
memory. Then it collects all the letters which appropriate to be
autotrained and updates regarding base. If any new received letter
arises, this process stops and waits for 10 seconds after last
receiving, and then start again. So, autotraining need some time to
be completed - about 15 seconds of running The Bat! in idle, or about
25 seconds after last letter received. If you run The Bat! with
command-line parameter which cause it to exit immediately after
receiving all letters, these letters will not be autotrained. In such
case, the value of autostart manually training process... can be
exceeded, and The Bat! will wait while you answer to the request. So,
if you need The Bat! to work automatically, it is recommended to
switch this feature off.




-- 
Sincerely,
 Alexey.
Using TB 1.63b7 on WinXP SP1 Corp + MUI RU, spelling by ORFO2002
   mailto:[EMAIL PROTECTED]



http://www.silverstones.com/thebat/TBUDLInfo.html


Re[2]: Autotraining

2003-05-27 Thread Alexey N. Vinogradov
Hello, Prezes. 
You wrote in mid:[EMAIL PROTECTED]

P Hello Alexey,
P Tuesday, May 27, 2003, 3:57:34 PM, you wrote:

ANV Well... Earlier or later it is necessary to write such guide, so I do
ANV it now...

ANV Also I ask everybody who tests BayesIt! to try feature extract tokens
ANV for selective downloading filter. Is it clear how to use it
ANV intuitively, or it is also need to explain?

P Thank you very much. Unfortunately it isn't clear. Could you explain it?

By using this feature you can easy extract from your current regarding
base all _header's_ tokens which are met _only_ in spam corpus for
more than 5 times (the value is defined by regarding threshold). All
such tokens extracted into plain text file, by one in each line. This
file can be used lately as the source of lines for The Bat! filters of
selective downloading. So, by using this feature you can immediately
kill some spams directly on the server, without downloading it at all.

This (extracted) file is small (about 4-6kb), and contains usually
about 200-600 signal tokens.


-- 
Sincerely,
 Alexey.
Using TB 1.63b7 on WinXP SP1 Corp + MUI RU, spelling by ORFO2002
   mailto:[EMAIL PROTECTED]



http://www.silverstones.com/thebat/TBUDLInfo.html


Re: Get ready for the new Beta :-)

2003-05-30 Thread Alexey N. Vinogradov
Hello, Stefan. 
You wrote in mid:[EMAIL PROTECTED]

ST   Here is a short update for Anti-SPAM plug-ins. There is a new
ST   function in the oncoming Beta to be called for submitting SPAM/HAM:

ST   function TBP_FeedSpam(MsgID, IsSPAM: Integer; GetData:
ST TBPGetDataProc): Integer; stdcall;

ST   Basically, MsgID and GetData parameters are the same as from
ST   TBP_GetSpamScore function.  If a submitted message is SPAM, the
ST   IsSpam parameter is not zero.  The return value is non-zero if the
ST   submitted message is not processed, it should be zero if everything
ST   is OK.

How The Bat! will interpret return value? If, for example, the message
was already classified before (not important how - manually or by
self-training), and user recall the procedure for the same letter
again with the same classification (typical situation: may be I've
already classified this letter, but not sure... so, I'll do it
again), what the function must return? Logically - that none is done
(because letter was processed before) - so, return non-zero? Or it
will cause to some error messages inside The Bat! - and so, I must return
zero to show that even though this call was useless, (and so, the
letter wasn't processed), all is OK?

ST   ...And the mpidMessageBody data ID is finally functional :-)

Does it return raw body (same as mpidRawMessage, but without RFC
headers), or _decoded_ message body?

How about button configure on the page of anti-spam plugins? Are you
going to realize something?

How about TBPlugin.ini - as I understood experimenting with plugin's
API, this file can store plugin's settings inside, cannot it?
  

-- 
Sincerely,
 Alexey.
Using TB 1.63b7 on WinXP SP1 Corp + MUI RU, spelling by ORFO2002
   mailto:[EMAIL PROTECTED]



http://www.silverstones.com/thebat/TBUDLInfo.html


Baesyan filter 011alpha - on the way to first release

2003-04-12 Thread Alexey N. Vinogradov
Hello, tbdev.

New build of AntiSpam baesyan filter and learning engine for it is
available.

I changed the internal format of regarding base to make it
self-trainable. New learning engine can create such regarding base.
Because the new format is incompatible with old rbd (now even
extension changed and became rgd), so I recompile the filter for
make possibly to work with new base. Also I changed some options which
let me decrease the size of files in times.

Note that new rgd files is quite larger then previous. It is because
self-training information which can occupy about 80% of file. Also
note that during usual mail-filtering routine the filter loads only
first part - regarding data, so you must (at least now) check Save
regarding data in Learning engine. By default this option is enabled
and saving of self-training data is disabled. If you want to create
fully-featured base for fully-functional filter which I'll release in
near future then you need to check both these options.

Except new regarding base format I only add service reporting when the
filter can't start (or be installed) because of absent/corrupted
c:\baesyan\regard.rgd. I hope that Marck D Pearlstone will say me
something about it after trying to install the filter :).

New filter need mfc42.dll. It is automatically included in all windows
except Win 95.

Learning engine 1.0alpha
http://klirik.narod.ru/arc/learn10alpha.exe (33kb)

Baesyan filter 0.11alpha (logged version)
http://klirik.narod.ru/arc/baes011log.tbp (37.5kb)

Baesyan filter 0.11 alpha (no-logged version)
http://klirik.narod.ru/arc/baes011nolog.tbp (36kb)


As in past, both variants of filter needs regarding base placed at
c:\baesyan\regard.rgd. Logged version also try to create and write
log-file at c:\baesyan\baesyan.log

Log is very useful when you want to know by which signs and how some letter
was regarded by the filter.

-- 
Sincerely,
 Alexey.
Using TB 1.63b7 on WinXP SP1 Corp + MUI RU, spelling by ORFO2002
  mailto:[EMAIL PROTECTED]



Current version is 1.62 | Using TBDEV information:
http://www.silverstones.com/thebat/TBUDLInfo.html


Bug with XLAT editing

2003-06-27 Thread 'Alexey N. Vinogradov'
Hello, tbbeta.

1. go to Preferences-Character Sets (XLAT)
2. select any codepage and press edit
3. In editing dialog press OK

In this very situation I get the error:

Access violation at address 0x00403F70 in module 'TheBat.exe'.
Reading of address 0xFFD4

(may be the addresses would be different, but during one The Bat!
session they are same).

I believe that the same error arises also in earlier betas.

Any confirmations?

-- 
Sincerely,
 Alexey.
Using TB 1.63b11 on WinSrv2003 Enterprize (v5.2 b3790), spelling by ORFO2002 (CSAPI)
  mailto:[EMAIL PROTECTED]



http://www.silverstones.com/thebat/TBUDLInfo.html


Re: Bug with XLAT editing

2003-06-27 Thread 'Alexey N. Vinogradov'
Hello, 'Alexey. 
You wrote in mid:[EMAIL PROTECTED]

ANV Hello, tbbeta.

ANV 1. go to Preferences-Character Sets (XLAT)
ANV 2. select any codepage and press edit
ANV 3. In editing dialog press OK

excuse for offtopic... I've just confused lists... :)


-- 
Sincerely,
 Alexey.
Using TB 1.63b11 on WinSrv2003 Enterprize (v5.2 b3790), spelling by ORFO2002 (CSAPI)
   mailto:[EMAIL PROTECTED]



http://www.silverstones.com/thebat/TBUDLInfo.html


.TBB message format

2003-07-05 Thread Alexey N. Vinogradov
Hello, tbdev.

... Working on BayesIt! I met the question about internal structure of
TBB files. I work with the files using description extracted from an
open-source application which also uses TBB. I found these headers in
the application:

// TBB file header
struct tmbasehead {
long Signature, SizeOfHeader;
};

// message header (inside TBB)
struct tletterhead {
long Signature, SizeOfHeader, Unk2, TimeReceived, ID, Flags,
 Encoding, ColorGrp, Priority, MsgSize, Reserved1, Reserved2;
};

(all messages is one-by-one, from offet(tmbasehead.SizeOfHeader) and
offset+=tletterhead.MsgSize+sizeof(tletterhead) for every next
message)

The question is: how is it possible to know total # of letters in
a TBB file? I mean if the short way exist (not passing all letters).

Also I never tried to investigate all letter's header's fields, but
some of them, I think, can be interested also. First of all, what
about TimeReceived? How to interpret this number (I mean, how to
extract the parts from it, or, at least, how to convert it to the
standard FILETIME or SYSTEMTIME structure?) Also, which field signs
that the letter is deleted? I suggest that it can be a bit in Flags,
but what precisely?

-- 
Sincerely,
 Alexey.
Using TB 1.63b11 on WinSrv2003 Enterprize (v5.2 b3790), spelling by ORFO2002 (CSAPI)
  mailto:[EMAIL PROTECTED]



http://www.silverstones.com/thebat/TBUDLInfo.html


Re: PlugIn Specification

2003-07-24 Thread Alexey N. Vinogradov
Hello, Jan. 
You wrote in mid:[EMAIL PROTECTED]

JO Hi,

JO   I'd like to play around with programming plugins for TB. As far as I
JO   know they are written (currently) using Delphi or at least some kind
JO   of Windows Pascal. Last time I looked at Delphi were before the
JO   coming of Win95, so my knowledge is pretty out of date and since I
JO   am writing in C++ I could use some specification on the PlugIn
JO   Interface. What functions are needed to export. How do I need to
JO   export them. I assume the PlugIns are just simple Windows DLLs.

JO Jan Oetjen

If you want, I can send you (privately, to don't add an attachment here in list)
some project files and .h for TB plugins. It is really simple DLLs, but it is
necessary to export functions via .def files, because TB doesn't understand
C-name decorations.

-- 
Sincerely,
 Alexey.
Using TB 1.63b11 on WinXP Pro SP1 (2600), spelling by ORFO2002 (CSAPI)
..with Kaspersky Antivirus Plugin (ver 3.5 Gold)  antispam filter BayesIt! 0.3b
   mailto:[EMAIL PROTECTED]



http://www.silverstones.com/thebat/TBUDLInfo.html


BayesIt! 0.4 testers version: pickup The Bat! folders

2003-08-04 Thread Alexey N. Vinogradov
Hello, tbdev.

   I made new mechanism of selection of The Bat! folders for initial feeding
   of antispam filter BayesIt. It is on the way for final release which will come soon.

   I would like to ask you to test this very feature.

   This developer's build you can find here:
   http://klirik.narod.ru/arc/bayesit04d_pickup_folders.zip (66.8kb)

-- 
Sincerely,
 Alexey.
Using TB 2.00b1 on WinXP Pro SP1 (2600), spelling by ORFO2002 (CSAPI)
..with Kaspersky Antivirus Plugin (ver 3.5 Gold)  antispam filter BayesIt! 0.3b
  mailto:[EMAIL PROTECTED]



http://www.silverstones.com/thebat/TBUDLInfo.html


New Plugin Spec...

2003-08-05 Thread Alexey N. Vinogradov
Hello, tbdev.

Strictly speaking, there are no specifications about TBP at all! The only things
which are exist - two simple plugins sent by Stefan as examples.

The very last one - which includes support for macro plugins - I attached to the
letter. TBPtest.rar - is originally posted by Stefan Tanurkov (you can found it
in previous postings, so this one only for reference or if anybody lost some
part of list). It is DELPHI file.

The second one - tpbtestVCPP - is _working_ translation of the first one, made
on Visual C++ (by me). In the file there is whole workspace and - tbptest.h -
which you can use in your own projects.

For full picture I am waiting if someone will make also variant for CBuilder (or
correct my one to be independent from compiler).

-- 
Sincerely,
 Alexey.
Using TB 2.00b1 on WinXP Pro SP1 (2600), spelling by ORFO2002 (CSAPI)
..with Kaspersky Antivirus Plugin (ver 3.5 Gold)  antispam filter BayesIt! 0.3b
  mailto:[EMAIL PROTECTED]

TBPtest.rar
Description: Binary data


tbptestVCPP.rar
Description: Binary data

http://www.silverstones.com/thebat/TBUDLInfo.html

Re[2]: Plugin Specs?

2003-08-06 Thread Alexey N. Vinogradov
Hello, Mark. 
You wrote in mid:[EMAIL PROTECTED]

MW Note that the only API Stefan has published is for spam filtering. If
MW you want to do more, there's nothing available. At least yet. Stefan
MW has promised support for user-defined macros and such, but so far
MW there hasn't been any API or samples.

See mid:[EMAIL PROTECTED]. You will found _new_ version
of TBP with user-defined macros. Unfortunately I can't yet found the way how to
translate it to C++ (I use Visual Studio) because of using COM interface.

-- 
Sincerely,
 Alexey.
Using TB 1.63b11 on WinXP Pro SP1 (2600), spelling by ORFO2002 (CSAPI)
..with Kaspersky Antivirus Plugin (ver 3.5 Gold)  antispam filter BayesIt! 0.3b
   mailto:[EMAIL PROTECTED]



http://www.silverstones.com/thebat/TBUDLInfo.html


Re: Plugin Specs?

2003-08-09 Thread Alexey N. Vinogradov
Hello, Bill. 
You wrote in mid:[EMAIL PROTECTED]

BM Hello TB Dev,

BM Back on July 24th, Jan Oetjen asked for specs for writing plugins.
BM There was no response with specs.

BM I would like to write DLLs in MinGW32 GCC C.  Does anyone have a
BM simple example?


You can found one variant in the attachment. Unfortunately I can't yet translate
interface definition from Delphi to C++ - there are some problem arises during
compilation. If you can resolve it - please, send to me working copy.


-- 
Sincerely,
 Alexey.
Using TB 1.63b11 on WinXP Pro SP1 (2600), spelling by ORFO2002 (CSAPI)
..with Kaspersky Antivirus Plugin (ver 3.5 Gold)  antispam filter BayesIt! 0.3b
   mailto:[EMAIL PROTECTED]

TBPtestVCPP.zip
Description: Binary data

http://www.silverstones.com/thebat/TBUDLInfo.html

Button configure in TB2b2

2003-08-15 Thread Alexey N. Vinogradov
Hello, tbdev.

Since the last beta (beta2) the button configure in the filter's options begin to
work!

If you want to try it you must change a function in the test plugin:

int WINAPI TBP_NeedConfig()
{
return 1;
}

(before it returned zero).

After compiling the plugin you will see the button Configure enabled in
preferences tab, when the plugin is selected.

By pressing this button (for test plugin) you'll receive the message:
Configured OK - because of calling the TBP_Setup().

Thank's to Stefan for supporting this!

Woe to me... I just made the next version of BayesIt!. Now I will rewrite it to
push all into bayesit.tbp (no more external learnengine.exe).


-- 
Sincerely,
 Alexey.
Using TB 2.00b1 on WinXP Pro SP1 (2600), spelling by ORFO2002 (CSAPI)
..with Kaspersky Antivirus Plugin (ver 3.5 Gold)  antispam filter BayesIt! 0.3b
  mailto:[EMAIL PROTECTED]



http://www.silverstones.com/thebat/TBUDLInfo.html


Re: The Bat! Common Plug-in API v1.0

2003-09-10 Thread Alexey N. Vinogradov
Hello, Stefan.

You wrote 10.09.2003 @ 16:30  in mid:[EMAIL PROTECTED]
  using mailer The Bat! (v2.00.6)

ST Dear All,

ST   Phew... Writing API documentation is definitely a hard task for me :-)

Agree... :)

ST   OK, here it is - the first version of TB! CP API for your comments.
ST   Attention C++ programmers - C calls were merely converted but not
ST   tested, so please verify that all definitions are correct.
ST   I tried to make everything clear, but if there are some uncovered
ST   issues and concerns, please post them here.

Some notes about the API:

,- [ from TBP_Setup description ]
| The TBP_Setup can be called by The Bat! only if the TBP_ConfigNeeded returned
| AVC_OK. The handle of the calling window can be retrieved by the GetActiveWindow
| Win32 API function
`-

AVC_OK didn't defined! May be change to ...if the TBP_ConfitNeeded returned
zero.

,- [ from TBP_SetConfigData description ]
|  C++:   int WINAPI TBP_SetConfigData(void* ABuf, int ABufSize);
| 
|  Object Pascal: function TBP_SetConfigData (const ABuf; ABufSize: Integer):
| Integer; stdcall;
`-

in Object Pascal description: first arg const ABuf sounds quite suspicious.
May be var ABuf?

Also, for C++ description it would be safer to define it as (const void* ABuf...)

ST   We are planning to make some additions to the API soon. Please post
ST   your suggestions about which plug-in slot should be implemented
ST   next.

I have at least two suggestions about it:

1. It would be good to have a possibility from TBP_GetSpamScore to add a custom
header into regarded letter, for example X-spam: ... or etc (or change the
header, if it is already present in the letter). This will be useful to filter
the messages later using regular The Bat! sorting office, and safe to the
integrity of the letter RFC format. (Of course, it would be ideal if the filter
would change anything in the message, but it isn't so safe).

2. About TBP_FeedSpam - it would be good, if The Bat! will call this function
itself according to Move to junk folder threshold, basing on integral grade of
all filters installed. In this case this function will necessary to be called
manually for wrongly graded letter, but not to every one received.


And finally: do you agree if I translate the API into Russian?



-- 
Sincerely,
 Alexey.
Using TB 2.00.6 on WinXP Pro SP1 (2600), spelling by ORFO2002 (CSAPI) 
..with Kaspersky Antivirus Plugin (ver 3.5 Gold)  antispam filter BayesIt! 0.4dm

   mailto:[EMAIL PROTECTED]



http://www.silverstones.com/thebat/TBUDLInfo.html


Re: The Bat! Common Plug-in API v1.0

2003-09-10 Thread Alexey N. Vinogradov
Hello, Stefan.

You wrote 10.09.2003 @ 16:30  in mid:[EMAIL PROTECTED]
  using mailer The Bat! (v2.00.6)

ST   We are planning to make some additions to the API soon. Please post
ST   your suggestions about which plug-in slot should be implemented
ST   next.

One more suggestion...
What about entering an internal macros in The Bat!, which can retrieve the names
and versions of installed plugins, and use this text anyway? (See my
subscription as example, but I did it manually :(. )



-- 
Sincerely,
 Alexey.
Using TB 2.00.6 on WinXP Pro SP1 (2600), spelling by ORFO2002 (CSAPI) 
..with Kaspersky Antivirus Plugin (ver 3.5 Gold)  antispam filter BayesIt! 0.4dm

   mailto:[EMAIL PROTECTED]



http://www.silverstones.com/thebat/TBUDLInfo.html


Re: The Bat! Common Plug-in API v1.0

2003-09-10 Thread Alexey N. Vinogradov
Hello, Stefan.

You wrote 10.09.2003 @ 16:30  in mid:[EMAIL PROTECTED]
  using mailer The Bat! (v2.00.6)

ST   I tried to make everything clear, but if there are some uncovered
ST   issues and concerns, please post them here.

ST   We are planning to make some additions to the API soon. Please post
ST   your suggestions about which plug-in slot should be implemented
ST   next.

,- [ 3.2. Thread safety ]
| Any plug-in function can be called from different threads simultaneously, so all
| functions must be aware to multi-threaded model and provide appropriate level of
| protection of internal data. If a Plug-in author does not want to support
| full-blown multithreading, a simple workaround can be made by using critical
| sections (EnterCriticalSection at the start of a function and
| LeaveCriticalSection at the end, make sure the critical section is initialised
| at the DLL's entry point or in the TBP_Initialize function and the code between
| EnterCriticalSection and LeaveCriticalSection is protected from exceptions)
`-

The important question: are TBP_Initialize and TBP_Finalize also multithreaded?
If so, it will unfortunately hard to initialize a critical sections in
TBP_Initialize...

-- 
Sincerely,
 Alexey.
Using TB 2.00.6 on WinXP Pro SP1 (2600), spelling by ORFO2002 (CSAPI) 
..with Kaspersky Antivirus Plugin (ver 3.5 Gold)  antispam filter BayesIt! 0.4dm

   mailto:[EMAIL PROTECTED]



http://www.silverstones.com/thebat/TBUDLInfo.html


Re: Plugin stub (API draft compliant)

2003-09-11 Thread Alexey N. Vinogradov
Hello, Mark.

You wrote 11.09.2003 @ 8:18  in mid:[EMAIL PROTECTED]
  using mailer The Bat! (v1.63 Beta/7) Personal

MW Here's the revised edition of my plugin stub, hopefully conforming to
MW the draft API document. Alexey - could you (or anyone else) please try
MW this under Visual C++? I've got it working under the other two
MW compilers and I *think* I've got the VC stuff formatted properly, but
MW I don't have that compiler at hand.

MW If that's working then this now compiles with Metrowerks Codewarrior,
MW Borland C++ Builder, and Visual C++.

There are some changes to make it compilable on VC:

,- [ TBPluginApi.h ]
| // if we're in Visual C++
| #ifdef _MSC_VER
|  #include objbase.h
|  #include initguid.h
|  #define TBP_EXPORT __declspec( dllexport )  __stdcall
|  typedef char *PChar;
| #endif
`-

,- [ TBPlugin.cpp (around Util1.h ]
| #ifndef _MSC_VER
| #include Unit1.h
| #endif
`-

So, it became compilable, but still doesn't work, because it still use name
decorations which is totally unsupported by The Bat!, unfortunately... So, the
TBP_ExecMacro became [EMAIL PROTECTED] and etc.

The only way still to use .def file...


-- 
Sincerely,
 Alexey.
Using TB 2.00.6 on WinXP Pro SP1 (2600), spelling by ORFO2002 (CSAPI) 
..with Kaspersky Antivirus Plugin (ver 3.5 Gold)  antispam filter BayesIt! 0.4em

   mailto:[EMAIL PROTECTED]



http://www.silverstones.com/thebat/TBUDLInfo.html


Re: The Bat! Common Plug-in API v1.0 - some extra typerrs found...

2003-09-17 Thread Alexey N. Vinogradov
Hello, Stefan.

You wrote 10.09.2003 @ 16:30  in mid:[EMAIL PROTECTED]
  using mailer The Bat! (v2.00.6)

ST Dear All,

ST   Phew... Writing API documentation is definitely a hard task for me :-)

Some extra notes to the text of API:

1. From TBP_GetConfigData description:

,-
| ABuf
| [out] Pointer to a binary buffer that receives configuration data from the
|   Plug-in. If ABuf is a null pointer, the function must return value is the
|   required buffer size in bytes.
| 
| ABufSize 
| [in] Size of the string buffer identified by ABuf, in bytes. If the ABufSize is
|  negative, the function must return value is the required buffer size in bytes.
`-

Error: Abuf is pointer to a BINARY buffer, but ABufSize is the size of STRING
   buffer.

Also I think it would be good to get a convention to call all STRINGS buffers
inside API documentatin as ABuf, but for BINARY buffers as simple Buf. This
is a simple decoration's convention, but I think it would be nice.

2. It would be nice to point explicitly the character of the buffer required.
For example, in TBP_GetName it is explicitly specified that it is _string_
buffer, and in TBP_GetConfigData it is explicitly cpecified that it is _binary_
buffer, but in TBP_SetConfigData - nothing specified _explicitly_.

3. It would be nice to always mention explicitly the measurement's units of
buffer's size (bytes). For example, in TBPSetConfigData it is mentioned
explicitly that the size of buffers is in bytes, but in TBPGetDataProc
Callback function there is nothing about measurement's units of buffer's size
mentioned.

4. As I mentioned before, sometimes (more precisely - TBP_Setup and
TBP_GetConfigData) the AVC_OK is used, but it was never defined explicitly.


-- 
Sincerely,
 Alexey.
Using TB 2.00.6 on WinXP Pro SP1 (2600), spelling by ORFO2002 (CSAPI) 
..with Kaspersky Antivirus Plugin (ver 3.5 Gold)  antispam filter BayesIt! 0.4em

   mailto:[EMAIL PROTECTED]



http://www.silverstones.com/thebat/TBUDLInfo.html


The Bat! Common Plug-in API v1.0 - Russian version

2003-09-17 Thread Alexey N. Vinogradov
Hello, tbdev.

In attachment there is my russian translation of CP-API v1.0 originally published
by Stefan Tanurkov @ MID:[EMAIL PROTECTED]

If anybody interesting: I am going to made nice-formatted PDF version - both for
english and russian version - and make it available to all who need.

-- 
Sincerely,
 Alexey.
Using TB 2.00.6 on WinXP Pro SP1 (2600), spelling by ORFO2002 (CSAPI) 
..with Kaspersky Antivirus Plugin (ver 3.5 Gold)  antispam filter BayesIt! 0.4em

  mailto:[EMAIL PROTECTED]

CP-APIru.zip
Description: Binary data

http://www.silverstones.com/thebat/TBUDLInfo.html

Re: The Bat! Common Plug-in API v1.0

2003-09-20 Thread Alexey N. Vinogradov
One more error i CP-API :)


,-
| 5.1.7. TBP_NeedConfig
| 
| Syntax:
| 
|  C++:   int WINAPI TBP_ConfigNeeded();
| 
|  Object Pascal: function TBP_ConfigNeeded: Integer; stdcall;
`-

Here must be TBP_NeedConfig, not TBP_ConfigNeeded!
 

-- 
Sincerely,
 Alexey.
Using TB 2.00.6 on WinXP Pro SP1 (2600), spelling by ORFO2002 (CSAPI) 
..with Kaspersky Antivirus Plugin (ver 3.5 Gold)  antispam filter BayesIt! 0.4em

   mailto:[EMAIL PROTECTED]



http://www.silverstones.com/thebat/TBUDLInfo.html


how to read Ignored letters after selective download?

2003-10-09 Thread Alexey N. Vinogradov
Hello, tbtech.

I've the mailbox with the selective download filter installed, and ignore
action assigned (i.e., not delete, but simply don't download).

The question: how can I download the letters, leaved on the server by the rule?

- If I just unactivate the rule and run mail delivery, the leaved messages is
immediatelly deleted (the first action The Bat does during delivering is
deleting of these letters).

- If I just try to Dispatch All mail on server, it again, first deletes the
not-downloaded letters, and second, shows the already emptied mailbox in mail
dispatcher.

So, I can't find a properly way to look at letters which were filtered using
ignore action in selective download rules in The Bat!

Can anybody give a suggestion how to.. do this?

-- 
Sincerely,
 Alexey.
Using TB 2.00.22 on WinXP Pro SP1 (2600), spelling by ORFO2002 (CSAPI) 
..with Kaspersky Antivirus Plugin (ver 3.5 Gold)  antispam filter BayesIt! 0.4gm

  mailto:[EMAIL PROTECTED]



http://www.silverstones.com/thebat/TBUDLInfo.html


CP-API - feature request

2003-10-09 Thread Alexey N. Vinogradov
Hello, tbdev.

AFAIK it is impossible to retrieve the date of receiving for the message from
TBPGetDataProc.

Can it be added?

In TBPGetSpamScore it is not so important - because it is called in the moment
of delivering - so, I can just use the current system date, but in TBPFeedSpam
it may be necessary to know it - for example, if the filter (as BayesIt)
analyses the time interval between send and received timestamps. So, I can
retrieve the send time using midxDate, but how can I find the received time
in this case? There is no midxDateReceived constant!

-- 
Sincerely,
 Alexey.
Using TB 2.00.22 on WinXP Pro SP1 (2600), spelling by ORFO2002 (CSAPI) 
..with Kaspersky Antivirus Plugin (ver 3.5 Gold)  antispam filter BayesIt! 0.4gm

  mailto:[EMAIL PROTECTED]



http://www.silverstones.com/thebat/TBUDLInfo.html


nntp2imap plugin - who wants to develop?

2003-11-13 Thread Alexey N. Vinogradov
Hello, tbdev.

I've written a small plugin which works like gate translating NNTP to IMAP
protocols. It is just a sample, and I published it for everybody who wants to
continue develop the subject. Now the plugin works only one way - it can
reflect NNTP groups into IMAP folders and download the messages. It will
receive all messages from the group - and you can implement the way to download
only last few messages which were not downloaded yet. Also you can implement the
store part - to sent the messages to NNTP (it need the other piece of code -
to translate SMTP to NNTP).

You can download VC++ 6 project here: http://klirik.narod.ru/arc/news2imap.rar
(65.3kb)

The compiled plugin is placed here: http://klirik.narod.ru/arc/imapnews.tbp
(58.5kb)

You can install the plugin usual way. Then create new IMAP mailbox with the
parameters:
IMAP server: localhost
user name - address of nntp server (i.e. news.rol.ru)
password - none.

If the nntp server require authorization, then use these parameters:

IMAP server - localhost
user name - [EMAIL PROTECTED] (i.e. [EMAIL PROTECTED])
password - password to access NNTP server.

The best way for working - is set up synchronization to synchronize whole
messages, but you also can use headers only or headers and text.


-- 
Sincerely,
 Alexey.
Using TB 2.01 on WinXP Pro SP1 (2600), spelling by ORFO2002 (CSAPI) 
..with Kaspersky Antivirus Plugin (ver 3.5 Gold)  antispam filter BayesIt! 0.4hm

  mailto:[EMAIL PROTECTED]



http://www.silverstones.com/thebat/TBUDLInfo.html


Re: TBPGetDataProc pointer for later use?

2004-03-27 Thread Alexey N. Vinogradov
Hello, Achim.

AW i want to include something like a progress bar into my antispam
AW filter. To do that i need the count of messages the user want to scan.
AW so there are two possibilities to do that.

Even if you don't make any resource-greedy work during such mark as action,
this action takes quite long time - because every processed letter is stored by
The Bat! into temporary file and only then TBP_FeedSpam called (it seems that it
works in one-thread). So, if you will only scan the number of messages, it
might not take a less time then if you will process them immediately.

I went here another way - progress bar is not only possible way to show that the
process doesn't stuck - you can simple show the number of already processed
letters - and it does not require to know the final number of letters which will
be processed (only user can know it!).

I've realized such way at my BayesIt 0.4 gm SE7
(http://www.ritlabs.com/download/bayesit/bayesit04gmse7.rar ), and it seems that
it works.

-- 
Sincerely,
 Alexey.
Using TB 2.05 Beta/12 on WinXP Pro SP1 (2600), spelling by ORFO2002 (CSAPI) 
..with Kaspersky Antivirus Plugin (ver 3.5 Gold)  antispam filter BayesIt! 0.4gmSE7

   mailto:[EMAIL PROTECTED]



http://www.silverstones.com/thebat/TBUDLInfo.html


Re: ExecuteMacro

2004-07-07 Thread Alexey N. Vinogradov
Hello, Achim.

You wrote 08.07.2004 @ 4:13 

AW does someone know how a can use ExecuteMacro? an example would be
AW nice...

Just give the necessary line as a first parameter and call the function.

as example:

std::string command = %IF:\%SUBJECT\=\\:\%SUBJ=' + Params[0] + ';
Template.ExecuteMacro(command.c_str(), command.size(), NULL, Template);
...

-- 
Sincerely,
 Alexey.
Using TB 2.12 Beta/7 on WinXP Pro SP1 (2600), spelling by ORFO2002 (CSAPI) 
..with Kaspersky Antivirus Plugin (ver 3.5 Gold)  antispam filter BayesIt! 0.5.6

   mailto:[EMAIL PROTECTED]



http://www.silverstones.com/thebat/TBUDLInfo.html


The wrapper for ITBPDataProvider interface.

2004-07-25 Thread Alexey N. Vinogradov
Hello, tbdev.

I've written a small helper wrapper on ++ to be used with ITBPDataProvider
interface. Here is the source:

// tbwraper.h: interface for the wrapper of ITBPDataProvider
//
//

#if !defined(tbwraper_h)
#define tbwraper_h

#include tbptest.h
#include string

// wrapper for the values of interface
class tbvalue
{
protected:
ITBPDataProvider* parent;
int index;
public:
tbvalue(ITBPDataProvider* c, int indx) : parent (c), index(indx) {};
void operator= (int c);
void operator= (const std::string c);
void operator= (const CString c);
void operator= (const char* c);
operator int ();
operator std::string ();
};

// wrapper for the whole interface
class tbwraper
{
protected:
ITBPDataProvider* parent;
public:
tbwraper (ITBPDataProvider* c) : parent(c) {};
tbvalue operator[](int indx) { return tbvalue(parent,indx);};
inline int items() {return parent-ItemCount();};
};

// Exceptions
class ExDataProvider
{
DWORD exnum;
public:
ExDataProvider(DWORD c) : exnum(c) {};
CString msg();
};


// implementations
CString ExDataProvider::msg()
{
CString c;
c.LoadString(exnum);
#ifdef _DEBUG
TRACE(c);
#endif
return c;
}

void tbvalue::operator= (int c)
{
if (parent-SetIntValue(index,c)0)
throw ExDataProvider(IDS_exnotsupported);  // the code of error
   // message in the string 
resources
};

void tbvalue::operator=(const std::string c)
{
if (parent-SetDataByID(index, c.c_str(), c.size())0)
throw ExDataProvider(IDS_exnotsupported);
};

void tbvalue::operator=(const CString cc)
{
operator=(std::string(cc));
};

void tbvalue::operator=(const char* cc)
{
operator=(std::string(cc));
};

tbvalue::operator int()
{
return parent-GetIntValue(index);
}

tbvalue::operator std::string()
{
DWORD bsize = parent-GetDataByID(index,NULL,-1);
char* b = new char[bsize];
parent-GetDataByID(index,b,bsize);
std::string res(b,bsize);
delete[] b;
return res;
}

#endif // !defined(tbwraper_h)


Usage:
1. Define a line in your resources with index IDS_exnotsupported like
Exception: this property is read-only.

2. Just use it!

int WINAPI TBP_ExecMacro(void* AMacro, int MaxLen, ITBPDataProvider* Template, 
ITBPDataProvider* Params)
{
tbwraper tm(Template);
tbwraper pr(Params);
...

if (pr.items()0) {// Params-GetItemCount()
   std::string res;
   for (int i=0; ipr.items(), ++i) {
   res+=pr[i];  // Params-GetDataByID(index,NULL,-1);
   }
   tm[0]=res;   // Template-SetDataByID(0,res.c_str(),res.size());
   return 0;
}


-- 
Sincerely,
 Alexey.
Using TB 2.12.03 on WinXP Pro SP1 (2600), spelling by ORFO2002 (CSAPI) 
..with Kaspersky Antivirus Plugin (ver 3.5 Gold)  antispam filter BayesIt! 0.5.7

  mailto:[EMAIL PROTECTED]



http://www.silverstones.com/thebat/TBUDLInfo.html


regexp in BayesIt! 0.6.1

2004-09-01 Thread Alexey N. Vinogradov
Hello, tbtech.

I understand that testing is more the subj of TBBETA, but this very subject is
quite specific and I want to send it here...

I am trying to make a usable regular expression's editor for newbies, and I need
your advices and notes.

For the moment I just realized regular expression's debugger and made it
possibly to be invoked by a macro %RegexEd - so, it is possible to create a
quick template which will call this macro and make possible to debug your
regexp. However I am not a guru in regexps - and some parts of this debugger may
need to be debugged themselves - namely the treeview (a resizable pane which
is shown in debugger by pressing tree button, and which shows the regexp
parsing tree).

Could you try to edit some regexps using this tool and report me about your
wishes and bugs? You can do it either directly (by private mail), either using
the bugtrack.

The 0.6.1 version of BayesIt you can download here:
[ http://www.ritlabs.com/download/bayesit/bayesit061.rar ]
(this plugin works also under The Bat! 2.1x versions).

Thanks!

-- 
Sincerely, Alexey.
Using TB 3.0 on WinXP Pro SP2 (2600), spelling by ORFO2002 (CSAPI) 
..with Kaspersky Antivirus Plugin (ver 3.5 Gold)  antispam filter BayesIt! 0.6.01

  mailto:[EMAIL PROTECTED]



http://www.silverstones.com/thebat/TBUDLInfo.html