Search WWW Search

Friday, September 01, 2006

Exchange: Export SMTP Relay List


There may come a time where you wish to export your allowed relay list in your SMTP virtual server. There is nothing in the SMTP Virtual server that can export the list. This can become encumbersome if your organization maintains a long list of relay hosts. I first approached this by trying to perform an LDIFDE query for the SMTP VS object in ADSIEDIT.

CN=1,CN=SMTP,CN=Protocols,CN=EXC03,CN=Servers,CN=First Administrative Group,CN=Administrative Groups,CN=MSexchange911,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=Msexchange911,DC=net

However after reviewing the output and viewing the msExchSMTPRelayIPList I noticed that the output was in octet format.


After doing some research, I came across the following KB article which converts different string formats.

SAMPLE: ARRAYCONVERT.EXE Variant Conversion Functions

After some testing, I could not get this to work. I came across another utility from the Exchange 2000 resource kit called IPSec.vbs. This script has a wide variety of functions to manage your IP Security settings including exporting your relay list. To export the relay list using IPSec.vbs:

1. Download IPSec.vbs[ James Chong Scripts ]

Download the entire folder ExIPSecurity and save it to your C:
2. Open command prompt and go to your ExIPSecurity directory.

3. C:\ExIPSecurity>regsvr32 exipsec.dll

4. C:\ExIPSecurity>cscript ipsec.vbs -s Exchangeserver -o e -r relay -d DCServername > c:\ExIPSecurity\relaylist.txt

This will export the relay list to a relaylist.txt file.

Other useful tips using IPsec.vbs

Ipsec.vbs -d dc1 -o e -r connection
Ipsec.vbs -d dc1 -o a -r relay -v
Ipsec.vbs -d dc1 -o a -r accept -v -m
Ipsec.vbs -d dc1 -s server1 -o d -r connection -t domain -v domain1
Ipsec.vbs -d dc1 -s server1 -o c -r deny
Ipsec.vbs -d dc1 -i 2 -o s -r relay -g grant

Note that options '-o s' and '-t domain' are not allowed in global accept/deny lists.

James Chong
MCSE M+, S+, MCTS, Security+

How useful was this article? Want to see a tip not listed? Please leave a comment.


Anonymous Anonymous said...

Thanks for the tips. I am new to scripting and have a large list of ip's with sm's to add. How can a loop be added to achieve this?

11:07 AM  
Blogger TonyC said...

