Control local delivery Cristiano Otto Von Trompczynski 11.. OOvveerrrriiddee llooccaall ttrraannssppoorrtt LLooccaall ttrraannssppoorrtt The "Local transport" option specifies the name of the transport for delivery to destinations that match "Destination" or "Network Interfaces" options. This option sets the "local_transport" postfix variable. By default, local mail is delivered to the transport called "local", which is just the name of a service that is defined the master.cf file. 22.. SSeeccuurriittyy ccoonnttrroollss LLooccaall ccoommmmaanndd sshheellll The "Local command shell" option controls what shell will be used for delivery to external command. By default, external commands are executed directly; commands are given to given to /bin/sh only when they contain shell meta characters or shell built-in commands. This option sets the "local_command_shell" postfix variable. Specify a different shell when you need more control over what programs can be run from e.g. .forward files. "sendmail's restricted shell" (smrsh) is what most people will use (smrsh is part of recent sendmail distributions) Note: when a shell is specified, it is invoked even when the command contains no shell built-in commands or meta characters. FFoorrwwaarrdd ppaatthh The "Forward path" option specifies a search list. The first file that is found is used. The following expansions are done on forward_path: $user (recipient username), $shell (recipient shell), $home (recipient home directory), $recipient (full recipient address), $extension (recipient address extension), $domain (recipient domain), $local (entire recipient localpart), $recipient_delimiter. Specify ${name?value} or ${name:value} to expand value only when $name does (does not) exist. This option sets the "forward_path" postfix variable. AAllllooww mmaaiill ttoo ccoommmmaannddss The "Allow mail to commands" option restricts mail delivery to external commands. The default is to disallow delivery to "|command" in :include: files. This option sets the "allow_mail_to_command" postfix variable. AAllllooww mmaaiill ttoo ffiilleess The "Allow mail to files" option restricts mail delivery to external file. The default is to disallow delivery to /file/name in :include: files. This option sets the "allow_mail_to_files" postfix variable. 33.. DDeelliivveerreedd--ttoo LLooccaall ddeessttiinnaattiioonn rreecciippiieenntt lliimmiitt The "Local destination recipient limit" option limits the number of recipients per local message delivery. The default limit is taken from the "Default destination recipient limit" option. However, the queue manager by design limits the number of recipients per local delivery request to exactly 1, so this parameter has no effect. PPrreeppeenndd ddeelliivveerreedd hheeaaddeerr The "Prepend delivered header" option control when Postfix should prepend a Delivered-To: message header. By default, Postfix prepends a Delivered-To: header when forwarding mail and when delivering to file (mailbox) and command. Turning off the Delivered-To: header when forwarding mail is not recommended.