Click here to Skip to main content
11,483,983 members (66,756 online)
Click here to Skip to main content

SMTP and POP3 Mail Server

, 29 Sep 2003 667.9K 12.9K 309
Rate this:
Please Sign up or sign in to vote.
An SMTP and POP3 mail server written using the .NET Framework and C#.

Sample Image - smtppop3mailserver.jpg

Introduction

The MailServerComponent implements POP3 and SMTP (core) servers. It Handles lowlevel POP3 and SMTP commands and raises events according to it. The MailServer service just handles MailServerComponent events and does mail retrieving and storing job.

Features

General:

  • SMTP/POP3/IMAP4/WebMail
  • IP access filtering
  • User mailbox size limit
  • Supports XML or MSSQL databases
  • Nice GUI for administation
  • Well commented source code included

SMTP:

  • All basic SMTP features  
  • Supports multiple domains  
  • Supports multiple e-address for one mailbox  
  • Supports aliases(Mailing lists). Supports public and private(needs authentication) lists.
  • Supports email routing. eg *ivar* pattern routes all addresses containing ivar to specified mailbox or remote address  
  • SMTP AUTH (LOGIN CRAM-MD5) (supported authentication types)  
  • SMTP SIZE, PIPELINING, 8BITMIME, CHUNCKING support  
  • SMTP custom message filters  
  • Relay can be controlled by IP access or authentication

POP3:

  • All basic POP3 features
  • APOP command for secure authentication
  • POP3 AUTH (LOGIN CRAM-MD5) (supported authentication types)
  • POP3 remote accounts

WebMail (ASP.NET):

  • Standalone webmail, can be used any with IMAP based mailserver
  • Supports XML or MSSQL databases
  • Multiple UI languages (ENG,EST,RUS)

Notes

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Ivar Lumi

Estonia Estonia
No Biography provided

Comments and Discussions

 
GeneralRe: Timeout while receiving message Pin
Ivar Lumi9-Feb-11 4:39
memberIvar Lumi9-Feb-11 4:39 
GeneralRe: Timeout while receiving message Pin
robertbindas10-Feb-11 5:17
memberrobertbindas10-Feb-11 5:17 
GeneralRe: Timeout while receiving message Pin
Ivar Lumi10-Feb-11 20:24
memberIvar Lumi10-Feb-11 20:24 
GeneralRe: Timeout while receiving message Pin
robertbindas14-Feb-11 1:38
memberrobertbindas14-Feb-11 1:38 
GeneralRe: Timeout while receiving message Pin
Ivar Lumi14-Feb-11 2:04
memberIvar Lumi14-Feb-11 2:04 
GeneralRe: Timeout while receiving message Pin
robertbindas21-Feb-11 0:53
memberrobertbindas21-Feb-11 0:53 
GeneralRe: Timeout while receiving message Pin
Ivar Lumi21-Feb-11 1:00
memberIvar Lumi21-Feb-11 1:00 
GeneralRe: Timeout while receiving message Pin
robertbindas1-Mar-11 3:15
memberrobertbindas1-Mar-11 3:15 
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
GeneralRe: Timeout while receiving message Pin
Ivar Lumi1-Mar-11 3:19
memberIvar Lumi1-Mar-11 3:19 
GeneralRe: Timeout while receiving message Pin
robertbindas1-Mar-11 4:38
memberrobertbindas1-Mar-11 4:38 
GeneralRe: Timeout while receiving message Pin
Ivar Lumi1-Mar-11 4:40
memberIvar Lumi1-Mar-11 4:40 
GeneralRe: Timeout while receiving message Pin
robertbindas1-Mar-11 5:25
memberrobertbindas1-Mar-11 5:25 
GeneralRe: Timeout while receiving message Pin
robertbindas2-Mar-11 3:37
memberrobertbindas2-Mar-11 3:37 
GeneralRe: Timeout while receiving message Pin
Ivar Lumi2-Mar-11 3:44
memberIvar Lumi2-Mar-11 3:44 
GeneralRe: Timeout while receiving message Pin
Ivar Lumi3-Mar-11 21:11
memberIvar Lumi3-Mar-11 21:11 
GeneralRe: Timeout while receiving message Pin
Loves00720-Feb-14 7:47
memberLoves00720-Feb-14 7:47 
Generalemail server configration Pin
zzzfirst11130-Dec-10 11:43
memberzzzfirst11130-Dec-10 11:43 
GeneralRe: email server configration Pin
Ivar Lumi30-Dec-10 21:00
memberIvar Lumi30-Dec-10 21:00 
GeneralMy vote of 5 Pin
mohanudupa2-Nov-10 22:26
membermohanudupa2-Nov-10 22:26 
Generaln Pin
wadeaa18-May-10 11:33
memberwadeaa18-May-10 11:33 
QuestionSMTP Proxy Server Pin
chris_lines15-Nov-09 0:42
memberchris_lines15-Nov-09 0:42 
AnswerRe: SMTP Proxy Server Pin
Ivar Lumi5-Nov-09 1:21
memberIvar Lumi5-Nov-09 1:21 
GeneralRe: SMTP Proxy Server Pin
chris_lines15-Nov-09 2:11
memberchris_lines15-Nov-09 2:11 
GeneralRe: SMTP Proxy Server Pin
Ivar Lumi5-Nov-09 2:50
memberIvar Lumi5-Nov-09 2:50 
GeneralRe: SMTP Proxy Server Pin
chris_lines15-Nov-09 3:39
memberchris_lines15-Nov-09 3:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150520.1 | Last Updated 30 Sep 2003
Article Copyright 2003 by Ivar Lumi
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid