{"id":3403,"date":"2011-09-26T04:36:23","date_gmt":"2011-09-25T19:36:23","guid":{"rendered":"https:\/\/www.pistolfly.com\/weblog\/?p=3403"},"modified":"2018-03-14T09:10:06","modified_gmt":"2018-03-14T00:10:06","slug":"prevent-an-error-mail-from-being-sent-to-original-sender-in-the-case-of-forwarding-failure-on-postfix","status":"publish","type":"post","link":"https:\/\/www.pistolfly.com\/weblog\/en\/2011\/09\/prevent-an-error-mail-from-being-sent-to-original-sender-in-the-case-of-forwarding-failure-on-postfix.html","title":{"rendered":"Prevent an error mail from being sent to the original sender in the case of forwarding failure on Postfix"},"content":{"rendered":"<p>On Postfix, in the case of forwarding by aliases or .forward, if the forwarding results in an error, the error mail is sent to the original sender. The most easy way to prevent this behavior is setting the alias to a redirection to sendmail command and changing envelope sender address using sendmail -f option like below.<\/p>\n<pre>| \/usr\/sbin\/sendmail -f &lt;envelope sender address&gt; &lt;recipient address to forward&gt;\r\n<\/pre>\n<p>Example:<\/p>\n<p>\/etc\/aliases<\/p>\n<pre class=\"prettyprint\">foo: foo, \"| \/usr\/sbin\/sendmail -f bar xxx@example.com\"\r\n<\/pre>\n<p>sendmail -f option sets the envelope sender address. This is the address where delivery problems are sent to (\"bar\" in the above example). This means that an error mail is not delivered to the original sender.<\/p>\n<p>\u203b <strong>Be careful not to create infinite loop<\/strong><br \/>\nIn the above example, you should be careful that foo does not come to be the last recipient.<\/p>\n<p><a href=\"http:\/\/www.postfix-jp.info\/ML\/arc.2\/msg00468.html\" target=\"_blank\">[postfix-jp:01469] Re: [Q] .forward \u3067\u8ee2\u9001\u5931\u6557\u306e\u30e1\u30fc\u30eb\u3092\u9001\u4fe1\u8005\u306b\u77e5\u3089\u305b\u305f\u304f\u306a\u3044<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>On Postfix, in the case of forwarding by aliases or .forward, if the forwarding results in an error, the error &hellip; <a href=\"https:\/\/www.pistolfly.com\/weblog\/en\/2011\/09\/prevent-an-error-mail-from-being-sent-to-original-sender-in-the-case-of-forwarding-failure-on-postfix.html\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Prevent an error mail from being sent to the original sender in the case of forwarding failure on Postfix<\/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":{"_locale":"en_US","_original_post":"1270","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[40],"tags":[],"class_list":["post-3403","post","type-post","status-publish","format-standard","hentry","category-mail","en-US"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Prevent an error mail from being sent to the original sender in the case of forwarding failure on Postfix - Pistolfly<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.pistolfly.com\/weblog\/en\/2011\/09\/prevent-an-error-mail-from-being-sent-to-original-sender-in-the-case-of-forwarding-failure-on-postfix.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Prevent an error mail from being sent to the original sender in the case of forwarding failure on Postfix - Pistolfly\" \/>\n<meta property=\"og:description\" content=\"On Postfix, in the case of forwarding by aliases or .forward, if the forwarding results in an error, the error &hellip; Continue reading Prevent an error mail from being sent to the original sender in the case of forwarding failure on Postfix &rarr;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.pistolfly.com\/weblog\/en\/2011\/09\/prevent-an-error-mail-from-being-sent-to-original-sender-in-the-case-of-forwarding-failure-on-postfix.html\" \/>\n<meta property=\"og:site_name\" content=\"Pistolfly\" \/>\n<meta property=\"article:published_time\" content=\"2011-09-25T19:36:23+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-03-14T00:10:06+00:00\" \/>\n<meta name=\"author\" content=\"Pistolfly\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Pistolfly\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/en\\\/2011\\\/09\\\/prevent-an-error-mail-from-being-sent-to-original-sender-in-the-case-of-forwarding-failure-on-postfix.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/en\\\/2011\\\/09\\\/prevent-an-error-mail-from-being-sent-to-original-sender-in-the-case-of-forwarding-failure-on-postfix.html\"},\"author\":{\"name\":\"Pistolfly\",\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/#\\\/schema\\\/person\\\/e779e918730b507907b3a35b77a9a2ab\"},\"headline\":\"Prevent an error mail from being sent to the original sender in the case of forwarding failure on Postfix\",\"datePublished\":\"2011-09-25T19:36:23+00:00\",\"dateModified\":\"2018-03-14T00:10:06+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/en\\\/2011\\\/09\\\/prevent-an-error-mail-from-being-sent-to-original-sender-in-the-case-of-forwarding-failure-on-postfix.html\"},\"wordCount\":143,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/#\\\/schema\\\/person\\\/e779e918730b507907b3a35b77a9a2ab\"},\"articleSection\":[\"mail\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/en\\\/2011\\\/09\\\/prevent-an-error-mail-from-being-sent-to-original-sender-in-the-case-of-forwarding-failure-on-postfix.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/en\\\/2011\\\/09\\\/prevent-an-error-mail-from-being-sent-to-original-sender-in-the-case-of-forwarding-failure-on-postfix.html\",\"url\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/en\\\/2011\\\/09\\\/prevent-an-error-mail-from-being-sent-to-original-sender-in-the-case-of-forwarding-failure-on-postfix.html\",\"name\":\"Prevent an error mail from being sent to the original sender in the case of forwarding failure on Postfix - Pistolfly\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/#website\"},\"datePublished\":\"2011-09-25T19:36:23+00:00\",\"dateModified\":\"2018-03-14T00:10:06+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/en\\\/2011\\\/09\\\/prevent-an-error-mail-from-being-sent-to-original-sender-in-the-case-of-forwarding-failure-on-postfix.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/en\\\/2011\\\/09\\\/prevent-an-error-mail-from-being-sent-to-original-sender-in-the-case-of-forwarding-failure-on-postfix.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/en\\\/2011\\\/09\\\/prevent-an-error-mail-from-being-sent-to-original-sender-in-the-case-of-forwarding-failure-on-postfix.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u30db\u30fc\u30e0\",\"item\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Prevent an error mail from being sent to the original sender in the case of forwarding failure on Postfix\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/#website\",\"url\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/\",\"name\":\"Pistolfly\",\"description\":\"Developer Blog\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/#\\\/schema\\\/person\\\/e779e918730b507907b3a35b77a9a2ab\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/#\\\/schema\\\/person\\\/e779e918730b507907b3a35b77a9a2ab\",\"name\":\"Pistolfly\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0b3ddb2859adabf28a2b97ae9fff98772ddffc46088d11cad2b9a2cef66115e7?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0b3ddb2859adabf28a2b97ae9fff98772ddffc46088d11cad2b9a2cef66115e7?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0b3ddb2859adabf28a2b97ae9fff98772ddffc46088d11cad2b9a2cef66115e7?s=96&d=mm&r=g\",\"caption\":\"Pistolfly\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0b3ddb2859adabf28a2b97ae9fff98772ddffc46088d11cad2b9a2cef66115e7?s=96&d=mm&r=g\"},\"description\":\"Software Engineer in Tokyo, Japan\",\"url\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/author\\\/pistolfly\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Prevent an error mail from being sent to the original sender in the case of forwarding failure on Postfix - Pistolfly","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.pistolfly.com\/weblog\/en\/2011\/09\/prevent-an-error-mail-from-being-sent-to-original-sender-in-the-case-of-forwarding-failure-on-postfix.html","og_locale":"en_US","og_type":"article","og_title":"Prevent an error mail from being sent to the original sender in the case of forwarding failure on Postfix - Pistolfly","og_description":"On Postfix, in the case of forwarding by aliases or .forward, if the forwarding results in an error, the error &hellip; Continue reading Prevent an error mail from being sent to the original sender in the case of forwarding failure on Postfix &rarr;","og_url":"https:\/\/www.pistolfly.com\/weblog\/en\/2011\/09\/prevent-an-error-mail-from-being-sent-to-original-sender-in-the-case-of-forwarding-failure-on-postfix.html","og_site_name":"Pistolfly","article_published_time":"2011-09-25T19:36:23+00:00","article_modified_time":"2018-03-14T00:10:06+00:00","author":"Pistolfly","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Pistolfly","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.pistolfly.com\/weblog\/en\/2011\/09\/prevent-an-error-mail-from-being-sent-to-original-sender-in-the-case-of-forwarding-failure-on-postfix.html#article","isPartOf":{"@id":"https:\/\/www.pistolfly.com\/weblog\/en\/2011\/09\/prevent-an-error-mail-from-being-sent-to-original-sender-in-the-case-of-forwarding-failure-on-postfix.html"},"author":{"name":"Pistolfly","@id":"https:\/\/www.pistolfly.com\/weblog\/#\/schema\/person\/e779e918730b507907b3a35b77a9a2ab"},"headline":"Prevent an error mail from being sent to the original sender in the case of forwarding failure on Postfix","datePublished":"2011-09-25T19:36:23+00:00","dateModified":"2018-03-14T00:10:06+00:00","mainEntityOfPage":{"@id":"https:\/\/www.pistolfly.com\/weblog\/en\/2011\/09\/prevent-an-error-mail-from-being-sent-to-original-sender-in-the-case-of-forwarding-failure-on-postfix.html"},"wordCount":143,"commentCount":0,"publisher":{"@id":"https:\/\/www.pistolfly.com\/weblog\/#\/schema\/person\/e779e918730b507907b3a35b77a9a2ab"},"articleSection":["mail"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.pistolfly.com\/weblog\/en\/2011\/09\/prevent-an-error-mail-from-being-sent-to-original-sender-in-the-case-of-forwarding-failure-on-postfix.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.pistolfly.com\/weblog\/en\/2011\/09\/prevent-an-error-mail-from-being-sent-to-original-sender-in-the-case-of-forwarding-failure-on-postfix.html","url":"https:\/\/www.pistolfly.com\/weblog\/en\/2011\/09\/prevent-an-error-mail-from-being-sent-to-original-sender-in-the-case-of-forwarding-failure-on-postfix.html","name":"Prevent an error mail from being sent to the original sender in the case of forwarding failure on Postfix - Pistolfly","isPartOf":{"@id":"https:\/\/www.pistolfly.com\/weblog\/#website"},"datePublished":"2011-09-25T19:36:23+00:00","dateModified":"2018-03-14T00:10:06+00:00","breadcrumb":{"@id":"https:\/\/www.pistolfly.com\/weblog\/en\/2011\/09\/prevent-an-error-mail-from-being-sent-to-original-sender-in-the-case-of-forwarding-failure-on-postfix.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pistolfly.com\/weblog\/en\/2011\/09\/prevent-an-error-mail-from-being-sent-to-original-sender-in-the-case-of-forwarding-failure-on-postfix.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.pistolfly.com\/weblog\/en\/2011\/09\/prevent-an-error-mail-from-being-sent-to-original-sender-in-the-case-of-forwarding-failure-on-postfix.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u30db\u30fc\u30e0","item":"https:\/\/www.pistolfly.com\/weblog"},{"@type":"ListItem","position":2,"name":"Prevent an error mail from being sent to the original sender in the case of forwarding failure on Postfix"}]},{"@type":"WebSite","@id":"https:\/\/www.pistolfly.com\/weblog\/#website","url":"https:\/\/www.pistolfly.com\/weblog\/","name":"Pistolfly","description":"Developer Blog","publisher":{"@id":"https:\/\/www.pistolfly.com\/weblog\/#\/schema\/person\/e779e918730b507907b3a35b77a9a2ab"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.pistolfly.com\/weblog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.pistolfly.com\/weblog\/#\/schema\/person\/e779e918730b507907b3a35b77a9a2ab","name":"Pistolfly","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/0b3ddb2859adabf28a2b97ae9fff98772ddffc46088d11cad2b9a2cef66115e7?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0b3ddb2859adabf28a2b97ae9fff98772ddffc46088d11cad2b9a2cef66115e7?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0b3ddb2859adabf28a2b97ae9fff98772ddffc46088d11cad2b9a2cef66115e7?s=96&d=mm&r=g","caption":"Pistolfly"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/0b3ddb2859adabf28a2b97ae9fff98772ddffc46088d11cad2b9a2cef66115e7?s=96&d=mm&r=g"},"description":"Software Engineer in Tokyo, Japan","url":"https:\/\/www.pistolfly.com\/weblog\/author\/pistolfly"}]}},"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/paorzz-ST","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/posts\/3403","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/comments?post=3403"}],"version-history":[{"count":14,"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/posts\/3403\/revisions"}],"predecessor-version":[{"id":4312,"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/posts\/3403\/revisions\/4312"}],"wp:attachment":[{"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/media?parent=3403"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/categories?post=3403"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/tags?post=3403"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}