smtp 4.8 KB

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