Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

269 lines
7.1 KiB

  1. #ifndef _SMTP_PROP_H__
  2. #define _SMTP_PROP_H__
  3. // const
  4. #define TSTR_POSTMASTR_NAME _T("Postmaster")
  5. // Bitmasks for changed fields:
  6. #define ID_SERVER_BINDINGS 0
  7. #define ID_PORT 0
  8. #define ID_SSLPORT 1
  9. #define ID_SECURE_BINDINGS 1
  10. #define ID_OUTBOUNDPORT 2
  11. #define ID_REMOTE_SECURE_PORT 2
  12. #define ID_SMARTHOST 3
  13. #define ID_SMART_HOST_TYPE 3
  14. #define ID_SHOULD_DELIVER 3
  15. #define ID_ENABLEDNSLOOKUP 4
  16. #define ID_POSTMASTEREMAIL 5
  17. #define ID_POSTMASTERNAME 5
  18. #define ID_HOP_COUNT 6
  19. #define ID_AUTH_PACKAGES 7
  20. #define ID_CLEARTEXT_AUTH_PACKAGE 7
  21. #define ID_AUTH_METHOD 7
  22. #define ID_DEFAULT_LOGON_DOMAIN 7
  23. #define ID_DROPDIR 8
  24. #define ID_BADMAILDIR 8
  25. #define ID_PICKUPDIR 8
  26. #define ID_QUEUEDIR 8
  27. #define ID_ALLOW_VERIFY 9
  28. #define ID_ALLOW_EXPAND 9
  29. #define ID_ROUTE_ACTION 10
  30. #define ID_ROUTE_USER_NAME 10
  31. #define ID_ROUTE_PASSWORD 10
  32. #define ID_ALWAYS_USE_SSL 11
  33. #define ID_MAX_OUT_CONN_PER_DOMAIN 11
  34. #define ID_LIMIT_REMOTE_CONNECTIONS 11
  35. #define ID_MAXINCONNECTION 11
  36. #define ID_MAXOUTCONNECTION 11
  37. #define ID_INCONNECTIONTIMEOUT 11
  38. #define ID_OUTCONNECTIONTIMEOUT 11
  39. #define ID_BATCH_MSGS 12
  40. #define ID_BATCH_MSG_LIMIT 12
  41. // these two must be unique
  42. #define ID_FQDN 13
  43. #define ID_DEFAULTDOMAIN 14
  44. #define ID_MAXMESSAGESIZE 15
  45. #define ID_MAXSESSIONSIZE 15
  46. #define ID_MAXMESSAGERECIPIENTS 15
  47. #define ID_LOCALRETRIES 18
  48. #define ID_REMOTERETRIES 18
  49. #define ID_LOCALRETRYTIME 18
  50. #define ID_REMOTERETRYTIME 18
  51. #define ID_DO_MASQUERADE 19
  52. #define ID_MASQUERADE 19
  53. #define ID_ETRNDAYS 21
  54. #define ID_SENDDNRTOPOSTMASTER 22
  55. #define ID_SENDBADMAILTOPOSTMASTER 22
  56. #define ID_SENDNDRTO 22
  57. #define ID_SENDBADTO 22
  58. #define ID_ROUTINGDLL 24
  59. #define ID_ROUTINGSOURCES 24
  60. #define ID_LOGFILEDIRECTORY 25
  61. #define ID_LOGFILEPERIOD 25
  62. #define ID_LOGFILETRUNCATESIZE 25
  63. #define ID_LOGMETHOD 25
  64. #define ID_LOGTYPE 25
  65. #define ID_LOCALDOMAINS 26
  66. #define ID_DOMAINROUTING 27
  67. #define ID_AUTOSTART 28
  68. #define ID_COMMENT 29
  69. inline DWORD BitMask(DWORD dwId)
  70. {
  71. _ASSERT(dwId < 32);
  72. return ( ((DWORD)1) << dwId );
  73. }
  74. // Default Values:
  75. #define UNLIMITED ( 0xffffffff )
  76. #define MAX_LONG UNLIMITED
  77. #define DEFAULT_SERVER_BINDINGS ( ( L":25:\0\0" ) ) // multisz
  78. #define DEFAULT_SECURE_BINDINGS ( ( L":465:\0\0" ) ) // multisz
  79. #define DEFAULT_COMMENT (_T( "" ))
  80. #define DEFAULT_SMART_HOST (_T( "" ))
  81. #define DEFAULT_SMART_HOST_TYPE ( 0 )
  82. #define DEFAULT_SHOULD_DELIVER ( TRUE )
  83. #define DEFAULT_ALLOW_EXPAND ( FALSE )
  84. #define DEFAULT_ALLOW_VERIFY ( FALSE )
  85. #define DEFAULT_POSTMASTER_EMAIL (_T( "Postmaster" ))
  86. #define DEFAULT_POSTMASTER_NAME (_T( "Postmaster" ))
  87. #define DEFAULT_SENDNDRTO (_T( "" ))
  88. #define DEFAULT_SENDBADTO (_T( "" ))
  89. #define DEFAULT_FQDN (_T( "" ))
  90. #define DEFAULT_DEFAULT_DOMAIN (_T( "" ))
  91. #define DEFAULT_DO_MASQUERADE ( FALSE )
  92. #define DEFAULT_MASQUERADE_DOMAIN (_T( "" ))
  93. #define DEFAULT_DROP_DIR (_T( "" ))
  94. #define DEFAULT_BADMAIL_DIR (_T( "" ))
  95. #define DEFAULT_PICKUP_DIR (_T( "" ))
  96. #define DEFAULT_QUEUE_DIR (_T( "" ))
  97. #define DEFAULT_ROUTING_SOUCES (_T( "" ))
  98. #define DEFAULT_LOGFILE_DIRECTORY (_T( "" ))
  99. #define DEFAULT_AUTH_PACKAGES (_T("NTLM"))
  100. #define DEFAULT_CLEARTEXT_AUTH_PACKAGE (_T(""))
  101. #define DEFAULT_AUTHENTICATION (MD_AUTH_ANONYMOUS | MD_AUTH_BASIC | MD_AUTH_NT)
  102. #define DEFAULT_LOGON_DOMAIN (_T(""))
  103. #define DEFAULT_PORT ( 25 )
  104. #define DEFAULT_SSLPORT ( 465 )
  105. #define DEFAULT_OUTBOND_PORT ( 25 )
  106. #define DEFAULT_REMOTE_SECURE_PORT ( 465 )
  107. #define DEFAULT_HOP_COUNT ( 10 )
  108. #define DEFAULT_ALWAYS_USE_SSL ( FALSE )
  109. #define DEFAULT_LIMIT_REMOTE_CONNECTIONS ( TRUE )
  110. #define DEFAULT_MAX_OUT_CONN_PER_DOMAIN ( 0 )
  111. #define DEFAULT_MAX_IN_CONNECTION ( 1000 )
  112. #define DEFAULT_MAX_OUT_CONNECTION ( 1000 )
  113. #define DEFAULT_IN_CONNECTION_TIMEOUT ( 60 )
  114. #define DEFAULT_OUT_CONNECTION_TIMEOUT ( 60 )
  115. #define DEFAULT_BATCH_MSGS ( TRUE )
  116. #define DEFAULT_BATCH_MSG_LIMIT ( 0 )
  117. #define DEFAULT_MAX_MESSAGE_SIZE ( 2048 * 1024 )
  118. #define DEFAULT_MAX_SESSION_SIZE ( 10240 * 1024 )
  119. #define DEFAULT_MAX_MESSAGE_RECIPIENTS ( 100 )
  120. #define DEFAULT_LOCAL_RETRIES ( 48 )
  121. #define DEFAULT_LOCAL_RETRY_TIME ( 60 )
  122. #define DEFAULT_REMOTE_RETRIES ( 48 )
  123. #define DEFAULT_REMOTE_RETRY_TIME ( 60 )
  124. #define DEFAULT_ETRN_DAYS ( 10 )
  125. #define DEFAULT_ROUTING_DLL ( ( L"routeldp.dll" ) )
  126. #define DEFAULT_ROUTING_SOURCES ( ( L"\0\0" ) ) // multisz
  127. #define DEFAULT_LOCAL_DOMAINS ( ( L"corp.com\0\0" ) ) // multisz
  128. #define DEFAULT_DOMAIN_ROUTING ( ( L"\0\0" ) ) // multisz
  129. #define DEFAULT_ROUTE_ACTION ( SMTP_SMARTHOST )
  130. #define DEFAULT_ROUTE_USER_NAME (_T(""))
  131. #define DEFAULT_ROUTE_PASSWORD (_T(""))
  132. #define DEFAULT_LOGFILE_PERIOD ( 1 )
  133. #define DEFAULT_LOGFILE_TRUNCATE_SIZE ( 1388000 )
  134. #define DEFAULT_LOG_METHOD ( 0 )
  135. #define DEFAULT_LOG_TYPE ( 1 )
  136. #define DEFAULT_ENABLE_DNS_LOOKUP ( FALSE )
  137. #define DEFAULT_SEND_DNR_TO_POSTMASTER ( FALSE )
  138. #define DEFAULT_SEND_BAD_TO_POSTMASTER ( FALSE )
  139. #define DEFAULT_AUTOSTART ( TRUE )
  140. // Parameter ranges:
  141. #define MIN_PORT ( 0 )
  142. #define MIN_SSLPORT ( 0 )
  143. #define MIN_OUTBOND_PORT ( 0 )
  144. #define MIN_MAX_IN_CONNECTION ( 0 )
  145. #define MIN_MAX_OUT_CONNECTION ( 0 )
  146. #define MIN_IN_CONNECTION_TIMEOUT ( 0 )
  147. #define MIN_OUT_CONNECTION_TIMEOUT ( 0 )
  148. #define MIN_MAX_MESSAGE_SIZE ( 0 )
  149. #define MIN_MAX_SESSION_SIZE ( 0 )
  150. #define MIN_MAX_MESSAGE_RECIPIENTS ( 0 )
  151. #define MIN_LOCAL_RETRIES ( 0 )
  152. #define MIN_REMOTE_RETRIES ( 0 )
  153. #define MIN_LOCAL_RETRY_TIME ( 0 )
  154. #define MIN_REMOTE_RETRY_TIME ( 0 )
  155. #define MIN_ETRN_DAYS ( 0 )
  156. #define MIN_LOGFILE_PERIOD ( 0 )
  157. #define MIN_LOGFILE_TRUNCATE_SIZE ( 0 )
  158. #define MIN_LOG_METHOD ( 0 )
  159. #define MIN_LOG_TYPE ( 0 )
  160. #define MAX_PORT ( MAX_LONG )
  161. #define MAX_SSLPORT ( MAX_LONG )
  162. #define MAX_OUTBOND_PORT ( MAX_LONG )
  163. #define MAX_MAX_IN_CONNECTION ( MAX_LONG )
  164. #define MAX_MAX_OUT_CONNECTION ( MAX_LONG )
  165. #define MAX_IN_CONNECTION_TIMEOUT ( MAX_LONG )
  166. #define MAX_OUT_CONNECTION_TIMEOUT ( MAX_LONG )
  167. #define MAX_MAX_MESSAGE_SIZE ( MAX_LONG )
  168. #define MAX_MAX_SESSION_SIZE ( MAX_LONG )
  169. #define MAX_MAX_MESSAGE_RECIPIENTS ( MAX_LONG )
  170. #define MAX_LOCAL_RETRIES ( MAX_LONG )
  171. #define MAX_REMOTE_RETRIES ( MAX_LONG )
  172. #define MAX_LOCAL_RETRY_TIME ( MAX_LONG )
  173. #define MAX_REMOTE_RETRY_TIME ( MAX_LONG )
  174. #define MAX_ETRN_DAYS ( MAX_LONG )
  175. #define MAX_LOGFILE_PERIOD ( MAX_LONG )
  176. #define MAX_LOGFILE_TRUNCATE_SIZE ( MAX_LONG )
  177. #define MAX_LOG_METHOD ( MAX_LONG )
  178. #define MAX_LOG_TYPE ( MAX_LONG )
  179. // string length
  180. #define MAXLEN_SERVER ( 256 )
  181. #define MAXLEN_SMART_HOST ( 256 )
  182. #define MAXLEN_POSTMASTER_EMAIL ( 256 )
  183. #define MAXLEN_POSTMASTER_NAME ( 256 )
  184. #define MAXLEN_DEFAULT_DOMAIN ( 256 )
  185. #define MAXLEN_BADMAIL_DIR ( 256 )
  186. #define MAXLEN_PICKUP_DIR ( 256 )
  187. #define MAXLEN_QUEUE_DIR ( 256 )
  188. #define MAXLEN_ROUTING_SOUCES ( 256 )
  189. #define MAXLEN_LOGFILE_DIRECTORY ( 256 )
  190. #endif