20 #define USE_RAW_CONTENT 1 21 #undef USE_RAW_CONTENT 28 #include <seclabel_api.h> 30 #include <sys/types.h> 43 struct X400mtSession *sp
45 static int add_single_recip(
46 struct X400mtMessage *mp
48 static int add_primary_recip(
49 struct X400mtMessage *mp
51 static int add_exempt_address(
52 struct X400mtMessage *mp
54 static int add_address_list_indicator(
55 struct X400mtMessage *mp
58 static int add_handling_instructions(
59 struct X400mtMessage *mp
62 #ifdef add_multi_recips 63 static int add_multi_recips(
64 struct X400mtMessage *mp
66 static int add_content_recip_info(
67 struct X400Recipient *rp,
68 const char *free_form_name
72 struct X400mtMessage *mp
74 static int build_content(
75 struct X400mtMessage *mp
77 static int add_binary_bp(
78 struct X400mtMessage *mp
80 static int add_gen_txt_bp(
81 struct X400mtMessage *mp
83 static int add_env_recip_info(
84 struct X400Recipient *rp
86 static void usage(
void);
88 static char * set_latest_del_time(
void);
90 static int fwd_rno = 1;
97 #define ADD_FWD_BODYPART 1 98 #ifdef ADD_FWD_BODYPART 99 static int add_fwd_bodypart(
100 struct X400mtMessage *mp
103 static int build_fwd_env (
104 struct X400Message *mp
107 static int build_fwd_content (
108 struct X400Message *mp
111 static int add_fwd_recip(
112 struct X400Message *mp,
113 const char *oraddress,
117 static int create_fw_message(
118 struct X400Message *mp
121 static int add_fwd_content_bodypart (
122 struct X400mtMessage *mp
125 static int add_dl_exempted_recip_list (
126 struct X400mtMessage *mp
138 #define HOSTNAME "dhcp-165" 143 #define USE_P772_EXTS 1 146 #define WANT_EXTERNAL_CONTENT_TYPE 1 148 static char *optstr =
"uG:O:r:g:G:c:l:R:y:C:iaqsAvf:X:S:";
152 static const char *orig;
154 static const char *fwd_orig;
155 static const char *fwd_recip;
157 static const char orig_ret_addr[] =
"/S=x400test-orig/OU="HOSTNAME
"/O=GatewayMTA/PRMD=TestPRMD/ADMD=TestADMD/C=GB/";
162 static char *exemp_recip;
164 static const char recip2[] =
"/S=x400test-recip2/OU="HOSTNAME
"/O=GatewayMTA/PRMD=TestPRMD/ADMD=TestADMD/C=GB/";
166 static const char badrecip[] =
"/S=x400test-recip2/OU=badhost/O=TestOrg/PRMD=TestPRMD/ADMD=TestADMD/C=GB/";
167 static const char auth_orig[] =
"/S=x400test-auth-orig/OU="HOSTNAME
"/O=TestOrg/PRMD=TestPRMD/ADMD=TestADMD/C=GB/";
170 static const char orar[] =
"/S=x400test-orig-orar/OU="HOSTNAME
"/O=TestOrg/PRMD=TestPRMD/ADMD=TestADMD/C=GB/";
172 static const char orardn[] =
"CN=alternative,c=gb";
175 #ifdef WANT_EXTERNAL_CONTENT_TYPE 176 static char *def_ext_content_type =
"1.3.26.0.4406.0.4.1";
178 static int def_bool = 0;
179 static int def_priority = 2;
182 static const char def_msgid[] =
"P772 MessageType identifier";
183 static const char def_utc[] =
"050924120000";
185 static const char msg_id[] =
"/PRMD=TestPRMD/ADMD=TestADMD/C=GB/;"HOSTNAME
".2810401";
186 static const char content_id[] =
"030924.140212";
187 static const char fwd_msg_id[] =
"/PRMD=TestFWDPRMD/ADMD=TestADMD/C=GB/;"HOSTNAME
".2810401";
190 static const char distvalue1[] = { 0x02, 0x01, 0x0a };
192 static const char distvalue2[] = { 0x13, 0x0a, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a};
194 static const char corr_octet[] = { 0x02, 0x01, 0x0a };
197 static const int importance = 2;
198 static const int sensitivity = 3;
199 static const int autoforwarded = 1;
202 static const char text[] =
"First line\r\nSecond line\r\n";
203 static const char ipm_id[] =
"1064400656.24922*";
204 static const char ipm_rep_id[] =
"1064400656.24923*";
205 static const char ipm_obs_id[] =
"1064400656.24924*";
206 static const char ipm_rel_id[] =
"1064400656.24925*";
207 static const char orig_ref[] =
"orig-ref-val";
210 #define XML_BUFSIZE 1024 211 #define STRING_BUFSIZE 1024 221 return send_msgs (argc, argv);
224 static int send_msgs (
230 struct X400mtSession *sp;
232 if (get_args(argc, argv, optstr)) {
237 orig = strdup(x400_default_gw_originator);
238 recip = strdup(x400_default_gw_recipient);
239 exemp_recip = strdup(x400_default_exempted_recipient);
240 fwd_orig = strdup(x400_default_fwd_originator);
241 fwd_recip = strdup(x400_default_fwd_recipient);
243 if (x400_channel == NULL) {
244 fprintf (stderr,
"No x400_channel value set in x400tailor file");
251 fprintf (stderr,
"Error in Open: %s\n",
X400mtError (status));
264 while (num_msgs_to_send-- > 0)
266 status = send_msg(sp);
268 fprintf (stderr,
"Error in send_msg: %s\n",
X400mtError (status));
278 struct X400mtSession *sp
282 struct X400mtMessage *mp;
290 printf(
"originator of msg is %s\n", orig);
296 status = add_single_recip(mp);
299 status = add_primary_recip(mp);
303 status = build_env(mp);
307 status = build_content(mp);
310 #ifdef HANDLING_MILITARY_IPN 313 struct X400ACP127Resp *resp = NULL;
314 struct X400ALI *ali1 = NULL;
315 struct X400ALI *ali2 = NULL;
370 "/cn=acp127ali1/PRMD=TestPRMD/ADMD=TestADMD/C=GB", -1);
374 "cn=acp127ali1,c=gb", -1);
378 "ACP127 Mr Address List Indicator1", -1);
398 "/cn=acp127ali2/PRMD=TestPRMD/ADMD=TestADMD/C=GB", -1);
402 "cn=acp127ali2,c=gb", -1);
406 "ACP127 Mr Address List Indicator2", -1);
421 fprintf (stderr,
"Temporary error in MsgSend: %s\n",
X400mtError (status));
422 printf(
"Press return to try again > ");
423 ic_fgets (foo,
sizeof foo, stdin);
425 fprintf (stderr,
"Error in MsgSend: %s\n",
X400mtError (status));
437 static int add_primary_recip(
438 struct X400mtMessage *mp
441 struct X400Recipient *rp;
444 printf(
"Adding primary recip with only FreeForm name\n");
454 static int add_single_recip(
455 struct X400mtMessage *mp
458 struct X400Recipient *rp;
461 printf(
"Adding single recip %s\n", recip);
469 status = add_env_recip_info (rp);
473 status = add_dl_exempted_recip_list (mp);
477 #define USE_REDIRECTION_HISTORY 1 478 #ifdef USE_REDIRECTION_HISTORY 480 struct X400RediHist *hist1;
481 struct X400RediHist *hist2;
485 fprintf(stderr,
"Failed to allocate new redirection history object \n");
496 "Failed to add X400_S_REDIRECTION_TIME to Redirection Hist\n");
502 "/cn=redihist/prmd=TestPRMD/admd=TestPRMD/C=gb",
506 "Failed to add X400_S_OR_ADDRESS to Redirection Hist\n");
516 "Failed to add X400_S_DIRECTORY_NAME to Redirection Hist\n");
526 "Failed to add X400_N_REDIRECTION_REASON to trace info\n");
534 fprintf(stderr,
"Failed to allocate new trace info object \n");
545 "Failed to add X400_S_REDIRECTION_TIME to Redirection Hist\n");
551 "/cn=redihist2/prmd=TestPRMD/admd=TestPRMD/C=gb",
555 "Failed to add X400_S_OR_ADDRESS to Redirection Hist\n");
565 "Failed to add X400_S_DIRECTORY_NAME to Redirection Hist\n");
575 "Failed to add X400_N_REDIRECTION_REASON to " 576 "Redirection Hist\n");
606 static int add_exempt_address(
607 struct X400mtMessage *mp
610 struct X400Recipient *rp;
611 struct X400Recipient *rp2;
613 printf(
"Adding exempted recip %s\n", exemp_recip);
623 "cn=exemprecip,c=gb", -1);
639 "/CN=exemp2/PRMD=TestPRMD/ADMD=TestADMD/C=GB", -1);
644 static int add_address_list_indicator(
645 struct X400mtMessage *mp
648 struct X400ALI *ali = NULL;
649 struct X400ALI *ali2 = NULL;
652 printf(
"Adding address list indicators\n");
668 "/cn=ALI1/PRMD=TestPRMD/ADMD=TestADMD/C=GB", -1);
676 "Mr Address List Indicator1", -1);
687 "/CN=ALI2/PRMD=TestPRMD/ADMD=TestADMD/C=GB", -1);
702 static int add_handling_instructions(
703 struct X400mtMessage *mp
706 struct X400PSS *pss = NULL;
707 struct X400PSS *pss2 = NULL;
710 printf(
"Adding handling instructions\n");
718 "Handling instruction1",
728 "Handling instruction2",
736 static int add_message_instructions(
737 struct X400mtMessage *mp
740 struct X400PSS *pss = NULL;
741 struct X400PSS *pss2 = NULL;
744 printf(
"Adding Message instructions\n");
752 "Message instruction1",
762 "Message instruction2",
770 static int add_dist_codes_sic(
771 struct X400mtMessage *mp
774 struct X400PSS *pss = NULL;
775 struct X400PSS *pss2 = NULL;
776 struct X400DistField *distfield1 = NULL;
777 struct X400DistField *distfield2 = NULL;
780 printf(
"Adding Distribution Codes\n");
838 static int add_other_recipient_indicator(
839 struct X400mtMessage *mp
842 struct X400OtherRecip *rp = NULL;
843 struct X400OtherRecip *rp2 = NULL;
846 printf(
"Adding Other Recipient Indicators\n");
877 #ifdef add_multi_recips 878 static int add_multi_recips(
879 struct X400mtMessage *mp
882 struct X400Recipient *rp;
885 printf(
"Adding multiple recips\n");
893 status = add_env_recip_info (rp);
923 status = add_content_recip_info (rp, recip);
933 status = add_content_recip_info (rp, recip2);
961 static int build_env(
962 struct X400mtMessage *mp
969 #ifdef WANT_EXTERNAL_CONTENT_TYPE 971 def_ext_content_type, -1);
975 #ifdef WANT_DL_EXP_HIST 978 struct X400DLExpHist *hist;
984 x400_default_gw_dlexphist1_or,
990 x400_default_gw_dlexphist1_dn,
1006 x400_default_gw_dlexphist2_or,
1012 x400_default_gw_dlexphist2_dn,
1018 "070801120000+0100",
1027 #ifdef USE_SEC_LABEL 1032 const char* xml_filename =
"seclabel.xml";
1033 char xml_content[XML_BUFSIZE];
1034 char str_content[STRING_BUFSIZE];
1035 int str_len = STRING_BUFSIZE;
1039 fd = fopen(xml_filename,
"r");
1041 fprintf(stderr,
"Failed to open %s : %s\n",
1042 xml_filename,strerror(errno));
1045 fread(&xml_content,XML_BUFSIZE,1,fd);
1049 status = SecLabelInit(
"Example program");
1050 if (status != SECLABEL_E_NOERROR) {
1051 fprintf(stderr,
"SecLabelInit returned error %d\n", status);
1056 status = SecLabelParse(xml_content,
1061 if (status != SECLABEL_E_NOERROR) {
1062 fprintf(stderr,
"SecLabelParse returned error %d\n", status);
1068 str_content,str_len);
1070 fprintf (stderr,
"x400mtMsgAddStrParam returned error: %s\n",
X400mtError (status));
1077 #define ADD_TRACE_INFO 1 1078 #ifdef ADD_TRACE_INFO 1080 struct X400TraceInfo *info1;
1081 struct X400TraceInfo *info2;
1085 fprintf(stderr,
"Failed to allocate new trace info object \n");
1092 "/PRMD=wibble/ADMD=TestADMD/C=GB/",
1096 "Failed to add X400_S_GLOBAL_DOMAIN_ID to trace info\n");
1106 "Failed to add X400_S_DSI_ARRIVAL_TIME to trace info\n");
1113 "/PRMD=atmpdom/ADMD=TestADMD/C=GB/",
1117 "Failed to add X400_S_DSI_ATTEMPTED_DOMAIN to trace info\n");
1129 "Failed to add X400_S_DSI_AA_DEF_TIME to trace info\n");
1140 "Failed to add X400_S_DSI_AA_CEIT to trace info\n");
1149 "Failed to add X400_N_DSI_ROUTING_ACTION to trace info\n");
1158 "Failed to add X400_N_DSI_AA_REDIRECTED to trace info\n");
1167 "Failed to add X400_N_DSI_AA_DLOPERATION to trace info\n");
1175 fprintf(stderr,
"Failed to allocate new trace info object \n");
1182 "/PRMD=fluffy/ADMD=TestADMD/C=GB/",
1186 "Failed to add X400_S_GLOBAL_DOMAIN_ID to trace info\n");
1196 "Failed to add X400_S_DSI_ARRIVAL_TIME to trace info\n");
1205 "Failed to add X400_N_DSI_AA_REDIRECTED to trace info\n");
1214 "Failed to add X400_N_DSI_AA_DLOPERATION to trace info\n");
1222 #define USE_INTERNAL_TRACE_INFO 1 1223 #ifdef USE_INTERNAL_TRACE_INFO 1225 struct X400InternalTraceInfo *int_info1;
1229 fprintf(stderr,
"Failed to allocate new trace info object \n");
1236 "/PRMD=intprmd/ADMD=TestADMD/C=GB/",
1240 "Failed to add X400_S_GLOBAL_DOMAIN_ID to trace info\n");
1251 "Failed to add X400_S_MTA_NAME to trace info\n");
1263 "Failed to add X400_S_MTA_SI_TIME to trace info\n");
1274 "Failed to add X400_N_MTA_SI_ROUTING_ACTION to trace info\n");
1281 "Attempted MTA name 1",
1285 "Failed to add X400_S_MTA_SI_ATTEMPTED_MTA to trace info\n");
1310 "Failed to add X400_S_MTA_SI_DEFERRED_TIME to trace info\n");
1320 "Failed to add X400_S_MTA_SI_DEFERRED_TIME to trace info\n");
1330 "Failed to add X400_N_MTA_SI_OTHER_ACTIONS to trace info\n");
1340 "Failed to add X400_N_MTA_SI_OTHER_ACTIONS to trace info\n");
1400 char *latest_time = set_latest_del_time();
1431 static int build_content(
1432 struct X400mtMessage *mp
1436 #ifdef USE_RAW_CONTENT 1439 char buf[10 * 1024];
1442 fd = open(
"./p22", O_RDONLY);
1444 printf(
"Failed to open p22 file in cwd");
1448 len = read(fd, buf, 10 * 1024);
1451 if (len == 10 * 1024) {
1452 printf(
"p22 file too long to read");
1488 #ifdef X400_1999_SUPPORTED 1512 status = add_binary_bp(mp);
1516 status = add_gen_txt_bp(mp);
1520 #ifdef ADD_FWD_BODYPART 1522 status = add_fwd_bodypart(mp);
1528 status = add_fwd_content_bodypart(mp);
1535 #ifdef USE_P772_EXTS 1536 status = add_exempt_address(mp);
1566 status = add_address_list_indicator(mp);
1570 status = add_handling_instructions(mp);
1574 status = add_message_instructions(mp);
1578 status = add_dist_codes_sic(mp);
1590 status = add_other_recipient_indicator(mp);
1604 char *pilot_ber = NULL;
1606 if (load_ber(
"pilot_fwd_info.ber",&pilot_ber,&buf_len) == 0) {
1607 printf(
"Adding pilot forwarding info\n");
1613 printf(
"unable to add pilot forwarding info\n");
1631 char *sec_label_ber = NULL;
1633 if (load_ber(
"info_sec_label.ber",&sec_label_ber,&buf_len) == 0) {
1634 printf(
"Adding information security label\n");
1636 sec_label_ber,buf_len);
1637 free(sec_label_ber);
1640 printf(
"unable to add information security labels\n");
1641 free(sec_label_ber);
1649 struct X400Bodypart *ADatP3 = NULL;
1664 "The first ADatP3 Data value",
1672 struct X400Bodypart *ADatP3 = NULL;
1687 "The second ADatP3 Data value\r\n" 1688 "The third ADatP3 Data value\r\n" 1689 "The fourth ADatP3 Data value\r\n",
1697 struct X400Bodypart *corrections = NULL;
1710 "A simple P772 correction",
1718 struct X400Bodypart *acp127data = NULL;
1731 "A simple P772 ACP127 Data IA5Text",
1737 #ifdef ADD_FWD_BODYPART 1740 struct X400Message *msg = NULL;
1749 status = create_fw_message(msg);
1753 def_ext_content_type, (
size_t)-1);
1763 char *encrypted_data = NULL;
1764 int encrypted_data_len;
1765 struct X400Message *msg = NULL;
1772 if (load_ber(
"pilot_fwd_info.ber",&encrypted_data,&encrypted_data_len)
1774 fprintf(stderr,
"Failed to load Fwd Enc data\n");
1775 free(encrypted_data);
1786 free(encrypted_data);
1795 status = create_fw_message(msg);
1797 free(encrypted_data);
1808 def_ext_content_type, (
size_t)-1);
1810 free(encrypted_data);
1816 encrypted_data, encrypted_data_len);
1817 free(encrypted_data);
1837 char *cert_ber = NULL;
1839 if (load_ber(
"1137492922.p12",&cert_ber,&buf_len) == 0) {
1840 printf(
"Adding sample originator cert\n");
1846 printf(
"unable to add originator certificate\n");
1858 char *moac_ber = NULL;
1860 if (load_ber(
"MOAC.ber",&moac_ber,&buf_len) == 0) {
1861 printf(
"Adding MOAC\n");
1867 printf(
"unable to add originator certificate\n");
1878 static int add_gen_txt_bp(
1879 struct X400mtMessage *mp
1883 struct X400Bodypart *GenTxt = NULL;
1902 "This is some General Text data",
1907 static int add_binary_bp(
1908 struct X400mtMessage *mp
1917 if (filename_to_send != NULL) {
1918 fp = fopen(filename_to_send,
"rb");
1919 if (fp == (FILE *)NULL) {
1920 printf(
"Cannot open binary file\n");
1923 binary_data = (
char *) malloc(bin_bp_size);
1924 if ( binary_data == NULL )
1926 if ((fs = fread (binary_data,
sizeof(
char),
1927 bin_bp_size/
sizeof(
char), fp) ) == -1) {
1928 printf(
"Cannot read from binary file\n");
1934 if (fs < bin_bp_size) {
1935 printf(
"Cannot read %d bytes from binary file (got %d)\n",
1944 printf(
"failed to add X400_T_BINARY BP\n");
1948 printf(
"no binary file set - not sending X400_T_BINARY\n");
1953 static int add_env_recip_info(
1954 struct X400Recipient *rp
1986 #ifdef add_multi_recips 1987 static int add_content_recip_info(
1988 struct X400Recipient *rp,
1989 const char *free_form_name
2009 static void usage(
void) {
2010 printf(
"usage: %s\n", optstr);
2011 printf(
"\t where:\n");
2012 printf(
"\t -u : Don't prompt to override defaults \n");
2013 printf(
"\t -G : Originator \n");
2014 printf(
"\t -O : Originator Return Address \n");
2015 printf(
"\t -g : Recipient\n");
2016 printf(
"\t -c : X.400 passive channel\n");
2017 printf(
"\t -l : Logline\n");
2018 printf(
"\t -R : Reports (0 - never, 1 - always, 2 - always NDR \n");
2019 printf(
"\t -y : Priority (0 - normal, 1 - non-urgent, 2 - urgent \n");
2020 printf(
"\t -C : Content Type (2/22/772/OID) \n");
2021 printf(
"\t -i : Implicit conversion prohibited = TRUE \n");
2022 printf(
"\t -a : Alternate Recipient Prohibited = TRUE \n");
2023 printf(
"\t -q : Content Return Request = TRUE \n");
2024 printf(
"\t -s : Disclosure of Recipient = FALSE \n");
2025 printf(
"\t -A : Recipient Reassignment Prohibited = FALSE \n");
2026 printf(
"\t -v : Conversion with Loss Prohibited = FALSE \n");
2027 printf(
"\t -f : Filename to transfer as binary bp\n");
2028 printf(
"\t -X : Number of messages to send\n");
2029 printf(
"\t -S : Size of binary attachment (requires -f)\n");
2034 char *set_latest_del_time(
2038 static char latest_del_time[BUFSIZ];
2042 now_secs += 60*60*24*2;
2044 strftime(latest_del_time,
2048 return strdup(latest_del_time);
2054 static int load_ber(
2056 char **output_buffer,
2063 struct stat stat_info;
2065 if (stat(filename, &stat_info)!=0) {
2066 fprintf(stderr,
"Failed to stat %s : %s\n",
2067 filename,strerror(errno));
2071 *output_buffer = (
char*) malloc (
sizeof(
char) * stat_info.st_size);
2073 fd = fopen(filename,
"r");
2075 fprintf(stderr,
"Failed to open %s : %s\n",
2076 filename,strerror(errno));
2080 fread(*output_buffer,stat_info.st_size,1,fd);
2083 *buf_len = stat_info.st_size;
2088 #ifdef ADD_FWD_BODYPART 2089 static int add_fwd_bodypart(
2090 struct X400mtMessage *mp
2094 struct X400Message *mbp;
2098 fprintf(stderr,
"add_fwd_bodypart: %s\n",
X400mtError(status));
2102 status = create_fw_message(mbp);
2104 fprintf(stderr,
"failed to create fwd message\n");
2112 static int build_fwd_env (
2113 struct X400Message *mp
2134 "070801120000+0100",
2140 "070801120000+0100",
2201 char *latest_time = set_latest_del_time();
2205 latest_time, (
size_t)-1);
2212 static int build_fwd_content (
2213 struct X400Message *mp
2260 "This is a forwarded test message", (
size_t)-1);
2266 static int add_fwd_recip(
2267 struct X400Message *mp,
2268 const char *oraddress,
2272 struct X400Recipient *rp;
2277 fprintf(stderr,
"Failed to create new \n");
2283 fprintf(stderr,
"Failed to add fwd recipient\n");
2307 static int create_fw_message(
2308 struct X400Message *mp
2319 fprintf(stderr,
"Failed to added forwarded originator\n");
2325 fprintf(stderr,
"Failed to added forwarded originator\n");
2329 status = build_fwd_env(mp);
2331 fprintf(stderr,
"Failed to build forwarded message envelope\n");
2335 status = build_fwd_content(mp);
2337 fprintf(stderr,
"Failed to build forwarded message content\n");
2347 static int add_fwd_content_bodypart (
2348 struct X400mtMessage *mp
2353 char *fwd_content_ber = NULL;
2354 struct X400Message *mbp;
2360 fprintf(stderr,
"add_fwd_bodypart: %s\n",
X400mtError(status));
2364 status = create_fw_message(mbp);
2368 def_ext_content_type, (
size_t)-1);
2371 if (load_ber(
"example_fwd_content.ber",&fwd_content_ber,&buf_len) == 0) {
2372 printf(
"Adding forwarded content string\n");
2375 fwd_content_ber, buf_len);
2376 free(fwd_content_ber);
2382 printf(
"unable to add forwarded content info\n");
2383 free(fwd_content_ber);
2395 static int add_dl_exempted_recip_list (
2396 struct X400mtMessage *mp
2399 struct X400Recipient *rp1;
2400 struct X400Recipient *rp2;
2401 struct X400Recipient *rp3;
2408 "/cn=x411exempted1/PRMD=TestPRMD/" 2409 "ADMD=TestADMD/C=GB", -1);
2416 "/cn=x411exempted2/PRMD=TestPRMD/" 2417 "ADMD=TestADMD/C=GB", -1);
2424 "/cn=x411exempted3/PRMD=TestPRMD/" 2425 "ADMD=TestADMD/C=GB", -1);
#define X400_S_DIRECTORY_NAME
#define X400_S_EXTERNAL_CONTENT_TYPE
#define X400_S_ORIGINATOR_REQUESTED_ALTERNATE_RECIPIENT
#define X400_S_MTA_SI_DEFERRED_TIME
#define X400_N_EXT_MSG_TYPE
#define X400_ACP127_NOTI_TYPE_POS
#define X400_S_ORIGINATOR_RETURN_ADDRESS
#define X400_N_IMPLICIT_CONVERSION_PROHIBITED
#define X400_EXEMPTED_ADDRESS
#define X400_S_DIST_CODES_EXT_OID
#define X400_S_DLEXP_TIME
#define X400_DL_EXEMPTED_RECIP
#define X400_S_LOG_CONFIGURATION_FILE
#define X400_S_EXT_AUTH_INFO
int X400mtMsgAddMessageBody(struct X400mtMessage *mp, struct X400Message *mbp)
#define X400_T_GENERAL_TEXT
#define X400_N_EXT_CODRESS
#define X400_N_ADATP3_PARM
int X400mtDLExpHistNew(struct X400mtMessage *mp, struct X400DLExpHist **histp)
Create a new DL Expansion History object, and associate it with the existing message.
#define X400_S_CONTENT_IDENTIFIER
X400COMMON_CDECL int X400RediHistAddIntParam(struct X400RediHist *hist, int paramtype, int value)
Set an integer value in a Redirection History object.
X400COMMON_CDECL int X400MsgAddRecip(struct X400Message *mp, int reciptype, struct X400Recipient *recip)
Add a recipient object to the message.
int X400mtOpen(const char *credentials, struct X400mtSession **spp)
Open a session to the MTA.
#define X400_N_MTA_SI_ROUTING_ACTION
X400COMMON_CDECL int X400ACP127RespAddStrParam(struct X400ACP127Resp *resp, int type, const char *value, size_t length)
Add string-valued parameter to the ACP127 Notification Response object.
#define X400_N_ADATP3_CHOICE
#define X400_S_ACP127_NOTI_RESP_RECIPIENT
int X400mtSetIntDefault(struct X400mtSession *sp, int paramtype, int value)
Set a default integer parameter value in a session.
#define X400_N_ACP127_NOTI_TYPE
X400COMMON_CDECL int X400OtherRecipAddIntParam(struct X400OtherRecip *otherrecip, int value)
Add integer parameter to the Other Recipient Indicator object.
#define X400_S_DIST_CODES_SIC
#define X400_S_MTA_SI_ATTEMPTED_MTA
int X400mtOtherRecipNew(struct X400mtMessage *mp, struct X400OtherRecip **otherrecip)
Create a new P772 Other Recipient object for a message object.
#define X400_N_ALI_REPLY_REQUEST
int X400mtMsgNew(struct X400mtSession *sp, int type, struct X400mtMessage **mpp)
Creates new message.
#define X400_N_RESPONSIBILITY
#define X400_N_ACP127DATA_PARM
#define X400_N_DSI_AA_DLOPERATION
X400COMMON_CDECL int X400PSSAddStrParam(struct X400PSS *pss, const char *value, size_t length)
Add string-valued parameter to the PSS info object.
#define X400_T_ACP127DATA
#define X400_S_ACP127_NOTI_RESP_SUPP_INFO
#define X400_N_DL_EXPANSION_PROHIBITED
X400COMMON_CDECL int X400TraceInfoAddIntParam(struct X400TraceInfo *info, int paramtype, int value)
Set an integer value in a Trace Info object.
#define X400_T_FWD_CONTENT
#define X400_S_CONTENT_CORRELATOR_IA5_STRING
#define X400_S_FREE_FORM_NAME
#define X400_S_DSI_ARRIVAL_TIME
X400COMMON_CDECL int X400ALIAddStrParam(struct X400ALI *info, int paramtype, const char *value, size_t length)
Add string-valued parameter to the ALI info object.
#define X400_S_INFO_SEC_LABEL
#define X400_S_MTA_SI_TIME
#define X400_N_DSI_AA_REDIRECTED
#define X400_S_GENERAL_TEXT_CHARSETS
#define X400_N_CONVERSION_WITH_LOSS_PROHIBITED
X400COMMON_CDECL int X400RecipAddIntParam(struct X400Recipient *rp, int paramtype, int value)
Add integer-valued parameter to the recipient.
#define X400_S_ORIGINAL_ENCODED_INFORMATION_TYPES
int X400mtRecipNew(struct X400mtMessage *mp, int type, struct X400Recipient **rpp)
Add new recipient to a message.
#define X400_N_RECIPIENT_REASSIGNMENT_PROHIBITED
int X400mtSetStrDefault(struct X400mtSession *sp, int paramtype, const char *value, size_t length)
Set a default string parameter value in a session.
#define X400_S_ACP127_MSG_ID
#define X400_S_CONTENT_STRING
#define X400_N_NOTIFICATION_REQUEST
int X400mtMsgAddIntParam(struct X400mtMessage *mp, int paramtype, int value)
Add integer-valued parameter to the message.
#define X400_S_MESSAGE_SUBMISSION_TIME
#define X400_S_EXPIRY_TIME
X400COMMON_CDECL int X400DistFieldAddStrParam(struct X400DistField *distfield, int type, const char *value, size_t length)
Add string-valued parameter to the DistField info object.
#define X400_N_EXT_COPY_PREC
X400COMMON_CDECL int X400ALIAddIntParam(struct X400ALI *info, int paramtype, int value)
Set an integer value in an Address List Indicator object.
#define X400_S_AUTHORIZATION_TIME
int X400mtRecipAddStrParam(struct X400Recipient *rp, int paramtype, const char *value, size_t length)
Add string-valued parameter to the message.
int X400mtRecipAddIntParam(struct X400Recipient *rp, int paramtype, int value)
Add integer-valued parameter to the message.
#define X400_MTA_SI_OTHER_ACTION_DLOPERATION
int X400mtMsgAddAttachment(struct X400mtMessage *mp, int type, const char *string, size_t length)
Add an attachment to the message.
#define X400_S_REDIRECTION_TIME
#define X400_S_OR_ADDRESS
#define X400_S_CONTENT_FILENAME
#define X400_N_ERROR_DUPLICATE_ATTRIBUTE
#define X400_S_RELATED_IPMS
#define X400_MTA_SI_RA_MTA
X400COMMON_CDECL int X400InternalTraceInfoAddStrParam(struct X400InternalTraceInfo *info, int paramtype, const char *value, size_t length)
Add string-valued parameter to the Internal Trace info object.
#define X400_S_MESSAGE_IDENTIFIER
const char * X400mtError(int error)
Return string for error code.
#define X400_RECIP_STANDARD
int X400mtMsgSend(struct X400mtMessage *mp)
Send message object to MTA.
#define X400_N_ALI_NOTIFICATION_REQUEST
X400COMMON_CDECL int X400BodypartNew(int type, struct X400Bodypart **bpp)
Create a new body part object.
#define X400_N_DISCLOSURE
#define X400_S_PILOT_FWD_INFO
#define X400_S_GLOBAL_DOMAIN_ID
#define X400_ACP127_NOTI_TYPE_NEG
#define X400_S_SECURITY_LABEL
#define X400_S_DIST_CODES_EXT_VALUE
X400COMMON_CDECL int X400MsgNew(int type, struct X400Message **mpp)
Creates new message.
#define X400_RECIP_PRIMARY
X400COMMON_CDECL int X400OtherRecipAddStrParam(struct X400OtherRecip *otherrecip, const char *value, size_t length)
Add string-valued parameter to the Other Recipient Indicator object.
#define X400_S_LATEST_DELIVERY_TIME
int X400mtPSSNew(struct X400mtMessage *mp, int type, struct X400PSS **pss)
Create a new Printable String Syntax object for a message object.
X400COMMON_CDECL int X400MsgAddIntParam(struct X400Message *mp, int paramtype, int value)
Add integer-valued parameter to the message.
#define X400_S_ORIGINATOR_REQUESTED_ALTERNATE_RECIPIENT_DN
#define X400_S_CORREC_DATA
#define X400_N_REPORT_REQUEST
#define X400_N_SENSITIVITY
#define X400_S_ADATP3_DATA
#define X400_S_CONTENT_CORRELATOR_OCTET_STRING
#define X400_N_MTA_SI_OTHER_ACTIONS
int X400mtDistFieldNew(struct X400mtMessage *mp, struct X400DistField **distfield)
Create a new P772 Distribution Field object for a message object.
#define X400_S_IPM_IDENTIFIER
X400COMMON_CDECL int X400ACP127RespAddIntParam(struct X400ACP127Resp *resp, int value)
Add integer parameter to the ACP127 Notification Response object.
#define X400_S_EXT_MSG_IDENTIFIER
X400COMMON_CDECL int X400TraceInfoAddStrParam(struct X400TraceInfo *info, int paramtype, const char *value, size_t length)
Add string-valued parameter to the X400TraceInfo object.
#define X400_S_ACP127_DATA
#define X400_N_IMPORTANCE
int X400mtMsgAddStrParam(struct X400mtMessage *mp, int paramtype, const char *value, size_t length)
Add string-valued parameter to the message.
#define X400_S_ACP127_NOTI_RESP_TIME
X400COMMON_CDECL int X400BodypartAddStrParam(struct X400Bodypart *bp, int paramtype, const char *value, size_t length)
Add string-valued parameter to the body part.
int X400mtClose(struct X400mtSession *sp)
Close a X400 Session.
#define X400_N_REPLY_REQUESTED
X400COMMON_CDECL int X400BodypartAddIntParam(struct X400Bodypart *bp, int paramtype, int value)
Add integer-valued parameter to the body part.
#define X400_N_ORIGINAL_RECIPIENT_NUMBER
int X400mtTraceInfoNew(struct X400mtMessage *mp, struct X400TraceInfo **info, int type)
Create a new Trace Info object for a message object.
#define X400_S_DSI_AA_CEIT
#define X400_S_FWD_CONTENT_STRING
int X400mtMsgAddBodypart(struct X400mtMessage *mp, struct X400Bodypart *bp)
Add a body part object to a message.
#define X400_RR_RECIP_ASSIGNED_ALT_RECIP
#define X400_T_CORRECTIONS
#define X400_N_EXT_PRIM_PREC
X400COMMON_CDECL int X400ACP127RespNewALI(struct X400ACP127Resp *resp, struct X400ALI **ali)
Create new Address List Indicator object associated with the X400ACP127 Resp.
X400COMMON_CDECL int X400InternalTraceInfoAddIntParam(struct X400InternalTraceInfo *info, int paramtype, int value)
Set an integer value in an Internal Trace Info object.
#define X400_S_TELEPHONE_NUMBER
#define X400_S_HANDLING_INSTRUCTIONS
X400COMMON_CDECL int X400RecipNew(int type, struct X400Recipient **rpp)
Create a new recipient object.
#define X400_E_TEMPORARY_ERROR
#define X400_N_ALTERNATE_RECIPIENT_ALLOWED
X400COMMON_CDECL int X400RediHistAddStrParam(struct X400RediHist *hist, int paramtype, const char *value, size_t length)
Add string-valued parameter to the X400RediHist object.
#define X400_ACP127_NOTI_TYPE_TRANS
X400COMMON_CDECL int X400RediHistNew(struct X400Recipient *recip, struct X400RediHist **hist)
Create a new Redirection History object.
X400COMMON_CDECL int X400MsgAddStrParam(struct X400Message *mp, int paramtype, const char *value, size_t length)
Add string-valued parameter to the message.
int X400mtMsgAddMessageBodyWType(struct X400mtMessage *mp, struct X400Message *mbp, int type)
Add a message body part object to a message.
#define X400_S_DSI_ATTEMPTED_DOMAIN
#define X400_S_PRECEDENCE_POLICY_ID
#define X400_N_MTA_REPORT_REQUEST
#define X400_S_MESSAGE_INSTRUCTIONS
#define X400_S_MTA_SI_CEIT
#define X400_N_REDIRECTION_REASON
int X400mtALINew(struct X400mtMessage *mp, struct X400ALI **ali)
Create a new Address List Indicator object for a message object.
int X400mtInternalTraceInfoNew(struct X400mtMessage *mp, struct X400InternalTraceInfo **info)
Create a new Internal Trace Info object for a message object.
#define X400_N_CORREC_PARM
#define X400_S_OBSOLETED_IPMS
#define X400_S_DSI_AA_DEF_TIME
#define X400_N_CONTENT_RETURN_REQUEST
#define X400_S_REPLY_TIME
#define X400_MTA_SI_OTHER_ACTION_REDIRECTED
X400COMMON_CDECL int X400RecipAddStrParam(struct X400Recipient *rp, int paramtype, const char *value, size_t length)
Add string-valued parameter to the recipient.
#define X400_S_REPLIED_TO_IDENTIFIER
#define X400_N_DSI_ROUTING_ACTION
#define X400_S_ORIGINATORS_REFERENCE
X400COMMON_CDECL int X400DLExpHistAddStrParam(struct X400DLExpHist *hist, int paramtype, const char *value, size_t length)
Add string-valued parameter to the X400DLExpHist object.
#define X400_S_ENCRYPTED_DATA_BYTES_ONLY
int X400mtMsgDelete(struct X400mtMessage *mp)
Delete message object.
int X400mtACP127RespNew(struct X400mtMessage *mp, struct X400ACP127Resp **respp)
Create an ACP127 Notification Response object.
#define X400_N_AUTOFORWARDED
#define X400_S_MESSAGE_DELIVERY_TIME