S/MIME with OpenSSL¶
S/MIME signing happens at the sender. Public certificate trust and mailbox association are separate from mathematical signature validity.
Certificate assessment has been active on ratemymail.eu since 2026-10-13: validity period, usage, mailbox matching and public trust against a curated Mozilla Email-bit snapshot containing 91 roots. Without a separate operator CA and fresh local CRLs, operator chain trust and revocation remain unknown. A valid signature establishes neither outer message headers nor personal identity.
Publicly CA-trusted S/MIME certificates may be paid; pricing and any trial offers depend on the provider and certificate type. Locally issued or private-CA certificates may also suit some recipients without being publicly trusted. Cryptographic validity and a certificate path alone establish neither public trust nor a cost class. For example, GlobalSign lists paid Secure Email products with provider-specific pricing (provider information, checked 2026-10-12).
Only a passing result against the separately configured public S/MIME root list is placed in the report's provider-cost group. This describes the trust profile; it does not claim that the certificate was or must be purchased. Free offers may be available.
RateMyMail can also assess operator-provided local full CRLs. “No revocation” applies only to the current local lists for the verified certificate chain. A listed signer or intermediate certificate produces a revoked result; missing or stale evidence remains unknown. Direct URI distribution points without delegation or reason restrictions are supported. Delta, indirect and partitioned CRLs remain outside this limited profile. It performs no online retrieval. A passing CRL result confirms neither the sender's identity nor outer message headers.
Delayed local CA/CRL access preserves core validation and SMTP acceptance; the optional signature assessment remains unknown. A permanently blocked filesystem can occupy all four worker slots. Only after file operations return can terminated assessment processes be reaped and new assessments start. An incomplete private source bundle cannot support native replay evidence.
Setup¶
Prepare your values and Debian packages. Commands use your domain and files.
For production, create a key and CSR, then obtain a certificate from a suitable S/MIME CA with emailProtection and the actual mailbox in the SAN. Import the issued certificate and chain into your mailclient. Obtain CA roots from a deliberately selected trust source.
set -euo pipefail
. /root/mailserver.env
install -d -m 0700 /root/mail-smime
umask 077
if test ! -s /root/mail-smime/user.key; then
openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:3072 -out /root/mail-smime/user.key
fi
openssl req -new -key /root/mail-smime/user.key -out /root/mail-smime/user.csr \
-subj "/CN=$MAILBOX/emailAddress=$MAILBOX" \
-addext "subjectAltName=email:$MAILBOX"
openssl req -in /root/mail-smime/user.csr -noout -verify
Test¶
This independent local function test uses a short-lived self-signed test certificate, exclusively for this test. It does not establish public CA trust.
set -euo pipefail
. /root/mailserver.env
tmp=$(mktemp -d)
trap 'rm -rf "$tmp"' EXIT
umask 077
openssl req -x509 -newkey rsa:2048 -nodes -days 1 \
-keyout "$tmp/test.key" -out "$tmp/test.crt" \
-subj "/CN=Local S-MIME test/emailAddress=$MAILBOX" \
-addext "subjectAltName=email:$MAILBOX" \
-addext "keyUsage=digitalSignature" -addext "extendedKeyUsage=emailProtection"
printf 'Content-Type: text/plain\r\n\r\nS-MIME functional test\r\n' > "$tmp/content"
openssl cms -sign -in "$tmp/content" -signer "$tmp/test.crt" -inkey "$tmp/test.key" \
-outform SMIME -out "$tmp/signed.eml"
openssl cms -verify -in "$tmp/signed.eml" -CAfile "$tmp/test.crt" -out "$tmp/verified"
grep -F 'S-MIME functional test' "$tmp/verified"
sed 's/S-MIME functional test/Tampered content/' "$tmp/signed.eml" > "$tmp/changed.eml"
if openssl cms -verify -in "$tmp/changed.eml" -CAfile "$tmp/test.crt" -out /dev/null; then
echo 'ERROR: tampered content accepted' >&2
exit 1
fi
echo 'PASS: original CMS content valid; modified content invalid.'
The test covers OpenSSL S/MIME. Also verify a message signed by your actual mailclient with the issued certificate at the real recipient. Online revocation and the public CA trust decision require separate acceptance.