{"id":529,"date":"2015-01-15T11:03:09","date_gmt":"2015-01-15T02:03:09","guid":{"rendered":"https:\/\/fugutabetai.com\/blog\/2015\/01\/15\/what-is-my-mail-server-rejecting\/"},"modified":"2015-01-15T11:03:09","modified_gmt":"2015-01-15T02:03:09","slug":"what-is-my-mail-server-rejecting","status":"publish","type":"post","link":"https:\/\/fugutabetai.com\/blog\/2015\/01\/15\/what-is-my-mail-server-rejecting\/","title":{"rendered":"What is my mail server rejecting?"},"content":{"rendered":"<p>I&#8217;ve recently migrated my hosting from one VPS to a new host.  It was a lot more work than it should have been.  I&#8217;ll try to be much better at keeping my host up to date and maintained.  <\/p>\n<p>At any rate, I finally have my mailserver up and running on the new host.  I implemented greylisting and some other spam prevention measures.  Sometimes I wonder what is being rejected and why.  Here is a super simple perl one-liner that can look at the mail.log file and spit out what hosts are rejected, and what the rejection reasons are (independently.) <\/p>\n<p>grep reject mail.log | perl -n -e &#8216;END { foreach my $key (sort {$hosts{$a} <=> $hosts{$b}} keys %hosts) { print &#8220;$hosts{$key}\\t$key\\n&#8221;; } foreach my $key ( sort { $reasons{$a} <=> $reasons{$b} } keys %reasons) { print &#8220;$reasons{$key}\\t$key\\n&#8221;;}} if (m\/RCPT from (.*?): .*?: (.*);\/) { $hosts{&#8220;$1&#8221;}++; $reasons{&#8220;$2&#8221;}++}&#8217;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve recently migrated my hosting from one VPS to a new host. It was a lot more work than it should have been. I&#8217;ll try to be much better at keeping my host up to date and maintained. At any rate, I finally have my mailserver up and running on the new host. I implemented [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[4,5],"tags":[],"_links":{"self":[{"href":"https:\/\/fugutabetai.com\/blog\/wp-json\/wp\/v2\/posts\/529"}],"collection":[{"href":"https:\/\/fugutabetai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fugutabetai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fugutabetai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fugutabetai.com\/blog\/wp-json\/wp\/v2\/comments?post=529"}],"version-history":[{"count":0,"href":"https:\/\/fugutabetai.com\/blog\/wp-json\/wp\/v2\/posts\/529\/revisions"}],"wp:attachment":[{"href":"https:\/\/fugutabetai.com\/blog\/wp-json\/wp\/v2\/media?parent=529"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fugutabetai.com\/blog\/wp-json\/wp\/v2\/categories?post=529"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fugutabetai.com\/blog\/wp-json\/wp\/v2\/tags?post=529"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}