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
someone_else
Posts: 302
Joined: Tue Jul 19, 2005 1:12 pm
Location: 404

MESpamC 0.2.0

Post by someone_else »

MESpamC 0.2.0 and MESpamCmde 0.2.0 are now available.


changes in this version:
- added: content filtering (both pre-SA and post-SA)
MailEnable plugins:
DKeyEvent - DomainKeys/DKIM
MESpamC - SpamAssassin integration

GmanOTM
Posts: 3
Joined: Sun Jul 02, 2006 2:09 pm

MEspamc and ClamAV for Windows Pickup event handler

Post by GmanOTM »

Hi

I've found a few posts regarding spamassassin and clamav specifcally or managing more than one process via the ME pickup event in general but am somewhat confused as to best approach.

On Windows 2000 server I'm running SpamD (with cygwin) as service using MEspamC for pickup event.

I've now installed "ClamAV for Windows" on the same server and have "Run clamd" running as a windows service. No errors in clamd logfile or windows application or system event viewer. Freshclam worked fine as well

Now, (before I botch things up), what I was expecting to do is create a "Pickup.cmd" batch file for ME pickup event which would then execute MESpamC.exe and Clam.exe (in that order).

Then I noticed coments in the ME forum using something more elaborate. Is it necessary for such an approach?

Could you comment/clarify on this in the context of MEspamC?

Thanks

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

MESpamC and ClamAV/clamd

Post by someone_else »

The simple CMD approach (with MESpamC and Clam running one after the other) should work ok, and there should be no problem with that. You might want to look into using a Clam client though, instead of the main Clam engine itself, as - like with SpamAssassin's spamd - it provides better performance. There is a ClamD client available some topics down in this forum, and while I've never tried it myself, it is reportedly working ok.
MailEnable plugins:
DKeyEvent - DomainKeys/DKIM
MESpamC - SpamAssassin integration

TrialUserXP
Posts: 35
Joined: Sat Feb 18, 2006 8:07 am

Post by TrialUserXP »

g'day,

newbie here, i've downloaded the win32 build of SA according to the post above...

i've installed active perl as well...

so what's the next move i should use? can i use it right away?

is there any clear instruction in this forum?

thank you in advance.

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

installing spamd (reprised)

Post by someone_else »

Instructions for installing the win32 build of SpamAssassin are available in the build's archive (see the readme.txt file and the /doc folder). You'll basically want to run spamd as a service and have it invoked with the necessary command line arguments ('A' is especially important, but all this is available in the spamd documentation). You can test your spamd installation by using the included spamc command line executable. Then, once you've got spamd up and running, you can install and configure MESpamC.
MailEnable plugins:
DKeyEvent - DomainKeys/DKIM
MESpamC - SpamAssassin integration

FuzzyWuzzy
Posts: 13
Joined: Sun Jul 30, 2006 12:58 pm

Post by FuzzyWuzzy »

I've encountered some problems while configurating and testing MESpamC.

The problems resolves in that when I add multiply people in the "TO: " list of my mail at the same server running MESpamC, then only one the emails gets checked for spam and the others run free right forward to the receivers.

I've confirmed this by sending a test mail containing the text
XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X
resulting in a spam-score of 1000points

The log of spamassassin shows this:
Sun Jul 30 14:58:49 2006 [23922] info: spamd: connection from ws221.ltsp [81.19.251.221] at port 4813
Sun Jul 30 14:58:49 2006 [23922] info: spamd: processing message <075601c6b3d4$912d46a0$66c9010a@mail2world.com> for (unknown):107
Sun Jul 30 14:58:53 2006 [23922] info: spamd: identified spam (1000.5/5.0) for (unknown):107 in 4.0 seconds, 2713 bytes.
Sun Jul 30 14:58:53 2006 [23922] info: spamd: result: Y 1000 - AWL,GTUBE,HTML_MESSAGE,SPF_HELO_PASS,SUSPICIOUS_RECIPS scantime=4.0,size=2713,user=(unknown),uid=107,required_score=5.0,rhost=ws221.ltsp,raddr=81.19.251.221,rport=4813,mid=<075601c6b3d4$912d46a0$66c9010a@mail2world.com>,autolearn=no
Sun Jul 30 14:58:53 2006 [23825] info: prefork: child states: BI
Sun Jul 30 14:58:53 2006 [23825] info: spamd: handled cleanup of child pid 23922 due to SIGCHLD
Sun Jul 30 14:58:53 2006 [23825] info: spamd: server successfully spawned child process, pid 24692
Sun Jul 30 14:58:54 2006 [23825] info: prefork: child states: II


And adds the header to the first mail, but not the others.

Is this an Mail Enable MTA runtime specific problem, or a problem with MESpamC sending false information to spamd?

Testing with:
- Windows 2003 x64 Standard
Running Mail Enable Enterprise 2.04
With MTA: MESpamC 2.0.10

Spamassassin server:
Debian Unstable
SpamAssassin version 3.1.3
running on Perl version 5.8.8

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

hmm...

Post by someone_else »

I'm not sure I understand exactly what you mean. Are you trying to send an outgoing mail with multiple recipients in the 'To: ' header field, and only one of those 'messages' gets processed?

