{"id":55,"date":"2008-06-18T12:26:12","date_gmt":"2008-06-18T17:26:12","guid":{"rendered":"http:\/\/it.thelibrarie.com\/weblog\/?p=55"},"modified":"2009-07-10T09:03:19","modified_gmt":"2009-07-10T14:03:19","slug":"exchange-2007-self-signed-certificate","status":"publish","type":"post","link":"https:\/\/it.thelibrarie.com\/weblog\/2008\/06\/exchange-2007-self-signed-certificate\/","title":{"rendered":"Exchange 2007 Self-Signed Certificate"},"content":{"rendered":"<p>This will probably never come up in my ventures as the Administrator here at my job, but it has come up with one of our customers.  They do not have a Certificate Authority (CA) and do not pay for an outside certificate.  They also use Exchange 2007.  I&#8217;m not privy to all the ins and outs of their network, but they&#8217;re a standard small business with 4 or 5 servers.  And it&#8217;s been 53 weeks since they installed Exchange 2007.<\/p>\n<p>Why is 53 a number you should scoff at?  Every 52 weeks (365 days, 12 months, 1 year, 1\/10th of a decade&#8230;) you have to resign the self-signed certificate that Exchange gives itself.  Why do I even need a certificate, you ask.  The certificate is required for all TLS communication.  Anything that&#8217;s even remotely secured uses TLS.  Outlook uses TLS.  If the certificate is invalid or non-existent, Outlook will refuse to send and receive emails from your Exchange server.  Not good.  I&#8217;m not sure why their server lasted 53 weeks and not 52, but maybe the guy got it wrong (he&#8217;s fairly technical though).<\/p>\n<p>Here&#8217;s a quick and easy way of renewing your certificate:<br \/>\n1.) On your Exchange 2007 server, open up the Exchange Management Shell<br \/>\n2.) Type &#8220;get-exchangecertificate&#8221; and hit enter.  This will show all installed certificates.<br \/>\nType &#8220;get-exchangecertificate | fl *&#8221; to show everything about the installed certificates.<br \/>\nType &#8220;get-exchangecertificate | fl services, thumbprint&#8221; to show only the services with the thumbprint for each certificate.<br \/>\n3.) Type &#8220;get-exchangecertificate -thumbprint thumbprint_of_cert | new-exchangecertificate<br \/>\n4.) Type &#8220;enable-exchangecertificate -thumbprint thumbprint_of_new_cert -services &#8220;IMAP,POP,SMTP,IIS&#8221;<br \/>\n5.) Test the services<br \/>\n6.) Remove the old certificate.  Type &#8220;remove-exchangecertificate &#8211; thumbprint thumbprint_of_old_cert<\/p>\n<p>You&#8217;ll have to do this every year if you use the self-signed certs.  If you use a CA, the issued certificate will last anywhere from 1 to 5 years.  You can also use your internal CA to issue new signed-certificates.  You can use the standard website template, and then use the Exchange Management Shell to add the services to the new certificate (enable-exchangecertificate -thumbprint thumbprint -services &#8220;imap,pop,smtp&#8221;.  You can leave out IIS since it *should* already be there.<\/p>\n<p>**** EDIT ****<\/p>\n<p><code>New-ExchangeCertificate -SubjectName \"DC=domain, DC=com, CN=server.domain.com\" -DomainName server.domain.com,mail.domain.com -IncludeAcceptedDomains -IncludeAutoDiscover -Services \"SMTP\" -PrivateKeyExportable $true<\/code><br \/>\nThis updates the certificate to cover all domains used by Exchange.  You can also specify other domains like mail.domain, webmail.domain etc.<\/p>\n<p><code>Get-ExchangeCertificate<\/code><br \/>\n<code>Get-ExchangeCertificate | FL<\/code><br \/>\nThese allow you to find the thumbprint of the certificate you created.<\/p>\n<p><code>Enable-ExchangeCertificate -Thumbprint THUMBPRINT -Services SMTP,IMAP,POP,IIS<\/code><br \/>\nThis will turn on the services for your thumbprinted certificate.  Obviously you can choose which services to allow.<\/p>\n<p><code>Export-ExchangeCertificate -Thumbprint THUMBPRINT -BinaryEncoded:$true -Path C:\\SSCert.pfx -Password:(Get-Credential).password<\/code><br \/>\nThis exports your personal certificate PFX file with the password you choose at the prompt.  This can then be pushed out to users to trust this file.  Check for root certificate installations for other details.<\/p>\n<p>OR, if you have your own Certificate Authority:<\/p>\n<blockquote><p>\n<code>New-ExchangeCertificate -GenerateRequest -SubjectName \"o=My, o=Site, cn=MyServer.MyDomain.com\" -IncludeAcceptedDomains<br \/>\n-Path c:\\MyServer.MyDomain.com.req<\/code><br \/>\nOpen this file using notepad or the like, and copy the information between the start and end of the certificate.<br \/>\nNow log into your Certificate Authority<br \/>\nhttp:\/\/CAServer\/certsrv<br \/>\nClick Request a certificate<br \/>\nSubmit an advanced certificate request<br \/>\nSubmit a certifcate request by using a base-64-encoded CMC or PKCS #10 file, or submit a renewal request by using a base-64-encoded PKCS #7 file<br \/>\nPaste the certificate information from earlier<br \/>\nChange the Certificate Template to Web Server<br \/>\nClick submit<\/p><\/blockquote>\n<p>You should now have a certificate issued.  You&#8217;ll probably want to download it &#8211; so select Base64 encoded and download the certificate.  I always choose to download the full path AND the general cert.<\/p>\n<p>Copy your newly issued\/downloaded certificate to your Exchange server.<br \/>\n<code>Import-ExchangeCertificate -Path c:\\2009mycert.cer | Enable-ExchangeCertificate -Services SMTP,POP,IMAP,IIS<\/code><\/p>\n<p>If you already have a certificate that&#8217;s the default one on Exchange, you&#8217;ll notice that the SMTP and IIS settings DO NOT STAY.<br \/>\nYou&#8217;ll have to:<br \/>\n<code>Enable-ExchangeCertificate -Thumbprint MYTHUMBPRINT -Services SMTP,IIS<\/code><br \/>\nExchange will ask if you want to overwrite the current certificate with Y for yes.<br \/>\nYou&#8217;re done!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This will probably never come up in my ventures as the Administrator here at my job, but it has come up with one of our customers. They do not have a Certificate Authority (CA) and do not pay for an outside certificate. They also use Exchange 2007. I&#8217;m not privy to all the ins and &hellip; <a href=\"https:\/\/it.thelibrarie.com\/weblog\/2008\/06\/exchange-2007-self-signed-certificate\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Exchange 2007 Self-Signed Certificate<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-55","post","type-post","status-publish","format-standard","hentry","category-microsoft"],"_links":{"self":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts\/55","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/comments?post=55"}],"version-history":[{"count":4,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts\/55\/revisions"}],"predecessor-version":[{"id":310,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts\/55\/revisions\/310"}],"wp:attachment":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/media?parent=55"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/categories?post=55"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/tags?post=55"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}