Comments (1)
I created kube secret:
kubectl create secret tls mail-tls --key=cert.key --cert=cert.crt
and deployed app with next deployment:
apiVersion: apps/v1
kind: Deployment
metadata:
name: smtp4dev
spec:
replicas: 1
selector:
matchLabels:
app: smtp4dev
template:
metadata:
labels:
app: smtp4dev
spec:
containers:
- name: smtp4dev
image: rnwood/smtp4dev
env:
- name: ServerOptions__TlsMode
value: "StartTls"
- name: ServerOptions__TlsCertificate
valueFrom:
secretKeyRef:
name: mail-tls
key: tls.crt
- name: ServerOptions__TlsCertificatePrivateKey
valueFrom:
secretKeyRef:
name: mail-tls
key: tls.key
ports:
- containerPort: 25
name: smtp
- containerPort: 80
name: http
volumeMounts:
- name: tls-volume
mountPath: /tls
volumes:
- name: tls-volume
secret:
secretName: mail-tls
after that I got an error:
The SMTP server failed to start: System.IO.DirectoryNotFoundException: Could not find a part of the path '/smtp4dev/-----BEGIN PRIVATE KEY-----
.
.
.
-----END PRIVATE KEY-----'.
at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter)
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode)
at System.IO.FileStream.OpenHandle(FileMode mode, FileShare share, FileOptions options)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
at System.IO.StreamReader.ValidateArgsAndOpenPath(String path, Encoding encoding, Int32 bufferSize)
at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks)
at System.IO.File.InternalReadAllText(String path, Encoding encoding)
at System.IO.File.ReadAllText(String path)
at Rnwood.Smtp4dev.Server.CertificateHelper.LoadCertificateWithKey(String certificatePath, String certificateKeyPath) in /app/Rnwood.Smtp4dev/Server/CertificateHelper.cs:line 20
at Rnwood.Smtp4dev.Server.Smtp4devServer.GetTlsCertificate() in /app/Rnwood.Smtp4dev/Server/Smtp4devServer.cs:line 102
at Rnwood.Smtp4dev.Server.Smtp4devServer.CreateSmtpServer() in /app/Rnwood.Smtp4dev/Server/Smtp4devServer.cs:line 61
at Rnwood.Smtp4dev.Server.Smtp4devServer.TryStart() in /app/Rnwood.Smtp4dev/Server/Smtp4devServer.cs:line 396
System.IO.DirectoryNotFoundException: Could not find a part of the path '/smtp4dev/-----BEGIN PRIVATE KEY-----
.
.
.
-----END PRIVATE KEY-----'.
at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter)
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode)
at System.IO.FileStream.OpenHandle(FileMode mode, FileShare share, FileOptions options)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
at System.IO.StreamReader.ValidateArgsAndOpenPath(String path, Encoding encoding, Int32 bufferSize)
at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks)
at System.IO.File.InternalReadAllText(String path, Encoding encoding)
at System.IO.File.ReadAllText(String path)
at Rnwood.Smtp4dev.Server.CertificateHelper.LoadCertificateWithKey(String certificatePath, String certificateKeyPath) in /app/Rnwood.Smtp4dev/Server/CertificateHelper.cs:line 20
at Rnwood.Smtp4dev.Server.Smtp4devServer.GetTlsCertificate() in /app/Rnwood.Smtp4dev/Server/Smtp4devServer.cs:line 102
at Rnwood.Smtp4dev.Server.Smtp4devServer.CreateSmtpServer() in /app/Rnwood.Smtp4dev/Server/Smtp4devServer.cs:line 61
at Rnwood.Smtp4dev.Server.Smtp4devServer.TryStart() in /app/Rnwood.Smtp4dev/Server/Smtp4devServer.cs:line 396
how to fix it?
help, please
from smtp4dev.
Related Issues (20)
- mail with DSN parameter RET in MAIL FROM: causes 501 error HOT 2
- smtp4dev with self signed certificate HOT 1
- smtp4dev not starting up when running under IIS in a locked-down environment, failing to bind to random port HOT 1
- [Feature] Use the http api interface of the specified email address to obtain the mailing list or information
- selfsigned certificate name mismatch on MacOS 12.0.1 with Docker and Mailkit HOT 1
- Public instance on Windows HOT 2
- [Feature] Make the API public and document it HOT 3
- [Bug] IMAP does not support SEARCH command (A5 BAD Error in arguments when searching for unseen flag term) HOT 2
- [Feature] Include a root folder in released .zips (Opening package litters download folder.) HOT 1
- SMTP HOT 2
- [Bug] Email addresses in TO or CC with trailing dot is shown as a BCC recipient in Web User interface HOT 1
- Size of app (windows) optimization HOT 2
- Password Protected
- Relaying message sends it to the CC/BCC recipients even when recipients were overridden HOT 4
- Hello image doen'st work HOT 1
- Feature: Reply to an email HOT 1
- Is there an in-memory persistence option HOT 1
- [Feature] Desktop edition - Minimize to tray HOT 3
- DotNet (Nuget) security updates available HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from smtp4dev.