Exchange Server 2007 Transport Agent Issue

This is the first time i am working on Exchange Server Development. Below is a simple Transport Agent that i am using, this agent should simply update the email Subjects
as shown below in the code.
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Exchange.Data.Transport;
using Microsoft.Exchange.Data.Transport.Smtp;
namespace MyAgents
public sealed class MyAgentFactory : SmtpReceiveAgentFactory
public override SmtpReceiveAgent CreateAgent(SmtpServer server)
return new MyAgent();
public class MyAgent : SmtpReceiveAgent
public MyAgent()
this.OnEndOfData += new EndOfDataEventHandler(MyEndOfDataHandler);
private void MyEndOfDataHandler(ReceiveMessageEventSource source, EndOfDataEventArgs e)
e.MailItem.Message.Subject = "This message passed through my agent: " + e.MailItem.Message.Subject;
Below is the Powershell script i am using to install the Agent.
Net Stop MSExchangeTransport
Install-TransportAgent -Name MyAgent -AssemblyPath EmailLogger.dll -TransportAgentFactory MyAgents.MyAgentFactory
Enable-TransportAgent -Identity MyAgent
Net Start MSExchangeTransport
Agent installed successfully using Exchange Management Shell.
Now when i send/receive emails in exchange, Email subjects are not modified. Emails have their original subjects. I don't know why?
I also performed the steps mentioned in below links to debug the Agent but breakpoints are not being hit by Visual Studio Debugger.
sf-tools.net/Messaging/tabid/55/EntryId/163/Exchange-2010-Transport-Agent.aspx
stackoverflow.com/questions/12347123/debugging-ms-exchange-2007-transport-agent
omarjames.com/blog/index.php/debugging-exchange-transport-agent/
My System Configuration
I am using the Exchange Server 2007 Virtual Machine provided by Microsoft from link below
microsoft.com/en-pk/download/details.aspx?id=14901
I also installed the Visual Studio 2008 on the VM for debugging.
Please help me in resolving the issue?

How are you testing this ? a SmtpReceiveAgent will only fire when the server receives email over SMTP. So if your just logging on and sending an Internal Email (eg mailbox to mailbox) or sending Email externally then the
SmtpReceiveAgent wont fire. For a single server if you want to capture all email you need to use a router agent see
http://blogs.technet.com/b/postwoman/archive/2010/09/14/step-by-step-how-to-create-a-routing-agent.aspx
. If you want to test what you have try sending an email to mailbox over SMTP using an SMTP client or Telnet
http://exchange.mvps.org/smtp_frames.htm
Cheers
Glen

