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.

736 lines
24 KiB

  1. /*++
  2. Copyright (c) 1995 Microsoft Corporation
  3. Module Name:
  4. smtpapi.h
  5. Abstract:
  6. This file contains information about the MSN SMTP server counters
  7. Author:
  8. Johnson Apacible (johnsona) 10-Sept-1995
  9. Rohan Phillips (Rohanp) 11-Dec-1995
  10. --*/
  11. #ifndef _SMTPAPI_
  12. #define _SMTPAPI_
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16. #include <inetcom.h>
  17. #ifndef NET_API_FUNCTION
  18. #define NET_API_FUNCTION _stdcall
  19. #endif
  20. #include "smtpext.h"
  21. #include "perfcat.h"
  22. //
  23. // Config Structures and API's
  24. #pragma warning( disable:4200 ) // nonstandard ext. - zero sized array
  25. // (MIDL requires zero entries)
  26. #define NAME_TYPE_USER (BitFlag(0))
  27. #define NAME_TYPE_LIST_NORMAL (BitFlag(1))
  28. #define NAME_TYPE_LIST_DOMAIN (BitFlag(2))
  29. #define NAME_TYPE_LIST_SITE (BitFlag(3))
  30. #define NAME_TYPE_ALL ( \
  31. NAME_TYPE_USER | \
  32. NAME_TYPE_LIST_NORMAL | \
  33. NAME_TYPE_LIST_DOMAIN | \
  34. NAME_TYPE_LIST_SITE \
  35. )
  36. typedef struct _SMTP_NAME_ENTRY
  37. {
  38. DWORD dwType;
  39. LPWSTR lpszName;
  40. } SMTP_NAME_ENTRY, *LPSMTP_NAME_ENTRY;
  41. typedef struct _SMTP_NAME_LIST
  42. {
  43. DWORD cEntries;
  44. #if defined(MIDL_PASS)
  45. [size_is(cEntries)]
  46. #endif
  47. SMTP_NAME_ENTRY aNameEntry[];
  48. } SMTP_NAME_LIST, *LPSMTP_NAME_LIST;
  49. typedef struct _SMTP_CONN_USER_ENTRY
  50. {
  51. DWORD dwUserId;
  52. LPWSTR lpszName;
  53. LPWSTR lpszHost;
  54. DWORD dwConnectTime;
  55. } SMTP_CONN_USER_ENTRY, *LPSMTP_CONN_USER_ENTRY;
  56. typedef struct _SMTP_CONN_USER_LIST
  57. {
  58. DWORD cEntries;
  59. #if defined(MIDL_PASS)
  60. [size_is(cEntries)]
  61. #endif
  62. SMTP_CONN_USER_ENTRY aConnUserEntry[];
  63. } SMTP_CONN_USER_LIST, *LPSMTP_CONN_USER_LIST;
  64. typedef struct _SMTP_CONFIG_DOMAIN_ENTRY
  65. {
  66. LPWSTR lpszDomain;
  67. } SMTP_CONFIG_DOMAIN_ENTRY, *LPSMTP_CONFIG_DOMAIN_ENTRY;
  68. typedef struct _SMTP_CONFIG_DOMAIN_LIST
  69. {
  70. DWORD cEntries; // Count of supported domains
  71. #if defined(MIDL_PASS)
  72. [size_is(cEntries)]
  73. #endif
  74. SMTP_CONFIG_DOMAIN_ENTRY aDomainEntry[]; // Supported domains
  75. } SMTP_CONFIG_DOMAIN_LIST, *LPSMTP_CONFIG_DOMAIN_LIST;
  76. typedef struct _SMTP_CONFIG_ROUTING_ENTRY
  77. {
  78. LPWSTR lpszSource;
  79. } SMTP_CONFIG_ROUTING_ENTRY, *LPSMTP_CONFIG_ROUTING_ENTRY;
  80. typedef struct _SMTP_CONFIG_ROUTING_LIST
  81. {
  82. DWORD cEntries; // Count of supported data sources
  83. #if defined(MIDL_PASS)
  84. [size_is(cEntries)]
  85. #endif
  86. SMTP_CONFIG_ROUTING_ENTRY aRoutingEntry[];
  87. } SMTP_CONFIG_ROUTING_LIST, *LPSMTP_CONFIG_ROUTING_LIST;
  88. // 0 - Perfmon stats
  89. typedef struct _SMTP_STATISTICS_0
  90. {
  91. // total bytes sent/received, including protocol msgs
  92. unsigned __int64 BytesSentTotal;
  93. unsigned __int64 BytesRcvdTotal;
  94. unsigned __int64 BytesSentMsg;
  95. unsigned __int64 BytesRcvdMsg;
  96. //incoming counters
  97. DWORD NumMsgRecvd;
  98. DWORD NumRcptsRecvd;
  99. DWORD NumRcptsRecvdLocal;
  100. DWORD NumRcptsRecvdRemote;
  101. DWORD MsgsRefusedDueToSize;
  102. DWORD MsgsRefusedDueToNoCAddrObjects;
  103. DWORD MsgsRefusedDueToNoMailObjects;
  104. //MTA counters
  105. DWORD NumMsgsDelivered;
  106. DWORD NumDeliveryRetries;
  107. DWORD NumMsgsForwarded;
  108. DWORD NumNDRGenerated;
  109. DWORD LocalQueueLength;
  110. DWORD RetryQueueLength;
  111. DWORD NumMailFileHandles;
  112. DWORD NumQueueFileHandles;
  113. DWORD CatQueueLength;
  114. //outgoing counters
  115. DWORD NumMsgsSent;
  116. DWORD NumRcptsSent;
  117. DWORD NumSendRetries;
  118. DWORD RemoteQueueLength;
  119. //DNS query counters
  120. DWORD NumDnsQueries;
  121. DWORD RemoteRetryQueueLength;
  122. //connection counters
  123. DWORD NumConnInOpen;
  124. DWORD NumConnInClose;
  125. DWORD NumConnOutOpen;
  126. DWORD NumConnOutClose;
  127. DWORD NumConnOutRefused;
  128. // other counters
  129. DWORD NumProtocolErrs;
  130. DWORD DirectoryDrops;
  131. DWORD RoutingTableLookups;
  132. DWORD ETRNMessages;
  133. DWORD MsgsBadmailNoRecipients;
  134. DWORD MsgsBadmailHopCountExceeded;
  135. DWORD MsgsBadmailFailureGeneral;
  136. DWORD MsgsBadmailBadPickupFile;
  137. DWORD MsgsBadmailEvent;
  138. DWORD MsgsBadmailNdrOfDsn;
  139. DWORD MsgsPendingRouting;
  140. DWORD MsgsPendingUnreachableLink;
  141. DWORD SubmittedMessages;
  142. DWORD DSNFailures;
  143. DWORD MsgsInLocalDelivery;
  144. CATPERFBLOCK CatPerfBlock;
  145. DWORD TimeOfLastClear; // statistics last cleared
  146. } SMTP_STATISTICS_0, *LPSMTP_STATISTICS_0;
  147. typedef struct _SMTP_STATISTICS_BLOCK
  148. {
  149. DWORD dwInstance;
  150. SMTP_STATISTICS_0 Stats_0;
  151. } SMTP_STATISTICS_BLOCK, *PSMTP_STATISTICS_BLOCK;
  152. typedef struct _SMTP_STATISTICS_BLOCK_ARRAY
  153. {
  154. DWORD cEntries; // Count of instances of statistics
  155. #if defined(MIDL_PASS)
  156. [size_is(cEntries)]
  157. #endif
  158. SMTP_STATISTICS_BLOCK aStatsBlock[];
  159. } SMTP_STATISTICS_BLOCK_ARRAY, *PSMTP_STATISTICS_BLOCK_ARRAY;
  160. #pragma warning(default:4200)
  161. //
  162. // Cut by keithlau on 7/8/96
  163. //
  164. // #define FC_SMTP_INFO_LOOP_BACK ((FIELD_CONTROL)BitFlag(0))
  165. // #define FC_SMTP_INFO_BACK_LOG ((FIELD_CONTROL)BitFlag(1))
  166. // #define FC_SMTP_INFO_MAX_OBJECTS ((FIELD_CONTROL)BitFlag(6))
  167. // #define FC_SMTP_INFO_DOMAIN ((FIELD_CONTROL)BitFlag(12))
  168. // #define FC_SMTP_INFO_DELIVERY ((FIELD_CONTROL)BitFlag(17))
  169. // #define FC_SMTP_INFO_BAD_MAIL ((FIELD_CONTROL)BitFlag(19))
  170. // #define FC_SMTP_INFO_MAIL_QUEUE_DIR ((FIELD_CONTROL)BitFlag(20))
  171. // #define FC_SMTP_INFO_FILELINKS ((FIELD_CONTROL)BitFlag(21))
  172. // #define FC_SMTP_INFO_BATCHMSGS ((FIELD_CONTROL)BitFlag(22))
  173. // #define FC_SMTP_INFO_ROUTING_DLL ((FIELD_CONTROL)BitFlag(23))
  174. // #define FC_SMTP_INFO_MAIL_PICKUP_DIR ((FIELD_CONTROL)BitFlag(25))
  175. #define FC_SMTP_INFO_REVERSE_LOOKUP ((FIELD_CONTROL)BitFlag(0))
  176. #define FC_SMTP_INFO_MAX_HOP_COUNT ((FIELD_CONTROL)BitFlag(1))
  177. #define FC_SMTP_INFO_MAX_ERRORS ((FIELD_CONTROL)BitFlag(2))
  178. #define FC_SMTP_INFO_MAX_SIZE ((FIELD_CONTROL)BitFlag(3))
  179. #define FC_SMTP_INFO_REMOTE_TIMEOUT ((FIELD_CONTROL)BitFlag(4))
  180. #define FC_SMTP_INFO_MAX_OUTBOUND_CONN ((FIELD_CONTROL)BitFlag(5))
  181. #define FC_SMTP_INFO_MAX_RECIPS ((FIELD_CONTROL)BitFlag(6))
  182. #define FC_SMTP_INFO_RETRY ((FIELD_CONTROL)BitFlag(7))
  183. #define FC_SMTP_INFO_PIPELINE ((FIELD_CONTROL)BitFlag(8))
  184. #define FC_SMTP_INFO_OBSOLETE_ROUTING ((FIELD_CONTROL)BitFlag(9))
  185. #define FC_SMTP_INFO_SEND_TO_ADMIN ((FIELD_CONTROL)BitFlag(10))
  186. #define FC_SMTP_INFO_SMART_HOST ((FIELD_CONTROL)BitFlag(11))
  187. #define FC_SMTP_INFO_AUTHORIZATION ((FIELD_CONTROL)BitFlag(12))
  188. #define FC_SMTP_INFO_COMMON_PARAMS ((FIELD_CONTROL)BitFlag(13))
  189. #define FC_SMTP_INFO_DEFAULT_DOMAIN ((FIELD_CONTROL)BitFlag(14))
  190. #define FC_SMTP_INFO_ROUTING ((FIELD_CONTROL)BitFlag(15))
  191. //
  192. // Added by keithlau on 7/8/96
  193. //
  194. #define FC_SMTP_INFO_BAD_MAIL_DIR ((FIELD_CONTROL)BitFlag(15))
  195. #define FC_SMTP_INFO_MASQUERADE ((FIELD_CONTROL)BitFlag(16))
  196. #define FC_SMTP_INFO_REMOTE_PORT ((FIELD_CONTROL)BitFlag(17))
  197. #define FC_SMTP_INFO_LOCAL_DOMAINS ((FIELD_CONTROL)BitFlag(18))
  198. #define FC_SMTP_INFO_DOMAIN_ROUTING ((FIELD_CONTROL)BitFlag(19))
  199. #define FC_SMTP_INFO_ADMIN_EMAIL_NAME ((FIELD_CONTROL)BitFlag(20))
  200. #define FC_SMTP_INFO_ALWAYS_USE_SSL ((FIELD_CONTROL)BitFlag(21))
  201. #define FC_SMTP_INFO_MAX_OUT_CONN_PER_DOMAIN ((FIELD_CONTROL)BitFlag(22))
  202. #define FC_SMTP_INFO_SASL_LOGON_DOMAIN ((FIELD_CONTROL)BitFlag(23))
  203. #define FC_SMTP_INFO_INBOUND_SUPPORT_OPTIONS ((FIELD_CONTROL)BitFlag(24))
  204. #define FC_SMTP_INFO_DEFAULT_DROP_DIR ((FIELD_CONTROL)BitFlag(25))
  205. #define FC_SMTP_INFO_FQDN ((FIELD_CONTROL)BitFlag(26))
  206. #define FC_SMTP_INFO_ETRN_SUBDOMAINS ((FIELD_CONTROL)BitFlag(27))
  207. #define FC_SMTP_INFO_NTAUTHENTICATION_PROVIDERS ((FIELD_CONTROL)BitFlag(29))
  208. #define FC_SMTP_CLEARTEXT_AUTH_PROVIDER ((FIELD_CONTROL)BitFlag(30))
  209. //
  210. // Added by mlans on 7/24/96
  211. //
  212. #define FC_SMTP_INFO_SSL_PERM ((FIELD_CONTROL)BitFlag(28))
  213. #define FC_SMTP_ROUTING_TYPE_FILTER ((FIELD_CONTROL)(BitFlag(30) | BitFlag(31)))
  214. #define FC_SMTP_ROUTING_TYPE_SQL ((FIELD_CONTROL)(0)))
  215. #define FC_SMTP_ROUTING_TYPE_FF ((FIELD_CONTROL)BitFlag(30))
  216. #define FC_SMTP_ROUTING_TYPE_LDAP ((FIELD_CONTROL)BitFlag(31))
  217. #define FC_SMTP_INFO_ALL ( \
  218. FC_SMTP_INFO_REVERSE_LOOKUP | \
  219. FC_SMTP_INFO_MAX_HOP_COUNT | \
  220. FC_SMTP_INFO_MAX_ERRORS | \
  221. FC_SMTP_INFO_MAX_SIZE | \
  222. FC_SMTP_INFO_REMOTE_TIMEOUT | \
  223. FC_SMTP_INFO_MAX_OUTBOUND_CONN | \
  224. FC_SMTP_INFO_MAX_RECIPS | \
  225. FC_SMTP_INFO_RETRY | \
  226. FC_SMTP_INFO_PIPELINE | \
  227. FC_SMTP_INFO_ROUTING | \
  228. FC_SMTP_INFO_OBSOLETE_ROUTING | \
  229. FC_SMTP_INFO_SEND_TO_ADMIN | \
  230. FC_SMTP_INFO_SMART_HOST | \
  231. FC_SMTP_INFO_COMMON_PARAMS | \
  232. FC_SMTP_INFO_DEFAULT_DOMAIN | \
  233. FC_SMTP_INFO_BAD_MAIL_DIR | \
  234. FC_SMTP_INFO_MASQUERADE | \
  235. FC_SMTP_INFO_LOCAL_DOMAINS | \
  236. FC_SMTP_INFO_REMOTE_PORT | \
  237. FC_SMTP_INFO_DOMAIN_ROUTING |\
  238. FC_SMTP_INFO_ADMIN_EMAIL_NAME |\
  239. FC_SMTP_INFO_ALWAYS_USE_SSL |\
  240. FC_SMTP_INFO_MAX_OUT_CONN_PER_DOMAIN |\
  241. FC_SMTP_INFO_INBOUND_SUPPORT_OPTIONS |\
  242. FC_SMTP_INFO_DEFAULT_DROP_DIR |\
  243. FC_SMTP_INFO_FQDN |\
  244. FC_SMTP_INFO_ETRN_SUBDOMAINS |\
  245. FC_SMTP_INFO_SSL_PERM |\
  246. FC_SMTP_INFO_AUTHORIZATION |\
  247. FC_SMTP_INFO_NTAUTHENTICATION_PROVIDERS |\
  248. FC_SMTP_INFO_SASL_LOGON_DOMAIN |\
  249. FC_SMTP_CLEARTEXT_AUTH_PROVIDER \
  250. )
  251. //
  252. // Cut out from FC_SMTP_INFO_ALL by keithlau on 7/8/96
  253. //
  254. /*
  255. *
  256. FC_SMTP_INFO_LOOP_BACK | \
  257. FC_SMTP_INFO_BACK_LOG | \
  258. FC_SMTP_INFO_MAX_OBJECTS | \
  259. FC_SMTP_INFO_DELIVERY | \
  260. FC_SMTP_INFO_BAD_MAIL | \
  261. FC_SMTP_INFO_DOMAIN | \
  262. FC_SMTP_INFO_MAIL_QUEUE_DIR | \
  263. FC_SMTP_INFO_FILELINKS | \
  264. FC_SMTP_INFO_BATCHMSGS | \
  265. FC_SMTP_INFO_ROUTING_DLL | \
  266. FC_SMTP_INFO_MAIL_PICKUP_DIR \
  267. *
  268. */
  269. typedef struct _SMTP_CONFIG_INFO
  270. {
  271. FIELD_CONTROL FieldControl;
  272. //
  273. // Removed by keithlau on 7/8/96
  274. //
  275. // DWORD dwCheckLoopBack; // Make sure we're not sending to ourself
  276. // DWORD dwLocalBackLog; //
  277. // DWORD dwRemoteBackLog; //
  278. // DWORD dwMaxAddressObjects; // Max CPool Addresses
  279. // DWORD dwMaxMailObjects; // Max CPool Msgs
  280. // DWORD dwShouldDelete; // Should delete messages when delivered
  281. // DWORD dwShouldDeliver; // Should deliver messages when accepted
  282. // DWORD dwUseFileLinks; // 0 = use NTFS file links, 1 = use CopyFile
  283. // DWORD dwBatchMsgs; // 0 = Don't batch msgs, 1 = batch msgs
  284. // DWORD dwMaxBatchLimit; // if dwBatchMsgs == 1, batch this many in a row
  285. // DWORD dwSaveBadMail; // Save bad mail locally - independent of sending to admin
  286. // DWORD dwEnableMailPickUp; // 1 = Pickup from a Dir, 0 = No pickup from a Dir
  287. // LPWSTR lpszDeleteDir; // Dir to move delivered msg to if dwShouldDelete == FALSE
  288. // LPWSTR lpszRoutingDll; // Mail routing DLL
  289. // LPWSTR lpszMailQueueDir; // Local directory to use for the mail queue
  290. // LPWSTR lpszMailPickupDir; // Local Directory for mail pickup
  291. // LPSMTP_CONFIG_DOMAIN_LIST DomainList; // Domain config info - default domain and supported domains
  292. DWORD dwReverseLookup; // Do DNS Reverse lookup?
  293. DWORD dwMaxHopCount; // Max msg hops before NDR
  294. DWORD dwMaxRemoteTimeOut; // Outbound inactivity timeout
  295. DWORD dwMaxErrors; // Max protocol errors before drop conn
  296. DWORD dwMaxMsgSizeAccepted; // Largest msg we'll accept
  297. DWORD dwMaxMsgSizeBeforeClose; // Largest msg we'll wait for before abrupt close
  298. DWORD dwMaxRcpts; // Max recips per message
  299. DWORD dwShouldRetry; // Should retry delivery
  300. DWORD dwMaxRetryAttempts; // Max # of retry attempts
  301. DWORD dwMaxRetryMinutes; // Minutes between retries
  302. DWORD dwNameResolution; // 0 = DNS, 1 = GetHostByName
  303. DWORD dwShouldPipelineOut; // Pipeline outbound mail?
  304. DWORD dwShouldPipelineIn; // Advertise inbound pipeline support?
  305. DWORD dwSmartHostType; // 0 = Never, 1 = On failed connection, 1 = Always
  306. DWORD dwSendNDRCopyToAdmin; // Send copy of all NDR's to AdminEmail?
  307. DWORD dwSendBadMailToAdmin; // Send bad msgs to AdminEmail?
  308. DWORD dwMaxOutboundConnections; // Maximum outbound connections allowed
  309. LPWSTR lpszSmartHostName; // Smart host server
  310. LPWSTR lpszConnectResp; // Connection response
  311. LPWSTR lpszBadMailDir; // Dir to save bad mail
  312. LPWSTR lpszDefaultDomain; // Default domain
  313. LPSMTP_CONFIG_ROUTING_LIST RoutingList; // Mail routing source information
  314. } SMTP_CONFIG_INFO, *LPSMTP_CONFIG_INFO;
  315. NET_API_STATUS
  316. NET_API_FUNCTION
  317. SmtpGetAdminInformation(
  318. IN LPWSTR pszServer OPTIONAL,
  319. OUT LPSMTP_CONFIG_INFO * ppConfig,
  320. DWORD dwInstance
  321. );
  322. NET_API_STATUS
  323. NET_API_FUNCTION
  324. SmtpSetAdminInformation(
  325. IN LPWSTR pszServer OPTIONAL,
  326. IN LPSMTP_CONFIG_INFO pConfig,
  327. IN DWORD dwInstance
  328. );
  329. NET_API_STATUS
  330. NET_API_FUNCTION
  331. SmtpGetConnectedUserList(
  332. IN LPWSTR pszServer OPTIONAL,
  333. OUT LPSMTP_CONN_USER_LIST *ppConnUserList,
  334. IN DWORD dwInstance
  335. );
  336. NET_API_STATUS
  337. NET_API_FUNCTION
  338. SmtpDisconnectUser(
  339. IN LPWSTR pszServer OPTIONAL,
  340. IN DWORD dwUserId,
  341. IN DWORD dwInstance
  342. );
  343. NET_API_STATUS
  344. NET_API_FUNCTION
  345. SmtpRenameDomain(
  346. IN LPWSTR wszServerName,
  347. IN LPWSTR wszOldDomainName,
  348. IN LPWSTR wszNewDomainName,
  349. IN DWORD dwInstance
  350. );
  351. NET_API_STATUS
  352. NET_API_FUNCTION
  353. SmtpGetLocalDomains(
  354. IN LPWSTR wszServerName,
  355. OUT LPSMTP_CONFIG_DOMAIN_LIST *ppDomainList,
  356. IN DWORD dwInstance
  357. );
  358. NET_API_STATUS
  359. NET_API_FUNCTION
  360. SmtpAddLocalDomain(
  361. IN LPWSTR wszServerName,
  362. IN LPWSTR wszLocalDomain,
  363. IN DWORD dwInstance
  364. );
  365. NET_API_STATUS
  366. NET_API_FUNCTION
  367. SmtpDelLocalDomain(
  368. IN LPWSTR wszServerName,
  369. IN LPWSTR wszLocalDomain,
  370. IN DWORD dwInstance
  371. );
  372. //
  373. // User config
  374. //
  375. #define FC_SMTP_USER_PROPS_FORWARD ((FIELD_CONTROL)BitFlag(0))
  376. #define FC_SMTP_USER_PROPS_MAILBOX_SIZE ((FIELD_CONTROL)BitFlag(1))
  377. #define FC_SMTP_USER_PROPS_VROOT ((FIELD_CONTROL)BitFlag(2))
  378. #define FC_SMTP_USER_PROPS_LOCAL ((FIELD_CONTROL)BitFlag(3))
  379. #define FC_SMTP_USER_PROPS_MAILBOX_MESSAGE_SIZE ((FIELD_CONTROL)BitFlag(4))
  380. #define FC_SMTP_USER_PROPS_ALL ( \
  381. FC_SMTP_USER_PROPS_FORWARD | \
  382. FC_SMTP_USER_PROPS_MAILBOX_SIZE | \
  383. FC_SMTP_USER_PROPS_VROOT | \
  384. FC_SMTP_USER_PROPS_LOCAL |\
  385. FC_SMTP_USER_PROPS_MAILBOX_MESSAGE_SIZE \
  386. )
  387. #if defined(MIDL_PASS)
  388. #define MIDL(x) x
  389. #else
  390. #define MIDL(x)
  391. #endif
  392. typedef struct _SMTP_USER_PROPS
  393. {
  394. FIELD_CONTROL fc;
  395. LPWSTR wszForward;
  396. DWORD dwMailboxMax;
  397. LPWSTR wszVRoot;
  398. DWORD dwLocal;
  399. DWORD dwMailboxMessageMax;
  400. } SMTP_USER_PROPS, *LPSMTP_USER_PROPS;
  401. NET_API_STATUS
  402. NET_API_FUNCTION
  403. SmtpCreateUser(
  404. IN LPWSTR wszServerName,
  405. IN LPWSTR wszEmail,
  406. IN LPWSTR wszForwardEmail,
  407. IN DWORD dwLocal,
  408. IN DWORD dwMailboxSize,
  409. IN DWORD dwMailboxMessageSize,
  410. IN LPWSTR wszVRoot,
  411. IN DWORD dwInstance
  412. );
  413. NET_API_STATUS
  414. NET_API_FUNCTION
  415. SmtpDeleteUser(
  416. IN LPWSTR wszServerName,
  417. IN LPWSTR wszEmail,
  418. IN DWORD dwInstance
  419. );
  420. NET_API_STATUS
  421. NET_API_FUNCTION
  422. SmtpGetUserProps(
  423. IN LPWSTR wszServerName,
  424. IN LPWSTR wszEmail,
  425. OUT LPSMTP_USER_PROPS *ppUserProps,
  426. IN DWORD dwInstance
  427. );
  428. NET_API_STATUS
  429. NET_API_FUNCTION
  430. SmtpSetUserProps(
  431. IN LPWSTR wszServerName,
  432. IN LPWSTR wszEmail,
  433. IN LPSMTP_USER_PROPS pUserProps,
  434. IN DWORD dwInstance
  435. );
  436. NET_API_STATUS
  437. NET_API_FUNCTION
  438. SmtpCreateDistList(
  439. IN LPWSTR wszServerName,
  440. IN LPWSTR wszEmail,
  441. IN DWORD dwType,
  442. IN DWORD dwInstance
  443. );
  444. NET_API_STATUS
  445. NET_API_FUNCTION
  446. SmtpDeleteDistList(
  447. IN LPWSTR wszServerName,
  448. IN LPWSTR wszEmail,
  449. IN DWORD dwInstance
  450. );
  451. NET_API_STATUS
  452. NET_API_FUNCTION
  453. SmtpCreateDistListMember(
  454. IN LPWSTR wszServerName,
  455. IN LPWSTR wszEmail,
  456. IN LPWSTR wszEmailMember,
  457. IN DWORD dwInstance
  458. );
  459. NET_API_STATUS
  460. NET_API_FUNCTION
  461. SmtpDeleteDistListMember(
  462. IN LPWSTR wszServerName,
  463. IN LPWSTR wszEmail,
  464. IN LPWSTR wszEmailMember,
  465. IN DWORD dwInstance
  466. );
  467. NET_API_STATUS
  468. NET_API_FUNCTION
  469. SmtpGetNameList(
  470. IN LPWSTR wszServer,
  471. IN LPWSTR wszEmail,
  472. IN DWORD dwType,
  473. IN DWORD dwRowsReq,
  474. IN BOOL fForward,
  475. OUT LPSMTP_NAME_LIST *ppNameList,
  476. IN DWORD dwInstance
  477. );
  478. NET_API_STATUS
  479. NET_API_FUNCTION
  480. SmtpGetNameListFromList(
  481. IN LPWSTR wszServerName,
  482. IN LPWSTR wszEmailList,
  483. IN LPWSTR wszEmail,
  484. IN DWORD dwType,
  485. IN DWORD dwRowsRequested,
  486. IN BOOL fForward,
  487. OUT LPSMTP_NAME_LIST *ppNameList,
  488. IN DWORD dwInstance
  489. );
  490. NET_API_STATUS
  491. NET_API_FUNCTION
  492. SmtpGetVRootSize(
  493. IN LPWSTR wszServerName,
  494. IN LPWSTR wszVRoot,
  495. IN LPDWORD pdwBytes,
  496. IN DWORD dwInstance
  497. );
  498. NET_API_STATUS
  499. NET_API_FUNCTION
  500. SmtpBackupRoutingTable(
  501. IN LPWSTR wszServerName,
  502. IN LPWSTR wszPath,
  503. IN DWORD dwInstance
  504. );
  505. // ===================================================
  506. // SMTP SDK RPCs
  507. //
  508. NET_API_STATUS
  509. NET_API_FUNCTION
  510. SmtpGetUserProfileInformation(
  511. IN LPWSTR pszServer OPTIONAL,
  512. IN LPWSTR wszEmail,
  513. IN OUT LPSSE_USER_PROFILE_INFO lpProfileInfo,
  514. IN DWORD dwInstance
  515. );
  516. NET_API_STATUS
  517. NET_API_FUNCTION
  518. SmtpSetUserProfileInformation(
  519. IN LPWSTR pszServer OPTIONAL,
  520. IN LPWSTR wszEmail,
  521. IN LPSSE_USER_PROFILE_INFO lpProfileInfo,
  522. IN DWORD dwInstance
  523. );
  524. //
  525. // Get Server Statistics
  526. //
  527. NET_API_STATUS
  528. NET_API_FUNCTION
  529. SmtpQueryStatistics(
  530. IN LPWSTR ServerName OPTIONAL,
  531. IN DWORD Level,
  532. OUT LPBYTE * Buffer
  533. );
  534. //
  535. // Clear server statistics
  536. //
  537. NET_API_STATUS
  538. NET_API_FUNCTION
  539. SmtpClearStatistics(
  540. IN LPWSTR ServerName OPTIONAL,
  541. IN DWORD dwInstance
  542. );
  543. //
  544. // Used to free buffers returned by APIs
  545. //
  546. VOID
  547. SmtpFreeBuffer(
  548. LPVOID Buffer
  549. );
  550. //
  551. // AQ Admin APIs
  552. //
  553. #include <aqadmtyp.h>
  554. NET_API_STATUS
  555. NET_API_FUNCTION
  556. SmtpAQApplyActionToLinks(
  557. LPWSTR wszServer,
  558. LPWSTR wszInstance,
  559. LINK_ACTION laAction);
  560. NET_API_STATUS
  561. NET_API_FUNCTION
  562. SmtpAQApplyActionToMessages(
  563. LPWSTR wszServer,
  564. LPWSTR wszInstance,
  565. QUEUELINK_ID *pqlQueueLinkId,
  566. MESSAGE_FILTER *pmfMessageFilter,
  567. MESSAGE_ACTION maMessageAction,
  568. DWORD *pcMsgs);
  569. NET_API_STATUS
  570. NET_API_FUNCTION
  571. SmtpAQGetQueueInfo(
  572. LPWSTR wszServer,
  573. LPWSTR wszInstance,
  574. QUEUELINK_ID *pqlQueueId,
  575. QUEUE_INFO *pqiQueueInfo);
  576. NET_API_STATUS
  577. NET_API_FUNCTION
  578. SmtpAQGetLinkInfo(
  579. LPWSTR wszServer,
  580. LPWSTR wszInstance,
  581. QUEUELINK_ID *pqlLinkId,
  582. LINK_INFO *pliLinkInfo);
  583. NET_API_STATUS
  584. NET_API_FUNCTION
  585. SmtpAQSetLinkState(
  586. LPWSTR wszServer,
  587. LPWSTR wszInstance,
  588. QUEUELINK_ID *pqlLinkId,
  589. LINK_ACTION la);
  590. NET_API_STATUS
  591. NET_API_FUNCTION
  592. SmtpAQGetLinkIDs(
  593. LPWSTR wszServer,
  594. LPWSTR wszInstance,
  595. DWORD *pcLinks,
  596. QUEUELINK_ID **rgLinks);
  597. NET_API_STATUS
  598. NET_API_FUNCTION
  599. SmtpAQGetQueueIDs(
  600. LPWSTR wszServer,
  601. LPWSTR wszInstance,
  602. QUEUELINK_ID *pqlLinkId,
  603. DWORD *pcQueues,
  604. QUEUELINK_ID **rgQueues);
  605. NET_API_STATUS
  606. NET_API_FUNCTION
  607. SmtpAQGetMessageProperties(
  608. LPWSTR wszServer,
  609. LPWSTR wszInstance,
  610. QUEUELINK_ID *pqlQueueLinkId,
  611. MESSAGE_ENUM_FILTER *pmfMessageEnumFilter,
  612. DWORD *pcMsgs,
  613. MESSAGE_INFO **rgMsgs);
  614. #ifdef __cplusplus
  615. }
  616. #endif
  617. #endif _SMTPAPI_