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 -dfrg
  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 -s
  56. if the server supports the ESMTP extension to use TLS encryption, turn it on for
  57. this session. See RFC3207 for details.
  58. .TP
  59. if the server also supports PLAIN or LOGIN authentication,
  60. authenticate to the server using a password from
  61. .IR factotum (4).
  62. See RFCs 3207 and 2554.
  63. This option also implies
  64. .B -s .
  65. .TP
  66. .B -u
  67. specify a user name to be used in authentication. The default name is
  68. the current login id.
  69. .TP
  70. .B -h
  71. use
  72. .I host
  73. as the local system name;
  74. it may be fully-qualified or not. If not
  75. specified, it will default to the contents of
  76. .BR /dev/sysname .
  77. .TP
  78. .B -f
  79. just filter the converted message to standard
  80. output rather than sending it.
  81. .TP
  82. .B -g
  83. makes
  84. .I gateway
  85. the system to pass the message to if smtp can't
  86. find an address or MX entry for the destination system.
  87. .PD
  88. .PP
  89. Finally if
  90. .I .domain
  91. is given, it is appended to the end of any unqualified system names
  92. in the envelope or header.
  93. .PP
  94. .I Smtpd
  95. receives a message using the Simple Mail Transfer Protocol.
  96. Standard input and output are the protocol connection.
  97. SMTP authentication by
  98. .I login
  99. and
  100. .I cram-md5
  101. protocols is supported; authenticated connections are permitted to relay.
  102. .PP
  103. The options are:
  104. .TP
  105. .B -d
  106. turns on debugging output to standard error.
  107. .TP
  108. .B -r
  109. turns on forward DNS validation of non-trusted sender address.
  110. .TP
  111. .B -g
  112. turns on grey/white list processing. All mail is rejected (with a
  113. retry code) unless the sender's IP address is on the whitelist,
  114. .BR /mail/lib/whitelist ,
  115. an append only file.
  116. Addresses can be added to the whitelist by the administrator. However,
  117. the usual way for addresses to be added is by
  118. .I smtpd
  119. itself.
  120. Whenever a message is received and the sender's address isn't on the whitelist,
  121. .I smtpd
  122. first looks for the file,
  123. .B /mail/grey/<remote ipaddr>/<local ipaddr>/<recipient> .
  124. If that file exists, the remote address is added to the whitelist. If
  125. not, the file is created and the mail is rejected with a 'try again'
  126. code. The expectation is that spammers will not retry and that others
  127. will.
  128. .TP
  129. .B -f
  130. prevents relaying from non-trusted networks.
  131. It also tags messages from non-trusted sites when they deliver mail
  132. from an address in a domain we believe we represent.
  133. .TP
  134. .B -n
  135. specifies the name of the network directory assigned to the incoming connection.
  136. This is used to determine the peer IP address. If this flag is not
  137. specified, the peer address is determined using standard input.
  138. .TP
  139. .B -h
  140. specifies the receiving domain. If this flag is not specified, the
  141. receiving domain is inferred from the host name.
  142. .TP
  143. .B -s
  144. causes copies of blocked messages to be saved in a sub-directory of
  145. .BR /mail/queue.dump .
  146. .TP
  147. .B -k
  148. causes connections from the host at
  149. the IP address,
  150. .IR evilipaddr ,
  151. to be dropped at program startup. Multiple addresses
  152. can be specified with several
  153. .B -k
  154. options. This option should be used carefully;
  155. it is intended to lessen the effects of denial of
  156. service attacks or broken mailers which continually
  157. connect. The connections are not logged and the
  158. remote system is not notified via the protocol.
  159. .TP
  160. .B -c
  161. specifies a certificate to use for TLS. Without this
  162. option, the capability to start TLS will not be advertised.
  163. .TP
  164. .B -a
  165. requires that all clients authenticate to be able to send mail.
  166. .TP
  167. .B -p
  168. permits clients to authenticate using protocols which transfer
  169. the password in the clear, e.g.
  170. .I login
  171. protocol. This should only be used if the connection has
  172. previously encrypted using e.g.
  173. .IR tlssrv (8).
  174. .PP
  175. .I Smtpd
  176. is normally run by a network listener such as
  177. .IR listen (8).
  178. Most of the command line options are more conveniently
  179. specified in the smtpd configuration file stored in
  180. .BR /mail/lib/smtpd.conf .
  181. .SH FILES
  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)