rnwood / smtp4dev Goto Github PK
View Code? Open in Web Editor NEWsmtp4dev - the fake smtp email server for development and testing
License: BSD 3-Clause "New" or "Revised" License
smtp4dev - the fake smtp email server for development and testing
License: BSD 3-Clause "New" or "Revised" License
Add a button to download the eml file
I'm having the same issue as described in #5 : the server's EHLO response contains lines like:
8BITMIME
SIZE
instead of:
250-8BITMIME
250-SIZE
The textarea control used to show message part source and session logs is slow when dealing with large (e.g 25MB) content. Chrome and Firefox both hang for several seconds when the text is dynamically set on these elements.
I am not sure if v3 is technically working or not given it's noted that it is in heavy development; I have the latest Docker image running and I see the sessions listed but it shows 0 messages and there is not response sent back to the client as I would normally expect with a 250.
I have tested the same build on Windows running as a service and it's working as expected, so this appears to just be something with the Docker image.
Firstly thanks for the great tool.
Opening the web ui http://localhost:5000 in internet explorer it opens empty page saying "Loading..." which never progresses.
Only on opening the console in IE developer tools do you see three has been an error:
SCRIPT5009: 'Reflect' is undefined
main.js (21,9971)
Is there any chance of showing a page to say the browser isn't supported?
That would save some time diagnosing what is going on,
Or adding a note to the readme.md on the main git hub page would be helpful.
Many thanks
Hello @rnwood
Great to see you've rebooted the project and we'll be getting a webui. This is awesome.
Running the exe from Smtp4dev-win-x86-v3.0.0-alpha-211 throws and exception saying the example.eml file can't be found.
Should I have used 209 instead of 211?
https://github.com/rnwood/smtp4dev/releases/tag/v2.0.10
Windows defender says the file contains the "Win32/Fuerboos.A!cl" trojan.
Hi,
When you are receiving several emails and at the same time you are trying to access contents from the WebUI. The application throw an unhandled exception.
Version Used: 3.0.349 Win x64
Logs:
`
F:\Program Files\Smtp4dev>"Rnwood.Smtp4dev.exe" --server.urls "http://0.0.0.0:50
00/"
smtp4dev version 3.0.0.0
https://github.com/rnwood/smtp4dev
Using Sqlite database at F:\Program Files\Smtp4dev\database.db
SMTP Server is listening on port 25. Keeping last 100 messages and 100 sessions.
Hosting environment: Production
Content root path: F:\Program Files\Smtp4dev
Now listening on: http://0.0.0.0:5000
Application started. Press Ctrl+C to shut down.
Session started. Client address XX.XX.XX.XX
Session started. Client address XX.XX.XX.XX
Session started. Client address XX.XX.XX.XX
Session started. Client address XX.XX.XX.XX
Session started. Client address XX.XX.XX.XX
Session started. Client address XX.XX.XX.XX
Session started. Client address XX.XX.XX.XX
Session started. Client address XX.XX.XX.XX
Session started. Client address XX.XX.XX.XX
Session started. Client address XX.XX.XX.XX
Session started. Client address XX.XX.XX.XX
Session started. Client address XX.XX.XX.XX
Session started. Client address XX.XX.XX.XX
Session started. Client address XX.XX.XX.XX
Session started. Client address XX.XX.XX.XX
Session started. Client address XX.XX.XX.XX
Session started. Client address XX.XX.XX.XX
Session started. Client address XX.XX.XX.XX
Session started. Client address XX.XX.XX.XX
Session started. Client address XX.XX.XX.XX
Session started. Client address XX.XX.XX.XX
Session started. Client address XX.XX.XX.XX
Session started. Client address XX.XX.XX.XX
Session started. Client address XX.XX.XX.XX
Session started. Client address XX.XX.XX.XX
Session started. Client address XX.XX.XX.XX
Session started. Client address XX.XX.XX.XX
Session completed. Client address XX.XX.XX.XX. Number of messages 4
Session started. Client address XX.XX.XX.XX
Session started. Client address XX.XX.XX.XX
Session completed. Client address XX.XX.XX.XX. Number of messages 5
Session started. Client address XX.XX.XX.XX
Session started. Client address XX.XX.XX.XX
Session completed. Client address XX.XX.XX.XX. Number of messages 4
Session started. Client address XX.XX.XX.XX
Session completed. Client address XX.XX.XX.XX. Number of messages 5
Session completed. Client address XX.XX.XX.XX. Number of messages 5
Session started. Client address XX.XX.XX.XX
Session started. Client address XX.XX.XX.XX
Unhandled Exception: fail: Microsoft.EntityFrameworkCore.Update[10000]
An exception occurred in the database while saving changes for context typ
e 'Rnwood.Smtp4dev.DbModel.Smtp4devDbContext'.
Microsoft.EntityFrameworkCore.DbUpdateConcurrencyException: Database opera
tion expected to affect 1 row(s) but actually affected 0 row(s). Data may have b
een modified or deleted since entities were loaded. See http://go.microsoft.com/
fwlink/?LinkId=527962 for information on understanding and handling optimistic c
oncurrency exceptions.
at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationComman
dBatch.ThrowAggregateUpdateConcurrencyException(Int32 commandIndex, Int32 expect
edRowsAffected, Int32 rowsAffected)
at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationComman
dBatch.ConsumeResultSetWithoutPropagationAsync(Int32 commandIndex, RelationalDat
aReader reader, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationComman
dBatch.ConsumeAsync(RelationalDataReader reader, CancellationToken cancellationT
oken)
at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.
ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationTok
en)
at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteA
sync(DbContext _, ValueTuple2 parameters, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.S aveChangesAsync(IReadOnlyList
1 entriesToSave, CancellationToken cancellationTok
en)
at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.S
aveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellatio
nToken)
at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acc
eptAllChangesOnSuccess, CancellationToken cancellationToken)
Microsoft.EntityFrameworkCore.DbUpdateConcurrencyException: Database operation e
xpected to affect 1 row(s) but actually affected 0 row(s). Data may have been mo
dified or deleted since entities were loaded. See http://go.microsoft.com/fwlink
/?LinkId=527962 for information on understanding and handling optimistic concurr
ency exceptions.
at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch
.ThrowAggregateUpdateConcurrencyException(Int32 commandIndex, Int32 expectedRows
Affected, Int32 rowsAffected)
at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch
.ConsumeResultSetWithoutPropagationAsync(Int32 commandIndex, RelationalDataReade
r reader, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch
.ConsumeAsync(RelationalDataReader reader, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.Execut
eAsync(IRelationalConnection connection, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(D
bContext _, ValueTuple2 parameters, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveCha ngesAsync(IReadOnlyList
1 entriesToSave, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveCha
ngesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken
)
at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAll
ChangesOnSuccess, CancellationToken cancellationToken)
Microsoft.EntityFrameworkCore.DbUpdateConcurrencyException: Database operation e
xpected to affect 1 row(s) but actually affected 0 row(s). Data may have been mo
dified or deleted since entities were loaded. See http://go.microsoft.com/fwlink
/?LinkId=527962 for information on understanding and handling optimistic concurr
ency exceptions.
at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch
.ThrowAggregateUpdateConcurrencyException(Int32 commandIndex, Int32 expectedRows
Affected, Int32 rowsAffected)
at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch
.ConsumeResultSetWithoutPropagationAsync(Int32 commandIndex, RelationalDataReade
r reader, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch
.ConsumeAsync(RelationalDataReader reader, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.Execut
eAsync(IRelationalConnection connection, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(D
bContext _, ValueTuple2 parameters, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveCha ngesAsync(IReadOnlyList
1 entriesToSave, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveCha
ngesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken
)
at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAll
ChangesOnSuccess, CancellationToken cancellationToken)
at Rnwood.Smtp4dev.Server.Smtp4devServer.OnMessageReceived(Object sender, Mes
sageEventArgs e) in C:\projects\smtp4dev\Rnwood.Smtp4dev\Server\Smtp4devServer.c
s:line 92
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionCo
ntext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.ThreadPoolWorkQueue.Dispatch()
`
In 2.0.10 Desktop Version smtp4dev appears to become very slow when the window list exceeds 65,536 emails.
In a test I was running it was able to receive hundreds of emails per second, but as soon as displayed messages exceed 65,536 it slows way down and can only receive on average one email per five seconds.
Please note that this is not a gradual slow down. It works at high speed right up till this number, and immediately after hitting that number it slows way down as described.
A workaround is to just "Delete All" in the window before it reaches that number. With this workaround smtp4dev continue to receive at high speed.
Note that the number 65,536 is 2^16.
Make it possible to set the server to persistently save the files to database / folder. Right now after closure it seems that the mails received before are gone
Since .NET Core doesn't allow use of Threads directly (only Tasks), now is a good time rather than hiding it with sync-over-async.
In the message view, it would be convenient to be able to see the basic headers outlook style (from, to, cc, bcc, subject)
Or did I miss it? :)
If you telnet to it and enter helo followed by a carriage return, instacrash!
I'm using this in my dev environment, but now have German & Swedish clients with non-ASCII characters in their email addresses.
I think I know how to fix it (Encode the addresses to UTF8), but I can't test with smtp4dev because it rejects non-ASCII characters in the email address...
Can you confirm, the smtp4dev doesn't support encoding the email address, so at least I know it's no my code's fault :-)
And obviously it would be good include support for encoding if you don't support it currently.
From PR16
AUTH LOGIN myusername
334 Username:
This is incorrect. The username was part of the initial command and so the response should be 334 Password:
In all the above the values would be base-64 encoded, but are included here in plan text to make it easier to understand the issue.
It would be nice to be able to view the raw content of message parts as plain text as it would be before transfer encoding, e.g. proper HTML.
Is it possible to e.g. add a tab or a selector button in the Parts tab that would toggle between showing the content before and after applying the transfer encoding?
In our scenario I would like to publish website into a virtual directory. There is no option to do that. Is there a possibility to add this by detecting where the app is actually running?
Hi,
Just like you have --server.urls as a commandline parameter, can you allow for the server port to be specified as well?
When running multiple test environments, to separate the emails easily, its best to run smtp4dev multiple times, listening on different ports.
Being able to specify the port when running the windows exe, would allow for a simple windows service configuration.
thanks
Wouldn't this make sense as a dotnet global tool?
Then you can install like this:
> dotnet tool install --global smtp4dev
Run it like this:
> smtp4dev
Easy and simple.
If you are on the sessions tab and a mail is received, when you return to the messages, the subject with is compressed and not using to available width. Restores after full refresh
Chrome after downloading MSI or zip binaries blocks them as malicious.
When receiving a message with the following MAIL FROM verb, a 501 Parameter not recognised message is returned.
MAIL FROM:[email protected] SIZE=5754 ENVID=X400-MTS-Identifier:+20[/PRMD+3dFirst+20Organizati/ADMD+3d+20/C+3dGB/;DC01-140416101643Z-98] RET=FULL
I have created an extension to handle the ENVID and RET parameters, however when the verb is parsed, the ENVID parameter is read in as "ENVID=X400-MTS-Identifier" and the remainder handled as an additional parameter. According to RFC 3461, ':' is a valid character for the ENVID parameter, however it is not treated as such.
Make it possible to delete a single email
when navigating to localhost:5000, browser says:
This webpage is not available
ERR_CONNECTION_REFUSED
Hi!
Since I don't have admin access on my work PC, but I still want to run this awesome tool, is it possible to run it as a portable app?
I think it was possible in earlier versions, wasn't it?
Port to run on .NET Core and provide binaries with framework for all supported platforms.
To replicate the feature in v2 where the program will optionally automatically display the latest message after it arrives.
When I click an email and select Headers, the divider starts to shift right and doesn't stop. until it is off screen (and even then still appears to go on)
smtp4dev is executed as service, on http://0.0.0.0:80
web interface is accessed from another machine in firefox, also tested in chrome
Hi, I am sending an email with a pdf attached and I am receiving this message. I do not know if it's ok, because it's a test or it's definitely wrong. Thanks!
Hello!
Having a issue running v3.0.248 as service on Linux.
I'm using the ZIP file containing all the necessary runtimes, and it was extracted all at one location, being /etc/smtp4dev
.
If I run the command manually in the terminal, /etc/smtp4dev/Rnwood.Smtp4dev --server.urls "http://0.0.0.0:5001/"
, everything runs fine.
When I use the same command in a systemd
service, I get the following error:
Aug 24 18:32:41 sidlee-mailhog Rnwood.Smtp4dev[26615]: Application startup exception: System.IO.FileNotFoundException: The configuration file 'appsettings.json' was not found and is not optional. The physical path is '/appsettings.json'.
Aug 24 18:32:41 sidlee-mailhog Rnwood.Smtp4dev[26615]: at Microsoft.Extensions.Configuration.FileConfigurationProvider.Load(Boolean reload)
Aug 24 18:32:41 sidlee-mailhog Rnwood.Smtp4dev[26615]: at Microsoft.Extensions.Configuration.ConfigurationRoot..ctor(IList`1 providers)
Aug 24 18:32:41 sidlee-mailhog Rnwood.Smtp4dev[26615]: at Microsoft.Extensions.Configuration.ConfigurationBuilder.Build()
Aug 24 18:32:41 sidlee-mailhog Rnwood.Smtp4dev[26615]: at Rnwood.Smtp4dev.Startup..ctor(IHostingEnvironment env) in C:\projects\smtp4dev\Rnwood.Smtp4dev\Startup.cs:line 36
Aug 24 18:32:41 sidlee-mailhog Rnwood.Smtp4dev[26615]: --- End of stack trace from previous location where exception was thrown ---
Aug 24 18:32:41 sidlee-mailhog Rnwood.Smtp4dev[26615]: at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
Aug 24 18:32:41 sidlee-mailhog Rnwood.Smtp4dev[26615]: at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.ConstructorMatcher.CreateInstance(IServiceProvider provider)
Aug 24 18:32:41 sidlee-mailhog Rnwood.Smtp4dev[26615]: at Microsoft.AspNetCore.Hosting.Internal.StartupLoader.LoadMethods(IServiceProvider hostingServiceProvider, Type startupType, String environmentName)
Aug 24 18:32:41 sidlee-mailhog Rnwood.Smtp4dev[26615]: at Microsoft.AspNetCore.Hosting.WebHostBuilderExtensions.<>c__DisplayClass1_0.<UseStartup>b__1(IServiceProvider sp)
Aug 24 18:32:41 sidlee-mailhog Rnwood.Smtp4dev[26615]: at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProviderEngineScope scope)
Aug 24 18:32:41 sidlee-mailhog Rnwood.Smtp4dev[26615]: at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider,
Type serviceType)
Aug 24 18:32:41 sidlee-mailhog Rnwood.Smtp4dev[26615]: at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
Aug 24 18:32:41 sidlee-mailhog Rnwood.Smtp4dev[26615]: at Microsoft.AspNetCore.Hosting.Internal.WebHost.EnsureStartup()
Aug 24 18:32:41 sidlee-mailhog Rnwood.Smtp4dev[26615]: at Microsoft.AspNetCore.Hosting.Internal.WebHost.EnsureApplicationServices()
Aug 24 18:32:41 sidlee-mailhog Rnwood.Smtp4dev[26615]: at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()
Aug 24 18:32:41 sidlee-mailhog Rnwood.Smtp4dev[26615]: Unhandled Exception: System.IO.FileNotFoundException: The configuration file 'appsettings.json' was not found and is not optional. The physical path is '/appsettings.json'.
Aug 24 18:32:41 sidlee-mailhog Rnwood.Smtp4dev[26615]: at Microsoft.Extensions.Configuration.FileConfigurationProvider.Load(Boolean reload)
Aug 24 18:32:41 sidlee-mailhog Rnwood.Smtp4dev[26615]: at Microsoft.Extensions.Configuration.ConfigurationRoot..ctor(IList`1 providers)
Aug 24 18:32:41 sidlee-mailhog Rnwood.Smtp4dev[26615]: at Microsoft.Extensions.Configuration.ConfigurationBuilder.Build()
Aug 24 18:32:41 sidlee-mailhog Rnwood.Smtp4dev[26615]: at Rnwood.Smtp4dev.Startup..ctor(IHostingEnvironment env) in C:\projects\smtp4dev\Rnwood.Smtp4dev\Startup.cs:line 36
Aug 24 18:32:41 sidlee-mailhog Rnwood.Smtp4dev[26615]: --- End of stack trace from previous location where exception was thrown ---
Aug 24 18:32:41 sidlee-mailhog Rnwood.Smtp4dev[26615]: at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
Aug 24 18:32:41 sidlee-mailhog Rnwood.Smtp4dev[26615]: at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.ConstructorMatcher.CreateInstance(IServiceProvider provider)
Aug 24 18:32:41 sidlee-mailhog Rnwood.Smtp4dev[26615]: at Microsoft.AspNetCore.Hosting.Internal.StartupLoader.LoadMethods(IServiceProvider hostingServiceProvider, Type startupType, String environmentName)
Aug 24 18:32:41 sidlee-mailhog Rnwood.Smtp4dev[26615]: at Microsoft.AspNetCore.Hosting.WebHostBuilderExtensions.<>c__DisplayClass1_0.<UseStartup>b__1(IServiceProvider sp)
Aug 24 18:32:41 sidlee-mailhog Rnwood.Smtp4dev[26615]: at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProviderEngineScope scope)
Aug 24 18:32:41 sidlee-mailhog Rnwood.Smtp4dev[26615]: at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider,
Type serviceType)
Aug 24 18:32:41 sidlee-mailhog Rnwood.Smtp4dev[26615]: at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
Aug 24 18:32:41 sidlee-mailhog Rnwood.Smtp4dev[26615]: at Microsoft.AspNetCore.Hosting.Internal.WebHost.EnsureStartup()
Aug 24 18:32:41 sidlee-mailhog Rnwood.Smtp4dev[26615]: at Microsoft.AspNetCore.Hosting.Internal.WebHost.EnsureApplicationServices()
Aug 24 18:32:41 sidlee-mailhog Rnwood.Smtp4dev[26615]: at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()
Aug 24 18:32:41 sidlee-mailhog Rnwood.Smtp4dev[26615]: at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build()
Aug 24 18:32:41 sidlee-mailhog Rnwood.Smtp4dev[26615]: at Rnwood.Smtp4dev.Program.Main(String[] args) in C:\projects\smtp4dev\Rnwood.Smtp4dev\Program.cs:line 17
Aug 24 18:32:41 sidlee-mailhog systemd[1]: smtp4dev.service: Main process exited, code=dumped, status=6/ABRT
Aug 24 18:32:41 sidlee-mailhog systemd[1]: smtp4dev.service: Unit entered failed state.
Aug 24 18:32:41 sidlee-mailhog systemd[1]: smtp4dev.service: Failed with result 'core-dump'.
Here's my service configuration:
[Unit]
Description=SMTP4DEV Service
[Service]
ExecStart=/etc/smtp4dev/Rnwood.Smtp4dev --server.urls "http://0.0.0.0:5001"
[Install]
WantedBy=multi-user.target
Linked to the persistent storage of emails (#35)
Set a period after which the program can delete the files, or set a max database / folder size and cleanup (rolling log kinda)
I installed smtp4dev using the dotnet tool command:
dotnet tool install -g Rnwood.Smtp4dev --version "3.0.0-*"
Then, when I try to run it using smtp4dev
I get reams of errors but the most important one seems to be related to aspnet-webpack
Application startup exception: System.AggregateException: One or more errors occurred. (Webpack dev middleware failed because of an error while loading 'aspnet-webpack'. Error was: Error: Cannot find module 'aspnet-webpack'
When testing the communication using telnet app will raise an exception when clicking on item which has been sent using telnet (see how to sent it using telnet - https://technet.microsoft.com/en-us/library/aa995718(v=exchg.65).aspx?f=255&MSPPError=-2147217396)
Tested on current master branch (3.0) using Telnet on latest stable Windows 10 machine.
I'll try to fix it when I have a time within next two weeks and will do the PR eventually.
var sc = new SmtpClient {
Host = "localhost",
UseDefaultCredentials = true,
Credentials = new NetworkCredential("whatever", "andMorewhatevers"),
Port = 25,
EnableSsl = true
};
var mail = new MailMessage("[email protected]", "[email protected]") {
Subject = "My subject",
Body = "My body"
};
sc.Send(mail);
this crashes latest smtp4dev with an ArgumentNullException
Is there a docker image for this? it would make everything very much easier if there was one.
I downloaded the source code of smtp4dev 2.0.9 and playing around with the Rnwood.SmtpServer to see if I can embed it in a custom server. In my server, I register only the Rnwood.SmtpServer.Extensions.SizeExtension. When I send a message using Mozilla Thunderbird, the transaction fails and Thunderbird says that the server responds with just "SIZE". In my case, server ends up in an infinite loop.
So, I debug using a telnet session to the server:
Trying 127.0.0.1...
Connected to goten.local.
Escape character is '^]'.
220 (none) smtp4dev ready
EHLO example.com
250 Nice to meet you.
SIZE
This is where I notice that the server responded incorrectly, so I sent the QUIT command back to the server and the everything closed correctly.
QUIT
221 See you later aligator
Connection closed by foreign host.
If I am interpreting RFC 1869 correctly, I think each line of the EHLO response is suppose start with a "250" code:
ehlo-ok-rsp ::= "250" domain [ SP greeting ] CR LF
/ ( "250-" domain [ SP greeting ] CR LF
*( "250-" ehlo-line CR LF )
"250" SP ehlo-line CR LF )
I think this is a bug. Any thoughts?
Thanks,
Ralph
comments
It would be nice if we can pull this solution directly from a NuGet package.
At the moment it seems like the web service in smtp4dev 3.0 alpha only listens on 'localhost', which works fine if you're developing locally but not so well if you're relying on remote machines. It would be very useful if the listening address was configurable in the config file, similar to how the listening port is.
It's helpful to easily see which messages are new and which ones have been viewed. Like version 2, could you add the default style for message items (in the messages list) to be bold, and then un-bold them after they've been viewed.
Thanks again for your work!
Hi Guys
I have the problem, that sometimes the list is sorted descending and otherwise it is sorted ascending (everytime it's the column "Received" which is sorted). I have no clue, how a user can change that or how I can configure that.
The problem is now, that I would like to change the sort order and define a default but I don't know how to do that or is it a bug?
Thanks
Victor
The most common 'AUTH LOGIN' mechanism looks like this
S: 220 esmtp.example.com ESMTP
C: ehlo client.example.com
S: 250-esmtp.example.com
S: 250-PIPELINING
S: 250-8BITMIME
S: 250-SIZE 255555555
S: 250 AUTH LOGIN PLAIN CRAM-MD5
C: auth login
S: 334 VXNlcm5hbWU6
C: avlsdkfj
S: 334 UGFzc3dvcmQ6
C: lkajsdfvlj
S: 535 authentication failed (#5.7.1)
From all the ESMTP Authentication mechanisms the offered, the client selects 'auth login'. The ESMTP server issues then a '334 VXNlcm5hbWU6' where 'VXNlcm5hbWU6' is a BASE64 encoded string 'Username:'. The client provides the BASE64 encoded user name and the sever responses with the request for the 'Password:' ('334 UGFzc3dvcmQ6'). In the sample above, random input is given and the server finally rejects the authentication request.
However, there exists a different, RFC compliant version of this behavior, where the client initially sends the userid already with the AUTH LOGIN method:
C: AUTH LOGIN ZHVtbXk=
S: 334 UGFzc3dvcmQ6
C: Z2VoZWlt
The C# SmtpClient uses the latter and this authentication method is currently rejected by smtp4dev.
Also the C# SmtpClient uses lowercase 'login' instead of 'LOGIN' which is also not recognized by the current implementation of smtp4dev server (version 2.1.1.0) (nothing a simple ToUpper cannot solve).
I have made some "hacks" to make this authentication work, but it would be better if these issues would be resolved in the trunk.
Here's the authentication hack:
public AuthMechanismProcessorStatus ProcessResponse(string data)
{
if (State == States.Initial && !String.IsNullOrEmpty(data))
{
State = States.WaitingForUsername;
}
I've been using smtp4dev for years in Win7, and have recently setup version 3 for a new computer. I realize this is work in progress, and while I don't expect everything to be perfect, a lack of any notification that email has arrived is a bit of a problem for me. Would it be possible to quickly add some code to send notifications to the browser using the Notifications API?
Thanks for all your work on this project!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.