Catch-all script forwards wayward emails in Microsoft POP3 server

Catch-all mailboxes are great if you're using Exchange. But what if you're using the POP3 server in Windows Server 2003? There's no native way to implement a catch-all mailbox in Windows Server's POP3 server, but here's a catch-all script that allows any email not sent to a known mailbox for the Windows Server 2003 POP3 server to be forwarded to a specific mailbox.

I've written about how to implement "catch-all" mailboxes in Exchange Server—a way of forwarding all email that doesn't match a particular mailbox name in the directory.

Catch-all mailboxes are great if you're using Exchange, but what if you're using the simple POP3 server that Microsoft supplies with Windows Server 2003? There's no native way to implement a catch-all mailbox in Windows Server's POP3 server, which limits its usefulness.

To the rescue comes Alex Feinman (of the ISO Recorder utility) by creating a simple catch-all script that allows any email not sent to a known mailbox for the Windows Server 2003 POP3 server to be forwarded to a specific mailbox. The script registers an event sink with the POP3 server to run whenever a message arrives that has no matching recipient.

Setting up the catch-all script

Setting up the script is simple. Create a mailbox for the mail to be forwarded to, then unpack the script into a directory and configure it with the name of the mailbox.

Removing the catch-all is just as easy, although you'll need to re-register the script if the mail domain name changes or the POSTMASTER account is modified. (If you just run the SMTPREG.VBS script with no parameters, you'll get feedback telling you how to pass parameters to the script—it's a generic script that can be used to register event handlers of many kinds with the SMTP service.)

The script also doesn't (yet) honor quotas on the target mailbox or forward mail to more than one mailbox (or an account entirely outside the system), but IMHO these are fairly minor omissions.

About the author: Serdar Yegulalp is editor of the Windows Insight, (formerly the Windows Power Users Newsletter), a blog site devoted to hints, tips, tricks and news for users and administrators of Windows NT, Windows 2000, Windows XP, Windows Server 2003 and Vista. He has more than 12 years of Windows experience under his belt, and contributes regularly to SearchWinComputing.com and SearchSQLServer.com.

More information on this topic:

This was first published in July 2007

Dig deeper on Microsoft Windows Data Backup and Protection

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchServerVirtualization

SearchCloudComputing

SearchExchange

SearchSQLServer

SearchWinIT

SearchEnterpriseDesktop

SearchVirtualDesktop

Close