Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to implement TLS tunneling in my Postfix so that when needed it can use TLS certification (when trying to send mails to the domain xxxx.xx, their servers will ask mine to establish a TLS session. In the documentation there seems to be two approaches: SMTP server and SMTP client.

What is the difference? And which one am I supposed to use?

share|improve this question

Postfix with TLS for SMTP Server is for when the mail client, or other mail server tries to send email to or through your postfix system, it will offer or require the use of TLS depending on how you configure it. Postfix with TLS for SMTP Client is when your postfix server wants to send email to another SMTP server.

Update 1

Given Postfix's client tls documentation if offers STARTTLS then and offers a correct ssl certificate, then configuring Opportunistic TLS with /etc/postfix/ smtp_tls_security_level = may will provide the support required.

share|improve this answer
Ok, but I make an SMTP connection to my Postfix server, and then I use this connection to send an mail to ''. Then requires a TLS session to accept that mail. Then my Postfix server is a server for me, but a client for the server at – Amarnasan Jul 10 '12 at 16:03
Correct. These are two distinct cases. – adaptr Jul 10 '12 at 17:23

Think of it this way. Your mail server is both a server and a client. When mail is sent to your server, it is acting as the server. When your server is relaying that email to another location or sending email to another server on your behalf, it is the client.

To see the default client TLS settings of postfix, you would type:

postconf -d | grep ^smtp_tls | more

To see the defulat server settings of postfix, you would type

postconf -d | grep ^smtpd_tls | more

If you remove the -d, you will see your current configuration. This should reflect what is in /etc/postfix/

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.