<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://htyp.org/mw/index.php?action=history&amp;feed=atom&amp;title=Postfix%2Fmain.cf%2Fmailbox_command</id>
	<title>Postfix/main.cf/mailbox command - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://htyp.org/mw/index.php?action=history&amp;feed=atom&amp;title=Postfix%2Fmain.cf%2Fmailbox_command"/>
	<link rel="alternate" type="text/html" href="https://htyp.org/mw/index.php?title=Postfix/main.cf/mailbox_command&amp;action=history"/>
	<updated>2026-06-27T04:34:35Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://htyp.org/mw/index.php?title=Postfix/main.cf/mailbox_command&amp;diff=15409&amp;oldid=prev</id>
		<title>Woozle: saving work; done?</title>
		<link rel="alternate" type="text/html" href="https://htyp.org/mw/index.php?title=Postfix/main.cf/mailbox_command&amp;diff=15409&amp;oldid=prev"/>
		<updated>2011-06-07T11:55:28Z</updated>

		<summary type="html">&lt;p&gt;saving work; done?&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==About==&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;parameter&amp;#039;&amp;#039;&amp;#039;: mailbox_command&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;default&amp;#039;&amp;#039;&amp;#039;: (empty)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;versions&amp;#039;&amp;#039;&amp;#039;: ?&lt;br /&gt;
&lt;br /&gt;
Optional external command that the [[Postfix/local|local]] delivery agent should use for mailbox delivery.  The command is run with the user ID and the primary group ID privileges of the recipient.  Exception:&lt;br /&gt;
command delivery for root executes with $[[../default_privs|default_privs]] privileges. This is not a problem, because:&lt;br /&gt;
# mail for root should always be aliased to a real user and&lt;br /&gt;
# don&amp;#039;t log in as root, use &amp;quot;su&amp;quot; instead.&lt;br /&gt;
===Environment===&lt;br /&gt;
The following environment variables are exported to the command:&lt;br /&gt;
; CLIENT_ADDRESS : Remote client network address. Available in Postfix version 2.2 and later.&lt;br /&gt;
; CLIENT_HELO : Remote client EHLO command parameter. Available in Postfix version 2.2 and later.&lt;br /&gt;
; CLIENT_HOSTNAME : Remote client hostname. Available in Postfix version 2.2 and later.&lt;br /&gt;
; CLIENT_PROTOCOL : Remote client protocol. Available in Postfix version 2.2 and later.&lt;br /&gt;
; DOMAIN : The domain part of the recipient address.&lt;br /&gt;
; EXTENSION : The optional address extension.&lt;br /&gt;
; HOME : The recipient home directory.&lt;br /&gt;
; LOCAL : The recipient address localpart.&lt;br /&gt;
; LOGNAME : The recipient&amp;#039;s username.&lt;br /&gt;
; ORIGINAL_RECIPIENT : The entire recipient address, before any address rewriting or aliasing.&lt;br /&gt;
; RECIPIENT : The full recipient address.&lt;br /&gt;
; SASL_METHOD : SASL authentication method specified in the remote client AUTH command. Available in Postfix version 2.2 and later.&lt;br /&gt;
; SASL_SENDER : SASL sender address specified in the remote client MAIL FROM command. Available in Postfix version 2.2 and later.&lt;br /&gt;
; SASL_USER : SASL username specified in the remote client AUTH command. Available in Postfix version 2.2 and later.&lt;br /&gt;
; SENDER : The full sender address.&lt;br /&gt;
; SHELL : The recipient&amp;#039;s login shell.&lt;br /&gt;
; USER : The recipient username.&lt;br /&gt;
&lt;br /&gt;
Unlike other Postfix configuration parameters, the &amp;#039;&amp;#039;&amp;#039;mailbox_command&amp;#039;&amp;#039;&amp;#039; parameter is not subjected to $name substitutions. This is to make it easier to specify shell syntax (see example below).&lt;br /&gt;
&lt;br /&gt;
If you can, avoid shell meta characters because they will force Postfix to run an expensive shell process. If you&amp;#039;re delivering via [[Procmail]] then running a shell won&amp;#039;t make a noticeable difference in the total cost.&lt;br /&gt;
&lt;br /&gt;
Note: if you use the &amp;#039;&amp;#039;&amp;#039;mailbox_command&amp;#039;&amp;#039;&amp;#039; feature to deliver mail system-wide, you must set up an alias that forwards mail for root to a real user.&lt;br /&gt;
&lt;br /&gt;
The precedence of [[Postfix/local|local]] delivery features from high to low is: aliases, .forward files, [[../mailbox_transport_maps|mailbox_transport_maps]], [[../mailbox_transport|mailbox_transport]],&lt;br /&gt;
[[../mailbox_command_maps|mailbox_command_maps]], [[../mailbox_command|mailbox_command]], [[../home_mailbox|home_mailbox]], [[../mail_spool_directory|mail_spool_directory]],&lt;br /&gt;
[[../fallback_transport_maps|fallback_transport_maps]], [[../fallback_transport|fallback_transport]] and [[../luser_relay|luser_relay]].&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
* mailbox_command = /some/where/procmail&lt;br /&gt;
* mailbox_command = /some/where/procmail -a &amp;quot;$EXTENSION&amp;quot;&lt;br /&gt;
* mailbox_command = /some/where/maildrop -d &amp;quot;$USER&amp;quot; -f &amp;quot;$SENDER&amp;quot; &amp;quot;$EXTENSION&amp;quot;&lt;/div&gt;</summary>
		<author><name>Woozle</name></author>
	</entry>
</feed>