-
Notifications
You must be signed in to change notification settings - Fork 17
Closed
Labels
verifiedAll test cases were verified successfullyAll test cases were verified successfully
Milestone
Description
When uploading a custom wildcard certificate via the UI, if the private key file (*.key) is missing a trailing newline (\n), the resulting fullchain.pem file generated at /etc/ssl/postfix/fullchain.pem becomes malformed. This causes Postfix to fail TLS initialization.
Steps to reproduce
- Upload a custom wildcard certificate and private key using the web interface.
- Ensure the private key file does not end with a newline after
-----END RSA PRIVATE KEY-----. - The generated
/etc/ssl/postfix/fullchain.pemwill look like this (note the missing newline before the cert begins):
-----END RSA PRIVATE KEY----------BEGIN CERTIFICATE-----
- Try to test SMTP with:
openssl s_client -showcerts -starttls smtp -connect <your-domain>:25 < /dev/null
- You will get:
error:04800066:PEM routines::bad end line:crypto/pem/pem_lib.c:881:
- Postfix log (
/var/log/maillog):
postfix/smtpd[37645]: warning: TLS library problem: error:04800066:PEM routines::bad end line:crypto/pem/pem_lib.c:881:
postfix/smtpd[37645]: warning: error loading private keys and certificates from: /etc/ssl/postfix/fullchain.pem: disabling TLS support
Expected behavior
- The system should ensure a newline is present at the end of the
.keyfile before concatenating it with the certificate, so thatfullchain.pemis correctly formatted.
Actual behavior
- Postfix to fail TLS initialization
Suggested Fix:
Automatically add a newline after -----END RSA PRIVATE KEY----- if it is missing during certificate upload or before generating fullchain.pem.
Components
ns8-traefik
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
verifiedAll test cases were verified successfullyAll test cases were verified successfully
Type
Projects
Status
Done