Manual Pages for UNIX Darwin command on man local
MyWebUniversity

Manual Pages for UNIX Darwin command on man local

LOCAL(8) LOCAL(8)

NAME

local - Postfix local mail delivery

SYNOPSIS

llooccaall [generic Postfix daemon options]

DESCRIPTION

The llooccaall daemon processes delivery requests from the Postfix queue

manager to deliver mail to local recipients. Each delivery request

specifies a queue file, a sender address, a domain or host to deliver to, and one or more recipients. This program expects to be run from the mmaasstteerr(8) process manager. The llooccaall daemon updates queue files and marks recipients as finished, or it informs the queue manager that delivery should be tried again at a later time. Delivery status reports are sent to the bboouunnccee(8), ddeeffeerr(8) or ttrraaccee(8) daemon as appropriate.

SSYYSSTTEEMM-WWIIDDEE AANNDD UUSSEERR-LLEEVVEELL AALLIIAASSIINNGG

The system administrator can set up one or more system-wide sseennddmmaaiill-

style alias databases. Users can have sseennddmmaaiill-style ~/.ffoorrwwaarrdd files.

Mail for name is delivered to the alias name, to destinations in ~name/.ffoorrwwaarrdd, to the mailbox owned by the user name, or it is sent back as undeliverable. The system administrator can specify a comma/space separated list of ~/.ffoorrwwaarrdd like files through the ffoorrwwaarrddppaatthh configuration parameter.

Upon delivery, the local delivery agent tries each pathname in the list

until a file is found. The ffoorrwwaarrddppaatthh parameter is subject to inter-

polation of $$uusseerr (recipient username), $$hhoommee (recipient home direc-

tory), $$sshheellll (recipient shell), $$rreecciippiieenntt (complete recipient

address), $$eexxtteennssiioonn (recipient address extension), $$ddoommaaiinn (recipient

domain), llooccaall (entire recipient address localpart) and $$rreecciippii-

eennttddeelliimmiitteerr.. The forms ${name?value} and ${name:value} expand condi-

tionally to value when $name is (is not) defined. Characters that may

have special meaning to the shell or file system are replaced by under-

scores. The list of acceptable characters is specified with the ffoorr-

wwaarrddeexxppaannssiioonnffiilltteerr configuration parameter.

An alias or ~/.ffoorrwwaarrdd file may list any combination of external com-

mands, destination file names, ::iinncclluuddee:: directives, or mail addresses.

See aalliiaasseess(5) for a precise description. Each line in a user's .ffoorr-

wwaarrdd file has the same syntax as the right-hand part of an alias.

When an address is found in its own alias expansion, delivery is made to the user instead. When a user is listed in the user's own ~/.ffoorrwwaarrdd

file, delivery is made to the user's mailbox instead. An empty ~/.ffoorr-

wwaarrdd file means do not forward mail. In order to prevent the mail system from using up unreasonable amounts of memory, input records read from ::iinncclluuddee:: or from ~/.ffoorrwwaarrdd files are broken up into chunks of length lliinneelleennggtthhlliimmiitt. While expanding aliases, ~/.ffoorrwwaarrdd files, and so on, the program

attempts to avoid duplicate deliveries. The dduupplliiccaatteeffiilltteerrlliimmiitt con-

figuration parameter limits the number of remembered recipients. MMAAIILL FFOORRWWAARRDDIINNGG

For the sake of reliability, forwarded mail is re-submitted as a new

message, so that each recipient has a separate on-file delivery status

record. In order to stop mail forwarding loops early, the software adds an

optional DDeelliivveerreedd-TToo:: header with the final envelope recipient

address. If mail arrives for a recipient that is already listed in a

DDeelliivveerreedd-TToo:: header, the message is bounced.

MMAAIILLBBOOXX DDEELLIIVVEERRYY

The default per-user mailbox is a file in the UNIX mail spool directory

