contents
Next: Local Users Up: Getting smail Up and Previous: The paths database

Delivering Messages to Local Addresses

Most commonly, a local address is just a user's login name, in which case the message is delivered to her mailbox, /var/spool/mail/user. Other cases include aliases and mailing list names, and mail forwarding by the user. In these cases, the local address expands to a new list of addresses, which may be either local or remote.

Apart from these ``normal'' addresses, smail can handle other types of local message destinations, like file names, and pipe commands. These are not addresses in their own right, so you can't send mail to, say, /etc/passwd@vbrew.com; they are only valid if they have been taken from forwarding or alias files.

A file name is anything that begins with a slash (/) or a tilde (). The latter refers to the user's home directory, and is possible only if the filename was taken from a .forward file or a forwarding entry in the mailbox (see below). When delivering to a file, smail appends the messages to the file, creating it if necessary.

A pipe command may be any command preceded by the pipe symbol (|). This causes smail to hand the command to the shell along with its arguments, but without the leading `|'. The message itself is fed to this command on standard input.

For example, to gate a mailing list into a local newsgroup, you might use a shell script named gateit, and set up a local alias which delivers all messages from this mailing list to the script using "|gateit".

If the invocation contains white space, it has to be enclosed in double quotes. Due to the security issues involved, care is taken not to execute the command if the address has been obtained in a somewhat dubious way (for example, if the alias file from which the address was taken was writable by everyone).




contents
Next: Local Users Up: Getting smail Up and Previous: The paths database

Andrew Anderson
Thu Mar 7 23:22:06 EST 1996

Hosting by: Hurra Communications Ltd.
Generated: 2007-01-26 17:57:41