MESpamC - MailEnable SpamAssassin Client [v 0.3.1 / 0.2.5]

Discussion, support and announcements for third party applications that work with MailEnable.
Post Reply
Setebos
Posts: 6
Joined: Thu Nov 16, 2006 8:29 pm

MTA Pickup event script

Post by Setebos »

Hi

I set up MESpamC with stand-alone Linux server and everything is working like a dream.

Now I need to save incoming messages to DB and for that I'm planning to use exe which is called in MTA Pickup event after MESpamC.
However, I can't get worlds simpliest cmd script to work.
What I have done so far:
1. Wrote MTAPICKUP.cmd

Code: Select all

@echo off
"C:\Program Files\MESpamC\mespamc.exe" %1
2. Saved that one to same directory as mespamc.exe
3. In MailEnable, changed MTA Pickup event executable to point at MTAPICKUP.cmd instead of mespamc.exe
4. MTA stop - start

And it doesn't work. Messages are missing X-SPAM headers which are added by SpamAssassin, but immediately when I change pickup event to use MESpamC.exe everything works again.

Any idea what's going on here?

someone_else
Posts: 302
Joined: Tue Jul 19, 2005 1:12 pm
Location: 404

CMD /C

Post by someone_else »

When using a batch script as a pickup event in ME, be sure to invoke it through CMD.exe; your pickup event setting in ME should therefore look something like this:

CMD /C "C:\somepath\yourscript.cmd"
MailEnable plugins:
DKeyEvent - DomainKeys/DKIM
MESpamC - SpamAssassin integration

Setebos
Posts: 6
Joined: Thu Nov 16, 2006 8:29 pm

Re: CMD /C

Post by Setebos »

someone_else wrote:When using a batch script as a pickup event in ME, be sure to invoke it through CMD.exe; your pickup event setting in ME should therefore look something like this:

CMD /C "C:\somepath\yourscript.cmd"
Thank you very much, I'll try that.

burningice
Posts: 11
Joined: Fri Apr 07, 2006 2:31 pm

Re: debugging

Post by burningice »

someone_else wrote:Well, if you want to debug, send me your mespamc.ini file by email, and we'll take it from there...
this is my ini-file

---------------------

;MESpamC - MailEnable SpamAssassin Client
;author: someone_else@exhalus.net


[SpamD]
Hosts=127.0.0.1
Port=783
Timeout=60
Failover=0
PassMEUsername=0
AllowMessagesToBeTruncated=0
LogCommunication=1


[MESpamC]
MaxFileSizeToCheck=256
IgnoreCatchallAddresses=0
CheckOutgoingMessages=0
CheckLocalMessages=0
SkipProcessingIfSenderHasAuthenticated=0
SkipProcessingForTheseDomains=
SkipProcessingForTheseSenders=
LogCriticalErrorsToEventLog=0
LogNonFatalErrors=1
SuppressFileNotFoundErrors=1
AddHeaderWithMESpamCStatus=0


[Content-Filtering-PreSA]
; [0 - Do Nothing] [1 - Delete] [2 - Move] [3 - Skip SpamAssassin]
MoveToFolder=
MissingFromHeader=0
EmptyBody=0
DeleteIfHeaderContains=
MoveIfHeaderContains=
SkipSAIfHeaderContains=
DeleteIfBodyContains=
MoveIfBodyContains=
SkipSAIfBodyContains=
SkipSAForTheseSenders=
SkipSAForTheseDomains=
SkipSAIfSenderHasAuthenticated=0
ResendToAddress=


[Content-Filtering-PostSA]
; [0 - Do Nothing] [1 - Delete] [2 - Move]
X-Spam-Status-Yes=0
;AddHeaderBasedOnSpamScoreThresholds=5,9,15
DeleteIfSpamScoreIsHigherThan=10.0
MoveIfSpamScoreIsHigherThan=
DeleteIfHeaderContains=
MoveIfHeaderContains=
DeleteFwdIfSpamScoreIsHigherThan=
MoveFwdIfSpamScoreIsHigherThan=
AddHeaderBasedOnSpamScoreThresholds=

---------------------

im still getting alot of error-messages, but the mespamc.log file is empty.

this is a snippet from my spamdIO.log

-----------------------

