{"id":877,"date":"2012-12-13T12:25:31","date_gmt":"2012-12-13T19:25:31","guid":{"rendered":"http:\/\/jim-zimmerman.com\/?p=877"},"modified":"2013-02-27T11:27:35","modified_gmt":"2013-02-27T18:27:35","slug":"custom-email-headers-in-sendmail-and-postfix","status":"publish","type":"post","link":"https:\/\/jim-zimmerman.com\/?p=877","title":{"rendered":"Custom email headers in sendmail and postfix."},"content":{"rendered":"<p>Sendmail:<\/p>\n<blockquote><p># cd \/etc\/mail<br \/>\n# vi \/submit.mc<br \/>\n&#8230;<br \/>\nLOCAL_CONFIG<br \/>\nH<em>X-MyCustomHeader: MyCustomHeaderValue<\/em><br \/>\n&#8230;<\/p>\n<p># m4 submit.mc > submit.cf<br \/>\n# service sendmail restart<\/p><\/blockquote>\n<p>Postfix:<\/p>\n<blockquote><p># cd \/etc\/postfix<\/p><\/blockquote>\n<p>Note: In the master.cf, only the -o (options) line was added.<\/p>\n<blockquote><p># vi master.cf<br \/>\n&#8230;<br \/>\nsmtp      unix  &#8211;       &#8211;       n       &#8211;       &#8211;       smtp<br \/>\n        -o smtp_header_checks=regexp:\/etc\/postfix\/<em>mycustomheaders<\/em><br \/>\n&#8230;\n<\/p><\/blockquote>\n<p>Create a file to store your custom headers.<\/p>\n<blockquote><p># vi mycustomheaders<br \/>\n\/^Subject:.*\/ PREPEND <em>X-MyCustomHeader: MyCustomHeaderValue<\/em><\/p>\n<p># service postfix restart<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>Sendmail: # cd \/etc\/mail # vi \/submit.mc &#8230; LOCAL_CONFIG HX-MyCustomHeader: MyCustomHeaderValue &#8230; # m4 submit.mc > submit.cf # service sendmail restart Postfix: # cd \/etc\/postfix Note: In the master.cf, only the -o (options) line was added. # vi master.cf &#8230; smtp unix &#8211; &#8211; n &#8211; &#8211; smtp -o smtp_header_checks=regexp:\/etc\/postfix\/mycustomheaders &#8230; Create a file to [&#038;hellip<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-877","post","type-post","status-publish","format-standard","hentry","category-documentation"],"share_on_mastodon":{"url":"","error":""},"_links":{"self":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts\/877","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=877"}],"version-history":[{"count":2,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts\/877\/revisions"}],"predecessor-version":[{"id":905,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts\/877\/revisions\/905"}],"wp:attachment":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=877"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=877"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=877"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}