Auto-Sender Whitelist

Discussion for developers using MailEnable.
Post Reply
schmidtc63
Posts: 10
Joined: Thu Feb 08, 2018 10:38 pm

Auto-Sender Whitelist

Post by schmidtc63 »

Greetings.

One of the features I miss from my previous MTA/Anti-spam software was the Auto-Sender Whitelist -- i.e, if I send a message to someone, they can always send to me regardless of any anti-spam functions. My customers really relied on it because it bypassed greylisting, spam assassin, etc.

I finally had a few free hours over the past couple days, so I wrote one. It's a COM event, called by MEMTA (ME provides a facility through a registry entry for calling COM events). It simply monitors outgoing messages and creates an .LST file in the user's config directory (%MailEnableRoot%\Config\Postoffices\<postoffice>\Mailboxes\<user>\Senders\Whitelist\).

Note that the user has to be authenticated to do this, either through a trusted IP or SMTP auth of some kind.

I've tested it on 64-bit Windows and it works great. I have not tested on 32-bit but the .dll is written to handle both.

If anyone is interested, please let me know. You can leave a response here or contact me at schmidtc@kvalley.com.

Installation is easy:
1. Drop the .dll in your MailEnable bin or bin64 directory (depending on your OS)
2. Double-click the appropriate .reg file (32- or 64-bit)
3. Stop and restart the MTA service in MailEnable

The COM event exits gracefully no matter what happens during execution.

Open your event viewer and view the Applications node. You'll see some KvalleyMTA entries -- you can test by sending out a message to someone. You should see an entry created in the event log and an .LST file created in the config directory mentioned above.

Some notes:
1. My postoffices are named after the domain they handle -- Kvalley.com\Kvalley.com
This is important because IP auth -- usually a trusted server relaying email -- results in some information in the Command File not
being populated. To overcome this, I take the sender's email address (your local user) and parse it for the post office and the user.
If you have postoffices that are not in the domain format, or multiple domains per postoffice and you allow relaying through
trusted IPs, this will not work for you. It won't break anything, it simply will exit when that happens.

2. If you already have a Pickup Event registered in Agents/MTA, this will overwrite it so don't do that. MailEnable only allows one Pickup Event Agent.

Chris

dustin
Posts: 34
Joined: Fri Jan 07, 2011 6:34 pm

Re: Auto-Sender Whitelist

Post by dustin »

Chris, this is awesome. This has always been one of my main gripes with MailEnable but I never got around to writing anything to do this. On a whim I decided to do another google search today and your post showed up. Would it be possible to grab a copy of this DLL from you? If so please PM me a link and I can PM you some beer.

MailEnable should really already have this as a main feature of their product, it's quite sad it isn't.

Post Reply