1

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?

3 Answers 3

1

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 blah.com offers STARTTLS then and offers a correct ssl certificate, then configuring Opportunistic TLS with /etc/postfix/main.cf: smtp_tls_security_level = may will provide the support required.

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

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/main.cf

0

Perhaps you want both client (smtp) and server (smtpd) config in main.cf:

smtp_tls_security_level = may
smtpd_tls_security_level = may
1
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Dec 2, 2021 at 18:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .