{"id":5132,"date":"2017-02-10T11:03:06","date_gmt":"2017-02-10T09:03:06","guid":{"rendered":"http:\/\/skeletor.org.ua\/?p=5132"},"modified":"2025-05-20T12:58:14","modified_gmt":"2025-05-20T09:58:14","slug":"postfix-dovecot-delivery","status":"publish","type":"post","link":"https:\/\/skeletor.org.ua\/?p=5132","title":{"rendered":"[Postfix] Dovecot delivery"},"content":{"rendered":"<p>\u0415\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <strong>dovecot-delivery<\/strong> \u0432\u043c\u0435\u0441\u0442\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e <strong>postfix&#8217;\u043e\u0432\u043e\u0433\u043e<\/strong>, \u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<p>1) \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0444\u0438\u043b\u044c\u0442\u0440 \u0432 <strong>master.cf<\/strong>:<\/p>\n<p><code>dovecot \u00a0 unix \u00a0\u2013 \u00a0 \u00a0 \u00a0 n \u00a0 \u00a0 \u00a0 n \u00a0 \u00a0 \u00a0 \u2013 \u00a0 \u00a0 \u00a0 \u2013 \u00a0 \u00a0 \u00a0 pipe<br \/>\nflags=DRhu user=vmail:vmail argv=\/usr\/lib\/dovecot\/dovecot-lda -f ${sender} -d ${recipient}<\/code><\/p>\n<p><!--more--><\/p>\n<p>\u0444\u043b\u0430\u0433\u0438 <strong>flags<\/strong> \u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 (\u043e\u0441\u0442\u0430\u0432\u043b\u044e \u0431\u0435\u0437 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430, \u0447\u0442\u043e \u0431\u044b \u043d\u0435 \u043f\u043e\u0442\u0435\u0440\u044f\u0442\u044c \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u0430):<\/p>\n<p>-D<\/p>\n<blockquote><p><span style=\"color: #993366;\">Prepend a &#8220;Delivered-To:recipient&#8221; message header with the envelope recipient address. Note: for this to work, the <a style=\"color: #993366;\" href=\"http:\/\/www.postfix.org\/postconf.5.html#transport_destination_recipient_limit\"><i>transport<\/i>_destination_recipient_limit<\/a> must be 1 (see\u00a0SINGLE-RECIPIENT DELIVERY above for details).<\/span><\/p>\n<p><span style=\"color: #993366;\">The D flag also enforces loop detection (Postfix 2.5 and later): if a message already contains a Delivered-To:header with the same recipient address, then the message<\/span><br \/>\n<span style=\"color: #993366;\"> is returned as undeliverable. The address comparison is case insensitive.<\/span><\/p>\n<p><span style=\"color: #993366;\">This feature is available as of Postfix 2.0.<\/span><\/p><\/blockquote>\n<p>-R<\/p>\n<blockquote><p><span style=\"color: #993366;\">Prepend a Return-Path: message header with the envelope sender address.<\/span><\/p><\/blockquote>\n<p>-h<\/p>\n<blockquote><p><span style=\"color: #993366;\">Fold the command-line $original_recipient and $recipient address domain part (text to the right of the right-most @ character) to lower case; fold the entire command-line $domain and $nexthop host or domain information to lower case. This is recommended for delivery via UUCP.<\/span><\/p><\/blockquote>\n<p>-u<\/p>\n<blockquote><p><span style=\"color: #993366;\">Fold the command-line $original_recipient and $recipient address localpart (text to the left of the right-most @ character) to lower case. This is recommended for delivery via UUCP.<\/span><\/p><\/blockquote>\n<p>2) \u0432 <strong>main.cf<\/strong> \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c &#8220;\u0434\u043e\u0441\u0442\u0430\u0432\u0449\u0438\u043a\u0430&#8221;:<\/p>\n<p><code>virtual_transport=dovecot<\/code><\/p>\n<p>\u0430 \u0442\u0430\u043a \u0436\u0435 \u043d\u0435 \u0437\u0430\u0431\u044b\u0442\u044c \u043f\u0440\u043e \u0441\u0442\u0440\u043e\u043a\u0443:<\/p>\n<p><code>dovecot_destination_recipient_limit=1<\/code><\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 <strong>postfix<\/strong> \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u0433\u043e \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u0430\u0434\u0440\u0435\u0441\u0430\u0442\u0443 \u0432 <strong>dovecot<\/strong>. \u0412 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0430\u043b\u0438\u0430\u0441\u044b \u0438 \u043e\u043d\u0438 \u0440\u0430\u0441\u043a\u0440\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u0435 \u0447\u0435\u043c \u0432 1 \u0430\u0434\u0440\u0435\u0441, \u0442\u043e <strong>postfix<\/strong> \u043f\u0435\u0440\u0435\u0434\u0430\u0441\u0442 \u0438\u0445 \u0432\u0441\u0435 \u0441\u0440\u0430\u0437\u0443 \u0438 \u0432 \u0438\u0442\u043e\u0433\u0435 <strong>dovecot-delivery<\/strong> \u043d\u0435 \u043f\u043e\u0439\u043c\u0451\u0442, \u0442\u0430\u043a \u043a\u0430\u043a \u0435\u043c\u0443 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0442\u0430\u043a\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<p><code>\/usr\/lib\/dovecot\/dovecot-lda -f sender.domain.com\u00a0-d user1@domain.org,user2@domain.org<\/code><\/p>\n<p>\u0430 \u0432 \u043b\u043e\u0433\u0430\u0445 \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<\/p>\n<p><code>postfix\/pipe[763762]: [ID 197553 mail.info] 1FB981DC1: to=&lt;user1@domain.org&gt;, orig_to=&lt;alias@domain.org&gt;, relay=dovecot, delay=61543, delays=61543\/0.12\/0\/0.02, dsn=5.3.0, status=bounced (command line usage error. Command output: lda: Fatal: Unknown argument: user2@domain.org Usage: dovecot-lda [-c &lt;config file&gt;] [-a &lt;address&gt;] [-d &lt;username&gt;] [-p &lt;path&gt;] [-f &lt;envelope sender&gt;] [-m &lt;mailbox&gt;] [-e] [-k] )<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0415\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c dovecot-delivery \u0432\u043c\u0435\u0441\u0442\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e postfix&#8217;\u043e\u0432\u043e\u0433\u043e, \u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435: 1) \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0444\u0438\u043b\u044c\u0442\u0440 \u0432 master.cf: dovecot \u00a0 unix \u00a0\u2013 \u00a0 \u00a0 \u00a0 n \u00a0 \u00a0 \u00a0 n \u00a0 \u00a0 \u00a0 \u2013 \u00a0 \u00a0 \u00a0 \u2013 \u00a0 \u00a0 \u00a0 pipe flags=DRhu user=vmail:vmail argv=\/usr\/lib\/dovecot\/dovecot-lda -f ${sender} -d ${recipient}<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-5132","post","type-post","status-publish","format-standard","hentry","category-mail"],"_links":{"self":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/5132","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5132"}],"version-history":[{"count":2,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/5132\/revisions"}],"predecessor-version":[{"id":5135,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/5132\/revisions\/5135"}],"wp:attachment":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5132"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5132"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5132"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}