<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Indented! &#187; Exchange</title>
	<atom:link href="http://www.indented.co.uk/index.php/tag/exchange/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.indented.co.uk</link>
	<description></description>
	<lastBuildDate>Fri, 02 Jul 2010 10:45:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Accept or reject messages from</title>
		<link>http://www.indented.co.uk/index.php/2009/08/27/accept-or-reject-messages-from/</link>
		<comments>http://www.indented.co.uk/index.php/2009/08/27/accept-or-reject-messages-from/#comments</comments>
		<pubDate>Thu, 27 Aug 2009 15:28:47 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Exchange]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://www.highorbit.co.uk/?p=1170</guid>
		<description><![CDATA[This function reads delivery restrictions from objects in Active Directory. By default it looks at Groups. As the same information can be returned using Get-DistributionGroup or Get-Mailbox using Exchange 2007; this function is aimed at Exchange 2003. Function Get-SendToPermissions { Param( [String]$Identity, [String]$SearchRoot = $Null, [String]$LDAPFilter = &#34;(objectCategory=group)&#34;, [Switch]$GC ) If ($GC) { $Port = [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>This function reads delivery restrictions from objects in Active Directory. By default it looks at Groups. As the same information can be returned using Get-DistributionGroup or Get-Mailbox using Exchange 2007; this function is aimed at Exchange 2003.<br />
<span id="more-1170"></span></p>
<pre class="brush: powershell;">
Function Get-SendToPermissions {
  Param(
    [String]$Identity,
    [String]$SearchRoot = $Null,
    [String]$LDAPFilter = &quot;(objectCategory=group)&quot;,
    [Switch]$GC
  )

  If ($GC) { $Port = &quot;GC&quot; } else { $Port = &quot;LDAP&quot; }
  If ($SearchRoot) { $SearchRoot = [ADSI]&quot;$Port://$SearchRoot&quot; }

  $Properties = @(&quot;name&quot;, &quot;distinguishedName&quot;, &quot;dLMemSubmitPerms&quot;, `
    &quot;dLMemRejectPerms&quot;, &quot;authOrig&quot;, &quot;unauthOrig&quot;, &quot;msExchRequireAuthToSendTo&quot;)

  $Searcher = New-Object `
    DirectoryServices.DirectorySearcher($SearchRoot, $LDAPFilter)
  $Searcher.PageSize = 1000
  $Searcher.PropertiesToLoad.AddRange($Properties)

  $Searcher.FindAll() | %{
    $_ | Select-Object `
      @{n='Name';e={ $_.Properties['name'] }}, `
      @{n='DN';e={ $_.Properties['distinguishedname'] }}, `
      @{n='RequireAuthToSendTo';e={
        If ($_.Properties['msexchrequireauthtosendto']) {
          $True
        } Else {
          $False
        } }}, `
      @{n='AcceptFromMembersOfGroup';e={ $_.Properties['dlmemsubmitperms'] }}, `
      @{n='RejectFromMembersOfGroup';e={ $_.Properties['dlmemrejectperms'] }}, `
      @{n='AcceptFromUsers';e={ $_.Properties['authorig'] }}, `
      @{n='RejectFromUsers';e={ $_.Properties['unauthorig'] }}
  }
End Function
</pre>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.indented.co.uk/index.php/2009/08/27/accept-or-reject-messages-from/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get-MailboxStatistics for Exchange 2003</title>
		<link>http://www.indented.co.uk/index.php/2009/01/22/exchange-2003-get-mailboxstatistics/</link>
		<comments>http://www.indented.co.uk/index.php/2009/01/22/exchange-2003-get-mailboxstatistics/#comments</comments>
		<pubDate>Thu, 22 Jan 2009 17:35:54 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Exchange]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[DirectorySearcher]]></category>
		<category><![CDATA[wmi]]></category>

		<guid isPermaLink="false">http://www.highorbit.co.uk/?p=871</guid>
		<description><![CDATA[Using PowerShell to create a version of Get-MailboxStatistics for Exchange 2003. Get-MailboxStatistics returns a set of information about a mailbox for Exchange 2007. It is possible to retrieve roughly the same information using WMI for Exchange 2003. The differences The following table notes the differences in property names between Exchange 2003 and Exchange 2007. Exchange [...]


Related posts:<ol><li><a href='http://www.indented.co.uk/index.php/2010/01/22/changing-the-primary-group-with-powershell/' rel='bookmark' title='Permanent Link: Changing the Primary Group with PowerShell'>Changing the Primary Group with PowerShell</a> <small>Exactly as the title says, an example of how to...</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Using PowerShell to create a version of Get-MailboxStatistics for Exchange 2003.<br />
<span id="more-871"></span><br />
Get-MailboxStatistics returns a set of information about a mailbox for Exchange 2007. It is possible to retrieve roughly the same information using WMI for Exchange 2003.</p>
<h3>The differences</h3>
<p>The following table notes the differences in property names between Exchange 2003 and Exchange 2007.</p>
<table>
<tr>
<th>Exchange 2007</th>
<th>Exchange 2003</th>
</tr>
<tr>
<td>AssociatedItemCount</td>
<td>AssocContentCount</td>
</tr>
<tr>
<td>DeletedItemCount</td>
<td><i>Not available</i></td>
</tr>
<tr>
<td>DisconnectDate</td>
<td>DateDiscoveredAbsentInDS</td>
</tr>
<tr>
<td>DisplayName</td>
<td>MailboxDisplayName</td>
</tr>
<tr>
<td>ItemCount</td>
<td>TotalItems</td>
</tr>
<tr>
<td>ObjectClass</td>
<td>Can be assumed to be Mailbox</td>
</tr>
<tr>
<td>StorageLimitStatus</td>
<td>StorageLimitInfo</td>
</tr>
<tr>
<td>TotalDeletedItemSize</td>
<td>DeletedMessageSizeExtended</td>
</tr>
<tr>
<td>TotalItemSize</td>
<td>Size</td>
</tr>
<tr>
<td>Database</td>
<td>Composed of Server, Storage Group and Store</td>
</tr>
<tr>
<td>DatabaseName</td>
<td>StoreName</td>
</tr>
<tr>
<td>Identity</td>
<td>MailboxGuid (repeat of above included for pipeline)</td>
</tr>
<tr>
<td>IsValid</td>
<td><i>Not available</i></td>
</tr>
<tr>
<td>OriginatingServer</td>
<td>Same as ServerName</td>
</tr>
</table>
<p>In addition to these the MailboxGuid attribute is formatted slightly differently. The MailboxGuid is enclosed in curly braces, {}, these are stripped in the code (or added when a search is being performed using a GUID)</p>
<p>No formatting is applied to the output. The output from this function can be made to look like the Exchange 2007 version of Get-MailboxStatistics by using Format-Table.</p>
<pre class="brush: powershell;">
Get-2003MailboxStatistics | Format-Table MailboxDisplayName, TotalItems, `
  StorageLimitStatus, LastLogonTime
</pre>
<p>This is the code for the function, it is not as flexible as the Exchange 2007 version with regard to pipelines, but it should accept simple input and work in much the same way otherwise.</p>
<h3>Usage examples</h3>
<pre class="brush: powershell;">
# With a Mailbox Display Name
Get-2003MailboxStatistics &quot;Chris Dent&quot;
# With a Legacy Exchange DN (&quot;-Identity&quot; itself is optional)
Get-2003MailboxStatistics -Identity &quot;/O=SomeOrg/OU=AdminGroup/CN=RECIPIENTS/CN=Someone&quot;
# For a single Mailbox Database
Get-2003MailboxStatistics -Database &quot;Mailbox Database&quot;
# For a different server
Get-2003MailboxStatistics -Server &quot;ExchangeServer02&quot;
</pre>
<h3>Get-MailboxStatistics for Exchange 2003</h3>
<pre class="brush: powershell;">
Function Get-2003MailboxStatistics {
  Param(
     [String]$Identity = &quot;&quot;,
     [String]$Server = $Env:ComputerName,
     [String]$Database = &quot;&quot;
  )

  $Filter = &quot;ServerName='$Server'&quot;
  if ($Database -ne &quot;&quot; ) {
    $Filter = &quot;$Filter AND StoreName='$Database'&quot;
  }
  if ($Identity -ne &quot;&quot;) {
    $Filter = &quot;$Filter AND (MailboxGuid='{$Identity}' OR LegacyDN='$Identity'&quot;
    $Filter = &quot;$Filter OR MailboxDisplayName='$Identity')&quot;
  }

  Get-WMIObject -ComputerName $Server `
    -Namespace &quot;root/MicrosoftExchangeV2&quot; -Class &quot;Exchange_Mailbox&quot; `
    -Filter $Filter | `
  Select-Object `
    AssocContentCount, `
    @{n='DateDiscoveredAbsentInDs';e={
      If ($_.DateDiscoveredAbsentInDs -ne $Null) {
        [Management.ManagementDateTimeConverter]::ToDateTime(`
          $_.DateDiscoveredAbsentInDs)
      }} }, `
    MailboxDisplayName, TotalItems, LastLoggedOnUserAccount, `
    @{n='LastLogonTime';e={ if ($_.LastLogonTime -ne $Null) { `
      [Management.ManagementDateTimeConverter]::ToDateTime($_.LastLogonTime)}}
    }, `
    @{n='LastLogoffTime';e={ if ($_.LastLogoffTime -ne $Null) { `
      [Management.ManagementDateTimeConverter]::ToDateTime($_.LastLogoffTime)}}
    }, `
    LegacyDN, `
    @{n='MailboxGuid';e={
      ([String]$_.MailboxGuid).ToLower() -Replace &quot;\{|\}&quot; }}, `
    @{n='ObjectClass';e={ &quot;Mailbox&quot; }}, `
    @{n='StorageLimitStatus';e={ `
      Switch ($_.StorageLimitInfo) {
        1 { &quot;BelowLimit&quot; }
        2 { &quot;IssueWarning&quot; }
        4 { &quot;ProhibitSend&quot; }
        8 { &quot;NoChecking&quot; }
        16 { &quot;MailboxDisabled&quot; } }} }, `
    DeletedMessageSize, Size, `
    @{n='Database';e={
      &quot;$($_.ServerName)\$($_.StorageGroupName)\$($_.StoreName)&quot; }}, `
    ServerName, StorageGroupName, StoreName, `
    @{n='Identity';e={ ([String]$_.MailboxGuid).ToLower() -Replace &quot;\{|\}&quot; }}
}
</pre>


<p>Related posts:<ol><li><a href='http://www.indented.co.uk/index.php/2010/01/22/changing-the-primary-group-with-powershell/' rel='bookmark' title='Permanent Link: Changing the Primary Group with PowerShell'>Changing the Primary Group with PowerShell</a> <small>Exactly as the title says, an example of how to...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.indented.co.uk/index.php/2009/01/22/exchange-2003-get-mailboxstatistics/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Exchange 2003: Returning mailbox sizes</title>
		<link>http://www.indented.co.uk/index.php/2008/10/28/exchange-2003-returning-mailbox-sizes/</link>
		<comments>http://www.indented.co.uk/index.php/2008/10/28/exchange-2003-returning-mailbox-sizes/#comments</comments>
		<pubDate>Tue, 28 Oct 2008 12:13:20 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Exchange]]></category>
		<category><![CDATA[VbScript]]></category>
		<category><![CDATA[information stores]]></category>
		<category><![CDATA[vbs]]></category>

		<guid isPermaLink="false">http://www.highorbit.co.uk/?p=604</guid>
		<description><![CDATA[This script uses WMI and Active Directory queries to return information about mailbox sizes from Exchange and the limits set in Active Directory. Download GetMailboxStatistics.vbs A number of people have been looking for Get-MailboxStatistics for Exchange 2003. I have a PowerShell version of this script for exactly that reason here. This script is only intended [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>This script uses WMI and Active Directory queries to return information about mailbox sizes from Exchange and the limits set in Active Directory.</p>
<p><a href='http://www.indented.co.uk/wp-content/uploads/2010/06/GetMailboxStatistics.txt'>Download GetMailboxStatistics.vbs</a></p>
<p>A number of people have been looking for Get-MailboxStatistics for Exchange 2003. I have a PowerShell version of this script for exactly that reason <a href="http://www.highorbit.co.uk/?p=871">here</a>.<br />
<span id="more-604"></span><br />
This script is only intended for use with Exchange 2003. Exchange 2000 must use MAPI, Exchange 2007 has a PowerShell cmdlet, Get-MailboxStatistics, which can much more easily return this information.</p>
<p>It requires access to WMI on each Exchange Server, but does not require any of the Exchange System Tools. legacyExchangeDN is used to match accounts between AD and Exchange.</p>
<p>The script performs a number of searches in Active Directory. The largest number if multiple Admin Groups are selected (/a:&#8221;Admin Group*&#8221;). It can be instructed to use a single DC by specifying a name with the /dc switch. For forest-wide searches that must be a Global Catalog. If no DC is specified the script executes a DNS query for Global Catalog service records on the current forest name to attempt to find a (responding) GC in the current site, failing back to any GC in the forest otherwise.</p>
<h4>Usage</h4>
<pre class="brush: plain;">
cscript GetMailboxStatistics.vbs [/o] [/s:&lt;exchangeServer&gt;]
        [/a:&quot;&lt;administrative Group Name&gt;&quot;] [/d:&lt;domainName&gt;]
        [/dc:&lt;domainControllerName&gt;] [/f:&lt;fileName&gt;]

One of the following parameters must be specified:

/o      Get statistics from all Exchange Servers in the organisation
        This option overrides all others
/s      Get statistics for this Exchange Server only
        This option overrides all except /o
/a      Get statistics from all Exchange Servers in the specified Administrative Group
/d      Get statistics from all Exchange Servers in the specified Domain

The following parameters are optional:

/dc     A Domain Controller to use for this process. Must be a Global Catalog
        for reporting that covers a Forest. The script will attempt to find a
        GC in the current site if not specified.
/f      File Name for the output. Default file name is MailboxReport.csv
</pre>
<p>The following details are returned by this script:</p>
<ul>
<li>Name</li>
<li>DN</li>
<li>AccountStatus (Enabled / Disabled)</li>
<li>UseDefaultQuotas (True / False)</li>
<li>Warn (in Mb, Warning Limit if specified on User Account)</li>
<li>ProhibitSend  (in Mb, if specified on User Account)</li>
<li>ProhibitSendAndReceive (in Mb, if specified on User Account)</li>
<li>Size (in Mb)</li>
<li>TotalItems</li>
<li>MailboxStatus (BelowLimit, IssueWarning, ProhibitSend, NoChecking, MailboxDisabled)</li>
<li>AssocContentCount (Total Number of messages associated with the mailbox folders)</li>
<li>DeletedMessageSize (in Mb)</li>
<li>LastLoggedOnUser</li>
<li>LastLogon</li>
<li>LastLogoff</li>
<li>DateDeleted (for mailboxes which have been disconnected, waiting to be purged)</li>
<li>MailboxDisplayName</li>
<li>MailboxGuid</li>
<li>ServerName (Exchange Server)</li>
<li>StorageGroup</li>
<li>Store</li>
<li>legacyExchangeDN</li>
</ul>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.indented.co.uk/index.php/2008/10/28/exchange-2003-returning-mailbox-sizes/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Finding a user in Exchange mailbox security</title>
		<link>http://www.indented.co.uk/index.php/2008/10/28/exchange-2003-finding-a-user-in-mailbox-security/</link>
		<comments>http://www.indented.co.uk/index.php/2008/10/28/exchange-2003-finding-a-user-in-mailbox-security/#comments</comments>
		<pubDate>Tue, 28 Oct 2008 11:33:59 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Exchange]]></category>
		<category><![CDATA[VbScript]]></category>
		<category><![CDATA[acl]]></category>
		<category><![CDATA[permissions]]></category>
		<category><![CDATA[securitydescriptor]]></category>
		<category><![CDATA[vbs]]></category>

		<guid isPermaLink="false">http://www.highorbit.co.uk/?p=575</guid>
		<description><![CDATA[A script to read the mailbox security descriptor from Active Directory with the intention of finding a particular user or security principal. It will not display the security descriptor, it simply displays whether or not the account is present in the access control list. The script works best when run with cscript as the script [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>A script to read the mailbox security descriptor from Active Directory with the intention of finding a particular user or security principal. It will not display the security descriptor, it simply displays whether or not the account is present in the access control list.<br />
<span id="more-575"></span><br />
The script works best when run with cscript as the script uses WScript.Echo to write back whether or not it finds a match.</p>
<p>It can be used against Exchange 2000 or Exchange 2003. Exchange 2007 can use Get-MailboxPermission to query the same information.</p>
<p>MailboxRights is used to retrieve the mailbox security descriptor. As part of CDOEXM (Collaboration Data Objects for Exchange Management) the Exchange System Tools must be installed on the system executing the script.</p>
<pre class="brush: vb;">
Option Explicit

' FindMailboxAccess.vbs
'
' Short Script to Find and Enumerate Mailbox Access for the specified
' security principal. Searches current domain, must be run as an Exchange Admin
' account to invoke MailboxRights method.
'
' This script is slow, it's speed is unavoidable as MailboxRights cannot be
' executed until connected to an individual user. That means we have to connect
' to every user account to determine whether or not the security principal is
' present within the ACL.
'
' Author: Chris Dent
' Modified: 04/01/2008

Sub UsageText
  Dim strMessage

  strMessage = &quot;Usage:&quot; &amp; VbCrLf &amp; VbCrLf
  strMessage = strMessage &amp; &quot;cscript &quot; &amp; WScript.ScriptName &amp; _
    &quot; &lt;search String&gt;&quot; &amp; VbCrLf
  strMessage = strmessage &amp; VbCrLf
  strMessage = strMessage &amp; &quot;Note: This script must be executed as Exchange &quot; &amp; _
    &quot;Administrator to enumerate&quot; &amp; VbCrLf
  strMessage = strMessage &amp; &quot;the Mailbox Security Descriptor&quot; &amp; VbCrLf
  WScript.Echo strMessage
  WScript.Quit
End Sub

Sub SortArgv
  Dim objArgv

  Set objArgv = WScript.Arguments
  If objArgv.Count &lt; 1 Then
    UsageText
  End If

  strSearchString = objArgv(0)

  Set objArgv = Nothing
End Sub

Sub SearchAD
  Const ADS_SCOPE_SUBTREE = 2

  Dim objConnection, objCommand, objRootDSE, objRecordSet, objUser
  Dim objMailboxSD, objDACL, objACE

  Set objConnection = CreateObject(&quot;ADODB.Connection&quot;)
  objConnection.Provider = &quot;ADsDSOObject&quot;
  objConnection.Open &quot;Active Directory Provider&quot;

  Set objCommand = CreateObject(&quot;ADODB.Command&quot;)
  objCommand.ActiveConnection = objConnection

  Set objRootDSE = GetObject(&quot;LDAP://RootDSE&quot;)
  objCommand.CommandText = &quot;SELECT distinguishedName, homeMDB &quot; &amp;_
    &quot;FROM 'LDAP://&quot; &amp; objRootDSE.Get(&quot;defaultNamingContext&quot;) &amp;_
    &quot;' WHERE objectClass='user' AND objectCategory='person'&quot;
  WScript.Echo &quot;Searching: &quot; &amp; objRootDSE.Get(&quot;defaultNamingContext&quot;)
  Set objRootDSE = Nothing

  objCommand.Properties(&quot;Page Size&quot;) = 1000
  objCommand.Properties(&quot;Timeout&quot;) = 600
  objCommand.Properties(&quot;Searchscope&quot;) = ADS_SCOPE_SUBTREE
  objCommand.Properties(&quot;Cache Results&quot;) = False

  Set objRecordSet = objCommand.Execute

  While Not objRecordSet.EOF
    On Error Resume Next
    If Not IsNull(objRecordSet.Fields(&quot;homeMDB&quot;)) Then
      ' Can't avoid connecting to the user, need to call the MailboxRights method

      Set objUser = _
        GetObject(&quot;LDAP://&quot; &amp; objRecordSet.Fields(&quot;distinguishedName&quot;).Value)

      Err.Clear
      Set objMailboxSD = objUser.MailboxRights
      Set objDACL = objMailboxSD.DiscretionaryAcl
      If Err.Number &lt;&gt; 0 Then
        ' Ignore It
      Else
        For Each objACE in objDACL
          If InStr(1, objACE.Trustee, strSearchString, VbTextCompare) Then
            WScript.Echo &quot;Found In Mailbox ACL: &quot; &amp; objUser.Name
          End If
        Next
      End If
      On Error Goto 0
    End If

    objRecordSet.MoveNext
  Wend
  objConnection.Close

  Set objRecordSet = Nothing
  Set objCommand = Nothing
  Set objConnection = Nothing
End Sub

'
' Main Code
'

Dim strSearchString

SortArgv

WScript.Echo &quot;Search String: &quot; &amp; strSearchString

SearchAD
</pre>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.indented.co.uk/index.php/2008/10/28/exchange-2003-finding-a-user-in-mailbox-security/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Requirements for hosting SMTP servers</title>
		<link>http://www.indented.co.uk/index.php/2008/10/23/requirements-for-hosting-smtp-servers/</link>
		<comments>http://www.indented.co.uk/index.php/2008/10/23/requirements-for-hosting-smtp-servers/#comments</comments>
		<pubDate>Thu, 23 Oct 2008 09:51:33 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Exchange]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[smtp]]></category>

		<guid isPermaLink="false">http://www.highorbit.co.uk/?p=463</guid>
		<description><![CDATA[One of the most common problems with outbound mail is configuration of the SMTP service name and DNS records. This post briefly covers the requirements for running a public SMTP service, it does not matter if that server is Exchange, or Sendmail, or PostFix, the same set of rules apply. The outbound rules do not [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>One of the most common problems with outbound mail is configuration of the SMTP service name and DNS records. This post briefly covers the requirements for running a public SMTP service, it does not matter if that server is Exchange, or Sendmail, or PostFix, the same set of rules apply.</p>
<p>The outbound rules do not apply when using a Smart Host to send mail. The inbound rules do not apply if receiving mail through a third-party (such as an anti-spam service).<br />
<span id="more-463"></span><br />
Notes:</p>
<ol>
<li>The server used to send mail does not have to be the same as the server used to receive mail.</li>
<li>Outbound SMTP servers do not have to appear in an MX record, those are for inbound mail only.</li>
<li>If the outbound server is not the same as the inbound server there is no way to dynamically find the outbound server outside of the network. The majority of sites that check SMTP configuration assume that the inbound and outbound servers are the same.</li>
</ol>
<h3>Host (A) record &#8211; inbound and outbound mail</h3>
<p>If a server needs to accept inbound mail it must have a name created in a public DNS service. The record must point to the public IP address your mail server will use for receiving (and / or sending) mail, in most cases that IP address is set on a Firewall or Router.</p>
<p>For example:</p>
<div class="wp_syntax">
<div class="code">
<pre>
mail.highorbit.co.uk.   IN A   1.2.3.4
smtp.highorbit.co.uk.   IN A   1.2.3.4
</pre>
</div>
</div>
<h3>Mail Exchanger (MX) record &#8211; inbound mail</h3>
<p>To accept inbound mail an MX Record should be created for the SMTP domain. The MX record must point to the record created above. MX Records must point to a Host (A) record to be RFC complaint, no Alias (CNAME) records and no IP addresses.</p>
<p>MX Records are written in the form:</p>
<div class="wp_syntax">
<div class="code">
<pre>
email-domain  IN MX   priority   server
</pre>
</div>
</div>
<p>For example, this MX record will accept mail bound for anyrecipient@somedomain.example and pass it onto mail.somedomain.example.</p>
<div class="wp_syntax">
<div class="code">
<pre>
somedomain.example.   IN MX   10   mail.somedomain.example.
</pre>
</div>
</div>
<h3>Pointer (PTR) record &#8211; outbound mail</h3>
<p>The reverse lookup zone maps IP Addresses back to names using Pointer (PTR) records. This forms the basis of a simple test to see if an SMTP server looks real rather than a virus / malware ridden machine sending spam.</p>
<p>If a server is sending out mail to hosts on the internet (that is, not relaying through a third-party service) it must have a PTR record configured. Failure to do so will cause mail to be rejected by many recipient systems.</p>
<p>The PTR record is generally be requested via an ISP; those responsible for providing the internet connection the mail server uses. The rare exception to this is where responsibility for the Reverse Lookup Zone has been delegated elsewhere.</p>
<p>The PTR record for mail.somedomain.example running on the public IP 1.2.3.4 would look like this:</p>
<div class="wp_syntax">
<div class="code">
<pre>
4.3.2.1.in-addr.arpa.   IN PTR   mail.somedomain.example.
</pre>
</div>
</div>
<p>Many ISPs will understand a request for a Reverse Lookup Record for 1.2.3.4 to mail.somedomain.example. That is, it is not necessary to know the exact syntax above.</p>
<p>Responsibility for the Classful reverse lookup zone can be seen using NSLookup as follows:</p>
<pre lang="winbatch">
nslookup -q=ns 3.2.1.in-addr.arpa.
</pre>
<p>Or using Dig it is possible to trace responsibility for the record with:</p>
<pre lang="winbatch">
dig 4.3.2.1.in-addr.arpa ptr +trace
</pre>
<h3>SMTP service name &#8211; outbound mail</h3>
<p>If the server is sending out mail it must use a public name in HELO / EHLO. Failure to correctly set the name will cause some mail to fail as the server name does not match the Host (A) record or the Pointer (PTR) record.</p>
<p>For Exchange 2007 the name is set in the Properties for the Send Connector. It is possible to set the name for the Receive Connector as well however this will have no impact on mail delivery. It may be considered good practice to set a public name on the Receive Connector for the sake of consistency.</p>
<p>For Exchange 2000 and 2003 the name is set in the Properties for the Virtual SMTP Server (Delivery, Advanced, Server FQDN).</p>
<h3>Sender Policy Framework (SPF / TXT) record &#8211; outbound mail</h3>
<p>This record is not required for a functional SMTP server. However, it can reduce abuse of a domain name and is worth considering for that.</p>
<p>The Sender Policy Framework allows you to state explicitly which servers can send mail as a domain name.</p>
<p>While this is not universally used it will help reduce abuse of a domain name by third-parties and also reduce the number of non-delivery reports returned to a system for mail with spoofed addresses.</p>
<p>Wizards to help create a record can be found here:</p>
<p><a href="http://www.openspf.org/">www.openspf.org</a><br />
<a href="http://www.microsoft.com/mscorp/safety/content/technologies/senderid/wizard/">www.microsoft.com/mscorp/safety/content/technologies/senderid/wizard/</a></p>
<p>The record would be added as a TXT record to a public domain. It is only checked by systems receiving mail.</p>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.indented.co.uk/index.php/2008/10/23/requirements-for-hosting-smtp-servers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Import contacts from a csv file using VbScript</title>
		<link>http://www.indented.co.uk/index.php/2008/10/21/vbscript-import-contacts-from-a-csv-file/</link>
		<comments>http://www.indented.co.uk/index.php/2008/10/21/vbscript-import-contacts-from-a-csv-file/#comments</comments>
		<pubDate>Tue, 21 Oct 2008 17:25:28 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Exchange]]></category>
		<category><![CDATA[VbScript]]></category>
		<category><![CDATA[import]]></category>
		<category><![CDATA[vbs]]></category>

		<guid isPermaLink="false">http://www.highorbit.co.uk/?p=377</guid>
		<description><![CDATA[Download ContactImport.vbs This script will create contacts in Active Directory based on a formatted CSV file. It was written to allow automatic synchronisation of contacts using a CSV file as the source. The usage for the script will echo when run without any parameters. Here&#8217;s a summary: cscript ContactImport.vbs -f &#60;file Name&#62; -o &#34;&#60;organisational Unit [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p><a href='http://69.164.211.174/wp-content/uploads/2008/10/contactimport.txt'>Download ContactImport.vbs</a></p>
<p>This script will create contacts in Active Directory based on a formatted CSV file. It was written to allow automatic synchronisation of contacts using a CSV file as the source.<br />
<span id="more-377"></span><br />
The usage for the script will echo when run without any parameters. Here&#8217;s a summary:</p>
<pre class="brush: plain;">
cscript ContactImport.vbs -f &lt;file Name&gt; -o &quot;&lt;organisational Unit Path&gt;&quot;
    [-r] [-s] [-a &lt;attributes&gt;] [-d &lt;delimiter&gt;] [-n &quot;&lt;name Format&gt;&quot;] [-t]

  -f &lt;file Name&gt; - Input File Name (Required)
  -o &lt;organisational Unit Path&gt; - Target OU for Contact Objects (Required)
  -r - Read the Header Line as AD Fields
  -s - Skip the Header Line
  -a &lt;attributes&gt; - AD Attibutes to write Fields to
    (Required if not using Header)
  -d &lt;delimiter&gt; - File Delimiter. Uses comma if not specified.
  -n &lt;name Format&gt; - DisplayName and CN Format by AD Attributes.
    Uses TargetAddress if not specified.
  -t - Test Only
</pre>
<h3>Usage examples</h3>
<h4>Reading data from a CSV using the header line as fields</h4>
<p>Example CSV file data:</p>
<pre class="brush: plain;">
givenName,sn,TargetAddress,streetAddress,streetAddress
Chris,Dent,chris.dent@somedomain.example,123 Somewhere Street,London
</pre>
<p>The following command will read the header line as the fields to import, then create contacts using givenName and sn as the display name / name.</p>
<pre class="brush: plain;">
cscript ContactImport.vbs -f Contacts.csv -o &quot;OU=Contacts,DC=somedomain,DC=example&quot; -r -n &quot;givenName sn&quot;
</pre>
<p>The attribute streetAddress appears twice, it will be concatenated using a comma as a delimiter. The streetAddress attribute will contain &#8220;123 Somewhere Street, London&#8221; in this example.</p>
<h4>Defining attributes on the command line</h4>
<p>Example CSV file data:</p>
<pre class="brush: plain;">
Chris,Dent,chris.dent@somedomain.example,SomeCorp,SomeOffice
</pre>
<p>The following command will read the file, then import attributes based on the -a value which must reflect the order of attributes in the import file.</p>
<pre class="brush: plain;">
cscript ContactImport.vbs -f Contacts.csv -o &quot;OU=Contacts,DC=somedomain,DC=example&quot; -a &quot;givenName,sn,targetAddress,company,physicalDeliveryOfficeName&quot;
</pre>
<p>Because no displayName format has been specified the targetAddress field will be used.</p>
<h4>Using a custom file delimiter</h4>
<p>Example file data:</p>
<pre class="brush: plain;">
FirstName|LastName|Address
Chris|Dent|chris@somedomain.example
</pre>
<p>In this example the header line contains names that cannot be used as attributes in Active Directory so the script is instructed to ignore it with -s. The fields are defined instead using the -a option. The Delimited is specified with -d.</p>
<pre class="brush: plain;">
cscript ContactImport.vbs -f Contacts.txt -o &quot;OU=Contacts,DC=somedomain,DC=example&quot; -a &quot;givenName,sn,targetAddress&quot; -s -d &quot;|&quot;
</pre>
<p>As above, because no displayName format is specified the targetAddress is used.</p>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.indented.co.uk/index.php/2008/10/21/vbscript-import-contacts-from-a-csv-file/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>VbScript: GetStores</title>
		<link>http://www.indented.co.uk/index.php/2008/10/06/getstores/</link>
		<comments>http://www.indented.co.uk/index.php/2008/10/06/getstores/#comments</comments>
		<pubDate>Mon, 06 Oct 2008 18:50:02 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Exchange]]></category>
		<category><![CDATA[VbScript]]></category>
		<category><![CDATA[information stores]]></category>
		<category><![CDATA[vbs]]></category>

		<guid isPermaLink="false">http://www.highorbit.co.uk/?p=113</guid>
		<description><![CDATA[A VbScript function to retrieve all Exchange Information Stores from Active Directory, returning the results as a Dictionary object containing the store name and store distinguishedName. Function GetStores ' Return Type: Scripting.Dictionary ' ' Finds all Private Information Stores in AD Const ADS_SCOPE_SUBTREE = 2 Dim objConnection : Set objConnection = CreateObject(&#34;ADODB.Connection&#34;) objConnection.Provider = &#34;ADsDSOObject&#34; [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>A VbScript function to retrieve all Exchange Information Stores from Active Directory, returning the results as a Dictionary object containing the store name and store distinguishedName.<br />
<span id="more-113"></span></p>
<pre class="brush: vb;">
Function GetStores
  ' Return Type: Scripting.Dictionary
  '
  ' Finds all Private Information Stores in AD

  Const ADS_SCOPE_SUBTREE = 2

  Dim objConnection : Set objConnection = CreateObject(&quot;ADODB.Connection&quot;)
  objConnection.Provider = &quot;ADsDSOObject&quot;
  objConnection.Open &quot;Active Directory Provider&quot;

  Dim objCommand : Set objCommand = CreateObject(&quot;ADODB.Command&quot;)
  objCommand.ActiveConnection = objConnection

  Dim objRootDSE : Set objRootDSE = GetObject(&quot;LDAP://RootDSE&quot;)
  objCommand.CommandText = &quot;SELECT name, distinguishedName &quot; &amp; _
    &quot;FROM 'LDAP://&quot; &amp; objRootDSE.Get(&quot;configurationNamingContext&quot;) &amp; _
    &quot;' WHERE objectClass='msExchPrivateMDB'&quot;

  objCommand.Properties(&quot;Page Size&quot;) = 1000
  objCommand.Properties(&quot;Timeout&quot;) = 600
  objCommand.Properties(&quot;Searchscope&quot;) = ADS_SCOPE_SUBTREE
  objCommand.Properties(&quot;Cache Results&quot;) = False

  Dim objRecordSet : Set objRecordSet = objCommand.Execute

  Dim objStores : Set objStores = CreateObject(&quot;Scripting.Dictionary&quot;)

  While Not objRecordSet.EOF
    Dim strDN : strDN = objRecordSet.Fields(&quot;distinguishedName&quot;).Value
    Dim strName : strName = objRecordSet.Fields(&quot;name&quot;).Value
    objStores.Add strDN, strName

    objRecordSet.MoveNext
  WEnd

  Set GetStores = objStores
End Function
</pre>
<h3>Usage example</h3>
<pre class="brush: vb;">
Set objStores = GetStores

For Each strDN in objStores
  WScript.Echo &quot;DN: &quot; &amp; strDN &amp; vbCrLf &amp; &quot;Name: &quot; &amp; objStores(strDN)
Next
</pre>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.indented.co.uk/index.php/2008/10/06/getstores/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
