Doesn't work and can't get Trace to give output.

Feb 23, 2010 at 9:05 PM
Hi there,
I've created & installed the transport agent, added the trace config and restarted the transport service, but no trace messages get created and all messages get bounced.
Install params: Install-TransportAgent -Name "Catch-All Agent for Exchange" -TransportAgentFactory "NKCSS.Exchange.CatchAll.Factory" -AssemblyPath "C:\ExchangeCatchAll\ExchangeCatchAll.dll"
The config.xml file resides in "C:\ExchangeCatchAll\" along with the .dll.
The tracing changes are made to "EdgeTransport.exe.config" in "C:\Program Files\Microsoft\Exchange Server\V14\Bin\"
Tracing element:  
  <system.diagnostics>
    <trace autoflush="false" indentsize="4">
      <listeners>
        <add name="myListener" 
         type="System.Diagnostics.TextWriterTraceListener" 
         initializeData="catch-all-traces.log" />
        <remove name="Default" />
      </listeners>
    </trace>
   </system.diagnostics>
To make sure there isn't a problem with rights, I've created the file in "C:\Program Files\Microsoft\Exchange Server\V14\Bin\" and added write & modify rights to "NETWORK SERVICE" (the account EdgeTransport.exe runs under).
[PS] C:\Windows\system32>Get-TransportAgent

Identity                                           Enabled         Priority
--------                                           -------         --------
Transport Rule Agent                               True            1
Text Messaging Routing Agent                       True            2
Text Messaging Delivery Agent                      True            3
Catch-All Agent for Exchange                       True            4


[PS] C:\Windows\system32>
XML Config:
<?xml version="1.0" encoding="utf-8" ?> 
<config>
  <domain name="blushop.nl" address="catchall@nkcss.lan" />
  <domain name="forwardondemand.com" address="catchall@nkcss.lan" />
  <domain name="neverlose.net" address="catchall@nkcss.lan" />
  <domain name="nickkusters.com" address="catchall@nkcss.lan" />
  <domain name="nkcss.biz" address="catchall@nkcss.lan" />
  <domain name="nkcss.com" address="catchall@nkcss.lan" />
  <domain name="nkcss.info" address="catchall@nkcss.lan" />
  <domain name="nkcss.lan" address="catchall@nkcss.lan" />
  <domain name="nkcss.net" address="catchall@nkcss.lan" />
  <domain name="nkcss.nl" address="catchall@nkcss.lan" />
  <domain name="sterf.eu" address="catchall@nkcss.lan" />
  <domain name="trefcentrumwvv.nl" address="catchall@nkcss.lan" />
</config>

As far as I can tell, the Factory.CreateAgent() is never called... Any ideas? Also note that I only have 3 default Transport Agents. I've tried changing the Priority to 2 and restart, but that didn't help. Also tried to uninstall and reinstall the transport rule, but that didn't work either.

Thanks in advance,

Nick.
Feb 23, 2010 at 9:19 PM

After going thru the code again, I finally noticed that this transport agent is actually a SMTP-only transport agent. This means that if you use your own exchange mail account within the domain, the catch-all won't work. Try e-mailing from an external (gmail for instance) mail adres, and it worked :)

 

The tracing still doesn't work by the way; can't figure out why, but the catch-all now does what it's supposed to do for outsite e-mails.

 

-- Nick.

 

N.B.

The reason why I only had 3 transport agents is because I run Exchange 2010 and it work's like a charm.

May 29, 2010 at 3:50 PM

For the Trace logging, try changing autoflush="false" to "true" and restarting the MSExchangeTransport Service.

You should now see entries in the log file.  It's worth turning this back to false once you've verified everything is working properly, since it's a small extra load on the server.

Howard