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 #ifdef add_multi_recips
165 static const char recip2[] =
"/S=x400test-recip2/OU="HOSTNAME
"/O=GatewayMTA/PRMD=TestPRMD/ADMD=TestADMD/C=GB/";
167 static const char badrecip[] =
"/S=x400test-recip2/OU=badhost/O=TestOrg/PRMD=TestPRMD/ADMD=TestADMD/C=GB/";
168 static const char auth_orig[] =
"/S=x400test-auth-orig/OU="HOSTNAME
"/O=TestOrg/PRMD=TestPRMD/ADMD=TestADMD/C=GB/";
172 static const char orar[] =
"/S=x400test-orig-orar/OU="HOSTNAME
"/O=TestOrg/PRMD=TestPRMD/ADMD=TestADMD/C=GB/";
174 static const char orardn[] =
"CN=alternative,c=gb";
177 #ifdef WANT_EXTERNAL_CONTENT_TYPE
178 static char *def_ext_content_type =
"1.3.26.0.4406.0.4.1";
180 static int def_bool = 0;
181 static int def_priority = 2;
184 static const char def_msgid[] =
"P772 MessageType identifier";
185 static const char def_utc[] =
"050924120000";
187 static const char msg_id[] =
"/PRMD=TestPRMD/ADMD=TestADMD/C=GB/;"HOSTNAME
".2810401";
188 static const char content_id[] =
"030924.140212";
189 static const char fwd_msg_id[] =
"/PRMD=TestFWDPRMD/ADMD=TestADMD/C=GB/;"HOSTNAME
".2810401";
192 static const char distvalue1[] = { 0x02, 0x01, 0x0a };
194 static const char distvalue2[] = { 0x13, 0x0a, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a};
198 static const char corr_octet[] = { 0x02, 0x01, 0x0a };
202 static const int importance = 2;
203 static const int sensitivity = 3;
204 static const int autoforwarded = 1;
207 static const char text[] =
"First line\r\nSecond line\r\n";
208 static const char ipm_id[] =
"1064400656.24922*";
209 static const char ipm_rep_id[] =
"1064400656.24923*";
210 static const char ipm_obs_id[] =
"1064400656.24924*";
211 static const char ipm_rel_id[] =
"1064400656.24925*";
212 #ifdef X400_1999_SUPPORTED
213 static const char orig_ref[] =
"orig-ref-val";
216 #define XML_BUFSIZE 1024
217 #define STRING_BUFSIZE 1024
227 return send_msgs (argc, argv);
230 static int send_msgs (
236 struct X400mtSession *sp;
238 if (get_args(argc, argv, optstr)) {
243 orig = strdup(x400_default_gw_originator);
244 recip = strdup(x400_default_gw_recipient);
245 exemp_recip = strdup(x400_default_exempted_recipient);
246 fwd_orig = strdup(x400_default_fwd_originator);
247 fwd_recip = strdup(x400_default_fwd_recipient);
249 if (x400_channel == NULL) {
250 fprintf (stderr,
"No x400_channel value set in x400tailor file");
257 fprintf (stderr,
"Error in Open: %s\n",
X400mtError (status));
270 while (num_msgs_to_send-- > 0)
272 status = send_msg(sp);
274 fprintf (stderr,
"Error in send_msg: %s\n",
X400mtError (status));
284 struct X400mtSession *sp
288 struct X400mtMessage *mp;
296 printf(
"originator of msg is %s\n", orig);
302 status = add_single_recip(mp);
305 status = add_primary_recip(mp);
309 status = build_env(mp);
313 status = build_content(mp);
316 #ifdef HANDLING_MILITARY_IPN
319 struct X400ACP127Resp *resp = NULL;
320 struct X400ALI *ali1 = NULL;
321 struct X400ALI *ali2 = NULL;
376 "/cn=acp127ali1/PRMD=TestPRMD/ADMD=TestADMD/C=GB", -1);
380 "cn=acp127ali1,c=gb", -1);
384 "ACP127 Mr Address List Indicator1", -1);
404 "/cn=acp127ali2/PRMD=TestPRMD/ADMD=TestADMD/C=GB", -1);
408 "cn=acp127ali2,c=gb", -1);
412 "ACP127 Mr Address List Indicator2", -1);
427 fprintf (stderr,
"Temporary error in MsgSend: %s\n",
X400mtError (status));
428 printf(
"Press return to try again > ");
429 ic_fgets (foo,
sizeof foo, stdin);
431 fprintf (stderr,
"Error in MsgSend: %s\n",
X400mtError (status));
443 static int add_primary_recip(
444 struct X400mtMessage *mp
447 struct X400Recipient *rp;
450 printf(
"Adding primary recip with only FreeForm name\n");
460 static int add_single_recip(
461 struct X400mtMessage *mp
464 struct X400Recipient *rp;
467 printf(
"Adding single recip %s\n", recip);
475 status = add_env_recip_info (rp);
479 status = add_dl_exempted_recip_list (mp);
483 #define USE_REDIRECTION_HISTORY 1
484 #ifdef USE_REDIRECTION_HISTORY
486 struct X400RediHist *hist1;
487 struct X400RediHist *hist2;
491 fprintf(stderr,
"Failed to allocate new redirection history object \n");
502 "Failed to add X400_S_REDIRECTION_TIME to Redirection Hist\n");
508 "/cn=redihist/prmd=TestPRMD/admd=TestPRMD/C=gb",
512 "Failed to add X400_S_OR_ADDRESS to Redirection Hist\n");
522 "Failed to add X400_S_DIRECTORY_NAME to Redirection Hist\n");
532 "Failed to add X400_N_REDIRECTION_REASON to trace info\n");
540 fprintf(stderr,
"Failed to allocate new trace info object \n");
551 "Failed to add X400_S_REDIRECTION_TIME to Redirection Hist\n");
557 "/cn=redihist2/prmd=TestPRMD/admd=TestPRMD/C=gb",
561 "Failed to add X400_S_OR_ADDRESS to Redirection Hist\n");
571 "Failed to add X400_S_DIRECTORY_NAME to Redirection Hist\n");
581 "Failed to add X400_N_REDIRECTION_REASON to "
582 "Redirection Hist\n");
612 static int add_exempt_address(
613 struct X400mtMessage *mp
616 struct X400Recipient *rp;
617 struct X400Recipient *rp2;
619 printf(
"Adding exempted recip %s\n", exemp_recip);
629 "cn=exemprecip,c=gb", -1);
645 "/CN=exemp2/PRMD=TestPRMD/ADMD=TestADMD/C=GB", -1);
650 static int add_address_list_indicator(
651 struct X400mtMessage *mp
654 struct X400ALI *ali = NULL;
655 struct X400ALI *ali2 = NULL;
658 printf(
"Adding address list indicators\n");
674 "/cn=ALI1/PRMD=TestPRMD/ADMD=TestADMD/C=GB", -1);
682 "Mr Address List Indicator1", -1);
693 "/CN=ALI2/PRMD=TestPRMD/ADMD=TestADMD/C=GB", -1);
708 static int add_handling_instructions(
709 struct X400mtMessage *mp
712 struct X400PSS *pss = NULL;
713 struct X400PSS *pss2 = NULL;
716 printf(
"Adding handling instructions\n");
724 "Handling instruction1",
734 "Handling instruction2",
742 static int add_message_instructions(
743 struct X400mtMessage *mp
746 struct X400PSS *pss = NULL;
747 struct X400PSS *pss2 = NULL;
750 printf(
"Adding Message instructions\n");
758 "Message instruction1",
768 "Message instruction2",
776 static int add_dist_codes_sic(
777 struct X400mtMessage *mp
780 struct X400PSS *pss = NULL;
781 struct X400PSS *pss2 = NULL;
782 struct X400DistField *distfield1 = NULL;
783 struct X400DistField *distfield2 = NULL;
786 printf(
"Adding Distribution Codes\n");
844 static int add_other_recipient_indicator(
845 struct X400mtMessage *mp
848 struct X400OtherRecip *rp = NULL;
849 struct X400OtherRecip *rp2 = NULL;
852 printf(
"Adding Other Recipient Indicators\n");
883 #ifdef add_multi_recips
884 static int add_multi_recips(
885 struct X400mtMessage *mp
888 struct X400Recipient *rp;
891 printf(
"Adding multiple recips\n");
899 status = add_env_recip_info (rp);
929 status = add_content_recip_info (rp, recip);
939 status = add_content_recip_info (rp, recip2);
967 static int build_env(
968 struct X400mtMessage *mp
975 #ifdef WANT_EXTERNAL_CONTENT_TYPE
977 def_ext_content_type, -1);
981 #ifdef WANT_DL_EXP_HIST
984 struct X400DLExpHist *hist;
990 x400_default_gw_dlexphist1_or,
996 x400_default_gw_dlexphist1_dn,
1002 "070801120000+0100",
1012 x400_default_gw_dlexphist2_or,
1018 x400_default_gw_dlexphist2_dn,
1024 "070801120000+0100",
1033 #ifdef USE_SEC_LABEL
1038 const char* xml_filename =
"seclabel.xml";
1039 char xml_content[XML_BUFSIZE];
1040 char str_content[STRING_BUFSIZE];
1041 int str_len = STRING_BUFSIZE;
1045 fd = fopen(xml_filename,
"r");
1047 fprintf(stderr,
"Failed to open %s : %s\n",
1048 xml_filename,strerror(errno));
1051 fread(&xml_content,XML_BUFSIZE,1,fd);
1055 status = SecLabelInit(
"Example program");
1056 if (status != SECLABEL_E_NOERROR) {
1057 fprintf(stderr,
"SecLabelInit returned error %d\n", status);
1062 status = SecLabelParse(xml_content,
1067 if (status != SECLABEL_E_NOERROR) {
1068 fprintf(stderr,
"SecLabelParse returned error %d\n", status);
1074 str_content,str_len);
1076 fprintf (stderr,
"x400mtMsgAddStrParam returned error: %s\n",
X400mtError (status));
1083 #define ADD_TRACE_INFO 1
1084 #ifdef ADD_TRACE_INFO
1086 struct X400TraceInfo *info1;
1087 struct X400TraceInfo *info2;
1091 fprintf(stderr,
"Failed to allocate new trace info object \n");
1098 "/PRMD=wibble/ADMD=TestADMD/C=GB/",
1102 "Failed to add X400_S_GLOBAL_DOMAIN_ID to trace info\n");
1112 "Failed to add X400_S_DSI_ARRIVAL_TIME to trace info\n");
1119 "/PRMD=atmpdom/ADMD=TestADMD/C=GB/",
1123 "Failed to add X400_S_DSI_ATTEMPTED_DOMAIN to trace info\n");
1135 "Failed to add X400_S_DSI_AA_DEF_TIME to trace info\n");
1146 "Failed to add X400_S_DSI_AA_CEIT to trace info\n");
1155 "Failed to add X400_N_DSI_ROUTING_ACTION to trace info\n");
1164 "Failed to add X400_N_DSI_AA_REDIRECTED to trace info\n");
1173 "Failed to add X400_N_DSI_AA_DLOPERATION to trace info\n");
1181 fprintf(stderr,
"Failed to allocate new trace info object \n");
1188 "/PRMD=fluffy/ADMD=TestADMD/C=GB/",
1192 "Failed to add X400_S_GLOBAL_DOMAIN_ID to trace info\n");
1202 "Failed to add X400_S_DSI_ARRIVAL_TIME to trace info\n");
1211 "Failed to add X400_N_DSI_AA_REDIRECTED to trace info\n");
1220 "Failed to add X400_N_DSI_AA_DLOPERATION to trace info\n");
1228 #define USE_INTERNAL_TRACE_INFO 1
1229 #ifdef USE_INTERNAL_TRACE_INFO
1231 struct X400InternalTraceInfo *int_info1;
1235 fprintf(stderr,
"Failed to allocate new trace info object \n");
1242 "/PRMD=intprmd/ADMD=TestADMD/C=GB/",
1246 "Failed to add X400_S_GLOBAL_DOMAIN_ID to trace info\n");
1257 "Failed to add X400_S_MTA_NAME to trace info\n");
1269 "Failed to add X400_S_MTA_SI_TIME to trace info\n");
1280 "Failed to add X400_N_MTA_SI_ROUTING_ACTION to trace info\n");
1287 "Attempted MTA name 1",
1291 "Failed to add X400_S_MTA_SI_ATTEMPTED_MTA to trace info\n");
1316 "Failed to add X400_S_MTA_SI_DEFERRED_TIME to trace info\n");
1326 "Failed to add X400_S_MTA_SI_DEFERRED_TIME to trace info\n");
1336 "Failed to add X400_N_MTA_SI_OTHER_ACTIONS to trace info\n");
1346 "Failed to add X400_N_MTA_SI_OTHER_ACTIONS to trace info\n");
1406 char *latest_time = set_latest_del_time();
1436 static int build_content(
1437 struct X400mtMessage *mp
1441 #ifdef USE_RAW_CONTENT
1444 char buf[10 * 1024];
1447 fd = open(
"./p22", O_RDONLY);
1449 printf(
"Failed to open p22 file in cwd");
1453 len = read(fd, buf, 10 * 1024);
1456 if (len == 10 * 1024) {
1457 printf(
"p22 file too long to read");
1493 #ifdef X400_1999_SUPPORTED
1517 status = add_binary_bp(mp);
1521 status = add_gen_txt_bp(mp);
1525 #ifdef ADD_FWD_BODYPART
1527 status = add_fwd_bodypart(mp);
1533 status = add_fwd_content_bodypart(mp);
1540 #ifdef USE_P772_EXTS
1541 status = add_exempt_address(mp);
1571 status = add_address_list_indicator(mp);
1575 status = add_handling_instructions(mp);
1579 status = add_message_instructions(mp);
1583 status = add_dist_codes_sic(mp);
1595 status = add_other_recipient_indicator(mp);
1609 char *pilot_ber = NULL;
1611 if (load_ber(
"pilot_fwd_info.ber",&pilot_ber,&buf_len) == 0) {
1612 printf(
"Adding pilot forwarding info\n");
1618 printf(
"unable to add pilot forwarding info\n");
1636 char *sec_label_ber = NULL;
1638 if (load_ber(
"info_sec_label.ber",&sec_label_ber,&buf_len) == 0) {
1639 printf(
"Adding information security label\n");
1641 sec_label_ber,buf_len);
1642 free(sec_label_ber);
1645 printf(
"unable to add information security labels\n");
1646 free(sec_label_ber);
1654 struct X400Bodypart *ADatP3 = NULL;
1669 "The first ADatP3 Data value",
1677 struct X400Bodypart *ADatP3 = NULL;
1692 "The second ADatP3 Data value\r\n"
1693 "The third ADatP3 Data value\r\n"
1694 "The fourth ADatP3 Data value\r\n",
1702 struct X400Bodypart *corrections = NULL;
1715 "A simple P772 correction",
1723 struct X400Bodypart *acp127data = NULL;
1736 "A simple P772 ACP127 Data IA5Text",
1742 #ifdef ADD_FWD_BODYPART
1745 struct X400Message *msg = NULL;
1754 status = create_fw_message(msg);
1758 def_ext_content_type, (
size_t)-1);
1768 char *encrypted_data = NULL;
1769 int encrypted_data_len;
1770 struct X400Message *msg = NULL;
1777 if (load_ber(
"pilot_fwd_info.ber",&encrypted_data,&encrypted_data_len)
1779 fprintf(stderr,
"Failed to load Fwd Enc data\n");
1780 free(encrypted_data);
1791 free(encrypted_data);
1800 status = create_fw_message(msg);
1802 free(encrypted_data);
1813 def_ext_content_type, (
size_t)-1);
1815 free(encrypted_data);
1821 encrypted_data, encrypted_data_len);
1822 free(encrypted_data);
1842 char *cert_ber = NULL;
1844 if (load_ber(
"1137492922.p12",&cert_ber,&buf_len) == 0) {
1845 printf(
"Adding sample originator cert\n");
1851 printf(
"unable to add originator certificate\n");
1863 char *moac_ber = NULL;
1865 if (load_ber(
"MOAC.ber",&moac_ber,&buf_len) == 0) {
1866 printf(
"Adding MOAC\n");
1872 printf(
"unable to add originator certificate\n");
1883 static int add_gen_txt_bp(
1884 struct X400mtMessage *mp
1888 struct X400Bodypart *GenTxt = NULL;
1907 "This is some General Text data",
1912 static int add_binary_bp(
1913 struct X400mtMessage *mp
1922 if (filename_to_send != NULL) {
1923 fp = fopen(filename_to_send,
"rb");
1924 if (fp == (FILE *)NULL) {
1925 printf(
"Cannot open binary file\n");
1928 binary_data = (
char *) malloc(bin_bp_size);
1929 if ( binary_data == NULL )
1931 if ((fs = fread (binary_data,
sizeof(
char),
1932 bin_bp_size/
sizeof(
char), fp) ) == -1) {
1933 printf(
"Cannot read from binary file\n");
1939 if (fs < bin_bp_size) {
1940 printf(
"Cannot read %d bytes from binary file (got %d)\n",
1949 printf(
"failed to add X400_T_BINARY BP\n");
1953 printf(
"no binary file set - not sending X400_T_BINARY\n");
1958 static int add_env_recip_info(
1959 struct X400Recipient *rp
1991 #ifdef add_multi_recips
1992 static int add_content_recip_info(
1993 struct X400Recipient *rp,
1994 const char *free_form_name
2014 static void usage(
void) {
2015 printf(
"usage: %s\n", optstr);
2016 printf(
"\t where:\n");
2017 printf(
"\t -u : Don't prompt to override defaults \n");
2018 printf(
"\t -G : Originator \n");
2019 printf(
"\t -O : Originator Return Address \n");
2020 printf(
"\t -g : Recipient\n");
2021 printf(
"\t -c : X.400 passive channel\n");
2022 printf(
"\t -l : Logline\n");
2023 printf(
"\t -R : Reports (0 - never, 1 - always, 2 - always NDR \n");
2024 printf(
"\t -y : Priority (0 - normal, 1 - non-urgent, 2 - urgent \n");
2025 printf(
"\t -C : Content Type (2/22/772/OID) \n");
2026 printf(
"\t -i : Implicit conversion prohibited = TRUE \n");
2027 printf(
"\t -a : Alternate Recipient Prohibited = TRUE \n");
2028 printf(
"\t -q : Content Return Request = TRUE \n");
2029 printf(
"\t -s : Disclosure of Recipient = FALSE \n");
2030 printf(
"\t -A : Recipient Reassignment Prohibited = FALSE \n");
2031 printf(
"\t -v : Conversion with Loss Prohibited = FALSE \n");
2032 printf(
"\t -f : Filename to transfer as binary bp\n");
2033 printf(
"\t -X : Number of messages to send\n");
2034 printf(
"\t -S : Size of binary attachment (requires -f)\n");
2039 char *set_latest_del_time(
2043 static char latest_del_time[BUFSIZ];
2047 now_secs += 60*60*24*2;
2049 strftime(latest_del_time,
2053 return strdup(latest_del_time);
2059 static int load_ber(
2061 char **output_buffer,
2068 struct stat stat_info;
2070 if (stat(filename, &stat_info)!=0) {
2071 fprintf(stderr,
"Failed to stat %s : %s\n",
2072 filename,strerror(errno));
2076 *output_buffer = (
char*) malloc (
sizeof(
char) * stat_info.st_size);
2078 fd = fopen(filename,
"r");
2080 fprintf(stderr,
"Failed to open %s : %s\n",
2081 filename,strerror(errno));
2085 fread(*output_buffer,stat_info.st_size,1,fd);
2088 *buf_len = stat_info.st_size;
2093 #ifdef ADD_FWD_BODYPART
2094 static int add_fwd_bodypart(
2095 struct X400mtMessage *mp
2099 struct X400Message *mbp;
2103 fprintf(stderr,
"add_fwd_bodypart: %s\n",
X400mtError(status));
2107 status = create_fw_message(mbp);
2109 fprintf(stderr,
"failed to create fwd message\n");
2117 static int build_fwd_env (
2118 struct X400Message *mp
2139 "070801120000+0100",
2145 "070801120000+0100",
2206 char *latest_time = set_latest_del_time();
2210 latest_time, (
size_t)-1);
2217 static int build_fwd_content (
2218 struct X400Message *mp
2265 "This is a forwarded test message", (
size_t)-1);
2271 static int add_fwd_recip(
2272 struct X400Message *mp,
2273 const char *oraddress,
2277 struct X400Recipient *rp;
2282 fprintf(stderr,
"Failed to create new \n");
2288 fprintf(stderr,
"Failed to add fwd recipient\n");
2312 static int create_fw_message(
2313 struct X400Message *mp
2324 fprintf(stderr,
"Failed to added forwarded originator\n");
2330 fprintf(stderr,
"Failed to added forwarded originator\n");
2334 status = build_fwd_env(mp);
2336 fprintf(stderr,
"Failed to build forwarded message envelope\n");
2340 status = build_fwd_content(mp);
2342 fprintf(stderr,
"Failed to build forwarded message content\n");
2352 static int add_fwd_content_bodypart (
2353 struct X400mtMessage *mp
2358 char *fwd_content_ber = NULL;
2359 struct X400Message *mbp;
2365 fprintf(stderr,
"add_fwd_bodypart: %s\n",
X400mtError(status));
2369 status = create_fw_message(mbp);
2373 def_ext_content_type, (
size_t)-1);
2376 if (load_ber(
"example_fwd_content.ber",&fwd_content_ber,&buf_len) == 0) {
2377 printf(
"Adding forwarded content string\n");
2380 fwd_content_ber, buf_len);
2381 free(fwd_content_ber);
2387 printf(
"unable to add forwarded content info\n");
2388 free(fwd_content_ber);
2400 static int add_dl_exempted_recip_list (
2401 struct X400mtMessage *mp
2404 struct X400Recipient *rp1;
2405 struct X400Recipient *rp2;
2406 struct X400Recipient *rp3;
2413 "/cn=x411exempted1/PRMD=TestPRMD/"
2414 "ADMD=TestADMD/C=GB", -1);
2421 "/cn=x411exempted2/PRMD=TestPRMD/"
2422 "ADMD=TestADMD/C=GB", -1);
2429 "/cn=x411exempted3/PRMD=TestPRMD/"
2430 "ADMD=TestADMD/C=GB", -1);
#define X400_S_ORIGINATOR_RETURN_ADDRESS
#define X400_MTA_SI_OTHER_ACTION_REDIRECTED
#define X400_N_ACP127_NOTI_TYPE
#define X400_N_MTA_SI_ROUTING_ACTION
#define X400_S_LOG_CONFIGURATION_FILE
#define X400_S_PRECEDENCE_POLICY_ID
int X400mtMsgAddAttachment(struct X400mtMessage *mp, int type, const char *string, size_t length)
Add an attachment to the message.
#define X400_N_EXT_CODRESS
#define X400_S_ENCRYPTED_DATA_BYTES_ONLY
#define X400_S_OBSOLETED_IPMS
#define X400_N_RECIPIENT_REASSIGNMENT_PROHIBITED
int X400mtACP127RespNew(struct X400mtMessage *mp, struct X400ACP127Resp **respp)
Create an ACP127 Notification Response object.
#define X400_S_CONTENT_CORRELATOR_IA5_STRING
#define X400_S_REPLY_TIME
X400COMMON_CDECL int X400InternalTraceInfoAddIntParam(struct X400InternalTraceInfo *info, int paramtype, int value)
Set an integer value in an Internal Trace Info object.
#define X400_S_ACP127_NOTI_RESP_SUPP_INFO
X400COMMON_CDECL int X400BodypartNew(int type, struct X400Bodypart **bpp)
Create a new body part object.
#define X400_S_ORIGINATOR_REQUESTED_ALTERNATE_RECIPIENT
X400COMMON_CDECL int X400RediHistAddIntParam(struct X400RediHist *hist, int paramtype, int value)
Set an integer value in a Redirection History object.
#define X400_N_DISCLOSURE
#define X400_S_ACP127_NOTI_RESP_TIME
#define X400_N_ACP127DATA_PARM
#define X400_S_ORIGINATORS_REFERENCE
#define X400_S_DIST_CODES_EXT_OID
#define X400_S_ORIGINAL_ENCODED_INFORMATION_TYPES
#define X400_N_CONTENT_RETURN_REQUEST
X400COMMON_CDECL int X400MsgAddIntParam(struct X400Message *mp, int paramtype, int value)
Add integer-valued parameter to the message.
int X400mtSetStrDefault(struct X400mtSession *sp, int paramtype, const char *value, size_t length)
Set a default string parameter value in a session.
#define X400_N_AUTOFORWARDED
int X400mtMsgDelete(struct X400mtMessage *mp)
Delete message object.
#define X400_S_DIST_CODES_SIC
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_S_INFO_SEC_LABEL
#define X400_N_EXT_MSG_TYPE
#define X400_N_DSI_ROUTING_ACTION
#define X400_N_CONVERSION_WITH_LOSS_PROHIBITED
#define X400_N_ADATP3_CHOICE
#define X400_S_EXT_AUTH_INFO
X400COMMON_CDECL int X400MsgNew(int type, struct X400Message **mpp)
Creates new message.
#define X400_S_CONTENT_STRING
X400COMMON_CDECL int X400ALIAddStrParam(struct X400ALI *info, int paramtype, const char *value, size_t length)
Add string-valued parameter to the ALI info object.
int X400mtRecipAddStrParam(struct X400Recipient *rp, int paramtype, const char *value, size_t length)
Add string-valued parameter to the message.
#define X400_S_MTA_SI_ATTEMPTED_MTA
#define X400_N_ADATP3_PARM
int X400mtOpen(const char *credentials, struct X400mtSession **spp)
Open a session to the MTA.
X400COMMON_CDECL int X400RediHistNew(struct X400Recipient *recip, struct X400RediHist **hist)
Create a new Redirection History object.
#define X400_S_REDIRECTION_TIME
#define X400_ACP127_NOTI_TYPE_NEG
X400COMMON_CDECL int X400ALIAddIntParam(struct X400ALI *info, int paramtype, int value)
Set an integer value in an Address List Indicator object.
#define X400_S_SECURITY_LABEL
#define X400_S_GENERAL_TEXT_CHARSETS
#define X400_T_ACP127DATA
#define X400_EXEMPTED_ADDRESS
const char * X400mtError(int error)
Return string for error code.
#define X400_N_REPLY_REQUESTED
#define X400_S_DSI_ATTEMPTED_DOMAIN
#define X400_DL_EXEMPTED_RECIP
#define X400_N_EXT_COPY_PREC
int X400mtMsgAddMessageBodyWType(struct X400mtMessage *mp, struct X400Message *mbp, int type)
Add a message body part object to a message.
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.
int X400mtRecipNew(struct X400mtMessage *mp, int type, struct X400Recipient **rpp)
Add new recipient to a message.
#define X400_S_MTA_SI_TIME
#define X400_S_TELEPHONE_NUMBER
#define X400_S_DIRECTORY_NAME
#define X400_S_RELATED_IPMS
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_MESSAGE_DELIVERY_TIME
X400COMMON_CDECL int X400OtherRecipAddIntParam(struct X400OtherRecip *otherrecip, int value)
Add integer parameter to the Other Recipient Indicator object.
#define X400_S_LATEST_DELIVERY_TIME
#define X400_S_ACP127_MSG_ID
#define X400_T_FWD_CONTENT
#define X400_ACP127_NOTI_TYPE_POS
#define X400_N_ALI_NOTIFICATION_REQUEST
#define X400_S_DIST_CODES_EXT_VALUE
#define X400_MTA_SI_OTHER_ACTION_DLOPERATION
int X400mtMsgAddStrParam(struct X400mtMessage *mp, int paramtype, const char *value, size_t length)
Add string-valued parameter to the message.
X400COMMON_CDECL int X400MsgAddStrParam(struct X400Message *mp, int paramtype, const char *value, size_t length)
Add string-valued parameter to the message.
#define X400_S_ACP127_NOTI_RESP_RECIPIENT
X400COMMON_CDECL int X400ACP127RespAddIntParam(struct X400ACP127Resp *resp, int value)
Add integer parameter to the ACP127 Notification Response object.
#define X400_RECIP_STANDARD
#define X400_S_CONTENT_FILENAME
#define X400_S_CONTENT_IDENTIFIER
#define X400_S_MESSAGE_IDENTIFIER
#define X400_MTA_SI_RA_MTA
#define X400_N_SENSITIVITY
X400COMMON_CDECL int X400BodypartAddIntParam(struct X400Bodypart *bp, int paramtype, int value)
Add integer-valued parameter to the body part.
#define X400_S_ADATP3_DATA
#define X400_S_FWD_CONTENT_STRING
#define X400_N_ALI_REPLY_REQUEST
#define X400_N_DSI_AA_REDIRECTED
#define X400_N_REPORT_REQUEST
#define X400_N_IMPLICIT_CONVERSION_PROHIBITED
#define X400_N_REDIRECTION_REASON
#define X400_S_EXPIRY_TIME
int X400mtMsgAddIntParam(struct X400mtMessage *mp, int paramtype, int value)
Add integer-valued parameter to the message.
#define X400_S_AUTHORIZATION_TIME
int X400mtRecipAddIntParam(struct X400Recipient *rp, int paramtype, int value)
Add integer-valued parameter to the message.
#define X400_N_DSI_AA_DLOPERATION
X400COMMON_CDECL int X400TraceInfoAddIntParam(struct X400TraceInfo *info, int paramtype, int value)
Set an integer value in a Trace Info object.
#define X400_S_EXTERNAL_CONTENT_TYPE
int X400mtDistFieldNew(struct X400mtMessage *mp, struct X400DistField **distfield)
Create a new P772 Distribution Field object for a message object.
#define X400_S_ORIGINATOR_REQUESTED_ALTERNATE_RECIPIENT_DN
#define X400_E_TEMPORARY_ERROR
int X400mtMsgNew(struct X400mtSession *sp, int type, struct X400mtMessage **mpp)
Creates new message.
#define X400_S_MESSAGE_INSTRUCTIONS
#define X400_S_CONTENT_CORRELATOR_OCTET_STRING
#define X400_RR_RECIP_ASSIGNED_ALT_RECIP
#define X400_RECIP_PRIMARY
#define X400_S_CORREC_DATA
int X400mtInternalTraceInfoNew(struct X400mtMessage *mp, struct X400InternalTraceInfo **info)
Create a new Internal Trace Info object for a message object.
#define X400_N_ORIGINAL_RECIPIENT_NUMBER
X400COMMON_CDECL int X400MsgAddRecip(struct X400Message *mp, int reciptype, struct X400Recipient *recip)
Add a recipient object to the message.
X400COMMON_CDECL int X400ACP127RespNewALI(struct X400ACP127Resp *resp, struct X400ALI **ali)
Create new Address List Indicator object associated with the X400ACP127 Resp.
X400COMMON_CDECL int X400TraceInfoAddStrParam(struct X400TraceInfo *info, int paramtype, const char *value, size_t length)
Add string-valued parameter to the X400TraceInfo object.
int X400mtMsgSend(struct X400mtMessage *mp)
Send message object to MTA.
#define X400_N_MTA_SI_OTHER_ACTIONS
#define X400_S_FREE_FORM_NAME
#define X400_S_PILOT_FWD_INFO
#define X400_N_DL_EXPANSION_PROHIBITED
X400COMMON_CDECL int X400RecipNew(int type, struct X400Recipient **rpp)
Create a new recipient object.
#define X400_N_ALTERNATE_RECIPIENT_ALLOWED
#define X400_N_IMPORTANCE
#define X400_N_NOTIFICATION_REQUEST
int X400mtOtherRecipNew(struct X400mtMessage *mp, struct X400OtherRecip **otherrecip)
Create a new P772 Other Recipient object for a message object.
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_S_REPLIED_TO_IDENTIFIER
#define X400_S_MESSAGE_SUBMISSION_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.
X400COMMON_CDECL int X400PSSAddStrParam(struct X400PSS *pss, const char *value, size_t length)
Add string-valued parameter to the PSS info object.
#define X400_S_GLOBAL_DOMAIN_ID
#define X400_S_DSI_AA_CEIT
#define X400_N_CORREC_PARM
#define X400_N_ERROR_DUPLICATE_ATTRIBUTE
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_IPM_IDENTIFIER
#define X400_T_CORRECTIONS
#define X400_ACP127_NOTI_TYPE_TRANS
#define X400_N_EXT_PRIM_PREC
#define X400_S_EXT_MSG_IDENTIFIER
#define X400_S_ACP127_DATA
#define X400_S_MTA_SI_DEFERRED_TIME
X400COMMON_CDECL int X400RecipAddIntParam(struct X400Recipient *rp, int paramtype, int value)
Add integer-valued parameter to the recipient.
#define X400_S_HANDLING_INSTRUCTIONS
#define X400_S_DSI_ARRIVAL_TIME
int X400mtPSSNew(struct X400mtMessage *mp, int type, struct X400PSS **pss)
Create a new Printable String Syntax object for a message object.
int X400mtALINew(struct X400mtMessage *mp, struct X400ALI **ali)
Create a new Address List Indicator object for a message object.
int X400mtSetIntDefault(struct X400mtSession *sp, int paramtype, int value)
Set a default integer parameter value in a session.
#define X400_N_RESPONSIBILITY
#define X400_N_MTA_REPORT_REQUEST
int X400mtMsgAddMessageBody(struct X400mtMessage *mp, struct X400Message *mbp)
#define X400_S_DLEXP_TIME
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_S_MTA_SI_CEIT
#define X400_T_GENERAL_TEXT
int X400mtTraceInfoNew(struct X400mtMessage *mp, struct X400TraceInfo **info, int type)
Create a new Trace Info object for a message object.
int X400mtMsgAddBodypart(struct X400mtMessage *mp, struct X400Bodypart *bp)
Add a body part object to a message.
#define X400_S_OR_ADDRESS
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_DSI_AA_DEF_TIME
X400COMMON_CDECL int X400RecipAddStrParam(struct X400Recipient *rp, int paramtype, const char *value, size_t length)
Add string-valued parameter to the recipient.
All rights reserved © 2002 - 2024 Isode Ltd.