smtp 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  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 -dfr
  28. ][
  29. .B -n
  30. .I netdir
  31. ][
  32. .B -h
  33. .I mydom
  34. ][
  35. .B -k
  36. .I evilipaddr
  37. ]
  38. .SH DESCRIPTION
  39. .PP
  40. .I Smtp
  41. sends the mail message from standard input
  42. to the users
  43. .I rcpt-list
  44. on the host at network address
  45. .I address
  46. using the Simple Mail Transfer Protocol.
  47. .The options are:
  48. .TP
  49. .B -d
  50. turn on debugging to standard error.
  51. .TP
  52. .B -a
  53. authenticate ourself to the server if the server
  54. supports PLAIN authentication and allows us to first
  55. start up an encrypted TLS connection
  56. .TP
  57. .B -s
  58. if the server supports the ESMTP extension to use TLS encryption, turn it on for
  59. this session. See RFC3207 for details.
  60. .TP
  61. .B -a
  62. if the server supports the ESMTP extension to use TLS encryption, turn it
  63. on. If the server also supports the PLAIN (user + password) authentication,
  64. authenticate to the server using a password from
  65. .IR factotum (4). See RFC's 3207 and 2554.
  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, the local system name will be
  77. contents of the environment variable
  78. .BR site .
  79. If that isn't specified, it will be 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 1.1i
  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 -f
  116. prevents relaying from non-trusted networks.
  117. It also tags messages from non-trusted sites when they deliver mail
  118. from an address in a domain we believe we represent.
  119. .TP
  120. .B -n
  121. specifies the name of the network directory assigned to the incoming connection.
  122. This is used to determine the peer IP address. If this flag is not
  123. specified, the peer address is determined using standard input.
  124. .TP
  125. .B -h
  126. specifies the receiving domain. If this flag is not specified, the
  127. receiving domain is inferred from the host name.
  128. .TP
  129. .B -s
  130. causes copies of blocked messages to be saved in a sub-directory of
  131. .BR /mail/queue.dump .
  132. .TP
  133. .B -k
  134. causes connections from the host at
  135. the IP address,
  136. .IR evilipaddr ,
  137. to be dropped at program startup. Multiple addresses
  138. can be specified with several
  139. .B -k
  140. options. This option should be used carefully;
  141. it is intended to lessen the effects of denial of
  142. service attacks or broken mailers which continually
  143. connect. The connections are not logged and the
  144. remote system is not notified via the protocol.
  145. .TP
  146. .B -a
  147. requires that all clients authenticate to be able to send mail.
  148. .TP
  149. .B -p
  150. permits clients to authenticate using protocols which transfer
  151. the password in the clear, e.g.
  152. .I login
  153. protocol. This should only be used if the connection has
  154. previously encrypted using e.g.
  155. .IR tlssrv (8).
  156. .PP
  157. .I Smtpd
  158. is normally run by a network listener such as
  159. .IR listen (8).
  160. Most of the command line options are more conveniently
  161. specified in the smtpd configuration file stored in
  162. .BR /mail/lib/smtpd.conf .
  163. .SH FILES
  164. .SH SOURCE
  165. .TP
  166. .B /sys/src/cmd/upas/smtp
  167. .SH "SEE ALSO"
  168. .IR aliasmail (8),
  169. .IR faces (1),
  170. .IR filter (1),
  171. .IR mail (1),
  172. .IR marshal (1),
  173. .IR mlmgr (1),
  174. .IR nedmail (1),
  175. .IR qer (8),
  176. .IR rewrite (6),
  177. .IR send (8),
  178. .IR tlssrv (8),
  179. .IR upasfs (4)