Describe the bug
I'm trying to setup a Bitwarden instance. It's relying on MailKit but I've been experiencing some issues. Due to those I've setup a small test environment. It successfully connects to my SMTP server, delivers the SMTP-data but I never receive a mail.
Platform (please complete the following information):
OS: Windows 11 | Linux
.NET Runtime: CoreCLR (Windows) | whatever Bitwarden is using
.NET ~Framework~: .net6.0 | whatever Bitwarden is using
MailKit Version: 4.4.0 | whatever Bitwarden is using
Exception
none
To Reproduce
Steps to reproduce the behavior:
Try sending a mail using the code from below
Expected behavior
Receiving a mail
Code Snippets
using MailKit;
using MailKit.Net.Smtp;
using MimeKit;
namespace ConsoleApp1
{
internal class Program
{
private static void Main(string[] args)
{
MimeMessage message = new MimeMessage();
message.MessageId = $"<{DateTime.Now.Ticks}@janwiesemann.de>";
message.From.Add(new MailboxAddress("Bitwarden", "noreply@janwiesemann.de"));
message.To.Add(new MailboxAddress("test", "xxx@janwiesemann.de"));
message.Subject = "How you doin'?";
message.Body = new TextPart("plain") { Text = "Bananenbrot" };
using (SmtpClient client = new SmtpClient(new ProtocolLogger(Console.OpenStandardOutput())))
{
client.Connect("smtp.strato.com", 465, true);
// Note: only needed if the SMTP server requires authentication
client.Authenticate("noreply@janwiesemann.de", "xxx");
client.Send(message);
client.Disconnect(true);
}
}
}
}
Protocol Logs
Connected to smtps://smtp.strato.com:465/
S: 220 smtp.strato.com ESMTP RZmta (P16 -)
C: EHLO janwiesemann.de
S: 250-smtp.strato.com greets 79.252.219.7
S: 250-ENHANCEDSTATUSCODES
S: 250-PIPELINING
S: 250-8BITMIME
S: 250-DELIVERBY
S: 250-SIZE 104857600
S: 250-LIMITS RCPTMAX=1000 MAILMAX=1000
S: 250-AUTH PLAIN LOGIN CRAM-MD5 DIGEST-MD5
S: 250-REQUIRETLS
S: 250 HELP
C: AUTH DIGEST-MD5
S: 334 xxx
C: ********
S: 334 xxx
C:
S: 235 2.7.0 OK Authenticated
C: MAIL FROM:<noreply@janwiesemann.de> SIZE=267 REQUIRETLS
C: RCPT TO:<xxx@janwiesemann.de>
S: 250 2.1.0 Sender ok
S: 250 2.1.5 Recipient ok: <xxx@janwiesemann.de>
C: DATA
S: 354 3.0.0 Enter data for mail with id k86a7203DEJ6bdQ
C: From: Bitwarden <noreply@janwiesemann.de>
C: Date: Sat, 13 Apr 2024 16:19:05 +0200
C: Subject: How you doin'?
C: Message-Id: <638486219459348519@janwiesemann.de>
C: To: test <xxx@janwiesemann.de>
C: MIME-Version: 1.0
C: Content-Type: text/plain; charset=utf-8
C:
C: Bananenbrot
C: .
S: 250 2.0.0 OK queued with id k86a7203DEJ6bdQ
C: QUIT
S: 221 2.0.0 smtp.strato.com closing connection
Additional context
Sending mails trough this address is possible. I'm already using it for Seafile (python using Django), FreePBX (postfix) and a few other systems.
If you need access to a test account I would be able to create one and mail it to you. In addition I've already contacted Strato.de but I haven't received a reply yet.
The following log is from my FreePBX system. I've received the message a few seconds later.
Describe the bug I'm trying to setup a Bitwarden instance. It's relying on MailKit but I've been experiencing some issues. Due to those I've setup a small test environment. It successfully connects to my SMTP server, delivers the SMTP-data but I never receive a mail.
Platform (please complete the following information):
Exception none
To Reproduce Steps to reproduce the behavior:
Expected behavior Receiving a mail
Code Snippets
Protocol Logs
Additional context Sending mails trough this address is possible. I'm already using it for Seafile (python using Django), FreePBX (postfix) and a few other systems.
If you need access to a test account I would be able to create one and mail it to you. In addition I've already contacted Strato.de but I haven't received a reply yet.
The following log is from my FreePBX system. I've received the message a few seconds later.