2006-11-23 18:22:48 [A01B2D403C424662BC33391C91228F5C.MAI] >> 127.0.0.1
2006-11-23 18:22:48 [A73CC74B187D4C7CA7DE7C9E233457CF.MAI] || 127.0.0.1
2006-11-23 18:22:52 [789428CCDEB04981A2A4446EC6101A98.MAI] >> 127.0.0.1
2006-11-23 18:22:52 [6AC468AA765F418CB3F0F90416B52E77.MAI] || 127.0.0.1
2006-11-23 18:22:53 [5184AA521A55452396F315A3CD53F324.MAI] >> 127.0.0.1
2006-11-23 18:22:56 [271B319D04E94471BBA7E439AE7472B9.MAI] >> 127.0.0.1
2006-11-23 18:22:56 [69EB99B791ED4E0B98519D0729AD0775.MAI] || 127.0.0.1
2006-11-23 18:22:57 [E2D3BDBB373E45FE9A4513BB312F25E8.MAI] >> 127.0.0.1
2006-11-23 18:23:03 [56EB93290EE24EE887ADE672656E3C01.MAI] >> 127.0.0.1
2006-11-23 18:23:04 [A01B2D403C424662BC33391C91228F5C.MAI] || 127.0.0.1
2006-11-23 18:23:09 [789428CCDEB04981A2A4446EC6101A98.MAI] || 127.0.0.1
2006-11-23 18:23:10 [843B9184E3D146E9916E809302E2E691.MAI] >> 127.0.0.1
2006-11-23 18:23:13 [5184AA521A55452396F315A3CD53F324.MAI] || 127.0.0.1
2006-11-23 18:23:17 [271B319D04E94471BBA7E439AE7472B9.MAI] || 127.0.0.1
2006-11-23 18:23:20 [E2D3BDBB373E45FE9A4513BB312F25E8.MAI] || 127.0.0.1
2006-11-23 18:23:25 [56EB93290EE24EE887ADE672656E3C01.MAI] || 127.0.0.1
2006-11-23 18:23:29 [843B9184E3D146E9916E809302E2E691.MAI] || 127.0.0.1
2006-11-23 18:23:36 [856D74416C78410DB04C2FD7A23B5525.MAI] >> 127.0.0.1
2006-11-23 18:23:39 [856D74416C78410DB04C2FD7A23B5525.MAI] || 127.0.0.1
2006-11-23 18:28:21 [851889D443BA4C239A8355FED2439D67.MAI] >> 127.0.0.1
2006-11-23 18:28:26 [851889D443BA4C239A8355FED2439D67.MAI] || 127.0.0.1
2006-11-23 18:28:51 [0CB30450E7054013B4AE372CD964481F.MAI] >> 127.0.0.1
2006-11-23 18:28:56 [0CB30450E7054013B4AE372CD964481F.MAI] || 127.0.0.1
2006-11-23 18:30:47 [C547B962F885464CA919F64DE653ACCE.MAI] >> 127.0.0.1
2006-11-23 18:30:53 [C547B962F885464CA919F64DE653ACCE.MAI] || 127.0.0.1

---------------------

someone_else
Posts: 302
Joined: Tue Jul 19, 2005 1:12 pm
Location: 404

some advice

Post by someone_else »

For those running a Windows SpamAssassin version, I strongly recommend you set the number of MTA threads to 1. One of the main drawbacks of Windows ports of SA (besides the obvious fact that they are slow and unreliable) is that they are usually single-threaded; if your MailEnable MTA threads value is not set to 1, MESpamC will be launched in multiple instances, multiple connections will be attempted on the (single) spamd process, and this (in my experience, at least) usually results in unpredictable behavior on the part of the latter. So again, if running a Windows port of SpamAssassin, you should set the number of MTA threads to 1.

If this is not a reasonable option in your environment (and, in fact, even if it is) I suggest you use a true (multi-threaded) version of SpamAssassin running under some form of UNIX (Linux being the most popular, and BSD being perhaps the most efficient). Having a real dedicated UNIX SA server is obviously the best choice, but as a second-best option you should consider a virtual SpamAssassin appliance; this combines the best of both worlds, and allows you to try a true SpamAssassin server before making any decision on whether a real dedicated server is worth considering.
MailEnable plugins:
DKeyEvent - DomainKeys/DKIM
MESpamC - SpamAssassin integration

burningice
Posts: 11
Joined: Fri Apr 07, 2006 2:31 pm

Re: some advice

Post by burningice »

Im sorry to be such a pain, but no matter what i do the error still keeps to reappear on every message handled by the MESpamC.

My MTA is running with only one thread, and the mespamc.log is still empty.

I know that WinSA32 is not an optimal solution, so i tried to connect to another SA-instance running on a BSD machine, but the problem is the same. Still keeps getting these Application Errors.

Im running ME Enterprise 2.32. Are their any know incompatible issues with this version?

someone_else
Posts: 302
Joined: Tue Jul 19, 2005 1:12 pm
Location: 404

issues

Post by someone_else »

Well, I am actually aware of some issues with ME Enterprise running in SQL mode; I have had some reports of there being problems with the ME API in those environments. Normally, in this case you would see errors in the EventLog about MESpamC not being able to use the MailEnable APIs.

Edit: see next post
Last edited by someone_else on Fri Nov 24, 2006 11:46 am, edited 1 time in total.
MailEnable plugins:
DKeyEvent - DomainKeys/DKIM
MESpamC - SpamAssassin integration

