Is it possible to have multiple pickup events?

Discussion regarding the Standard version.

Is it possible to have multiple pickup events?

Post by Guest » Fri Aug 29, 2003 5:21 pm

I've been using SNIMTA for a few months (and I love it, thank you), but I'm now wanting to add the "attachment" filter as well using the KillSoBig.vbs pickup event. My problem is, I don't see anyway to run two pickup events at the same time. Am I right? I tried to make a batch file that called both the SNIMTA.exe and the KillSoBig.vbs, but it looks like neither work when I do that.

Any ideas? Can I have two pickup events in MailEnable Standard?




Post by Guest » Fri Aug 29, 2003 11:43 pm

Also found a thread on this issue here....
...but still don't have a solution.



Posts: 45
Joined: Wed Jul 23, 2003 3:05 pm
Location: Wisconsin, US

Post by wunder » Sat Aug 30, 2003 3:00 pm

I haven't looked into the SNIMTA filter, but if it's written in VBScript, you could potentially merge the code for both scripts. I know that's not an easy solution... I think you can only have a single MTA event.
John Wunderlin
All-Pro Sports Software


Post by Guest » Tue Sep 02, 2003 4:22 pm

It certainly looks like you can only have one pickup event, though (according to the aforementioned thread) you can call multiple events via a batch file. I'm still not able to get this to work, however.

Support -- any ideas? I can't be the ONLY person wanting to call two different pickup events, can I?



Posts: 22
Joined: Fri Jul 25, 2003 6:44 pm
Location: Wichita, KS

Multiple events with batch file

Post by Lantz » Tue Sep 02, 2003 4:29 pm

Yep, you're the ONLY one! :D

Seriously, the MTA calls your pickup event with passing it a single parameter (the name of the mail file) so what you need to do is have your batch file pick up that command prompt parameter, then refeed it into your other calls within the batch.

Hope this helps, I know it was the one thing that bit me several times. I setup my batch file, but each individual call inside didn't know what mail file to deal with, only the batch file got that parameter, and I was doing nothing with it.


Posts: 448
Joined: Wed Oct 02, 2002 11:29 pm
Location: Chesapeake, VA

Post by puzzled » Tue Sep 02, 2003 7:43 pm

The MTA passes two parameters to scripts or programs, namely the message/command filename (same name, different folders) and the connector ID, e.g., SMTP, so that your script/program knows where to find the file pair. (Your script/program retrives the path from the registry.) One way to call multiple filters is to set the MTA pick up event to a batch file that in turn calls the programs.

1) Using Notepad, create FILTERS.CMD and save it in ME's \bin folder.
cscript //T:20 "C:\Program Files\Mail Enable\Bin\killsobig.vbs" %1 %2
C:\Program Files\Mail Enable\SNIMTA\SNIMTA.exe %1 %2


2) In the MTA properties, check Enable pickup event and type "C:\Program Files\Mail Enable\Bin\filters.cmd" (with quotes) in the Program to execute on mail file: text box.

3) Click Ok, then right-click MTA and first Stop and then Start the MTA service.

The script/programs in this example are those that you mentioned, but any filter could be substituted or added in this batch file. When you change FILTERS.CMD you do not need to stop and start the MTA.

One caveat for your multiple script/program environment. The order of scripts/programs could be an important factor. If a previous script/program has deleted files, the second will get a filename that no longer exists. This could leave leave your script in a state of confusion or something worse. If you add a script of your own that follows another, be sure that it tests whether the files exist before operating on them.
Last edited by puzzled on Tue Sep 02, 2003 8:31 pm, edited 2 times in total.

Posts: 45
Joined: Wed Jul 23, 2003 3:05 pm
Location: Wisconsin, US

Post by wunder » Tue Sep 02, 2003 7:48 pm

Nice post, puzzled- thanks!
John Wunderlin
All-Pro Sports Software

Posts: 40
Joined: Tue Jul 29, 2003 12:37 pm