Similar Messages

  • HELP - Exchange Server 2007 Transport Rule Issue

    Hi all,
    sorry if here is not the place to put my question but I did not find another forum, so if anyone can help me I appreciate.
    - I have an Exchange Server 2007 SP3 environment with 1 MBX Server and 3 CAS/HUB Servers.
    - I have created a Transport Rule that said:
    "all emails that have @test.com in BCC field are dropped off except one group can send" .
    The issue is the rule doesn´t work.
    Anyone can help me, please?
    Thanks in advance.
    Luiz

    The Exchange previous versions forums are here: 
    http://social.technet.microsoft.com/Forums/en-US/category/exchangeserverlegacy
    Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."

  • MimeMessage.reply() issue with MS Exchange Server 2007 Emails

    I have an application that retrieves emails from an MS Exchange Server 2003 mailbox. The data from each message is read, validated and conditionally loaded to a table. If the message doesn't pass validation, a rejection email is sent back to the sender with an error message and a copy of the email. (We're using Java 1.5. However, I test with both 1.5 and 1.6.)
    Also, if the message passes validation, positive notification is sent back to the sender.
    Both processes use the method: javax.mail.Message.reply()It's coded as:
    MimeMessage reply = (MimeMessage) message.reply(false);My organization is in the process of migrating to MS Exchange Server 2007. We've found that the reply() method no longer finds the sender method, thus unable to create a reply message. The error message we receive is:
    javax.mail.SendFailedException: No recipient addresses
         at javax.mail.Transport.send0(Transport.java:110)
         at javax.mail.Transport.send(Transport.java:80)
         at org.ccci.gms.datacollector.DataCollector.sendReply(DataCollector.java:514)
         at org.ccci.gms.datacollector.DataCollector.processMessages(DataCollector.java:162)
         at org.ccci.gms.datacollector.DataCollector.main(DataCollector.java:101)After creating the MimeMessage object from the reply() method, I printed out the email header detail from both 2003 and 2007 messages. You'll note from below that the "To" or recipient address is missing from Server 2007.
    MS Exchange 2003 works fine
    From: [email protected]
    To: [email protected]
    Subject: Re: Report
    In-Reply-To: <[email protected]>MS Exchange 2007 no longer works
    From: [email protected]
    Subject: Re: Reports
    In-Reply-To: <[email protected]>I know I could just use the "addRecipient()" method to get around this problem. I wanted to know if anyone has encountered this issue. Please share the resolution. Any suggestions will be greatly appreciated.
    Thanks,
    LaelW

    When the original message is accessed using IMAP, the reply method uses the information in the
    IMAP ENVELOPE to determine where to send the reply. It first looks for the Reply-To address
    in the ENVELOPE, then the From address.
    Interestingly, when not using IMAP, the getFrom method returns the Sender header if the From
    header is empty. The IMAP-specific code doesn't do that, although perhaps it should.
    It would be interesting to compare the ENVELOPE data from the protocol trace in the two cases.
    The ENVELOPE data will follow this syntax:
    envelope     = "(" env-date SP env-subject SP env-from SP
              env-sender SP env-reply-to SP env-to SP env-cc SP
              env-bcc SP env-in-reply-to SP env-message-id ")"
    So it's the first three address fields after the Subject that are relevant. If the From and Reply-To
    fields are NIL, but the Sender field has a valid address, let me know. I should probably fix the
    IMAP provider to fall back to the Sender field if the From field is missing.

  • Backup Issue of exchange server 2007 mailbox store

    Dears
    Exchange server 2007 with CCR clustering
    I have got a problem with the backup of one of my mailbox store. Its going till the last and giveing the final error as follows:-
    V-79-57344-65247 - A failure occurred reading an object.
    Also the warning as follows:-
    Backup- \\mailserver.domain\Microsoft Information Store\First Storage Group
    WARNING: "\\mailserver.domain\Microsoft Information Store\First Storage Group\Database" is a corrupt file. This file cannot verify.
    Backup V-79-57344-34108 - An unexpected error occurred when cleaning up snapshot volumes. Confirm that all snapped volumes are correctly resynchronized with the original volumes.
    Does it mean my information store is really a corrupted file. It has been properly monted and logs are genearting.
    Even when I checked the last full backedup log file from the management shell it clearly shows the backing up is properly happened on the log files.
    When I checked the event log of Exchnage server I can see these logs:-
    Event ID 401, 403 errors
    The size of the problem store is 308 GB.
    One of the other store with 46 GB is backing up without any issue

    Hi,
    If you have a space issue with the Exchange server, you can upgrade drives on active node and passive node one by one. It is not recommended to upgrade them at the same time.
    For more information about upgrading Exchange 2007 CCR active node or passive node, here are some helpful threads for your reference.
    Upgrade hard drives on passive node. Process and procedure
    http://social.technet.microsoft.com/Forums/exchange/en-US/08b9e893-87c9-48c3-bab2-91027cc09949/upgrade-hard-drives-on-passive-node-process-and-procedure?forum=exchangesvravailabilityandisasterrecoverylegacy
    Upgrading hard drives in exchange server
    http://social.technet.microsoft.com/Forums/exchange/en-US/0e4514f9-76da-44d2-9dec-a3be5add79b1/upgrading-hard-drives-in-exchange-server?forum=exchangesvravailabilityandisasterrecoverylegacy
    Hope it helps.
    Best regards,
    Amy
    Amy Wang
    TechNet Community Support

  • How to install and configure ms exchange server 2007 both role hub and edge transport role in one network

    How to install and configure ms exchange server 2007 both role hub and edge transport role in one network 

    Hi,
    Edge role is design for perimeter networks, to keep security risks minimum.  So it’s not recommended to have edge role in internal network. Must have separate network or subnet for edge services.
    If you are playing around it in labs, then you can put edge role within same subnet as other exchange roles and no specific requirements in that case.
    Thanks.
    MachPanel - Premium Cloud Automation Solution

  • Exchange Server 2007 / Java issue

    We have just upgraded to Exchange Server 2007. We have a couple of web apps that add an appointment automatically to users calendars using HttpClient PostMethod. Since the upgrade this no longer works. Any ideas or suggestions?

    Hi,
    From your description, I would like to verify the following things for troubleshooting.
    1. Were you able to send and receive emails before?
    2. What type of email account is configured in Outlook?
    3. Please check if you can send and receive emails using OWA.
    Best regards,
    Amy Wang
    TechNet Community Support

  • Exchange server 2007 stop receiving emails

    i have a strange issue with our exchange 2007 server, and i hope any one can help me, each day i have one of our exchange servers can't receive emails, and all emails sent to users in this servers are queued in the sending email server, and i have to manually
    restart the Microsoft exchange transport service in this server so that it's able to receive emails, i found an error in the server that always repeated with different parameters
    the error is
    Error ID: 4999
    Error Source: MSExchange Common
    Watson report about to be sent to dw20.exe for process id: 3508, with parameters: E12, c-RTL-AMD64, 08.02.0254.000, edgetransport, M.E.Transport, M.E.P.S.SmtpInServer.HandleConnection, System.NullReferenceException, 69f8, 08.02.0254.000.  ErrorReportingEnabled:
    False
    i receive the same error each time the server stop responds but the parameters is changed each time (Process ID number always changed) like below
    Watson report about to be sent to dw20.exe for process id: 3644, with parameters: E12, c-RTL-AMD64, 08.02.0254.000, edgetransport, M.E.Transport, M.E.P.S.SmtpInServer.HandleConnection, System.NullReferenceException, 69f8, 08.02.0254.000.  ErrorReportingEnabled:
    False
    i hope any one can help me solving this problem
    the server is windows server 2008
    Exchange 2007 SP2 Server Rollup 5
    McAfee Enterprise Antivirus is in the box
    Backup Exec Agent is in the box Also
    a lot of transport rules applied to our exchange organization
    Mahmoud Sabry IT System Engineer

    Hi
    As per the information and details provided by you, Exchange server 2007 stop receiving emails, then please follow these steps: -
    If you do have a 60 GB partition on the C: drive, one of the first signs of trouble is when the free space on C: drops below 2GB. Exchange 2007 stops receiving external
    emails. This is caused by a condition known as Back Pressure.
    Please check the following: -
    Check the nslook up for correct MX record.
    Run the exbpa and llok for any recent changes.
    Check for the device in perimeter network which accepts connections on port 25 FW or any other anti spam device).
    Try to run a telnet session from the firwall and then out side and drop email on the server.
    I hope this information will be helpful for you.
    Thanks and regards
    Shweta@G 

  • Newbie needs some direction with Exchange Server 2007

    I am in school and I have been given an assignment that is kinda hard for me.  I am not asking for answers but I am asking for direction.   If you guys can point me to some research that will help me It would be much appreciated. 
    Here is the scenario:
    Your organization plans to open a remote location that requires a server to host Exchange Server 2007
    with the CAS, Hub Transport, UM, and Mailbox roles. Your Senior Administrator has assigned you the
    task of choosing the hardware to support this server. Using the links below and internet research, design
    a server capable of hosting the previously mentioned roles and 1,000 mailboxes. Choose a processor,
    hard drive, and RAM.
    Here are the questions associated with the scenario:
    Questions
    1. What is the total cost of the server you designed?
    2. Would you recommend a multiple core processor? If so, why or why not?
    3. What is the minimum amount of RAM necessary?
    4. Would you recommend a RAID setup? If so, what RAID level? If not, what would you suggest for
    fault tolerance.
    Your guidance and expertise is much appreciated.  Just point me in the right direction for research....

    Hi Mikenater,
    Thank you for your question.
    1. What is the total cost of the server you designed?
    A:the total cost depend on the price of hardware and software in your country, we didn’t give an exact answer.
    2. Would you recommend a multiple core processor? If so, why or why not?
    A: I suggest we use the multiple core processor, because Exchange consume much hardware resources. including CPU,RAM and so on, when we use multiple core processor, Exchange will deal with a mount of request without no response. It is convent for us to manage
    Exchange server.
    3. What is the minimum amount of RAM necessary?
    A:  AS you said that a server to host Exchange Server 2007 with the CAS, Hub Transport, UM, and Mailbox roles. The minimum amount of RAM is 4GB. However, if there are 1000 mailbox, we suggest the RAM is higher, we could refer to
    the following link:
    https://technet.microsoft.com/en-us/library/bb738124(v=exchg.80).aspx
    4. Would you recommend a RAID setup? If so, what RAID level? If not, what would you suggest for fault tolerance. 
    A: Exchange 2007 have high availability for database, for example LCR,CCR,Scc or SCR, we could refer to the following link:
    https://technet.microsoft.com/en-us/library/bb124721(v=exchg.80).aspx
    If there are any questions regarding this issue, please be free to let me know. 
    Best Regard,
    Jim

  • Is there a way to sync Pre-MS Exchange Server 2007 (Service Pack 1) Calendar?

    Hello all,
    I think my company must be using Pre-Microsoft Exchange Server 2007 with Service Pack 1 for our exchange server, because
    I can only set up company Exchange account on MS Entourage, not the new Outlook
    I can only set up the same exchange account only on iPad and iPhone (able to view in Mail, Calendar, Contacts & Reminders)
    But
    I am unable to use Lion's Mail, iCal and Address Book to see my Exchange account
    For the moment, I am not really concern about mail and addresses,
    but can I see my Exchange calendar on my desktop iCal? How do I set it up?
    I guess the most obvious and straight forward way, for now, is to view on my iPad :-)  But it is really funny that the iDevices are backward compatible but yet Lion OS cannot...
    Thanks and cheers.

    Hi,
    Yes it will work, it says enterprise because it works there as well.
    Thanks
    Bifocals
    Click Accept as Solution for posts that have solved your issue(s)!
    Be sure to click Like! for those who have helped you.
    Install BlackBerry Protect it's a free application designed to help find your lost BlackBerry smartphone, and keep the information on it secure.

  • Provisiong of users from OIM to Exchange Server 2007

    Hi,
    I am trying to Provisioning the users from OIM 9.1.0.1 to Exchange server 2007. For this i used Exchange Server Connector 9.1.1.1.0. By using AD_Base_connector 9.1.1.0.0 i can
    provisioned the user details. But while provisioning to the Exchange server 2007 i am getting the following error
    ERROR [XELLERATE.WEBAPP],Class/Method: tcLookupFieldAct ion/lookupByColumn encounter some problems: lookup Error in OIM
    And i am unable to get the LookUp detais for the MailBox in Design Console as well as in the ScheduleTasks in OIM Admin Console..
    Can anybody help me in solving this issue.
    Thanks & Regards
    SRI

    Hi suren,
    i am using the Remote Manager. I enabled logs in log.properties in both OIM server and Remote Manager.
    I am observing the following message in Remote Manager command prompt.
    DEBUG,30 Mar 2010 01:12:44,437,[XELLERATE.REMOTEMANAGER],Class/Method: RMISSLCli
    entSocketFactory/createSocket left.
    and i am getting the error in Weblogic server command prompt.
    Running ISADAM
    Target Class = java.lang.String
    Running GETATTRIBUTEHASH
    Target Class = com.thortech.xl.util.adapters.tcUtilHashTableOperations
    Running Set User Attributes
    ERROR,30 Mar 2010 01:13:39,484,[XELLERATE.WEBAPP],Class/Method: tcLookupFieldAct
    ion/lookupByColumn encounter some problems: lookup Error
    can u help me in resolving this issue.
    Thanks in Advance,
    SRI

  • Hidden Contact Subfolders are visible on iPhone after sync with Exchange Server 2007

    Hello,
    We have encountered an issue where synchronizing the iPhone with Contacts from an Exchange Server 2007 mailbox, causes hidden contact subfolders (from Outlook) to be visible and appear in the Groups list in the Contacts App on the iPhone.  This does not occur with Exchange Server 2010 mailboxes.
    We have a 3rd party application that creates hidden subfolders in the default Contacts folder on Exchange Server 2007 mailboxes.  The hidden folders do not display in the Outlook client, Blackberry or on an Android phone.  We did see that they were showing up in Outlook Web Access until we applied this Microsoft Exchange Server 2007 Service Pack 3 Rollup 2 patch unto the Exchange server:
    http://support.microsoft.com/kb/2210042 - A sub contact folder is still visible after you set the "PR_ATTR_HIDDEN" attribute to "True" in an Exchange Server 2007 environment.
    After the patch was applied, the hidden contacts do not show up anywhere else.  However, when we synced the mailbox to an iPhone and synced existing contacts, all of the hidden folders appear in the Contact Groups list.  Is there a way to hide the hidden sub contact folders on the iPhone and prevent them from appearing in the Contact Group lists?
    Any help provided would be most appreciated.
    Thanks and Best Regards

    Hi SBuchan,
    I have an open case with Microsoft about it.  It is an issue with ActiveSync in Exchange 2007 that sends the hidden objects.  Microsoft tried to resolve this in Exchange 2010 by sending a delete message after sending the hidden objects to remove them from the device.  Am awaiting to see if they will approve a design change to Exchange 2007 ActiveSync to prevent the synching of hidden objects.

  • Exchange Server 2007 shows email as "Receive" but not "Deliver"

    Hi Guys
    We have Exchange Server 2007 inside of a SBS 2008 set up.
    One specific email from a regular sender wasn't received by the recipient. The recipient is used to receiving messages from this sender and the email is not hiding within Outlook.
    Exchange 2007 mail tracker shows the email was received, but that's it. Nothing has happened to the email after that. Normally we'd see a "Deliver" report, or possibly a "Fail", but always something to show the email has been actioned
    in some way.
    The queues are all empty.
    So, this one email has disappeared into the ether of Exchange! So far as I can see, this is the only email with only a "Receive" notification. All others have something else immediately following the Receive.
    The Server has GFI anti-spam installed, but that hasn't seen the email either, because emails are collected by Exchange before being passed to GFI. In this instance it hasn't been passed, or returned to the sender as undeliverable. It just seems
    to have been eaten.
    Would anyone have any sensible suggestions on where to start kicking this email back into life?

    Hi Simon
    Apologies for the late response, but I only get to this client once a month.
    1. Did the sender get NDR? ~ No
    2. Let the receiver check the email via OWA and see
    whether the email is available. ~ Still not available
    3. Use MFCMAPI to check the user mailbox, can you
    find the missing email? ~ I haven't yet worked out what is MFCMAPI or how to use it to check, but I suspect that as the Exchange email tracker doesn't have any actions after "Receive" that it cannot have sent the email on to the user's mailbox or rejected
    the email as non-deliverable.
    The client isn't too willing to expend too much effort
    / cost on this issue which does appear to be a one-off glitch, but I am interested in resolving it for myself as I haven't heard of this problem before.
    Thanks for the interest,
    Michael D

  • Exchange server 2007 SP3

    Dear all,
    Presently we are using exchange server 2007 Sp3 along with windows 2008 x64 Domain controller it's working fine . But we have some issue related with
    Message Size restriction when I changed maximum msg size sent and receive  this option will applied to the mail box user taking long time how can i update this option immediately  to the end users ?
    Best Regards
    Subash 

    Hi,
    After you configure the mailbox size restriction for a mailbox, the configured limits are enforced after a period of time, but do not take effect immediately. Restarting the Microsoft Exchange Information Store service causes the configured limits to take
    effect immediately.
    Please restart the Microsoft Exchange Information Store service to check result.
    Here is a related article about this issue for your reference.
    http://technet.microsoft.com/en-us/library/bb684892(v=exchg.80).aspx
    Best regards,
    Belinda Ma
    TechNet Community Support

  • Exchange Server 2007 OWA users can receive email but can't send

    Hi,
    I have an Exchange server 2007 in an SBS 2008 environment with POP3 connector configured and working fine , smtp send mail connector configured. 
    Now users can connect to OWA, receive email but cant not send.
    smtp connector works fine from Outlook client. Tried to track the emails from exchange server management console and I get the
    SEND DELIVER SUBMIT TRANSFER.
    The emails go to the sent items folder, but it never reach the recipients.
    Have been troubleshooting for a while without succes. Any help will be most appreciated.
    Regards
    Faisal

    POP3 is a single mailbox client mail retrieval protocol, not a mail transport protocol. 
    Any attempt to use it as a mail transport protocol is a great big kludge. 
    Exchange is designed to connect to the Internet using SMTP.
    No version of Exchange has a POP3 connector.
    I recommend that you post this in the SBS Forum:  http://social.technet.microsoft.com/Forums/en/smallbusinessserver/threads
    Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."

  • Hi, in our Enterprise environment, we have a single mac with Mavericks version 10.9.2 and Office for Mac 14.4.1. When setting up outlook, we are trying to connect to a mailbox on exchange server 2007.

    Hi, in our Enterprise environment, we have a single mac with Mavericks version 10.9.2 and Office for Mac 14.4.1. When setting up outlook, we are trying to connect to a mailbox on exchange server 2007. We put in the EWS details in the server field since our autodiscover function is not functioning. But still it doesn't work. There are no errors, no popups. We turned on the logging and in the logs, it says a error of -3259. We are stuck and any help will be really appreciated.

    I have a customer experiencing exactly the same issue. Their computer is running Windows 7 Pro with Office 2007 SP3. After seemingly exhausting all troubleshooting options, I backed up their data, formatted the hard drive and performed a clean install of
    Windows and all their applications. It didn't solve the problem!
    What's strange is the customer also has a laptop computer, running the same version of Outlook, and that doesn't experience any problems connecting to Office 365 on the same network.
    My next step is to send the customer a new ADSL modem/router to try.
    I have another customer on Office 365, also running Outlook 2007, and they also experience issues with emails sitting in the outbox while Outlook displays the status message “Outlook is trying to retrieve data from the Microsoft exchange server outlook.office365.com.”
    In this case Outlook doesn't freeze/stop responding, like it does for the first customer I mentioned.

Maybe you are looking for