Google
Search WWW Search msexchangetips.blogspot.com

Friday, September 01, 2006

Exchange: Export SMTP Relay List

Summary:

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.

msExchSmtpRelayIpList::
GAAAgCAAAIA8AACARAAAgAEAAABMAAAAAAAAAAAAAAAB
AAAAAQAAAAIAAAACAAAABAAAAAAAAABMAA
CAAAAAAAAAAAAAAAAAAAAAAP////8CAgIC

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

SAMPLE: ARRAYCONVERT.EXE Variant Conversion Functions
http://support.microsoft.com/kb/q250344/

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

ftp://ftp.smtp25.org/[ 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

Examples:
Ipsec.vbs -d dc1 -o e -r connection
Ipsec.vbs -d dc1 -o a -r relay -v 127.0.0.1
Ipsec.vbs -d dc1 -o a -r accept -v 123.123.123.0 -m 255.255.255.0
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+
msexchangetips.blogspot.com


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

22 Comments:

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 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 xjd7410@gmail.com 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.com,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...

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 Unknown 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
1128minko

6:45 PM  
Blogger xumeiqing said...

151202meiqing
michaek kors handbags
nike trainers
chanel bags
north face jackets
pandora jewelry
michael kors outlet clearance
louis vuitton bags
lebron james shoes
ralph lauren outlet
nike huarache
jordan 11
cheap jordans
lebron james shoes 2015
cheap uggs
ugg boots
canada goose
ugg australia
michael kors outlet
ugg slippers
replica watches
uggs for sale
ugg boots for men
toms shoes
coach outlet online
cheap oakley sunglasses
louis vuitton outlet
michael kors outlet online
uggs australia
ugg boots
oakley sunglasses
michael kors outlet
ray ban sunglasses
uggs on sale
canada goose outlet
christian louboutin
uggs outlet
nike air max
coach factory outlet
ed hardy clothing
cheap jordans

5:31 PM  
Blogger Unknown said...

cheap oakley sunglasses
ray ban sale
nike outlet
prada outlet
nike sneakers
swarovski crystal
ralph lauren polo shirts
cheap oakley sunglasses
michael kors usa
wellensteyn coats
true religion jeans
air force one shoes
lululemon outlet
michael kors handbags
ray ban sunglasses
ralph lauren
true religion sale
coach outlet store online,coach outlet store,coach outlet
canada goose outlet
instyler ionic styler,instyler,instyler ionic styler pro
cheap ugg boots
air jordan 11 free shipping
swarovski outlet
hollister pas cher
cleveland cavaliers
CHENG1202

11:58 PM  
Blogger John said...

cheap oakleys
hollister co
nike running shoes
longchamp outlet
ray-ban sunglasses
louis vuitton handbags
tory burch outlet
ugg boots
jordans
toms shoes
uggs outlet
uggs on sale
oakley sunglasses
christian louboutin outlet
louis vuitton
jordan shoes
coach outlet
abercrombie and fitch
ugg boots
hollister jeans
cheap uggs for sale
louis vuitton outlet
nike air max
hollister uk
lebron james shoes
ugg slippers
cheap uggs
gucci outlet
nike huarache
uggs on sale
polo ralph lauren outlet
20151203yuanyuan

7:12 PM  
Blogger Unknown said...

cheap oakley sunglasses
ray ban sale
nike outlet
prada outlet
nike sneakers
swarovski crystal
ralph lauren polo shirts
cheap oakley sunglasses
michael kors usa
wellensteyn coats
true religion jeans
air force one shoes
lululemon outlet
michael kors handbags
ray ban sunglasses
ralph lauren
true religion sale
coach outlet store online,coach outlet store,coach outlet
canada goose outlet
instyler ionic styler,instyler,instyler ionic styler pro
cheap ugg boots
air jordan 11 free shipping
swarovski outlet
hollister pas cher
cleveland cavaliers

12:30 AM  
Blogger John said...

prada outlet
ugg australia
hollister uk
canada goose jackets
ugg outlet
nike trainers
ralph lauren polo
ugg boots
louis vuitton outlet
ugg boots
cheap soccer shoes
coach outlet
abercrombie fitch
michael kors handbags
cheap oakleys
ray ban sunglasses outlet
fake oakleys
michael kors uk
pandora jewelry
nike huarache
oakley sunglasses
concords 11
montblanc
fitflops
toms
louis vuitton bags
coach factory outlet
louis vuitton handbags
canada goose outlet
michael kors handbags
michael kors outlet
20151207yuanyuan

11:15 PM  
Blogger raybanoutlet001 said...

ugg outlet
hermes belt
ralph lauren
nike blazer
pandora jewelry
longchamp le pliage
nike free 5
ugg outlet
jordan shoes
coach outlet online
2017.6.7

8:27 PM  
Blogger Unknown said...

longchamp bags
michael kors handbags
chrome hearts online store
van cleef
cheap jordans
longchamp bags
cheap jordans
adidas nmd
yeezy shoes
true religion outlet

12:48 AM  
Anonymous Anonymous said...

air jordan shoes
moncler outlet
canada goose jackets
keen sandals
michael kors outlet clearance
rolex watches
cheap jordan shoes
yeezy boost
toms outlet
coach outlet store
mt0526

12:09 AM  
Blogger Unknown said...

zzzzz2018.7.14
nike presto
jordan shoes
moncler jackets
coach outlet online
ralph lauren outlet
canada goose jackets
mbt shoes outlet
cheap snapbacks
christian louboutin sale
moncler online

10:28 PM  
Blogger Unknown said...

www11.20

ugg boots
tory burch outlet

nike shoes
red bottom shoes
christian louboutin outlet
longchamp outlet
off white shoes
louboutin shoes
prada shoes




11:14 PM  
Blogger jjjjjjjjjjjjj said...

iniki
kevin durant shoes
adidas stan smith
air max
yeezy boost 350 v2
curry 4
golden goose starter
adidas nmd
golden goose
pure boost

10:59 PM  
Blogger Nashwa Mostafa said...



شركة نقل عفش بالمدينة المنورة
شركة عزل أسطح بالمدينة المنورة
نقل أثاث من المدينة المنورة إلي تبوك
نقل أثاث من المدينة المنورة إلي القصيم
شركة نقل أثاث بالمدينة المنورة
شركة مكافحة النمل الأبيض بالمدينة المنورة
شركة مكافحة حشرات بالمدينة المنورة
شركة مكافحة الحمام بالمدينة المنورة
شركة تخزين أثاث بالمدينة المنورة
شركة رش مبيدات بالمدينة المنورة
نقل أثاث من المدينة المنورة الي حائل
---------------------------------
تركيب طوارد حمام للحفاظ على شكل منزلك الخارجي

12:40 PM  

Post a Comment

<< Home

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