-
-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: Signed mail #8
Comments
Hi, I know it's a bit obsolete however it's the only way that works and allows you to define EmailReplyTo. Does MimeKit allow you to do that? I was thinking to move Send-Email to Emailimo, and as soon as most of my modules move to Emailimo (if I will be able to migrate them) scrap some Email functions out. |
Yeah. MimeKit can do pretty much everything. I've looked for You would need to pack MimeKit with Emailimo though. |
Also. After looking over |
Well, I did take a look and it's not trivial. Most likely would require a separate module to cover all topics related to MimeKit. But let's keep this open. Maybe when I'll get time, or I'll be bored I'll take a look and implement something. If not signing then maybe migrate to mimekit to be 'supported'. |
I've found an Implementation of MailKit which handles closely to As of now it's not on the gallery. I've opened an issue dbaileyut/PSMailKit#7 to this end. |
I've done my own implementation of MailKit in https://github.com/EvotecIT/Mailozaurr It doesn't yet have signing but I'm one step closer :-) |
It looks quite good. I'm going to have a closer look next week :-) |
I am liking the Mailozaurr module so far but would like to +1 for the Signed mail. (Things like password expiry notifications would be great to be sent signed) |
I agree. It would be cool. Resources:
No promises - but when I'll get some free time I'll take a look. |
I had a few looks at SMIME functionality. Per default this would be a SQLite DB. Shall we simply use SQLite or should there be a class which can be inherited from for Users/Admins to write their own implementation of The actual signing implementation itself is not that much work as soon as you have a context. Here is an example with the windows default context: index 5ed86b8..775f6db 100644
--- a/Public/Send-EmailMessage.ps1
+++ b/Public/Send-EmailMessage.ps1
@@ -530,6 +530,10 @@
}
$Message.Body = $BodyBuilder.ToMessageBody()
+ $ctx = $ctx = [MimeKit.Cryptography.WindowsSecureMimeContext]::new([System.Security.Cryptography.X509Certificates.StoreLocation]::CurrentUser)
+ $Signer = $Message.From.Mailboxes[0].Clone()
+ $Message.Body = [MimeKit.Cryptography.MultipartSigned]::Create($ctx, $Signer, [MimeKit.Cryptography.DigestAlgorithm]::Sha256, $Message.Body)
+
### SMTP Part Below
$SmtpClient = [MySmtpClient]::new()
if ($SkipCertificateRevocation) { A few notes here
|
As you can see I also tried the SMIME in the Testing-Certs branch but a bit failed attempt. Mailozaurr/Public/Send-EmailMessage.ps1 Line 542 in 884faf3
I saw windosecuremimecontext, but what about linux/macos. I am not sure what is the best approach. I would like it to be as portable as possible. |
In that case I'd say you should bundle The question then is where you want to store the SQLite DB per default. Maybe I'll take a look at writing a Context this weekend |
Once you have something ready and working the path can be then decided. Let's work out the working solution. I guess we should have something hardcoded if parameter is not provided, but also allow people to define location where the db is located, or maybe explicitly prompt for it - since it can be hard to define on macos/linux/winows to make sure all 3 locations are supported |
@jschpp any luck with creating this? I believe this would be greatly beneficial. Seeing as Integrated Auth will soon be a thing, I think we mostly miss Signing |
Hi there.
I love this collection of utilities and replaced some of my own tools with it.
Would it be possible to add S/MIME signed mails to the Send-Email function?
Also on this topic:
The
System.Net.Mail.SmtpClient
API is obsolete. Microsoft recommends using https://github.com/jstedfast/MimeKitThe text was updated successfully, but these errors were encountered: