tlswrapper-smtp(1)

πŸ“¦
version 0~20260501 Β· 2 versions
, in ubuntu stonking

πŸ’– tlswrapper-smtp β€” TLS encryption wrapper: smtp helper πŸ’–

okay bestie, gather round, because this is tlswrapper-smtp(1), a General Commands Manual page and honestly? it's giving tiny but mighty. 🌸


✨ NAME ✨

tlswrapper-smtp β€” TLS encryption wrapper, but make it the smtp helper πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

tlswrapper-smtp [ options ] prog

πŸ‘‘ DESCRIPTION πŸ‘‘

so here's the tea: tlswrapper-smtp adds STARTTLS support to those old, crusty, inetd-style SMTP servers that lowkey refuse to support STARTTLS natively. no patching required, we just wrap it. πŸŽ€

and the way it gets executed is literally this whole relay chain:

Internet <--> systemd.socket/inetd/tcpserver/... <--> tlswrapper <-->
tlswrapper-smtp  <--> smtpprogram

main character energy in the middle of the pipeline, periodt. πŸ”₯


πŸ’… OPTIONS πŸ’…

  • -q β€” quiet mode, bestie. absolutely no error messages. 🀫
  • -v β€” verbose mode unlocked! stack multiple -v options to crank the verbosity up higher. the max is 3, so don't get greedy. 😌
  • -t seconds β€” sets the SMTP session timeout to seconds seconds. default is 600. ⏰
  • -T seconds β€” sets the connect/read/write timeout to seconds seconds. default is 15. ⚑
  • -u user β€” runs program prog under a specified user's uid and gid. heads up though: the account must resolve to a non-zero uid and a non-zero gid, and accounts with uid 0 or gid 0 are rejected. no root shenanigans here, babes. 🚫
  • -g host:port β€” turns on greylist support (postgrey protocol) and uses the server running on host:port. πŸ“
  • -c β€” handles communication to the greylist server in fail-closed mode. if a greylist lookup fails temporarily, tlswrapper-smtp exits with status 111. dramatic but honest. πŸ’€
  • -C β€” handles communication to the greylist server in fail-open mode. if a greylist lookup fails temporarily, it assumes the address is not greylisted. this one is the default, iykyk. πŸ™ˆ
  • -J jaildir β€” chroots into the specified jaildir. default: /var/lib/tlswrapper/empty. 🧚
  • -j jailuser β€” runs under the specified jailuser's uid and gid. same rules as before: the account must resolve to non-zero uid and non-zero gid, and uid 0 / gid 0 accounts are rejected. leave it unset and it runs under a random uid and gid instead. 🎲
  • prog β€” program. yes that's the whole description bestie, that's the argument. 🫢

πŸ”’ SECURITY πŸ”’

JAIL β€” Privilege separation, filesystem isolation, limits 🏰

tlswrapper-smtp, just like tlswrapper processes, runs under a dedicated non-zero uid to prohibit kill, ptrace, etc. like, don't even think about touching it. πŸ’ͺ

it also gets chrooted into an empty, unwritable directory to prohibit filesystem access β€” nothing to see, nothing to touch, iconic. 🌈

and it sets ulimits to prohibit new files, sockets, etc. 🌸

it also sets ulimits to prohibit forks. 🍴🚫

fr fr, this thing is locked down tighter than your read receipts. πŸ”

🌟 EXAMPLES 🌟

run QMAIL qmail-smtpd on port 25 with STARTTLS enabled (without patching QMAIL, because we said no patching):

exec softlimit -m 64000000 -f 100000000 \
tcpserver -HRDl0 0 25 \
tlswrapper -v -n -f /etc/ssl/cert.pem \
tlswrapper-smtp -v -u qmaild \
qmail-smtpd

slay. that's the whole flex. πŸ’…βœ¨


🫢 SEE ALSO 🫢


and that's the page babes! πŸ’– this little icon was brought to you by tlswrapper-smtp(1) β€” go be safe, stay jailed, and remember: no cap, only STARTTLS. πŸŽ€πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from