Problem solve Get help with specific problems with your technologies, process and projects.

Importing and exporting Exchange Server 2003 sender filters

Exchange 2003's sender filtering lets you specify who can and can't send email from your organization. Learn how you can import or export a copy of your Exchange server's sender filters to reuse somewhere else or to just have on hand for reference.

Exchange Server 2003's sender filtering is a helpful feature that lets you specify who can and can't send email...

from within your organization.


If you've ever wanted to export a copy of your Exchange Server's sender filters and reuse them somewhere else, or just have a copy on hand for reference, these limitations can be frustrating.

Exchange Server guru Brian Desmond has come with a way to import and export a list of filtered sender domains in Exchange 2003. I've reprinted his techniques here in detail with his permission.

To export:

From a command prompt or batch file, run the following command:

ldifde -m -f senderfilter.ldf -r "(objectCategory=msExchSMTPTurfList)" 
-d "cn=configuration,dc=yourdomain " -l msExchTurfListNames

For this to work in your organization, you'll need to replace dc=yourdomain with your own domain's address. For instance, if your domain for this Exchange server is, you'd render this as dc=utena,dc=ohtori,dc=org. For a local address like myserver.local, use dc=myserver,dc=local.

The results will be exported to a file named senderfilter.ldf, which can be read in any text file.

To import:

If you're importing this list into a new domain, edit the senderfilter.ldf file and replace each dc=domain instance with the proper domain description as outlined above. Then use this command to import the file:

ldifde -i -f senderfilter.ldf

If you're using this to copy lists to many domains, you can replace the domain references in the file with dc=x and use the command:

ldifde -i -f senderfilter.ldf –c dc=x dc=targetdomain,dc=local

The enumeration for the domain name you're copying to is dc=targetdomain,dc=local, which allows you to keep the file in one consistent format and only make the changes needed when supplying the import command.

More Microsoft Exchange tips and resources:

Prevent Exchange Server 2003 users from sending or receiving Internet email

Securing email messages with Outlook 2003's Information Rights Management feature

Microsoft Exchange administration tools and downloads

Microsoft Exchange Server 2003 Reference Center

Note that if you import a list of filtered senders to an Exchange server that already has such a list, the results will be merged and not replaced. In other words, any existing filtered senders will be kept, and the ones listed in the file will be added.

About the author: Serdar Yegulalp is editor of Windows Insight.


Exporting senderfilter isn't a problem, but importing is.

I use this command for export:

ldifde -m -f senderfilter.ldf -r "(objectcategory=msexchsmtpturflist)" -d "cn=configuration,dc=interlogica,dc=nl" -l msexchturflistnames

Now I get a senderfilter.ldf file. I can modify it and would like to import this on the same server.

I use this command for import:

ldifde -i -f senderfilter.ldf -r "(objectcategory=msexchsmtpturflist)" -d "cn=configuration,dc=interlogica,dc=nl" -l msexchturflistnames

However, this is not working.

I didn't modify the *.ldf file because it's the same server.

Can you tell me what's going wrong?
—Addy L.


From what I can tell, the import command you're using is not in the right format. To import you just need to say:

ldifde -i -f senderfilter.ldf

The other options aren't needed.
—Serdar Yegulalp, tip author


When I use ldifde -i -f senderfilter.ldf, I get the following messages:

Connecting to ""

Logging in as current user using SSPI

Importing directory from file "senderfilter.ldf"

Loading entries

There is a syntax error in the input file. Failed on line 1. The last token starts with '"'.
0 entries modified successfully. An error has occurred in the program
No log files were written. In order to generate a log file, please specify the log file path via the -j option.

Any help would be great.
—Ryan J.


It's possible that the exported file was edited and then saved, but its codepage (UTF-8 vs. ASCII) was not retained when it was saved. Perhaps you should try using a different text editor and see if that helps.
—Serdar Yegulalp, tip author

Do you have comments on this tip? Let us know.

Please let others know how useful this tip was via the rating scale below. Do you have a useful Exchange Server or Microsoft Outlook tip, timesaver or workaround to share? Submit it to If we publish it, we'll send you a nifty thank-you gift.

It does have some limitations though -- it only stores about 800 addresses and can't be easily imported or exported from Exchange Server.
This was last published in June 2006

Dig Deeper on Microsoft Exchange Server Administration Tools

Start the conversation

Send me notifications when other members comment.

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

Please create a username to comment.