|
Hi,
In win 7 you need run it as administrator ...
|
|
|
|
|
Hi Ivar,
still using your smtp server implementation and it rocks. However, from time to time happens, that smtp server is not able to receive the message ( gives timeout back ) and after that the processor load stays high after that( seems like session processing the message causes that).
Is there any built in technique to handle this type of timeouts ? Or should I implemement it into Session_GetMessageStream, checking for LastActivity property, calling Disconnect/Dispose after some amount of time ?
Thank you in advance for your help.
Robert
|
|
|
|
|
Hi,
What version do you use ?
|
|
|
|
|
|
I meant version in version.txt file.
|
|
|
|
|
Here is the copy of content of version.txt file:
//----------------------------------------
version: 0.X (xx.xx.xx)
*) Ole mime classes (MimeConstructor,MimeParser,...) obsoleted.
*) Completely new Mime system. For more see LumiSoft.Net.Mime namespcae in help file.
//----------------------------------------
version: 0.11 (13.06.2005)
*) Removed obslolete methods from DnsEX
*) DnsEx renamed to Dns_Client and moved to new namespace "LumiSoft.Net.Dns.Client".
|
|
|
|
|
|
Thanks Ivar, i have the latest version now.
Now to the question:
Is there any event to be raised, if delivering of message to your smtp server has not been successful?
Is it maybe Session_MessageStoringCanceled event ?
Is there a way to delete / set on hold this message, that couldn't be received ?
Thank you.
Robert
|
|
|
|
|
>Is it maybe Session_MessageStoringCanceled event ?
Yes this method is called when session times out or message receiving fails.
You can clean up message resources there.
|
|
|
|
|
Hi Ivar,
i'm really stucked in finding what the cause for timeouts is. Maybe you will have some idea ...
Here what's going on, when timeout occurs (short extract from log should explain that):
2011-03-01 00:51:07.7621 - Log - Processing.BounceHandling.SmtpServerOnSessionCreated - SMTP_SERVER_SESSION_START 3/1/2011 12:51:07 AM SessionId: aedcc6a1-b1ad-482a-97e6-ea26e744d80b
2011-03-01 00:52:50.2326 - Log - MailServer.SmtpServer.Session_MessageStoringCanceled - TimeOut occured while receiving message. EHlo From: To: do-not-reply+37850779@bounceback.server.com FromEnvelopeId: LocalEndPoint: 25.0.9.15:2785 RemoteEndPoint: 25.0.7.40:54484 SessionId: aedcc6a1-b1ad-482a-97e6-ea26e744d80b -> sent 421 back to mail server
00:57:57.7436 - SessionOnMessageStoringCompleted event was fired - Message has been delivered, Session is already disposed at this point
Same message retried to be delivered:
2011-03-01 02:01:07.5413 - Log - Processing.BounceHandling.SmtpServerOnSessionCreated - SMTP_SERVER_SESSION_START 3/1/2011 2:01:07 AM SessionId: 8d0e6779-4fe2-455c-9b72-b0e24025a02a - Thread: 56
2011-03-01 02:02:52.2758 - Log - MailServer.SmtpServer.Session_MessageStoringCanceled - TimeOut occured while receiving message. EHlo From: To: do-not-reply+37850779@bounceback.server.com FromEnvelopeId: LocalEndPoint: 25.0.9.15:2785 RemoteEndPoint: 25.0.7.40:22549 SessionId: 8d0e6779-4fe2-455c-9b72-b0e24025a02a - Thread: 86 -> sent 421 back to mail server
02:07:53.5570 - SessionOnMessageStoringCompleted event was fired - Message has been delivered, Session is already disposed at this point
Same message retried to be delivered
2011-03-01 03:11:07.2611 - Log - Processing.BounceHandling.SmtpServerOnSessionCreated - SMTP_SERVER_SESSION_START 3/1/2011 3:11:07 AM SessionId: 29cfa6c4-3ffe-449e-98ef-58cc30a7efa2 - Thread: 36
2011-03-01 03:12:54.3361 - Log - MailServer.SmtpServer.Session_MessageStoringCanceled - TimeOut occured while receiving message. EHlo From: To: do-not-reply+37850779@bounceback.server.com FromEnvelopeId: LocalEndPoint: 25.0.9.15:2785 RemoteEndPoint: 25.0.7.40:25237 SessionId: 29cfa6c4-3ffe-449e-98ef-58cc30a7efa2 - Thread: 43 -> sent 421 back to mail server
03:17:55.4232 - SessionOnMessageStoringCompleted event was fired - Message has been delivered, Session is already disposed at this point
As you can see timeout occurs, disposes session, but the message seems to be delivered 5 minutes later as the SessionOnMessageStoringCompleted event is fired.
Do you maybe have idea on this ?
Do you maybe have some advice on MessageStoringCanceled event implemetation that avoid devilering message later with already disposed session ?
Thank you.
Robert
|
|
|
|
|
I must check, may be Socket not disposed when TimeOut called.
EDIT:
Just checked socket is dosposed, so SessionOnMessageStoringCompleted should not be raised when timeout happens.
|
|
|
|
|
Unfortunately, as you can see from logs it raises.
Is maybe some additional action necessary in MessageStorageCanceled event to avoid that ?
|
|
|
|
|
Probably message storing part needs to check IsDisposed property value and not wait socket error after dispose.
|
|
|
|
|
Yes, that should work as work around. But ... it still occurs ... always exact 5 minutes (300 seconds) after timeout - independent from message. I was searching for some timeout in your code that could cause that but did not found anything.
|
|
|
|
|
Hi Ivar,
i think i found the Problem. Server goes crazy (causes excessive cpu load) if more than one session opened in same moment (more messages delivered in exact same milisecond).
Setting MaxConnections to 1 seem to solving the problem.
Robert
|
|
|
|
|
You should have another problem. Settings MaxConnections is not solution.
I run this smtp component live on few servers, so far all work ok, alowing many connections(limited to 200) at time.
|
|
|
|
|
I just tried time out, no MessageStored event riased, only MessageStoringCanceled raised.
|
|
|
|
|
Warning ==> never use DLL or EXE that you dont see the code behind.
Peace
|
|
|
|
|
please can you help me
how configration this program how use it
|
|
|
|
|
Hi,
First ensure you use latest from:
http://www.lumisoft.ee/lswww/download/downloads/MailServer/Devel/Current/[^]
In general all configured with most general settings.
You just need to create domain and add users.
Also you need to specify "host name" with your dns name(for example mail.domain.com) in binding for each service(SMTP,POP3,IMAP,..)
Thats all you need todo.
|
|
|
|
|
I tried SMTP, for 15 days but you are great.. you helped me a lot.. Thank you Ivar Lumi
|
|
|
|
|
thanks very much , this article helps me
|
|
|
|
|
Hi Ivar,
I am looking to create an SMTP Proxy Server that sits in front of another SMTP server to monitor and filter email. This Proxy needs to be able to listen to up to 10 ports (eg 25, 25000, 25001 etc) and parse the email (body and attachments) before resending it out to any one of the other ports! This server will be part of a .NET application written in C#. Would your classes be able to do this? Or should I be looking somewhere else?
Thanks
Chris
|
|
|
|
|
|
Thanks, are there any examples of these classes being used in .NET C# to create a SMTP Proxy server? For example can message attachments be saved as files before being forwarded to the next port?
I will download the latest version too...thanks
|
|
|
|