Catch-all script forwards wayward emails in Microsoft POP3 server

Catch-all script forwards wayward emails in Microsoft POP3 server

Serdar Yegulalp, Contributor

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

    Requires Free Membership to View

    By submitting your registration information to SearchWindowsServer.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchWindowsServer.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

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

Join the conversationComment

Share
Comments

    Results

    Contribute to the conversation

    All fields are required. Comments will appear at the bottom of the article.

    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.