mirror of
https://github.com/Pro/exchange-catchall.git
synced 2026-04-25 07:25:53 +03:00
[GH-ISSUE #3] exchange-catchall possibly crashing MSExchangeTransport #3
Labels
No labels
bug
enhancement
pull-request
question
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/exchange-catchall#3
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @pgale on GitHub (Mar 5, 2014).
Original GitHub issue: https://github.com/Pro/exchange-catchall/issues/3
Not sure if this is the fault of exchange-catchall. Every 3 or 4 days I see this exception error and exchange stops processing mail. I also have GFI mail essentials installed and that reports email placed in a failed mail folder as it can't process. The errors are:
Is that something to do with catchall?
Thanks.
@damien-giry commented on GitHub (Mar 5, 2014):
I have the same type of messages. Is it SP1 or exchange-catchall? It seems to start with the installation of exchange-catchall. By the way I only have exchange-catchall as an external transport agent.
@pgale commented on GitHub (Mar 5, 2014):
Looking at the logs in more detail, it's actually crashing quite regularly except most of the time MSExchange Transport restarts OK - some times it doesn't though which is when everything stops and I notice.
@damien-giry commented on GitHub (Mar 5, 2014):
Did you patched your exchange SP1? http://windowsitpro.com/blog/exchange-2013-sp1-bug-breaks-third-party-products
I have just applied the patch to see if it change something.
@Pro commented on GitHub (Mar 5, 2014):
You are using Exchange 2013 SP1, correct? I'll try to test it in a VM with this version...
I'm using Exchange 2010 SP3 and Catchall for at least a year and didn't ran in this bug.
@pgale What does "crashes quite regularly" mean exactly? A specific time span (e.g. every 5 minutes) or each time an email arrives?
According to the exception messages it looks like
exchange-catchallis causing the exception in theExchange.CatchAll.CatchAllAgent.RcptToHandlerfunction.I suspect the line 217 to cause the exception:
github.com/Pro/exchange-catchall@9fc7fd5540/CatchAllAgent/CatchAllAgent.cs (L217)(because it is the only one having anything to do with a Dictionary causing the exception)
The
origToMappingobject is used to save the original recipient (the E-Mail address the sender used) for later usage to set theX-OrigToheader (which can't be done directly in the RcptTo handler).It looks like the
RcptToHandlermethod is called multiple times for the same E-Mail which shouldn't happen.Anyways I'll check if there's a better alternative for uniquely identifying a
MailIteminstead of usingGetHashCode()(which isn't a unique identifier: http://msdn.microsoft.com/en-us/library/system.object.gethashcode.aspx).Using a better identifier and checking if the ID already exists in the dictionary should fix the problem.
Give me a few days to (hopefully) fix this. If you have any suggestions feel free to mention them 👍
@Pro commented on GitHub (Mar 5, 2014):
I quick-fixed the issue with the commits above.
You can use the following .dll (just replace it with your existing one) in the meantime so you can still get E-Mails (for Exchange 2013 SP1 only!!): https://github.com/Pro/exchange-catchall/raw/5a78b01a84f9b25d52c76a0969ca80186f3834dc/CatchAllAgent/bin/Exchange%202013%20SP1/ExchangeCatchAll.dll
(The
X-OrigToheader is disabled in this version).Please let me know if you still get any exceptions!
@pgale commented on GitHub (Mar 6, 2014):
Yes using 2013 SP1 and with GFI mailessentials anti spam installed.
I was getting exceptions every 20-30 minutes it seemed.
I have installed the .DLL and am monitoring... good so far
BTW - small typo in caught email in event log - 'Caught' spelt wrongly.
Many thanks for the super quick support :)
Paul.
@pgale commented on GitHub (Mar 10, 2014):
Just to let you know - the new version has been running fine for the last 4 days or so with no more errors :)
@Pro commented on GitHub (Mar 10, 2014):
This should now be fixed in version 1.6.0. Before updating, please read: https://github.com/Pro/exchange-catchall#updating-to-version-160 (Thanks for the typo hint)