This article was useful as it gave the correct syntax to use to export to a text file, all the IPs which our ORG allows to relay/connect to our front-end SMTPVSs. The article has a hyperlink to an FTP area which no longer exists .... also, it would be great if the article gave the full, correct syntax of how to 'import' or otherwise update a large number of IPs into the 'allowed' list ... this would be great for a very quick and simple 'recovery' of such long lists as (i'm sure) many companies hold in their 'relay or connection granted' lists .... many thanks Tony C.

1:44 AM  
Blogger TonyC said...

This article was semi-useful as it gave me the correct syntax to use to export to a text file, all the IPs which or ORG allows to relay/connect to our front-end SMTPVSs. The article had a hyperlink to an FTP area which no longer exists .... also, it would be great if the article also gave the full correct syntax of how to 'import' or otherwise update a large number of IPs into the 'allowed' list ... this would be great for a very quick and simple 'recovery' of such long lists as (i'm sure) many companies hold in their 'relay or connection granted' lists .... many thanks Tony C.

1:44 AM  
Blogger xinxin said...

The louis vuitton is one of the products in the Monogram canvas family of louis vuitton bags . Other quite similar bags in this family include the likes of Monogram Roses Canvas , the Deauville and the Sac Chasse Bag; among others. While I confess to being an old-time fan of Monogram Rubis , having used so many of the products from this label, it is the Carryall - which I have only gotten to use quite recently - that I have been most enchanted with.

6:18 PM  
Blogger Nandha said...

I have received an error "Quitting: Syntax incorrect. Type 'ipsec.vbs' for usage." while trying to get the SMTP relay IP's. Please assist me to the relay IP's.

5:44 AM  
Blogger Nandha said...

and also the exported .txt file size is 1KB alone....

5:45 AM  
Blogger 风骚达哥 said...

20151012 junda
Abercrombie & Fitch Factory Outlet
michael kors outlet
coach factory outlet
michael kors outlet
Louis Vuitton Handbags Factory Store
louis vuitton
Cheap Jordans For Sale Wholesale
oakley sunglasses,oakley vault,prescription sunglasses,polarized sunglasses,aviator sunglasses,spy sunglasses,oakleys,oakley canada,cheap oakley sunglasses,oakley frogskins,oakley holbrook,cheap sunglasses,wayfarer sunglasses,oakley standard issue,fake oakleys,oakley glasses,,oakley prescription glasses,oakley goggles,sunglasses for men,oakley gascan,oakley store,oakleys sunglasses
uggs australia
ugg boots
cheap ugg boots
michael kors handbag
Coach Factory Outlet Online Sale
Louis Vuitton Outlet USA
Air Jordan 4 Toro Bravo
canada goose outlet
toms outlet
New Louis Vuitton Handbags Outlet
Michael Kors Handbags Outlet Deals
michael kors outlet
Wholesale Authentic Designer Handbags
Ugg Boots,Ugg Boots Outlet,Ugg Outlet,Cheap Uggs,Uggs On Sale,Ugg Boots Clearance,Uggs For Women
cheap jordan shoes
michael kors outlet online
louis vuitton handbags
Coach Factory Outlet Private Sale
true religion jeans
Louis Vuitton Bags On Sale
Jordan 13 Shoes For Sale
Ralph Lauren Outlet Clothing

6:16 AM  
Blogger oakleyses said...

louis vuitton outlet, oakley sunglasses, michael kors handbags, cheap jordans, prada handbags, uggs outlet, michael kors outlet, oakley sunglasses, uggs on sale, ray ban sunglasses, burberry outlet, tiffany jewelry, uggs on sale, kate spade, gucci handbags, ray ban sunglasses, prada outlet, longchamp outlet, louboutin uk, burberry factory outlet, tory burch outlet, nike air max, tiffany jewelry, christian louboutin, louboutin shoes, oakley sunglasses, cheap oakley sunglasses, chanel handbags, michael kors outlet store, louis vuitton outlet, nike outlet, ralph lauren polo, louis vuitton, christian louboutin, michael kors outlet online, longchamp outlet, uggs outlet, michael kors outlet online, nike air max, longchamp bags, replica watches, ralph lauren outlet, oakley sunglasses, ray ban sunglasses, louis vuitton outlet online, nike free, michael kors

6:30 PM  
Blogger oakleyses said...

burberry pas cher, lunette oakley pas cher, coach outlet, kate spade outlet, true religion jeans, converse, coach outlet, longchamp soldes, north face uk, michael kors, louboutin pas cher, new balance, lululemon outlet, coach purses, nike air max, hermes pas cher, nike tn pas cher, vans pas cher, coach outlet store online, mulberry uk, lunette ray ban pas cher, nike air max uk, sac guess pas cher, nike air force, nike roshe run pas cher, longchamp pas cher, north face pas cher, nike air max pas cher, ray ban uk, true religion outlet, abercrombie and fitch, polo lacoste pas cher, true religion outlet, michael kors, jordan pas cher, nike free, polo ralph lauren uk, vanessa bruno pas cher, true religion outlet, hogan sito ufficiale, ralph lauren pas cher, michael kors outlet online, nike free pas cher, nike roshe uk, abercrombie and fitch UK, nike blazer pas cher, hollister uk

6:32 PM  
Blogger oakleyses said...

converse shoes outlet, salvatore ferragamo, timberland boots, softball bats, herve leger, ray ban, hollister, louboutin, gucci, nike roshe run, iphone cases, beats by dre, mcm handbags, oakley, p90x workout, insanity workout, wedding dresses, abercrombie and fitch, abercrombie, nike air max, mac cosmetics, babyliss pro, valentino shoes, bottega veneta, mont blanc, converse, jimmy choo outlet, hollister clothing, nike air max, north face outlet, new balance shoes, north face outlet, instyler ionic styler, soccer shoes, lululemon outlet, asics running shoes, ghd hair, giuseppe zanotti, soccer jerseys, nfl jerseys, longchamp uk, reebok outlet, nike air huarache, chi flat iron, hermes handbags, vans outlet, polo ralph lauren, celine handbags, nike trainers uk, vans scarpe

6:34 PM  
Blogger oakleyses said...

toms shoes, supra shoes, montre pas cher, ugg uk, juicy couture outlet, moncler, lancel, michael kors outlet online, ugg pas cher, michael kors handbags, barbour, doke & gabbana, michael kors outlet, coach outlet, louis vuitton uk, canada goose jackets, pandora charms, moncler, ugg,ugg australia,ugg italia, links of london uk, moncler jackets, hollister, juicy couture outlet, canada goose outlet, swarovski uk, pandora jewelry, canada goose pas cher, canada goose outlet, marc jacobs, moncler pas cher, thomas sabo uk, swarovski jewelry, karen millen uk, louis vuitton, moncler, moncler uk, sac louis vuitton, canada goose, moncler outlet, louis vuitton, canada goose, wedding dresses uk, ugg,uggs,uggs canada, canada goose uk, sac louis vuitton, moncler, replica watches, barbour jackets uk, bottes ugg pas cher, canada goose jackets

6:35 PM  
Blogger Junda Xu said...

20151026 junda
michael kors outlet
louis vuitton outlet
nfl jerseys
cheap ugg boots
Coach Factory Outlet Online Sale
air max 95,nike golf,nike janoski,air max 1,nike canada,nike plus,nike shox,nike factory store
Louboutin Red Bottoms Shoes Outlet
oakley sunglasses
louis vuitton outlet
ralph lauren polo
michael kors outlet
michael kors outlet sale
ugg boots
Authentic Louis Vuitton Handbags Cheap Online
mont blanc
michael kors outlet
Gucci Outlet Online Sale
michael kors handbags
Authentic Louis Vuitton Belts Outlet Store
michael kors outlet
Coach Factory Outlet Private Sale
true religion jeans
tory burch outlet
Oakley Vault Outlet Store Online
hollister clothing store
nike trainers
Louis Vuitton Handbags Official Site
michael kors handbag
Louis Vuitton Handbags Factory Store
uggs australia

1:17 AM  
Blogger Minko Chen said...

adidas outlet
soccer jerseys wholesale
michael kors handbags
mulberry outlet store
prada outlet
cheap nba jerseys
ralph lauren uk
swarovski crystal
oakley sunglasses wholesale
chanel handbags outlet
ralph lauren outlet
cheap jordan shoes
canada goose coats
toms outlet store
puma outlet
north face outlet store
ugg boots
black friday deals
ugg outlet
toms outlet

6:45 PM  

Post a Comment

<< Home

xml:lang="en" lang="en"> MS Exchange Tips: Exchange: Export SMTP Relay List