When you send such a message, MESpamC will normally be called by MailEnable to filter that ONE message you originally sent; after MESpamC has processed the message (with SpamAssassin), ME will 'split' the message, i.e. it will send it to each recipient.

MESpamC will process every message it is called on, but it could well be that for some reason, it is either not called on every message, or else its results are not properly distributed.
MailEnable plugins:
DKeyEvent - DomainKeys/DKIM
MESpamC - SpamAssassin integration

FuzzyWuzzy
Posts: 13
Joined: Sun Jul 30, 2006 12:58 pm

Post by FuzzyWuzzy »

You didnt understand me fully. Let me split it down:

I'm sending an email from an server outside (eq. icqmail.com) with multiply receivers all on the same domain (eq. example.com). It may come down to this:

From: testingserver@icqmail.com
To: test1@example.com; test2@example.com, test3@example.com

And the example.com would by my domain running the MESpamC/Mail Enable software.
But here's the problem. Only test1@example.com would get processed by spamassassin and therfore letting test2 and test3 go through.

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

some things to check

Post by someone_else »

1. Check your MailEnable logs, and see if MESpamC is invoked on all messages.

2. Check if MESpamC has logged any errors in mespamc.log
MailEnable plugins:
DKeyEvent - DomainKeys/DKIM
MESpamC - SpamAssassin integration

baratus
Posts: 6
Joined: Tue Aug 01, 2006 6:48 pm

MESpamC error log suggestion

Post by baratus »

Would it be possible to have critical errors logged to both the Application event log and the other log file? I just spent 45 minutes banging my head up against a problem I was having and then finally saw the note in the CHM file that says the critical errors are logged in the Application log.

The other suggestion I have is make the "critical" errors a little more descriptive. The problem I was having was that SpamD was taking too long (since my test server is a virtual server on my home PC) and so it was timing out, but the error in the event viewer showed as simply "MESpamC received an invalid response from SpamD host 127.0.0.1". I only figured out the timeout by the fact the default timeout value was 9 seconds and the spamd.log showed that processing was taking 14-30 seconds each time.

Let me know if you need any further info. Awesome filter, working great now that I've figured out the timeout problem :)

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

re: suggestions

Post by someone_else »

Normally, the 'invalid response' message will contain the actual response MESpamC received; in this case, though, there's nothing there because, given the timeout, there was no response. This is actually a design flaw in the current version of MESpamC, and will be corrected in the next release.

I will also add an option in the next version to log critical errors to the text log instead of the EventLog.
MailEnable plugins:
DKeyEvent - DomainKeys/DKIM
MESpamC - SpamAssassin integration

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

MESpamC 0.2.1

Post by someone_else »

MESpamC 0.2.1 and MESpamCmde 0.2.1 are now available.


changes in this version:
- added: option to SuppressFileNotFoundErrors
- added: option to LogCriticalErrorsToEventLog
- fixed: bug with ignoring outgoing messages
- fixed: bug with timeout errors not being reported
MailEnable plugins:
DKeyEvent - DomainKeys/DKIM
MESpamC - SpamAssassin integration

Annelies
Posts: 5
Joined: Tue Aug 01, 2006 10:49 pm

Post by Annelies »

Hi, I'm very new at this, so forgive me if I'm being very stupid, but I'm trying to get spamD working (on the local machine) by using the special win32 build of SpamAssassin.

Windows 2003 server
MailEnable Enterprise 2.11

I checked, the service is running: in regedit:
c:\perl\bin\spamd.bat -A 127.0.0.1 -i 127.0.0.1 -p 783

In MESpamCmde.ini
[SpamD]
Hosts=127.0.0.1
Port=783
Timeout=9

I have given mespamcmde.exe access to the port 783 in the FireWall

Just like GmanOTM I get the error message for each email in the MEspamC.log :
2006/08/02 00:11:55 could not connect to 127.0.0.1

I know I should try to see if spamD is listening on port 783 by using a Telnet connection, but I don't have a clue how that works....

Is there anyone out there who can help me?

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

Telnet

Post by someone_else »

Annelies wrote:I know I should try to see if spamD is listening on port 783 by using a Telnet connection, but I don't have a clue how that works....
(in Windows) Start Menu -> Run -> 'Telnet' (and click 'Ok')
-> Telnet console will start
(in the Telnet consolse) 'set local_echo' (and hit Return/Enter)
-> will set local_echo to on
(in the Telnet consolse) 'open 127.0.0.1 783' (Return/Enter)
-> will open a connection to spamd
(in the Telnet consolse) 'azerty' (Return/Enter)
-> will send spamd an invalid command (azerty)
>> spamd should reply will an 'unrecognized command' message
MailEnable plugins:
DKeyEvent - DomainKeys/DKIM
MESpamC - SpamAssassin integration

Annelies
Posts: 5
Joined: Tue Aug 01, 2006 10:49 pm

Post by Annelies »

Thank you so much for your quick reaction!

Tried it and got (after 'open 127.0.0.1 783'):
Connecting to 127.0.0.1...Could not open connection to the host, on port 783: Connection failed

Any idea why spamd can't connect?

Post Reply