dot-forward(1) dot-forward(1) NNAAMMEE dot-forward - read a .forward file under qmail SSYYNNOOPPSSIISS in ~~//..qqmmaaiill: || ddoott--ffoorrwwaarrdd [ --nnNN ] _f_i_l_e _._._. OOVVEERRVVIIEEWW ddoott--ffoorrwwaarrdd forwards incoming messages according to sendmail-style instructions in _f_i_l_e, if _f_i_l_e exists. Normally _f_i_l_e is ..ffoorrwwaarrdd. WWAARRNNIINNGG:: If you create a ..qqmmaaiill file to enable ddoott--ffoorrwwaarrdd, make sure to add a second line specifying delivery to your normal mailbox. For example: |dot-forward .forward ./Mailbox CCOOMMPPAATTIIBBIILLIITTYY WWAARRNNIINNGG:: ddoott--ffoorrwwaarrdd does not support ::iinncclluuddee:: or mbox deliveries. You can use the delivery mechanism described in ddoott-- qqmmaaiill(5) instead. OOPPTTIIOONNSS --NN (Default.) Read and forward a message. --nn Parse _f_i_l_e and print the forwarding instructions in it, one per line; do not follow the instructions. You can use this option from the command line to see how your ..ffoorrwwaarrdd file will be inter- preted: dot-forward -n .forward FFIILLEE HHAANNDDLLIINNGG When a message arrives, ddoott--ffoorrwwaarrdd opens _f_i_l_e and handles it as dis- cussed below. It exits 99, so qqmmaaiill--llooccaall will ignore further instruc- tions in ..qqmmaaiill. Exception: If _f_i_l_e specifies delivery directly to you, ddoott--ffoorrwwaarrdd exits 0, so qqmmaaiill--llooccaall will read further instructions in ..qqmmaaiill. If _f_i_l_e does not exist, ddoott--ffoorrwwaarrdd exits 0. You can list several _f_i_l_es; then ddoott--ffoorrwwaarrdd will try each one in turn, using the first one that exists, or exiting 0 if none exist. CCOOMMPPAATTIIBBIILLIITTYY WWAARRNNIINNGG:: ddoott--ffoorrwwaarrdd treats an empty _f_i_l_e as if it did not exist. Versions of sendmail before V8 would throw away the incom- ing message. CCOOMMPPAATTIIBBIILLIITTYY WWAARRNNIINNGG:: If ddoott--ffoorrwwaarrdd encounters a temporary error opening _f_i_l_e, it exits 111, so that qqmmaaiill--llooccaall will try again later. sendmail assumes incorrectly that _f_i_l_e does not exist. CCOOMMPPAATTIIBBIILLIITTYY WWAARRNNIINNGG:: _f_i_l_e must be readable by ddoott--ffoorrwwaarrdd, which is normally running as the user. sendmail places different constraints on its ..ffoorrwwaarrdd permissions, since it is normally running as root. FFOORRWWAARRDDIINNGG Normally _f_i_l_e contains an address. ddoott--ffoorrwwaarrdd forwards the message to that address. The address is parsed as if it were in an RFC 822 message header. Parenthesized comments and bracketed addresses are permitted: bob (Bob, the postmaster) @heaven.af.mil Addresses with special characters must be quoted: "spaced out mailbox"@heaven.af.mil Address groups are not permitted. _f_i_l_e can contain any number of lines, each line containing any number of addresses. ddoott--ffoorrwwaarrdd forwards the message to each address: bob, fred, susan Joe Shmoe An address without a fully qualified domain name is handled as described in qqmmaaiill--hheeaaddeerr(5). Exception: Certain addresses without domain names are handled specially, as described below. DDIIRREECCTT DDEELLIIVVEERRYY If an address does not contain a domain name, and matches the environ- ment variable $$UUSSEERR (without regard to case), it specifies delivery directly to you. If an address matches $$UUSSEERR@@$$HHOOSSTT (without regard to case), it speci- fies delivery directly to you. CCOOMMPPAATTIIBBIILLIITTYY WWAARRNNIINNGG:: sendmail's handling of quotes and backslashes violates RFC 821 and RFC 822, and is not supported by ddoott--ffoorrwwaarrdd. ddoott--ffoorrwwaarrdd treats \\jjooee the same way as jjooee. The ddoott--qqmmaaiill delivery mechanism lets each user manage several addresses, so there is no need for a special syntax to get around forwarding. CCOOMMMMAANNDDSS If an address does not contain a domain name, and begins with a verti- cal bar, ddoott--ffoorrwwaarrdd takes the rest of the address as a command to run: bob, "|vacation bob" ddoott--ffoorrwwaarrdd feeds the message to the command, preceded by the environ- ment variables $$UUFFLLIINNEE, $$RRPPLLIINNEE, and $$DDTTLLIINNEE. CCOOMMPPAATTIIBBIILLIITTYY WWAARRNNIINNGG:: Internet addresses can legitimately start with a slash or vertical bar. ddoott--ffoorrwwaarrdd treats anything with an unquoted @ as an address. sendmail appears to have various problems coping with these addresses, and with commands that contain @ signs. CCOOMMMMEENNTTSS Any line in _f_i_l_e that begins with # is ignored: # this is a comment CCOOMMPPAATTIIBBIILLIITTYY WWAARRNNIINNGG:: Versions of sendmail before V8 did not allow comments in ..ffoorrwwaarrdd files. VVEERRSSIIOONN This is ddoott--ffoorrwwaarrdd 0.71. The ddoott--ffoorrwwaarrdd home page is hhttttpp::////ppoobbooxx..ccoomm//~~ddjjbb//ddoott--ffoorrwwaarrdd..hhttmmll. SSEEEE AALLSSOO qmail-header(5), dot-qmail(5) dot-forward(1)