smtp 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  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. .TP
  118. .B -n
  119. specifies the name of the network directory assigned to the incoming connection.
  120. This is used to determine the peer IP address. If this flag is not
  121. specified, the peer address is determined using standard input.
  122. .TP
  123. .B -h
  124. specifies the receiving domain. If this flag is not specified, the
  125. receiving domain is inferred from the host name.
  126. .TP
  127. .B -s
  128. causes copies of blocked messages to be saved in a sub-directory of
  129. .BR /mail/queue.dump .
  130. .TP
  131. .B -k
  132. causes connections from the host at
  133. the IP address,
  134. .IR evilipaddr ,
  135. to be dropped at program startup. Multiple addresses
  136. can be specified with several
  137. .B -k
  138. options. This option should be used carefully;
  139. it is intended to lessen the effects of denial of
  140. service attacks or broken mailers which continually
  141. connect. The connections are not logged and the
  142. remote system is not notified via the protocol.
  143. .TP
  144. .B -a
  145. requires that all clients authenticate to be able to send mail.
  146. .TP
  147. .B -p
  148. permits clients to authenticate using protocols which transfer
  149. the password in the clear, e.g.
  150. .I login
  151. protocol. This should only be used if the connection has
  152. previously encrypted using e.g.
  153. .IR tlssrv (8).
  154. .PP
  155. .I Smtpd
  156. is normally run by a network listener such as
  157. .IR listen (8).
  158. Most of the command line options are more conveniently
  159. specified in the smtpd configuration file stored in
  160. .BR /mail/lib/smtpd.conf .
  161. .SH FILES
  162. .SH SOURCE
  163. .TP
  164. .B /sys/src/cmd/upas/smtp
  165. .SH "SEE ALSO"
  166. .IR aliasmail (8),
  167. .IR faces (1),
  168. .IR filter (1),
  169. .IR mail (1),
  170. .IR marshal (1),
  171. .IR mlmgr (1),
  172. .IR nedmail (1),
  173. .IR qer (8),
  174. .IR rewrite (6),
  175. .IR send (8),
  176. .IR tlssrv (8),
  177. .IR upasfs (4)