someone_else
Posts: 302
Joined: Tue Jul 19, 2005 1:12 pm
Location: 404

MESpamC 0.3.0.1

Post by someone_else »

MESpamC 0.3.0.1 is now available.


changes in this version:
- fixed: bug with application popup errors



known issues:

. issue: errors in the EventLog about MESpamC not being able to access MEAOAM (or any other MailEnable API)

. cause: MailEnable API

. resolution: locate the 'MEAIAM.DLL' file (normally found in the 'MailEnable\bin' folder) and copy it to the MESpamC installation folder

. applies to: MailEnable Enterprise
MailEnable plugins:
DKeyEvent - DomainKeys/DKIM
MESpamC - SpamAssassin integration

burningice
Posts: 11
Joined: Fri Apr 07, 2006 2:31 pm

Re: MESpamC 0.3.0.1

Post by burningice »

Im sorry, but the errors are still the same.

I've updated to 0.3.0.1 this morning and copied the MEAIAM.dll file into my SpamC installation directory. the mespamc.log is still empty but windows keep popping up these application error messages.

Im running ME Enterprise with my configuration stored in MySQL. Operating system is Windows 2003.

someone_else
Posts: 302
Joined: Tue Jul 19, 2005 1:12 pm
Location: 404

...

Post by someone_else »

You may try restarting your server, for any old API objects to be cleared. I have managed to reproduce the error you were receiving on a test server (with ME Ent running on MySQL with MyODBC), and the new build of MESpamC fixed these issues in that environment.
MailEnable plugins:
DKeyEvent - DomainKeys/DKIM
MESpamC - SpamAssassin integration

burningice
Posts: 11
Joined: Fri Apr 07, 2006 2:31 pm

Re: ...

Post by burningice »

someone_else wrote:You may try restarting your server, for any old API objects to be cleared. I have managed to reproduce the error you were receiving on a test server (with ME Ent running on MySQL with MyODBC), and the new build of MESpamC fixed these issues in that environment.
The error message is still popping up.

I've restarted the server and moved the dll-file to the install-dir. The weirdest thing though, is, that even if the application error is there both SpamC and SA seems to do there job. In a test period of 30 minutes i've received 135 emails and SA has processed them all.

But its annoying to have to click OK to a dozen of error messages everytime i logon to the server :/

jgrant07
Posts: 14
Joined: Sat Apr 29, 2006 7:03 am

Post by jgrant07 »

I have recently began seeing a problem on my mespamc filter using spamassassin on a virtual linux server that is on the same pc as my windows server with Mailenable.

My windows server ip is 10.0.0.1 and the linux server is 10.0.0.2. Spamassassin and mespamc seem to be working like a charm, and filtering about 95% of the emails coming through, but there are still a high amount of emails that come in and seem like they are not passing through to spamassasin.

I set the MTA max connections to 1 as stated in earlier post, and that seemed to help, but not much. The strange thing is, even in my spamIO log, I don't even see where the message is being passed over to spamassassin.

My question is if there is any other way to see how the message is being passed through once it is received by mailenable? I have checked the message header of the actual message, and it doens't even show that mespamc is being called.

I have also checked my mailenable filtering rules (as this was the problem from my ealier posts), but the only filter I have is if it detects a virus to delete it, which works fine.

Thanks for the help

someone_else
Posts: 302
Joined: Tue Jul 19, 2005 1:12 pm
Location: 404

logs

Post by someone_else »

You should check the MailEnable MTA logs; from your description, it appears that MESpamC is not being called on those messages.
MailEnable plugins:
DKeyEvent - DomainKeys/DKIM
MESpamC - SpamAssassin integration

burningice
Posts: 11
Joined: Fri Apr 07, 2006 2:31 pm

Re: ...

Post by burningice »

someone_else wrote:You may try restarting your server, for any old API objects to be cleared. I have managed to reproduce the error you were receiving on a test server (with ME Ent running on MySQL with MyODBC), and the new build of MESpamC fixed these issues in that environment.
Im beginning to receave these messages in my mespamc.log

could not access the MEAOAM component. Please make sure that MailEnable is installed and running properly on this machine.

and when they come i have to restart ME and then everything runs fine for a couple of hours, and then these errors appear again.

I've copied MEAOAM.dll to the spamc installation directory.

Are there something more i should be aware of?

someone_else
Posts: 302
Joined: Tue Jul 19, 2005 1:12 pm
Location: 404

MEAIAM

Post by someone_else »

You need to copy MEAIAM.DLL to the MESpamC folder; note that it's not a typo, MEAIAM and MEAOAM are two different files, and even though the MESpamC error refers to the latter, the solution implies the former (they seem to be interlinked, so that when MESpamC calls one, the other is also invoked by ME).
MailEnable plugins:
DKeyEvent - DomainKeys/DKIM
MESpamC - SpamAssassin integration

Post Reply