Byteplant Forum

Home » CleanMail Support » CleanMail Add-ons » Having a problem using Bayes
Having a problem using Bayes [message #203] Fri, 27 October 2006 17:49
Frank
Messages: 3
Registered: October 2006
Junior Member
IMAP2MBOX is not logging on to my server which is a Win2k3 sbs. I get a message that states:

Unable to write temp config file spam.config-new: Permission denied at IMAP1BOX.pl line 269
IMAP connect failed: Unable to connect to: INVALID ARGUMENT

Here's the .bat file:

rem learns an mbox mail folder as spam
rem
rem execute this batch in installation directory
rem
rem imap2mbox has been previously configured to read from the mail server and
rem export the emails into the mbox container called "spam.mbox"
rem
rem
rem A logfile called spam.log is created so we can monitor the activities of
rem imap2mbox and spam-learn. Spam.log should be deleted periodically
rem
del spam.mbox

echo *===* >> spam.log
imap2mbox.exe --config=spam.cfg >> spam.log
if exist spam.mbox sa\sa-learn -C sa\ruleset --showdots --spam --mbox spam.mbox >> spam.log
sa\sa-learn -C sa\ruleset --showdots --force-expire >> spam.log
sa\spamassassin -x -C sa\ruleset --lint >> spam.log

Here's the config file:

[Server]
Name=MYSERVER
Port=143

[User]
Name=mydomain/frank/frank
Magic=Blanked Out
[Public Box]
Path=Public Folders/
Folder=spam

[Output]
Mbox=.\export.mbox

[Options]
Verbose=1
Delete=1
Timestamp=ThuOct261304252006

Any help please is appreciated.

Re: Having a problem using Bayes [message #204 is a reply to message #203] Sat, 28 October 2006 07:34 Go to previous message
Heidner
Messages: 121
Registered: February 2005
Senior Member
It should be working... the error you are seeing... occurs when IMAP2MBOX can not write to the "spam.cfg" file. In the batch file you included... it should not need to write to the file UNLESS it was unable to actually read the specified file.

So the next question is... where is the spam.cfg file? Is it in the same directory that the batch script is running from.

If enter the commands in by hand does it work then?
Re: Having a problem using Bayes [message #205 is a reply to message #203] Sat, 28 October 2006 20:38 Go to previous message
Frank
Messages: 3
Registered: October 2006
Junior Member
The spam.cfg file is in the "no spam today!" folder as are all of the other files related to NST and "imap2mbox". Problem with the "write" was that it actually wrote a 2nd copy of the spam.cfg.

Now, at the cmd prompt, I'll enter:

C:\Program Files\No Spam Today!>imap2mbox config=spam.cfg server=myserver username=mydomain/frank/frank pass=blank mbox=spam.mbox path=public folders/ folder=spam

I get the following response:

The server is: myserver
IMAP connect failed: Unable to connect to myserver: Unknown error

Not sure what I'm doing wrong here. I tried NOT using the alias and got the same msg. and also tried using the FQDN of the domain and received the same reply.

In the .cfg I removed everything after MAGIC=
I thought because I entered the password in as stated above that it would write a new encrypted password. Well, it doesn't, so how do I get it to rewrite the encrypted password?

Sorry for my ignorance here, but this is a little confusing.
Re: Having a problem using Bayes [message #206 is a reply to message #203] Sat, 28 October 2006 22:04 Go to previous message
Heidner
Messages: 121
Registered: February 2005
Senior Member
>>IMAP connect failed: Unable to connect to myserver: Unknown error

Couple of things to check,

the mail account for exchange (at least 2000 and earlier) is:

name=domain/mailuser/alias so first action is to verify that.

It may be possible that with exchange 2003 that it changed to your smtp type e-mail address. In which case it might be:

name=mailuser@domain

Next item to test is verify that IMAP is running on port 143

You can test this by opening a command box and entering

telnet myserver 143

This would open a telnet session to your e-mail server. You should see a one line banner with the mail server information.

Finally when you create the configuration file for imap2mbox, it takes the settings in the file -- plus your password, the path to the file and encrypts the information into magic. If you move this file to another directory -- it will not decrypt the password correctly (part of security to prevent hacking). So the password must be entered in the same account and running from the same directory that you intend to use the program. Then as a safety precaution - change permissions on the file such that only the system, administrator, the user that will run the script and the creator have access to the file.
Re: Having a problem using Bayes [message #207 is a reply to message #203] Sun, 29 October 2006 18:10 Go to previous message
Frank
Messages: 3
Registered: October 2006
Junior Member
Ok Dennis, I got it now . . . thanks!

DUH!! You got it spot on. I didn't have the IMAP4 service running. After enabling the service, I had a couple of other things to do.

Since the alias and username are the same, I only needed "domainname/username" plus I didn't have the quotes around the syntax. Also, I received msgs. stating that the delete and verbose options are implied and therefore not needed.

Everythings working now. Thanks again.

Previous Topic: Nod32 antivirus Filter
Next Topic: Bogofilter
Goto Forum:
  


Current Time: Sun Dec 11 14:45:09 CET 2016