Loading ...
Sorry, an error occurred while loading the content.

Re: SSL Certificates per domain

Expand Messages
  • Wietse Venema
    ... How would Postfix know what certificate to use? Hint: SMTP is not HTTP. Wietse
    Message 1 of 8 , Jun 1, 2010
    • 0 Attachment
      Eduardo Júnior:
      > Hi, all
      >
      >
      > I'm blocking the communication from MUA to MTA from port 25/tcp,
      > doing that only through from ports 587/tcp and 465/tcp
      >
      >
      > But my box Postfix provides mail services to many domains and I created
      > a only SSL certificate with the name server as Common Name.
      >
      >
      > And I get many warnings because the Common Name in the certificate doesn't match
      > the FQDN of the SMTP server configured on mail clients (outlook,
      > thunderbird, etc)
      >
      > For example:
      >
      > Common Name: myserver.domain.com
      > MX for domain1: smtp.domain1.com
      > MX for domain2: smtp.domain2.com
      >
      > Then, how i configure SSL Certificates per domain on Postfix?
      > References?

      How would Postfix know what certificate to use?
      Hint: SMTP is not HTTP.

      Wietse
    • Martin Strand
      On Tue, 01 Jun 2010 16:20:56 +0200, Wietse Venema ... Even HTTP wouldn t be able to handle this since it doesn t know the hostname until
      Message 2 of 8 , Jun 1, 2010
      • 0 Attachment
        On Tue, 01 Jun 2010 16:20:56 +0200, Wietse Venema <wietse@...>
        wrote:

        > Eduardo Júnior:
        >>
        >> But my box Postfix provides mail services to many domains and I created
        >> a only SSL certificate with the name server as Common Name.
        >>
        >>
        >> And I get many warnings because the Common Name in the certificate
        >> doesn't match
        >> the FQDN of the SMTP server configured on mail clients (outlook,
        >> thunderbird, etc)
        >>
        >> For example:
        >>
        >> Common Name: myserver.domain.com
        >> MX for domain1: smtp.domain1.com
        >> MX for domain2: smtp.domain2.com
        >>
        >> Then, how i configure SSL Certificates per domain on Postfix?
        >> References?
        >
        > How would Postfix know what certificate to use?
        > Hint: SMTP is not HTTP.
        >
        > Wietse


        Even HTTP wouldn't be able to handle this since it doesn't know the
        hostname until after the SSL handshake when the request has been sent.

        If clients support it, I suppose you could add SANs (subject alternative
        names) to the certificate. It's a list of "alternative" hostnames covered
        by the same certificate:
        http://en.wikipedia.org/wiki/Subject_Alternative_Name
      • Victor Duchovni
        ... Now that OpenSSL 1.0 is out, and has always on support for TLSv1 extensions, I may find some time to add SNI support to Postfix. This creates significant
        Message 3 of 8 , Jun 1, 2010
        • 0 Attachment
          On Tue, Jun 01, 2010 at 10:20:56AM -0400, Wietse Venema wrote:

          > > Common Name: myserver.domain.com
          > > MX for domain1: smtp.domain1.com
          > > MX for domain2: smtp.domain2.com
          > >
          > > Then, how i configure SSL Certificates per domain on Postfix?
          > > References?
          >
          > How would Postfix know what certificate to use?
          > Hint: SMTP is not HTTP.

          Now that OpenSSL 1.0 is out, and has "always on" support for TLSv1
          extensions, I may find some time to add SNI support to Postfix. This
          creates significant additional complexity in the SMTP server SSL
          state management, and with most users on 0.9.8 or even 0.9.7, it
          has not yet been a priority.

          Even with SNI support, most SMTP clients will not make use of SNI, so
          it will take a long time before SMTP STARTTLS servers can expect to
          support multiple certificates for most clients.

          --
          Viktor.
        • Terry Inzauro
          ... Could this be a case where it makes sense to run multiple instances of postfix which bind to different IP s and are each configured with unique certs? kind
          Message 4 of 8 , Jun 1, 2010
          • 0 Attachment
            On 06/01/2010 10:00 AM, Victor Duchovni wrote:
            > On Tue, Jun 01, 2010 at 10:20:56AM -0400, Wietse Venema wrote:
            >
            >>> Common Name: myserver.domain.com
            >>> MX for domain1: smtp.domain1.com
            >>> MX for domain2: smtp.domain2.com
            >>>
            >>> Then, how i configure SSL Certificates per domain on Postfix?
            >>> References?
            >>
            >> How would Postfix know what certificate to use?
            >> Hint: SMTP is not HTTP.
            >
            > Now that OpenSSL 1.0 is out, and has "always on" support for TLSv1
            > extensions, I may find some time to add SNI support to Postfix. This
            > creates significant additional complexity in the SMTP server SSL
            > state management, and with most users on 0.9.8 or even 0.9.7, it
            > has not yet been a priority.
            >
            > Even with SNI support, most SMTP clients will not make use of SNI, so
            > it will take a long time before SMTP STARTTLS servers can expect to
            > support multiple certificates for most clients.
            >

            Could this be a case where it makes sense to run multiple instances of postfix which bind to different IP's and are each
            configured with unique certs?


            kind regards,

            _Terry
          • Victor Duchovni
            ... Yes, clearly, that s the most practical configuration option today. -- Viktor.
            Message 5 of 8 , Jun 1, 2010
            • 0 Attachment
              On Tue, Jun 01, 2010 at 12:23:38PM -0500, Terry Inzauro wrote:

              > > Even with SNI support, most SMTP clients will not make use of SNI, so
              > > it will take a long time before SMTP STARTTLS servers can expect to
              > > support multiple certificates for most clients.
              > >
              >
              > Could this be a case where it makes sense to run multiple instances
              > of postfix which bind to different IP's and are each
              > configured with unique certs?

              Yes, clearly, that's the most practical configuration option today.

              --
              Viktor.
            • /dev/rob0
              ... They don t need to be separate instances, possibly just separate smtpd(8) listeners bound per IP address. If you want each smtpd s input to be a separate
              Message 6 of 8 , Jun 1, 2010
              • 0 Attachment
                On Tue, Jun 01, 2010 at 12:23:38PM -0500, Terry Inzauro wrote:
                > Could this be a case where it makes sense to run multiple
                > instances of postfix which bind to different IP's and are each
                > configured with unique certs?

                They don't need to be separate instances, possibly just separate
                smtpd(8) listeners bound per IP address. If you want each smtpd's
                input to be a separate output stream, that would either require
                separate Postfix instances, or the new features in Postfix 2.7
                (release notes and the list archives have more information.)

                Is SNI defined for SMTP yet? A quick Google search didn't find it.
                How would that work? The client would have to tell the hostname or
                domain name wanted before the STARTTLS?
                --
                Offlist mail to this address is discarded unless
                "/dev/rob0" or "not-spam" is in Subject: header
              • Victor Duchovni
                ... SNI works entirely within SSL, the desired hostname is sent in the client SSL HELLO. There is no need to define SNI for SMTP. An MUA that implements SNI
                Message 7 of 8 , Jun 1, 2010
                • 0 Attachment
                  On Tue, Jun 01, 2010 at 12:42:06PM -0500, /dev/rob0 wrote:

                  > Is SNI defined for SMTP yet? A quick Google search didn't find it.
                  > How would that work? The client would have to tell the hostname or
                  > domain name wanted before the STARTTLS?

                  SNI works entirely within SSL, the desired hostname is sent in the
                  client SSL HELLO. There is no need to define SNI for SMTP.

                  An MUA that implements SNI for submission, would send the SMTP server
                  name it expects to match. This case is easy.

                  An MTA delivering mail to an MX host faces a more complex choice,
                  because it may be willing to accept a variety of names. The best
                  choice would be to send the "nexthop" domain (typically the same
                  as the domain of the recipients), and the server will choose a
                  cert with that name if it has one, a cert for a sub-domain
                  otherwise, and the default cert if neither an exact match, nor
                  a sub-domain are available.

                  On the client side, we may need to a new policy table attribute to
                  allow the client administrator to specify an SNI name other than the
                  nexthop.

                  Anyway, this is not currently a high priority, if implemented, it would
                  largely be just Postfix talking to Postfix. I am not aware of any other
                  SMTP+STARTTLS implementations that support SNI.

                  --
                  Viktor.
                Your message has been successfully submitted and would be delivered to recipients shortly.