qmail-command(8) qmail-command(8) NNAAMMEE qmail-command - user-specified mail delivery program SSYYNNOOPPSSIISS in ..qqmmaaiill_e_x_t: ||_c_o_m_m_a_n_d DDEESSCCRRIIPPTTIIOONN qqmmaaiill--llooccaall will, upon your request, feed each incoming mail message through a program of your choice. When a mail message arrives, qqmmaaiill--llooccaall runs sshh --cc _c_o_m_m_a_n_d in your home directory. It makes the message available on _c_o_m_m_a_n_d’s standard input. WWAARRNNIINNGG:: The mail message does not begin with qqmmaaiill--llooccaall’s usual RReettuurrnn--PPaatthh and DDeelliivveerreedd--TToo lines. Note that qqmmaaiill--llooccaall uses the same file descriptor for every delivery in your ..qqmmaaiill file, so it is not safe for _c_o_m_m_a_n_d to fork a child that reads the message in the background while the parent exits. EEXXIITT CCOODDEESS _c_o_m_m_a_n_d’s exit codes are interpreted as follows: 0 means that the delivery was successful; 99 means that the delivery was successful, but that qqmmaaiill--llooccaall should ignore all further delivery instructions; 100 means that the delivery failed permanently (hard error); 111 means that the delivery failed but should be tried again in a little while (soft error). Currently 64, 65, 70, 76, 77, 78, and 112 are considered hard errors, and all other codes are considered soft errors, but _c_o_m_m_a_n_d should avoid relying on this. EENNVVIIRROONNMMEENNTT VVAARRIIAABBLLEESS qqmmaaiill--llooccaall supplies several useful environment variables to _c_o_m_m_a_n_d. WWAARRNNIINNGG:: These environment variables are not quoted. They may contain special characters. They are under the control of a possibly malicious remote user. SSEENNDDEERR is the envelope sender address. NNEEWWSSEENNDDEERR is the forwarding envelope sender address, as described in ddoott--qqmmaaiill((55)). RREECCIIPPIIEENNTT is the envelope recipient address, _l_o_c_a_l_@_d_o_m_a_i_n. UUSSEERR is _u_s_e_r. HHOOMMEE is your home directory, _h_o_m_e_d_i_r. HHOOSSTT is the _d_o_m_a_i_n part of the recipient address. LLOOCCAALL is the _l_o_c_a_l part. EEXXTT is the address extension, _e_x_t. HHOOSSTT22 is the portion of HHOOSSTT preceding the last dot; HHOOSSTT33 is the por- tion of HHOOSSTT preceding the second-to-last dot; HHOOSSTT44 is the portion of HHOOSSTT preceding the third-to-last dot. EEXXTT22 is the portion of EEXXTT following the first dash; EEXXTT33 is the por- tion following the second dash; EEXXTT44 is the portion following the third dash. DDEEFFAAUULLTT is the portion corresponding to the ddeeffaauulltt part of the ..qqmmaaiill--... file name; DDEEFFAAUULLTT is not set if the file name does not end with ddeeffaauulltt. DDTTLLIINNEE and RRPPLLIINNEE are the usual DDeelliivveerreedd--TToo and RReettuurrnn--PPaatthh lines, including newlines. UUFFLLIINNEE is the UUCP-style FFrroomm__ line that qqmmaaiill-- llooccaall adds to _m_b_o_x-format files. SSEEEE AALLSSOO dot-qmail(5), envelopes(5), qmail-local(8) qmail-command(8)