smtp 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. .TH SMTP 8
  2. .SH NAME
  3. smtp, smtpd \- mail transport
  4. .SH SYNOPSIS
  5. .PP
  6. .B upas/smtp
  7. [
  8. .B -dfas
  9. ][
  10. .B -g
  11. .I gateway
  12. ][
  13. .B -h
  14. .I host
  15. ][
  16. .B -u
  17. .I user
  18. ][
  19. .I .domain
  20. ]
  21. .I destaddr
  22. .I sender
  23. .I rcpt-list
  24. .PP
  25. .B upas/smtpd
  26. [
  27. .B -adfrg
  28. ][
  29. .B -n
  30. .I netdir
  31. ][
  32. .B -h
  33. .I mydom
  34. ][
  35. .B -k
  36. .I evilipaddr
  37. ][
  38. .B -c
  39. .I certfile
  40. ]
  41. .SH DESCRIPTION
  42. .PP
  43. .I Smtp
  44. sends the mail message from standard input
  45. to the users
  46. .I rcpt-list
  47. on the host at network address
  48. .I address
  49. using the Simple Mail Transfer Protocol.
  50. The options are:
  51. .TP
  52. .B -d
  53. turn on debugging to standard error.
  54. .TP
  55. .B -a
  56. if the server supports PLAIN or LOGIN authentication,
  57. authenticate to the server using a password from
  58. .IR factotum (4).
  59. See RFCs 3207 and 2554.
  60. This option implies
  61. .BR -s .
  62. .TP
  63. .B -s
  64. if the server supports the ESMTP extension to use TLS encryption, turn it on for
  65. this session. See RFC3207 for details.
  66. .TP
  67. .B -u
  68. specify a user name to be used in authentication. The default name is
  69. the current login id.
  70. .TP
  71. .B -h
  72. use
  73. .I host
  74. as the local system name;
  75. it may be fully-qualified or not. If not
  76. specified, it will default to the contents of
  77. .BR /dev/sysname .
  78. .TP
  79. .B -f
  80. just filter the converted message to standard
  81. output rather than sending it.
  82. .TP
  83. .B -g
  84. makes
  85. .I gateway
  86. the system to pass the message to if smtp can't
  87. find an address or MX entry for the destination system.
  88. .PD
  89. .PP
  90. Finally if
  91. .I .domain
  92. is given, it is appended to the end of any unqualified system names
  93. in the envelope or header.
  94. .PP
  95. .I Smtpd
  96. receives a message using the Simple Mail Transfer Protocol.
  97. Standard input and output are the protocol connection.
  98. SMTP authentication by
  99. .I login
  100. and
  101. .I cram-md5
  102. protocols is supported; authenticated connections are permitted to relay.
  103. .PP
  104. The options are:
  105. .TP
  106. .B -d
  107. turns on debugging output to standard error.
  108. .TP
  109. .B -r
  110. turns on forward DNS validation of non-trusted sender address.
  111. .TP
  112. .B -g
  113. turns on grey/white list processing. All mail is rejected (with a
  114. retry code) unless the sender's IP address is on the whitelist,
  115. .BR /mail/grey/whitelist ,
  116. an append only file.
  117. Addresses can be added to the whitelist by the administrator. However,
  118. the usual way for addresses to be added is by
  119. .I smtpd
  120. itself.
  121. Whenever a message is received and the sender's address isn't on the whitelist,
  122. .I smtpd
  123. first looks for the file
  124. .BI /mail/grey/tmp/\| local-ipaddr /\| remote-ipaddr /\| recipient.
  125. If it exists, the remote address is added to the whitelist. If
  126. not, the file is created and the mail is rejected with a `try again'
  127. code. The expectation is that spammers will not retry and that others
  128. will.
  129. .TP
  130. .B -f
  131. prevents relaying from non-trusted networks.
  132. It also tags messages from non-trusted sites when they deliver mail
  133. from an address in a domain we believe we represent.
  134. .TP
  135. .B -n
  136. specifies the name of the network directory assigned to the incoming connection.
  137. This is used to determine the peer IP address. If this flag is not
  138. specified, the peer address is determined using standard input.
  139. .TP
  140. .B -h
  141. specifies the receiving domain. If this flag is not specified, the
  142. receiving domain is inferred from the host name.
  143. .TP
  144. .B -s
  145. causes copies of blocked messages to be saved in a sub-directory of
  146. .BR /mail/queue.dump .
  147. .TP
  148. .B -k
  149. causes connections from the host at
  150. the IP address,
  151. .IR evilipaddr ,
  152. to be dropped at program startup. Multiple addresses
  153. can be specified with several
  154. .B -k
  155. options. This option should be used carefully;
  156. it is intended to lessen the effects of denial of
  157. service attacks or broken mailers which continually
  158. connect. The connections are not logged and the
  159. remote system is not notified via the protocol.
  160. .TP
  161. .B -c
  162. specifies a certificate to use for TLS. Without this
  163. option, the capability to start TLS will not be advertised.
  164. .TP
  165. .B -a
  166. requires that all clients authenticate to be able to send mail.
  167. .TP
  168. .B -p
  169. permits clients to authenticate using protocols which transfer
  170. the password in the clear, e.g.
  171. .I login
  172. protocol. This should only be used if the connection has
  173. previously encrypted using e.g.
  174. .IR tlssrv (8).
  175. .PP
  176. .I Smtpd
  177. is normally run by a network listener such as
  178. .IR listen (8).
  179. Most of the command line options are more conveniently
  180. specified in the smtpd configuration file stored in
  181. .BR /mail/lib/smtpd.conf .
  182. .SH SOURCE
  183. .TP
  184. .B /sys/src/cmd/upas/smtp
  185. .SH "SEE ALSO"
  186. .IR aliasmail (8),
  187. .IR faces (1),
  188. .IR filter (1),
  189. .IR mail (1),
  190. .IR marshal (1),
  191. .IR mlmgr (1),
  192. .IR nedmail (1),
  193. .IR qer (8),
  194. .IR rewrite (6),
  195. .IR send (8),
  196. .IR tlssrv (8),
  197. .IR upasfs (4)