You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-dev@logging.apache.org by "Dominik Psenner (JIRA)" <ji...@apache.org> on 2014/01/02 18:43:51 UTC

[jira] [Comment Edited] (LOG4NET-414) Implicit SSL not supported on SMTP appender

    [ https://issues.apache.org/jira/browse/LOG4NET-414?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13860378#comment-13860378 ] 

Dominik Psenner edited comment on LOG4NET-414 at 1/2/14 5:42 PM:
-----------------------------------------------------------------

Hey there and happy new year!

Since .NET does not support this feature there are three possibilities:
1] implement the SMTP protocol
2] replace the .NET implementation with a third party library
3] file a bug to microsoft
4] use the deprecated System.Web.Mail namespace

1] Is very unlikely to happen any time soon.
2] Would be a bad choice for log4net core.
And even if we filed 3] to microsoft it will have about the same chances as 1] to happen any time soon.
And finally for 4] we are not going to add a reference to a deprecated .NET namespace into log4net, but this would be my choice if I did solution A].

Thus I propose:

A] You implement an SMTP appender yourself that uses another library. Maybe your application uses one already? Then you can reference your SMTP appender implementation in the configuration to make the magic happen.
B] The SMTP implementation from microsoft .NET works for most people out there. For instance I've got it working with smtp.gmail.com, smtp.live.com and several root servers that run postfix. So why doesn't it work for you? Maybe there's something you could do in your server configuration?

Best regards


was (Author: nachbarslumpi):
Hey there and happy new year!

Since .NET does not support this feature there are three possibilities:
1] implement the SMTP protocol
2] replace the .NET implementation with a third party library
3] file a bug to microsoft

1] Is very unlikely to happen any time soon.
2] Would be a bad choice for log4net core.
And even if we filed 3] to microsoft it will have about the same chances as 1] to happen any time soon.

Thus I propose:

1] You implement an SMTP appender yourself that uses another library. Maybe your application uses one already? Then you can reference your SMTP appender implementation in the configuration to make the magic happen.
2] The SMTP implementation from microsoft .NET works for most people out there. For instance I've got it working with smtp.gmail.com, smtp.live.com and several root servers that run postfix. So why doesn't it work for you? Maybe there's something you could do in your server configuration?

Best regards

> Implicit SSL not supported on SMTP appender
> -------------------------------------------
>
>                 Key: LOG4NET-414
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-414
>             Project: Log4net
>          Issue Type: Bug
>          Components: Appenders
>    Affects Versions: 1.2.13
>         Environment: .NET 3.5 Windows 7 professional
>            Reporter: Zev
>              Labels: SMTP, SSL, appender
>
> It appears that implicit SMTP (SSL) is not supported. Rather only explicit SMTP (SSL) is supported.
> This is due to the fact that log4net delegates mail to the System.Net.Mail.SmtpClient object and Microsoft doesn't support it. 
> The bug request is to fix the smtp appender to support both flavors.
> Marked as bug instead of improvement since some providers only support port 465 (SMTP/SSL).
> In my case, using port 465 with EnableSSL. This is why my send timed out. It was waiting for the server to respond to it’s STARTTLS command, while the server was waiting for the client to start a secure sockets connection.
> Thanks,
> Zev.
> Differences between implicit and explicit SMTP SSL:
> With Explicit SSL, the communication (which basically is a sockets connection) starts unencrypted on port 25 or 587 as a regular SMTP conversation, then switches to TLS (encrypted channel) using the SMTP STARTTLS command, after which it authenticates and starts sending the email. This is the kind of SSL that the .NET SmtpClient understands, and the only kind it understands. It is described in this RFC (which actually talks about FTP, but the thing at issue here is the actual SSL connection, not the protocol – FTP or SMTP – running on top of it).
> With Implicit SSL, the connection starts out the whole conversation over SSL, i.e. it is encrypted from the get go. Commonly, port 465 is used for this. Implicit SSL is NOT covered by any RFC, it is NOT a standard, and the .NET SmtpClient does NOT understand it. 



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)