Git Product home page Git Product logo

simple.mailserver's People

Contributors

hanswolff avatar nholmgaard avatar rflipper avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

simple.mailserver's Issues

Way to stop the server or bind

I have been looking for a way to stop the listening port without coming out of the console app
Is there something built in that I am missing or would I have to make a function to do this.

Synchronized writer

Hi,
I was playing around with your SMTP server project and in my stress testing I kept running into problems with the program trying to access an object that had been disposed.

I track this down to an issue in BaseConnection.cs the underlying problem being that Streams are not thread safe
I made a small change to lock the stream when writing to it and the problem went away, my change is below.

public async Task WriteLineAsyncAndFireEvents(string line)
{
            if (Writer.BaseStream.CanWrite)
            {
                RawLineSent(this, new RawLineEventArgs(Writer.Encoding.GetBytes(line)));            
                // previously did:
                // await Writer.WriteLineAsync(line);
                // updated to this:
                await TextWriter.Synchronized(Writer).WriteLineAsync(line);
            }
}

I should note this problem only showed up when I threw thousands of connections at the SMTP Server

Receiving attachments slow

Receiving attachments using this mailserver is incredibly slow when attachments are large. Could you shed some light on this?

Memory leaks

Hello.
After reciving 200 000 smtp messages the application occupy 150 000 Mb.
And memory usage is increasing.
There are some problems with memory leaks in the aplication.
Could you help me with it.
I thought of using this smtp server for sending sms, but it can't work on prodaction server with this issue.
Thank you.

Performance issues

I noticed serious performance issue related to using Stream.ReadAsync method which has huge overhead in Simple.MailServer.Mime.StringReaderStream.ReadLineAsync method

for (var i = 0; i < _buffer.Length; i++)
{
   var read = await BaseStream.ReadAsync(_singleBuf, 0, 1, cancellationToken); // <-- this is the issue
   if (read <= 0)

I believe the following articles are related to the issue:
https://ayende.com/blog/173345/the-cost-of-async-i-o-false-assumptions-and-pride
https://nbsoftsolutions.com/blog/await-async-in-c-and-why-synchrony-is-here-to-stay

AUTH support question

I was going to take a stab at implementing AUTH (probably LOGIN first) and wondered if @hanswolff had any suggestions for implementing the announcement and subsequent acceptance of credentials from the client.

I can extend SmtpCommandParser with a new ProcessCommandAuth, which handles the AUTH command along with the username, however this request then requires a subsequent send by the client of the password following a 334 (I think) response. This subsequent send does not contain a command parameter, only the password.

Here is a diff on a feature branch (sorry the commit is such a mess, it is just a spike and I inadvertantly included some superfluous code.

Link to ProcessCommandAuth

Any preference on how you would like this type of a workflow implemented?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.