smtp 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  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 -a
  56. authenticate ourself to the server if the server
  57. supports PLAIN authentication and allows us to first
  58. start up an encrypted TLS connection
  59. .TP
  60. .B -s
  61. if the server supports the ESMTP extension to use TLS encryption, turn it on for
  62. this session. See RFC3207 for details.
  63. .TP
  64. .B -a
  65. if the server supports the ESMTP extension to use TLS encryption, turn it
  66. on. If the server also supports the PLAIN (user + password) authentication,
  67. authenticate to the server using a password from
  68. .IR factotum (4). See RFC's 3207 and 2554.
  69. .TP
  70. .B -u
  71. specify a user name to be used in authentication. The default name is
  72. the current login id.
  73. .TP
  74. .B -h
  75. use
  76. .I host
  77. as the local system name;
  78. it may be fully-qualified or not. If not
  79. specified, it will default to the contents of
  80. .BR /dev/sysname .
  81. .TP
  82. .B -f
  83. just filter the converted message to standard
  84. output rather than sending it.
  85. .TP
  86. .B -g
  87. makes
  88. .I gateway
  89. the system to pass the message to if smtp can't
  90. find an address or MX entry for the destination system.
  91. .PD
  92. .PP
  93. Finally if
  94. .I .domain
  95. is given, it is appended to the end of any unqaulified system names
  96. in the envelope or header.
  97. .PP
  98. .I Smtpd
  99. receives a message using the Simple Mail Transfer Protocol.
  100. Standard input and output are the protocol connection.
  101. SMTP authentication by
  102. .I login
  103. and
  104. .I cram-md5
  105. protocols is supported; authenticated connections are permitted to relay.
  106. .PP
  107. The options are:
  108. .TP
  109. .B -d
  110. turns on debugging output to standard error.
  111. .TP
  112. .B -r
  113. turns on forward DNS validation of non-trusted sender address.
  114. .TP
  115. .B -g
  116. turns on grey/white list processing. All mail is rejected (with a
  117. retry code) unless the sender's IP address is on the whitelist,
  118. .BR /mail/lib/whitelist .
  119. Addresses can be added to the whitelist by the administrator. However,
  120. the usual way for addresses to be added is by smtpd itself. Whenever,
  121. a message is received and the sender's address isn't on the whitelist,
  122. .B smtpd
  123. first looks for the file,
  124. .B /mail/grey/<remote ipaddr>/<local ipaddr>/<recipient> .
  125. If that file 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 FILES
  183. .SH SOURCE
  184. .TP
  185. .B /sys/src/cmd/upas/smtp
  186. .SH "SEE ALSO"
  187. .IR aliasmail (8),
  188. .IR faces (1),
  189. .IR filter (1),
  190. .IR mail (1),
  191. .IR marshal (1),
  192. .IR mlmgr (1),
  193. .IR nedmail (1),
  194. .IR qer (8),
  195. .IR rewrite (6),
  196. .IR send (8),
  197. .IR tlssrv (8),
  198. .IR upasfs (4)