(//vvaarr//mmaaiill//user or //vvaarr//ssppooooll//mmaaiill//user); the location can be specified with the mmaaiillssppoooollddiirreeccttoorryy configuration parameter. Specify a name

ending in // for qqmmaaiill-compatible mmaaiillddiirr delivery.

Alternatively, the per-user mailbox can be a file in the user's home

directory with a name specified via the hhoommeemmaaiillbbooxx configuration parameter. Specify a relative path name. Specify a name ending in // for

qqmmaaiill-compatible mmaaiillddiirr delivery.

Mailbox delivery can be delegated to an external command specified with the mmaaiillbbooxxccoommmmaanndd configuration parameter. The command executes with the privileges of the recipient user (exception: in case of delivery as root, the command executes with the privileges of ddeeffaauullttpprriivvss). Mailbox delivery can be delegated to alternative message transports specified in the mmaasstteerr..ccff file. The mmaaiillbbooxxttrraannssppoorrtt configuration parameter specifies a message transport that is to be used for all

local recipients, regardless of whether they are found in the UNIX

passwd database. The ffaallllbbaacckkttrraannssppoorrtt parameter specifies a message

transport for recipients that are not found in the UNIX passwd data-

base.

In the case of UNIX-style mailbox delivery, the llooccaall daemon prepends a

"FFrroomm sender timestamp" envelope header to each message, prepends an

XX-OOrriiggiinnaall-TToo:: header with the recipient address as given to Postfix,

prepends an optional DDeelliivveerreedd-TToo:: header with the final envelope

recipient address, prepends a RReettuurrnn-PPaatthh:: header with the envelope

sender address, prepends a >> character to lines beginning with "FFrroomm ", and appends an empty line. The mailbox is locked for exclusive access while delivery is in progress. In case of problems, an attempt is made to truncate the mailbox to its original length.

In the case of mmaaiillddiirr delivery, the local daemon prepends an optional

DDeelliivveerreedd-TToo:: header with the final envelope recipient address,

prepends an XX-OOrriiggiinnaall-TToo:: header with the recipient address as given

to Postfix, and prepends a RReettuurrnn-PPaatthh:: header with the envelope sender

address. EEXXTTEERRNNAALL CCOOMMMMAANNDD DDEELLIIVVEERRYY The aalllloowwmmaaiillttooccoommmmaannddss configuration parameter restricts delivery

to external commands. The default setting (aalliiaass,, ffoorrwwaarrdd) forbids com-

mand destinations in ::iinncclluuddee:: files. The command is executed directly where possible. Assistance by the shell (//bbiinn//sshh on UNIX systems) is used only when the command contains

shell magic characters, or when the command invokes a shell built-in

command. A limited amount of command output (standard output and standard error)

is captured for inclusion with non-delivery status reports. A command

is forcibly terminated if it does not complete within ccoomm-

mmaannddttiimmeelliimmiitt seconds. Command exit status codes are expected to follow the conventions defined in .

A limited amount of message context is exported via environment vari-

ables. Characters that may have special meaning to the shell are

replaced by underscores. The list of acceptable characters is speci-

fied with the ccoommmmaannddeexxppaannssiioonnffiilltteerr configuration parameter. SSHHEELLLL The recipient user's login shell. HHOOMMEE The recipient user's home directory. UUSSEERR The bare recipient name. EEXXTTEENNSSIIOONN The optional recipient address extension. DDOOMMAAIINN The recipient address domain part.

LOGNAME

The bare recipient name.

LLOOCCAALL The entire recipient address localpart (text to the left of the

rightmost @ character). RREECCIIPPIIEENNTT The entire recipient address. SSEENNDDEERR The entire sender address.

The PPAATTHH environment variable is always reset to a system-dependent

default path, and environment variables whose names are blessed by the eexxppoorrtteennvviirroonnmmeenntt configuration parameter are exported unchanged. The current working directory is the mail queue directory. The llooccaall daemon prepends a "FFrroomm sender timestamp" envelope header to

each message, prepends an XX-OOrriiggiinnaall-TToo:: header with the recipient

address as given to Postfix, prepends an optional DDeelliivveerreedd-TToo:: header

with the final recipient envelope address, prepends a RReettuurrnn-PPaatthh::

header with the sender envelope address, and appends no empty line. EEXXTTEERRNNAALL FFIILLEE DDEELLIIVVEERRYY The delivery format depends on the destination filename syntax. The

default is to use UNIX-style mailbox format. Specify a name ending in

// for qqmmaaiill-compatible mmaaiillddiirr delivery.

The aalllloowwmmaaiillttooffiilleess configuration parameter restricts delivery to

external files. The default setting (aalliiaass,, ffoorrwwaarrdd) forbids file des-

tinations in ::iinncclluuddee:: files.

In the case of UNIX-style mailbox delivery, the llooccaall daemon prepends a

"FFrroomm sender timestamp" envelope header to each message, prepends an

XX-OOrriiggiinnaall-TToo:: header with the recipient address as given to Postfix,

prepends an optional DDeelliivveerreedd-TToo:: header with the final recipient

envelope address, prepends a >> character to lines beginning with "FFrroomm ", and appends an empty line. The envelope sender address is available

in the RReettuurrnn-PPaatthh:: header. When the destination is a regular file, it

is locked for exclusive access while delivery is in progress. In case

of problems, an attempt is made to truncate a regular file to its orig-

inal length.

In the case of mmaaiillddiirr delivery, the local daemon prepends an optional

DDeelliivveerreedd-TToo:: header with the final envelope recipient address, and

prepends an XX-OOrriiggiinnaall-TToo:: header with the recipient address as given

to Postfix. The envelope sender address is available in the RReettuurrnn-

PPaatthh:: header. AADDDDRREESSSS EEXXTTEENNSSIIOONN The optional rreecciippiieennttddeelliimmiitteerr configuration parameter specifies how

to separate address extensions from local recipient names.

For example, with "rreecciippiieennttddeelliimmiitteerr == ++", mail for name+foo is

delivered to the alias name+foo or to the alias name, to the destina-

tions listed in ~name/.ffoorrwwaarrdd+foo or in ~name/.ffoorrwwaarrdd, to the mailbox owned by the user name, or it is sent back as undeliverable.

In all cases the llooccaall daemon prepends an optional `DDeelliivveerreedd-TToo::

header line with the final recipient address. DDEELLIIVVEERRYY RRIIGGHHTTSS Deliveries to external files and external commands are made with the rights of the receiving user on whose behalf the delivery is made. In the absence of a user context, the llooccaall daemon uses the owner rights of the ::iinncclluuddee:: file or alias database. When those files are owned by the superuser, delivery is made with the rights specified with the ddeeffaauullttpprriivvss configuration parameter. STANDARDS RFC 822 (ARPA Internet Text Messages) DIAGNOSTICS Problems and transactions are logged to ssyyssllooggdd(8). Corrupted message files are marked so that the queue manager can move them to the ccoorrrruupptt queue afterwards.

Depending on the setting of the nnoottiiffyyccllaasssseess parameter, the postmas-

ter is notified of bounces and of other trouble.

BUGS

For security reasons, the message delivery status of external commands or of external files is never checkpointed to file. As a result, the

program may occasionally deliver more than once to a command or exter-

nal file. Better safe than sorry.

Mutually-recursive aliases or ~/.ffoorrwwaarrdd files are not detected early.

The resulting mail forwarding loop is broken by the use of the DDeelliivv-

eerreedd-TToo:: message header.

CCOONNFFIIGGUURRAATTIIOONN PPAARRAAMMEETTEERRSS

Changes to mmaaiinn..ccff are picked up automatically, as local(8) processes

run for only a limited amount of time. Use the command "ppoossttffiixx rreellooaadd" to speed up a change. The text below provides only a parameter summary. See postconf(5) for more details including examples. CCOOMMPPAATTIIBBIILLIITTYY CCOONNTTRROOLLSS bbiiffff ((yyeess))

Whether or not to use the local biff service.

eexxppaannddoowwnneerraalliiaass ((nnoo))

When delivering to an alias "aliasname" that has an "owner-

aliasname" companion alias, set the envelope sender address to

the expansion of the "owner-aliasname" alias.

oowwnneerrrreeqquueessttssppeecciiaall ((yyeess))

Give special treatment to owner-listname and listname-request

address localparts: don't don't split such addresses when the

recipientdelimiter is set to "-".

ssuunnmmaaiillttoooollccoommppaattiibbiilliittyy ((nnoo)) Obsolete SUN mailtool compatibility feature. DDEELLIIVVEERRYY MMEETTHHOODD CCOONNTTRROOLLSS

The precedence of local(8) delivery methods from high to low is:

aliases, .forward files, mailboxtransport, mailboxcommandmaps, mail-

boxcommand, homemailbox, mailspooldirectory, fallbacktransport and luserrelay.

aalliiaassmmaappss ((sseeee ''ppoossttccoonnff -dd'' oouuttppuutt))

The alias databases that are used for local(8) delivery.

ffoorrwwaarrddppaatthh ((sseeee ''ppoossttccoonnff -dd'' oouuttppuutt))

The local(8) delivery agent search list for finding a .forward

file with user-specified delivery methods.

mmaaiillbbooxxttrraannssppoorrtt ((eemmppttyy))

Optional message delivery transport that the local(8) delivery

agent should use for mailbox delivery to all local recipients,

whether or not they are found in the UNIX passwd database. mmaaiillbbooxxccoommmmaannddmmaappss ((eemmppttyy))

Optional lookup tables with per-recipient external commands to

use for local(8) mailbox delivery.

mmaaiillbbooxxccoommmmaanndd ((eemmppttyy))

Optional external command that the local(8) delivery agent

should use for mailbox delivery. hhoommeemmaaiillbbooxx ((eemmppttyy))

Optional pathname of a mailbox file relative to a local(8)

user's home directory.

mmaaiillssppoooollddiirreeccttoorryy ((sseeee ''ppoossttccoonnff -dd'' oouuttppuutt))

The directory where local(8) UNIX-style mailboxes are kept.

ffaallllbbaacckkttrraannssppoorrtt ((eemmppttyy))

Optional message delivery transport that the local(8) delivery

agent should use for names that are not found in the aliases(5) database or in the UNIX passwd database. lluusseerrrreellaayy ((eemmppttyy))

Optional catch-all destination for unknown local(8) recipients.

MMAAIILLBBOOXX LLOOCCKKIINNGG CCOONNTTRROOLLSS ddeelliivveerrlloocckkaatttteemmppttss ((2200)) The maximal number of attempts to acquire an exclusive lock on a mailbox file or bounce(8) logfile. ddeelliivveerrlloocckkddeellaayy ((11ss)) The time between attempts to acquire an exclusive lock on a mailbox file or bounce(8) logfile. ssttaalleelloocckkttiimmee ((550000ss)) The time after which a stale exclusive mailbox lockfile is removed.

mmaaiillbbooxxddeelliivveerryylloocckk ((sseeee ''ppoossttccoonnff -dd'' oouuttppuutt))

How to lock a UNIX-style local(8) mailbox before attempting

delivery. RREESSOOUURRCCEE AANNDD RRAATTEE CCOONNTTRROOLLSS ccoommmmaannddttiimmeelliimmiitt ((11000000ss)) Time limit for delivery to external commands. dduupplliiccaatteeffiilltteerrlliimmiitt ((11000000))

The maximal number of addresses remembered by the address dupli-

cate filter for aliases(5) or virtual(5) alias expansion, or for showq(8) queue displays. llooccaallddeessttiinnaattiioonnccoonnccuurrrreennccyylliimmiitt ((22))

The maximal number of parallel deliveries via the local mail

delivery transport to the same recipient (when "localdestina-

tionrecipientlimit = 1") or the maximal number of parallel

deliveries to the same local domain (when "localdestina-

tionrecipientlimit > 1"). llooccaallddeessttiinnaattiioonnrreecciippiieennttlliimmiitt ((11)) The maximal number of recipients per message delivery via the

local mail delivery transport.

mmaaiillbbooxxssiizzeelliimmiitt ((5511220000000000))

The maximal size of any local(8) individual mailbox or maildir

file, or zero (no limit). SSEECCUURRIITTYY CCOONNTTRROOLLSS aalllloowwmmaaiillttooccoommmmaannddss ((aalliiaass,, ffoorrwwaarrdd))

Restrict local(8) mail delivery to external commands.

aalllloowwmmaaiillttooffiilleess ((aalliiaass,, ffoorrwwaarrdd))

Restrict local(8) mail delivery to external files.

ccoommmmaannddeexxppaannssiioonnffiilltteerr ((sseeee ''ppoossttccoonnff -dd'' oouuttppuutt))

Restrict the characters that the local(8) delivery agent allows

in $name expansions of $mailboxcommand.

ddeeffaauullttpprriivvss ((nnoobbooddyy))

The default rights used by the local(8) delivery agent for

delivery to external file or command.

ffoorrwwaarrddeexxppaannssiioonnffiilltteerr ((sseeee ''ppoossttccoonnff -dd'' oouuttppuutt))

Restrict the characters that the local(8) delivery agent allows

in $name expansions of $forwardpath.

MMIISSCCEELLLLAANNEEOOUUSS CCOONNTTRROOLLSS

ccoonnffiiggddiirreeccttoorryy ((sseeee ''ppoossttccoonnff -dd'' oouuttppuutt))

The default location of the Postfix main.cf and master.cf con-

figuration files. ddaaeemmoonnttiimmeeoouutt ((1188000000ss)) How much time a Postfix daemon process may take to handle a

request before it is terminated by a built-in watchdog timer.

eexxppoorrtteennvviirroonnmmeenntt ((sseeee ''ppoossttccoonnff -dd'' oouuttppuutt))

The list of environment variables that a Postfix process will

export to non-Postfix processes.

iippccttiimmeeoouutt ((33660000ss)) The time limit for sending or receiving information over an internal communication channel. llooccaallccoommmmaannddsshheellll ((eemmppttyy))

Optional shell program for local(8) delivery to non-Postfix com-

mand. mmaaxxiiddllee ((110000ss)) The maximum amount of time that an idle Postfix daemon process waits for the next service request before exiting. mmaaxxuussee ((110000))

The maximal number of connection requests before a Postfix dae-

mon process terminates. pprreeppeennddddeelliivveerreeddhheeaaddeerr ((ccoommmmaanndd,, ffiillee,, ffoorrwwaarrdd))

The message delivery contexts where the Postfix local(8) deliv-

ery agent prepends a Delivered-To: message header.

pprroocceessssiidd ((rreeaadd-oonnllyy))

The process ID of a Postfix command or daemon process.

pprroocceessssnnaammee ((rreeaadd-oonnllyy))

The process name of a Postfix command or daemon process. pprrooppaaggaatteeuunnmmaattcchheeddeexxtteennssiioonnss ((ccaannoonniiccaall,, vviirrttuuaall)) What address lookup tables copy an address extension from the lookup key to the lookup result.

qquueeuueeddiirreeccttoorryy ((sseeee ''ppoossttccoonnff -dd'' oouuttppuutt))

The location of the Postfix top-level queue directory.

rreecciippiieennttddeelliimmiitteerr ((eemmppttyy)) The separator between user names and address extensions (user+foo). rreeqquuiirreehhoommeeddiirreeccttoorryy ((nnoo))

Whether or not a local(8) recipient's home directory must exist

before mail delivery is attempted. ssyyssllooggffaacciilliittyy ((mmaaiill)) The syslog facility of Postfix logging. ssyyssllooggnnaammee ((ppoossttffiixx)) The mail system name that is prepended to the process name in

syslog records, so that "smtpd" becomes, for example, "post-

fix/smtpd". FILES The following are examples; details differ between systems.

$HOME/.forward, per-user aliasing

/etc/aliases, sytem-wide alias database

/var/spool/mail, system mailboxes

SEE ALSO

qmgr(8), queue manager bounce(8), delivery status reports newaliases(1), create/update alias database postalias(1), create/update alias database aliases(5), format of alias database postconf(5), configuration parameters syslogd(8), system logging LLIICCEENNSSEE The Secure Mailer license must be distributed with this software. HISTORY

The DDeelliivveerreedd-TToo:: message header appears in the qqmmaaiill system by Daniel

Bernstein. The maildir structure appears in the qqmmaaiill system by Daniel Bernstein. AUTHOR(S) Wietse Venema IBM T.J. Watson Research P.O. Box 704 Yorktown Heights, NY 10598, USA LOCAL(8)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™