{"id":68,"date":"2012-04-03T17:15:58","date_gmt":"2012-04-03T17:15:58","guid":{"rendered":"https:\/\/adeelejaz.com\/blog\/?p=68"},"modified":"2016-01-12T23:48:09","modified_gmt":"2016-01-12T23:48:09","slug":"postfix-not-sending-mails-after-installing-and-uninstalling-sendmail","status":"publish","type":"post","link":"https:\/\/adeelejaz.com\/blog\/postfix-not-sending-mails-after-installing-and-uninstalling-sendmail\/","title":{"rendered":"Postfix not sending mails after installing and uninstalling Sendmail"},"content":{"rendered":"<p>I got bitten today, really bad! My story starts when postfix stopped working for me (after the update last night). All I had to do was re-install postfix but in desperation I ended up installing Sendmail and that&#8217;s how it all started! I found my mistake, uninstalling Sendmail and then reinstalled Postfix. But it was too late. Now the server wasn&#8217;t sending emails. I quickly jumped to <code>\/var\/log\/mail.log<\/code> which read:<\/p>\n<pre>postfix\/master: fatal: bind 0.0.0.0 port 25: Address already in use<\/pre>\n<p>A big of Googling to see what was using port 25, I had to install <code>sockstat<\/code> as it gives you the process ID of the process running on that port:<\/p>\n<pre>socket | grep :25<\/pre>\n<p>The output I got was very interesting:<\/p>\n<pre>root     sendmail-mta    17059    tcp4    127.0.0.1:25     *:*    LISTEN<\/pre>\n<p>Aha! I thought I had uninstalled Sendmail! Well I have, but the process is still running(!) and holding the port 25 at bay!<\/p>\n<p>A quick kill command:<\/p>\n<pre>kill 17059<\/pre>\n<p>(replace the number with the process id you got in the previous command)<\/p>\n<p>Give Postfix a reboot and viola! It works!<\/p>\n<p>If this works for you, please leave a comment \ud83d\ude42<\/p>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content --><p class=\"wp-flattr-button\"><a href=\"https:\/\/adeelejaz.com\/blog\/?flattrss_redirect&amp;id=68&amp;md5=fd0b0fa0e97f4152de2c325c3c3e151c\" title=\"Flattr\" target=\"_blank\"><img src=\"https:\/\/adeelejaz.com\/blog\/wp-content\/plugins\/flattr\/img\/flattr-badge-white.png\" srcset=\"https:\/\/adeelejaz.com\/blog\/wp-content\/plugins\/flattr\/img\/flattr-badge-white.png, https:\/\/adeelejaz.com\/blog\/wp-content\/plugins\/flattr\/img\/flattr-badge-white@2x.png 2xhttps:\/\/adeelejaz.com\/blog\/wp-content\/plugins\/flattr\/img\/flattr-badge-white.png, https:\/\/adeelejaz.com\/blog\/wp-content\/plugins\/flattr\/img\/flattr-badge-white@3x.png 3x\" alt=\"Flattr this!\"\/><\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>I got bitten today, really bad! My story starts when postfix stopped working for me (after the update last night). All I had to do was re-install postfix but in desperation I ended up installing Sendmail and that&#8217;s how it all started! I found my mistake, uninstalling Sendmail and then reinstalled Postfix. But it was [&hellip;]<!-- AddThis Advanced Settings generic via filter on wp_trim_excerpt --><!-- AddThis Share Buttons generic via filter on wp_trim_excerpt --><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-68","post","type-post","status-publish","format-standard","hentry","category-ubuntu"],"_links":{"self":[{"href":"https:\/\/adeelejaz.com\/blog\/wp-json\/wp\/v2\/posts\/68","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/adeelejaz.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/adeelejaz.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/adeelejaz.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/adeelejaz.com\/blog\/wp-json\/wp\/v2\/comments?post=68"}],"version-history":[{"count":1,"href":"https:\/\/adeelejaz.com\/blog\/wp-json\/wp\/v2\/posts\/68\/revisions"}],"predecessor-version":[{"id":69,"href":"https:\/\/adeelejaz.com\/blog\/wp-json\/wp\/v2\/posts\/68\/revisions\/69"}],"wp:attachment":[{"href":"https:\/\/adeelejaz.com\/blog\/wp-json\/wp\/v2\/media?parent=68"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/adeelejaz.com\/blog\/wp-json\/wp\/v2\/categories?post=68"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/adeelejaz.com\/blog\/wp-json\/wp\/v2\/tags?post=68"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}