{"id":4,"date":"2018-04-25T10:21:50","date_gmt":"2018-04-25T10:21:50","guid":{"rendered":"https:\/\/ubuntu.science\/?p=4"},"modified":"2022-04-02T11:07:56","modified_gmt":"2022-04-02T09:07:56","slug":"como-instalar-postfix-tls-en-ubuntu-16-04","status":"publish","type":"post","link":"https:\/\/rootfan.com\/es\/how-to-install-postfix-tls-on-ubuntu-16-04\/","title":{"rendered":"C\u00f3mo instalar Postfix con TLS en Ubuntu 16.04"},"content":{"rendered":"<p>Primero intall Postfix y mailutils<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code\" data-no-translation=\"\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\napt-get install postfix mailutils\n<\/pre><\/div>\n\n\n<p>Generar certificados que se utilizar\u00e1n para el cifrado TLS y\/o la autenticaci\u00f3n de certificados:<\/p>\n\n\n\n<!--more-->\n\n\n<div class=\"wp-block-syntaxhighlighter-code\" data-no-translation=\"\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\ntouch smtpd.key\nchmod 600 smtpd.key\nopenssl genrsa 1024 &gt; smtpd.key\nopenssl req -new -key smtpd.key -x509 -days 3650 -out smtpd.crt # has prompts\nopenssl req -new -x509 -extensions v3_ca -keyout cakey.pem -out cacert.pem -days 3650 # has prompts\nmv smtpd.key \/etc\/ssl\/private\/\nmv smtpd.crt \/etc\/ssl\/certs\/\nmv cakey.pem \/etc\/ssl\/private\/\nmv cacert.pem \/etc\/ssl\/certs\/\n<\/pre><\/div>\n\n\n<p>Cuando obtenga esto (el segundo paso promt), introduzca una frase de paso de su elecci\u00f3n<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code\" data-no-translation=\"\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nEnter PEM pass phrase:\n<\/pre><\/div>\n\n\n<p>Configure Postfix para que realice el cifrado TLS tanto para el correo entrante como para el saliente:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code\" data-no-translation=\"\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\npostconf -e 'smtp_tls_security_level = may'\npostconf -e 'smtpd_tls_security_level = may'\npostconf -e 'smtpd_tls_auth_only = no'\npostconf -e 'smtp_tls_note_starttls_offer = yes'\npostconf -e 'smtpd_tls_key_file = \/etc\/ssl\/private\/smtpd.key'\npostconf -e 'smtpd_tls_cert_file = \/etc\/ssl\/certs\/smtpd.crt'\npostconf -e 'smtpd_tls_CAfile = \/etc\/ssl\/certs\/cacert.pem'\npostconf -e 'smtpd_tls_loglevel = 1'\npostconf -e 'smtpd_tls_received_header = yes'\npostconf -e 'smtpd_tls_session_cache_timeout = 3600s'\npostconf -e 'tls_random_source = dev:\/dev\/urandom'\npostconf -e 'myhostname = server1.example.com' # remember to change this to yours\n<\/pre><\/div>\n\n\n<p>Tambi\u00e9n te recomiendo que hagas esto, o podr\u00edas tener algunos problemas al enviar con ipv6<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code\" data-no-translation=\"\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\npostconf -e 'inet_protocols = ipv4'\n<\/pre><\/div>\n\n\n<p>El nuevo archivo de configuraci\u00f3n de Postfix se encuentra aqu\u00ed<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code\" data-no-translation=\"\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n\/etc\/postfix\/main.cf\n<\/pre><\/div>\n\n\n<p>Reinicie ahora Postfix con este comando<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code\" data-no-translation=\"\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n\/etc\/init.d\/postfix restart\n<\/pre><\/div>\n\n\n<p>Ahora puede probar su configuraci\u00f3n con este comando desde la l\u00ednea de comandos<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code\" data-no-translation=\"\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\necho \"Test mail from postfix\" | mail -s \"Test Postfix\" you@example.com\n<\/pre><\/div>\n\n\n<p>Y comprueba en el registro que todo ha ido bien<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code\" data-no-translation=\"\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\ntail -50 \/var\/log\/mail.log\n<\/pre><\/div>","protected":false},"excerpt":{"rendered":"<p>En primer lugar intall Postfix y mailutils Generar certificados que se utilizar\u00e1n para el cifrado TLS y \/ o certificado de autenticaci\u00f3n:<\/p>","protected":false},"author":1,"featured_media":2832,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_focus_keyword":"","rank_math_title":"","rank_math_description":"Get a comprehensive tutorial on installing Postfix with TLS on Ubuntu 16.04 to set up a secure email server for your domain.","rank_math_robots":null,"rank_math_og_title":"","rank_math_og_description":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[2],"tags":[3,4,29],"class_list":["post-4","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-postfix","tag-postfix","tag-tutorial","tag-ubuntu"],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/rootfan.com\/wp-content\/uploads\/noria.jpg?fit=2000%2C1200&ssl=1","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/rootfan.com\/es\/wp-json\/wp\/v2\/posts\/4","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rootfan.com\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rootfan.com\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rootfan.com\/es\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rootfan.com\/es\/wp-json\/wp\/v2\/comments?post=4"}],"version-history":[{"count":9,"href":"https:\/\/rootfan.com\/es\/wp-json\/wp\/v2\/posts\/4\/revisions"}],"predecessor-version":[{"id":2845,"href":"https:\/\/rootfan.com\/es\/wp-json\/wp\/v2\/posts\/4\/revisions\/2845"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/rootfan.com\/es\/wp-json\/wp\/v2\/media\/2832"}],"wp:attachment":[{"href":"https:\/\/rootfan.com\/es\/wp-json\/wp\/v2\/media?parent=4"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rootfan.com\/es\/wp-json\/wp\/v2\/categories?post=4"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rootfan.com\/es\/wp-json\/wp\/v2\/tags?post=4"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}