Works for me!

Post by Redman » Thu Oct 23, 2003 4:20 pm

Thanks puzzled!!

This works great for me. I was trying to do it on my own with VBS, but this simple batch file works perfectly.

I would recommend ME staff post this in the third party download section.

With SNIMTA, KillSoBig, and PandaCL running together, I have total protection!!

harlequin guest

nice one

Post by harlequin guest » Fri Jan 30, 2004 3:12 am

hi guys, this 'double' vb script thing is excellent, we have used the killsobig for long time now and been happy but wanting to use content filter as well like last our prayers are answered....thanks...

steve q


one quick note

Post by Guest » Fri Jan 30, 2004 8:59 pm

is that not being a coder of any sorts, i was kinda following advice to the when you said...

cscript //T:20 "C:\Program Files\Mail Enable\Bin\killsobig.vbs" %1 %2
C:\Program Files\Mail Enable\SNIMTA\SNIMTA.exe %1 %2

thats exactly what i put in the filters.cmd file

I kinda thought the equals signs were like commented out or something however when i looked at cpu i had 100% usage and 20 or more cmd.exe's running...

It took me a little while to figure it out and lo and behold its now working, just thought i'd post up in case any body else done the same thing as me..

thanks again guys... :)


Still having problems.

Post by Shawn » Wed Feb 25, 2004 12:58 pm

I have a filters.cmd set up and it runs a scripts that copies all mail into another mailbox and runs SNIMTA. However, it runs the script fine but it doesn't appear to be running SNIMTA. This is what I have in my batch file:

cscript.exe //T:20 "F:\Program Files\Mail Enable\Bin\copymail.vbs" %1 %2
"F:\Program Files\Mail Enable\SNIMTA\SNIMTA.EXE" %1 %2

Anyone have any ideas?

Posts: 77
Joined: Wed Feb 25, 2004 12:40 am
Location: United Kingdom

Post by wembley2000 » Mon Mar 01, 2004 1:15 am


I have following the instructions to the letter. However the filters.cmd isn't working. I am using the professional edition and therefore it might be slightly different.

The emails are still getting through and not being deleted.

Can anyone help?


Post by Guest » Tue Apr 06, 2004 11:23 pm

I am having the same problem than wembley2000.

I can not fire filters.cmd or filters.bat or picukp2.vbs in the pickup event path, only snimta.exe is being fired.

I have also Professional version.

Any help!? Support? :(


Post by Guest » Sat May 22, 2004 7:46 am

Don't know if this applies to you or not. I had to change all the commands to be be preceded with the directory short names, i.e. C:\PROGRA~1\MAILEN~1\BIN\ in both the MTA settings and in the .CMD file to get it to work. Got errors before doing that.

Posts: 67
Joined: Mon Jul 07, 2003 3:18 pm
Location: Dallas, TX, USA

Multiple SNIMTA MTA events. One nice, one mean.

Post by luptona » Tue May 25, 2004 12:51 am

Just curious if anyone has tried this.
I have tried the FILTERS.CMD as outlined above to run two separate SNIMTA events, one from the normal SNIMTA directory, one from another called SNIMTAKILL. In the first, I use the large list of words and phrases in the bannedphrases.txt file to tag all suspect spam (SNIMTA.CFG WUSSMODE=YES) and pass the tagged mail on to clients.
In the SNIMTAKILL directory, I use only really offensive words and phrases in the bannedphrases.txt file and changed the SNIMTA.CFG to delete mail (WUSSMODE=NO).
Only the SNIMTA one works, regardless of whether it is before or after the SNIMTAKILL one. Any ideas why only the one event will process?
(I have run MEMTA -DEBUG). The MTA shows that they BOTH run on the offending test mail, but I have confirmed that only the SNIMTA one actually does anything. There are NO log entries in the stats under the SNIMTAKILL copy.
Thoughts? Suggestions?

Post Reply