| 1 | .TH qmail-smtpd 8 |
| 2 | .SH NAME |
| 3 | qmail-smtpd \- receive mail via SMTP |
| 4 | .SH SYNOPSIS |
| 5 | .B qmail-smtpd |
| 6 | .SH DESCRIPTION |
| 7 | .B qmail-smtpd |
| 8 | receives mail messages via the Simple Mail Transfer Protocol (SMTP) |
| 9 | and invokes |
| 10 | .B qmail-queue |
| 11 | to deposit them into the outgoing queue. |
| 12 | .B qmail-smtpd |
| 13 | must be supplied several environment variables; |
| 14 | see |
| 15 | .BR tcp-environ(5) . |
| 16 | |
| 17 | .B qmail-smtpd |
| 18 | is responsible for counting hops. |
| 19 | It rejects any message with 100 or more |
| 20 | .B Received |
| 21 | or |
| 22 | .B Delivered-To |
| 23 | header fields. |
| 24 | |
| 25 | .B qmail-smtpd |
| 26 | supports ESMTP, including the 8BITMIME and PIPELINING options. |
| 27 | .SH TRANSPARENCY |
| 28 | .B qmail-smtpd |
| 29 | converts the SMTP newline convention into the UNIX newline convention |
| 30 | by converting CR LF into LF. |
| 31 | |
| 32 | .B qmail-smtpd |
| 33 | accepts messages that contain long lines or non-ASCII characters, |
| 34 | even though such messages violate the SMTP protocol. |
| 35 | .SH "CONTROL FILES" |
| 36 | .TP 5 |
| 37 | .I badmailfrom |
| 38 | Unacceptable envelope sender addresses. |
| 39 | .B qmail-smtpd |
| 40 | will reject every recipient address for a message |
| 41 | if the envelope sender address is listed in |
| 42 | .IR badmailfrom . |
| 43 | A line in |
| 44 | .I badmailfrom |
| 45 | may be of the form |
| 46 | .BR @\fIhost , |
| 47 | meaning every address at |
| 48 | .IR host . |
| 49 | .TP 5 |
| 50 | .I localiphost |
| 51 | Replacement host name for local IP addresses. |
| 52 | Default: |
| 53 | .IR me , |
| 54 | if that is supplied. |
| 55 | .B qmail-smtpd |
| 56 | is responsible for recognizing dotted-decimal addresses for the |
| 57 | current host. |
| 58 | When it sees a recipient address of the form |
| 59 | .IR box@[d.d.d.d] , |
| 60 | where |
| 61 | .I d.d.d.d |
| 62 | is a local IP address, |
| 63 | it replaces |
| 64 | .IR [d.d.d.d] |
| 65 | with |
| 66 | .IR localiphost . |
| 67 | This is done before |
| 68 | .IR rcpthosts . |
| 69 | .TP 5 |
| 70 | .I rcpthosts |
| 71 | Allowed RCPT domains. |
| 72 | If |
| 73 | .I rcpthosts |
| 74 | is supplied, |
| 75 | .B qmail-smtpd |
| 76 | will reject |
| 77 | any envelope recipient address with a domain not listed in |
| 78 | .I rcpthosts |
| 79 | unless the sending host is a designated relay client (see the |
| 80 | description of the |
| 81 | .I relayhosts |
| 82 | file beow). |
| 83 | |
| 84 | .I rcpthosts |
| 85 | may include wildcards: |
| 86 | |
| 87 | .EX |
| 88 | heaven.af.mil |
| 89 | .heaven.af.mil |
| 90 | .EE |
| 91 | |
| 92 | Envelope recipient addresses without @ signs are |
| 93 | always allowed through. |
| 94 | .TP 5 |
| 95 | .I relayhosts |
| 96 | Allowed relay clients. Each line is a host-suffix pair, separated by a |
| 97 | colon. If the client's hostname matches one of the hostnames in the |
| 98 | file, that client is permitted to send mail to any host (i.e., to use us |
| 99 | as a relay), and the corresponding suffix is appended to all recipient |
| 100 | addresses generated by the client. |
| 101 | |
| 102 | .I relayhosts |
| 103 | may include wildcards: |
| 104 | |
| 105 | .EX |
| 106 | heaven.af.mil: |
| 107 | .heaven.af.mil: |
| 108 | hell.irs.gov:.irs.virtdomain |
| 109 | .EE |
| 110 | |
| 111 | For historical reasons, the |
| 112 | .B RELAYCLIENT |
| 113 | environment variable overrides this table. If |
| 114 | .B RELAYCLIENT |
| 115 | is set, it has the same effect as there being a matching entry in the |
| 116 | .I relayhosts |
| 117 | file, using the value of |
| 118 | .B RELAYCLIENT |
| 119 | as the suffix. |
| 120 | .TP 5 |
| 121 | .I smtpgreeting |
| 122 | SMTP greeting message. |
| 123 | Default: |
| 124 | .IR me , |
| 125 | if that is supplied; |
| 126 | otherwise |
| 127 | .B qmail-smtpd |
| 128 | will refuse to run. |
| 129 | The first word of |
| 130 | .I smtpgreeting |
| 131 | should be the current host's name. |
| 132 | .TP 5 |
| 133 | .I timeoutsmtpd |
| 134 | Number of seconds |
| 135 | .B qmail-smtpd |
| 136 | will wait for each new buffer of data from the remote SMTP client. |
| 137 | Default: 1200. |
| 138 | .SH "SEE ALSO" |
| 139 | tcp-env(1), |
| 140 | tcp-environ(5), |
| 141 | qmail-control(5), |
| 142 | qmail-inject(8), |
| 143 | qmail-queue(8), |
| 144 | qmail-remote(8) |