Tip

Catch-all script forwards wayward emails in Microsoft POP3 server

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

Requires Free Membership to View

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

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

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:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.