20 #include <seclabel_api.h>
25 #define XML_BUFSIZE 1024
31 static int do_msg_env(
32 struct X400mtMessage *mp
34 static int do_msg_headers(
35 struct X400mtMessage *mp
37 static void do_msg_content(
38 struct X400mtMessage *mp
40 static int get_a_msg (
41 struct X400mtSession *sp
43 static int get_recips(
44 struct X400mtMessage *mp,
49 static int get_exempted_recips (
50 struct X400mtMessage *mp
53 static int do_rep_env(
54 struct X400mtMessage *mp
57 static int do_rep_content(
58 struct X400mtMessage *mp
61 static int do_rep_retcontent(
62 struct X400mtMessage *mp
65 static void usage(
void);
67 #ifdef WANT_DL_EXP_HIST
68 static int do_dl_hist (
69 struct X400mtMessage *mp
73 static int do_trace_info (
74 struct X400mtMessage *mp
77 static int do_internal_trace_info (
78 struct X400mtMessage *mp
81 static int do_redirection_hist (
82 struct X400Recipient *recip
85 static int do_redirection_hist_env (
86 struct X400mtMessage *msg
90 struct X400mtMessage *mp
94 struct X400mtMessage *mp
98 struct X400mtMessage *mp
101 static int get_dist_codes_sic(
102 struct X400mtMessage *mp
105 static int get_other_recips(
106 struct X400mtMessage *mp
109 #ifdef HANDLING_MILITARY_IPN
110 static int get_acp127_ali (
111 struct X400ACP127Resp *resp
115 static char *optstr =
"uo:O:r:c:l:EQ:";
117 static int get_body_parts(
118 struct X400mtMessage *mp
121 static int do_orig_and_dl (
122 struct X400mtMessage *mp
125 static void report_sig_info(
126 struct X400Recipient *rp
129 static void print_sec_label(
130 unsigned char slab_buffer[],
135 struct X400Recipient *rp
138 static void show_certificate (
139 struct X400Recipient *rp,
156 if (x400_channel == NULL) {
157 fprintf (stderr,
"No x400_channel value set in x400tailor file");
167 retval = get_msg(argc, argv);
168 fprintf (stderr,
"Error in X400mtMsgGet: %s\n",
X400mtError (retval));
178 struct X400mtSession *sp;
179 char *filepath =
"/var/isode";
181 if (get_args(argc, argv, optstr)) {
189 fprintf (stderr,
"Error in Open: %s\n",
X400mtError (status));
196 filepath, strlen(filepath));
200 #ifdef WANT_OR_CANONICAL
204 if (attr_to_fault != 0) {
207 fprintf (stderr,
"Error in X400mtMarkToFault: %s\n",
X400mtError (status));
218 printf(
"X400mtClose returned error %d\n", status);
219 fprintf (stderr,
"Error in X400mtClose: %s\n",
231 printf(
"X400mtClose returned error %d\n", status);
232 fprintf (stderr,
"Error in X400mtClose: %s\n",
238 while (until_no_more_msgs);
243 printf(
"X400mtClose returned error %d\n", status);
244 fprintf (stderr,
"Error in X400mtClose: %s\n",
251 static int get_a_msg (
252 struct X400mtSession *sp
255 struct X400mtMessage *mp;
258 static int reported_none = 0;
264 if (reported_none == 0) {
265 printf(
"No messages ...\n");
270 printf(
"Error getting message (%d) %s\n", status,
X400mtError(status));
271 fprintf (stderr,
"Error in X400mtMsgGet: %s\n",
X400mtError (status));
278 printf(
"Message waiting\n\n");
286 printf(
"Report waiting\n\n");
290 do_rep_retcontent(mp);
295 printf (
"Got a probe, ignoring ...\n");
299 printf(
"X400mtMsgDelete returned error %d\n", status);
300 fprintf (stderr,
"Error in X400mtMsgDelete: %s\n",
307 #define DRD_UNRECOGNISED_OR 0
308 #define DRR_UNABLE_TO_TRANSFER 1
312 DRR_UNABLE_TO_TRANSFER, DRD_UNRECOGNISED_OR,
"Unable to transfer");
318 printf(
"X400mtMsgFinish returned error %d\n", status);
319 fprintf (stderr,
"Error in X400mtMsgFinish: %s\n",
322 printf(
"X400mtMsgFinish returned success %d\n", status);
327 printf(
"X400mtMsgDelete returned error %d\n", status);
328 fprintf (stderr,
"Error in X400mtMsgDelete: %s\n",
338 static int do_msg_env(
339 struct X400mtMessage *mp
352 buffer,
sizeof buffer , &length);
354 printf(
"error getting originator address\n");
356 "Error in X400mtMsgGetStrParam: %s\n",
X400mtError (status));
359 printf (
"Originator: %.*s\n", (
int)length, buffer);
363 buffer,
sizeof buffer , &length);
365 printf(
"error getting message identifier\n");
366 fprintf (stderr,
"Error in X400mtMsgGetStrParam: %s\n",
X400mtError (status));
369 printf (
"MessageID: %.*s\n", (
int)length, buffer);
373 buffer,
sizeof buffer , &length);
375 printf (
"Content Identifier: %.*s\n", (
int)length, buffer);
379 buffer,
sizeof buffer , &length);
381 printf (
"Content Correlator IA5Text: %.*s\n", (
int)length, buffer);
384 buffer,
sizeof buffer , &length);
386 printf (
"Content Correlator Octet String: %i bytes\n", (
int)length);
391 buffer,
sizeof buffer , &length);
393 printf (
"Original EITs: %.*s\n", (
int)length, buffer);
397 buffer,
sizeof buffer , &length);
399 printf (
"Message Submission Time: %.*s\n", (
int)length, buffer);
403 buffer,
sizeof buffer , &length);
405 printf (
"Message Delivery Time: %.*s\n", (
int)length, buffer);
409 buffer,
sizeof buffer , &length);
411 printf (
"Latest Delivery Time: %.*s\n", (
int)length, buffer);
415 buffer,
sizeof buffer , &length);
417 printf (
"Originator Return Address : %.*s\n", (
int)length, buffer);
420 buffer,
sizeof buffer , &length);
422 printf (
"External Content Type : %.*s\n", (
int)length, buffer);
428 printf (
"Content type : P%d\n", int_param);
432 printf (
"Content type : P%d\n", int_param);
437 printf (
"Content length: %d\n", int_param);
442 printf (
"Priority: %d\n", int_param);
447 printf (
"Disclosure of recips prohibited %s\n", int_param == 0 ?
"No":
"Yes");
452 printf (
"Implicit conversion prohibited %s\n", int_param == 0 ?
"No":
"Yes");
457 printf (
" Alternate recipient allowed: %s\n", int_param == 0 ?
"No":
"Yes");
462 printf (
" Content return request: %s\n", int_param == 0 ?
"No":
"Yes");
467 printf (
"Recipient reassignment prohibited: %s\n", int_param == 0 ?
"No":
"Yes");
472 printf (
"Distribution List expansion prohibited: %s\n", int_param == 0 ?
"No":
"Yes");
477 printf (
"Conversion with loss prohibited: %s\n", int_param == 0 ?
"No":
"Yes");
482 printf(
"error getting recipients\n");
483 fprintf (stderr,
"Error in getting recipient: %s\n",
491 printf(
"error getting recipients\n");
492 fprintf (stderr,
"Error in getting recipient: %s\n",
498 #ifdef WANT_DL_EXP_HIST
503 status = do_dl_hist(mp);
506 printf(
"No DL Expansion history\n");
509 printf(
"error getting DL Expansion History\n");
510 fprintf (stderr,
"Error in X400mtDLExpHistGet: %s\n",
521 #define XML_BUFSIZE 1024
523 char xml_buffer[XML_BUFSIZE];
524 unsigned char slab_buffer[XML_BUFSIZE];
532 printf(
"No security label\n");
534 fprintf(stderr,
"Failed to fetch security label: %d",status);
539 sec_status = SecLabelInit(
"Example program");
540 if (status != SECLABEL_E_NOERROR) {
541 fprintf(stderr,
"SecLabelInit returned error %d\n", status);
545 status = SecLabelPrint(slab_buffer,
550 if (status != SECLABEL_E_NOERROR) {
551 fprintf(stderr,
"SecLabelParse returned error %d\n", status);
556 printf(
"Got security label:%s\n",xml_buffer);
564 #define WANT_TRACE_INFO 1
565 #ifdef WANT_TRACE_INFO
568 status = do_trace_info(mp);
572 printf(
"There is no Trace Info\n");
574 printf(
"error getting Trace Info\n");
575 fprintf (stderr,
"Error fetching trace info: %s\n",
583 #define USE_INTERNAL_TRACE_INFO 1
584 #ifdef USE_INTERNAL_TRACE_INFO
587 status = do_internal_trace_info(mp);
591 printf(
"There is no internal Trace Info\n");
593 printf(
"error getting Trace Info\n");
594 fprintf (stderr,
"Error fetching trace info: %s\n",
605 buffer,
sizeof buffer , &length);
607 printf (
"Originator Cert got %i bytes\n", (
int)length);
612 buffer,
sizeof buffer , &length);
614 printf (
"MOAC got %i bytes\n", (
int)length);
619 #ifdef WANT_DL_EXP_HIST
620 static int do_dl_hist (
621 struct X400mtMessage *mp
624 struct X400DLExpHist *hist = NULL;
625 char DLORAddress[BUFSIZ];
627 char DLExpTime[BUFSIZ];
645 DLORAddress, BUFSIZ , &length);
650 DLORAddress[length] =
'\0';
651 printf (
"DLExpansion List entry %d OR Address:%s\n",
654 fprintf (stderr,
"Error in :X400DLGetStrParam OR %s\n",
659 DLORDN, BUFSIZ , &length);
661 DLORDN[length] =
'\0';
662 printf (
"DLExpansion List entry %d DN :%s\n",n,DLORDN);
664 fprintf (stderr,
"Error in :X400DLGetStrParam DN %s\n",
669 DLExpTime, BUFSIZ , &length);
671 DLExpTime[length] =
'\0';
672 printf (
"DLExpansion List entry %d Time :%s\n",n,DLExpTime);
674 fprintf (stderr,
"Error in :X400DLGetStrParam Time %s\n",
683 static int do_msg_headers(
684 struct X400mtMessage *mp
693 printf(
"\nContent:\n");
698 printf(
"error getting recipients\n");
699 fprintf (stderr,
"Error in getting recipient: %s\n",
707 printf(
"error getting recipients\n");
708 fprintf (stderr,
"Error in getting recipient: %s\n",
716 printf(
"error getting recipients\n");
717 fprintf (stderr,
"Error in getting recipient: %s\n",
725 printf(
"error getting recipients\n");
726 fprintf (stderr,
"Error in getting recipient: %s\n",
734 printf(
"error getting recipients\n");
735 fprintf (stderr,
"Error in getting recipient: %s\n",
741 status = get_exempted_recips(mp);
743 fprintf (stderr,
"Error in getting exempted recipient: %s\n",
752 buffer,
sizeof buffer , &length);
754 printf (
"IPM IDentifier: %.*s\n", (
int)length, buffer);
758 buffer,
sizeof buffer , &length);
760 printf (
"Subject: %.*s\n", (
int)length, buffer);
764 buffer,
sizeof buffer , &length);
766 printf (
"Replied-to-identifier: %.*s\n", (
int)length, buffer);
770 buffer,
sizeof buffer , &length);
772 printf (
"Obsoleted IPMs: %.*s\n", (
int)length, buffer);
776 buffer,
sizeof buffer , &length);
778 printf (
"Related IPMs: %.*s\n", (
int)length, buffer);
782 buffer,
sizeof buffer , &length);
784 printf (
"Expiry Time: %.*s\n", (
int)length, buffer);
788 buffer,
sizeof buffer , &length);
790 printf (
"Reply Time: %.*s\n", (
int)length, buffer);
794 buffer,
sizeof buffer , &length);
796 printf (
"Authorisation Time: %.*s\n", (
int)length, buffer);
800 buffer,
sizeof buffer , &length);
802 printf (
"Originator's Reference: %.*s\n", (
int)length, buffer);
808 printf (
"Importance: %d\n", int_param);
813 printf (
"Sensitivity: %d\n", int_param);
818 printf (
"Autoforwarded: %s\n", int_param ?
"false" :
"true");
823 printf (
"number of attachments: %d\n", num_atts);
827 buffer,
sizeof buffer , &length);
829 printf (
"P772 Ext Auth Info Time: %.*s\n", (
int)length, buffer);
835 printf (
"P772 Codress value: %d\n", int_param);
840 printf (
"P772 Message Type: %.*s\n", (
int)length, buffer);
844 buffer,
sizeof buffer, &length);
846 printf (
"P772 Message Type/Identifier: %d\n", int_param);
851 printf (
"P772 Primary Precedence: %d\n", int_param);
856 printf (
"P772 Copy Precedence: %d\n", int_param);
868 get_dist_codes_sic(mp);
871 get_other_recips(mp);
875 buffer,
sizeof buffer , &length);
877 printf (
"P772 Originator Reference: %.*s\n", (
int)length, buffer);
880 buffer,
sizeof buffer , &length);
882 printf (
"P772 Originator PLAD: %.*s\n", (
int)length, buffer);
885 buffer,
sizeof buffer , &length);
887 printf (
"P772 ACP127 Msg ID: %.*s\n", (
int)length, buffer);
891 buffer,
sizeof buffer , &length);
893 printf (
"P772 Pilot Forwarding Info got %i bytes\n", (
int)length);
898 buffer,
sizeof buffer , &length);
900 printf (
"P772 Information Security Label got %i bytes\n", (
int)length);
902 #ifdef HANDLING_MILITARY_IPN
907 struct X400ACP127Resp *resp = NULL;
917 printf(
"P772 ACP127 Notification Response Type Negative\n");
920 printf(
"P772 ACP127 Notification Response Type Positive\n");
923 printf(
"P772 ACP127 Notification Response Type Transfer\n");
933 printf (
"P772 ACP127 Response time: %.*s\n", (
int)length, buffer);
942 printf (
"P772 ACP127 Recipient: %.*s\n", (
int)length, buffer);
950 printf (
"P772 ACP127 Resp supp info: %.*s\n", (
int)length, buffer);
955 get_acp127_ali(resp);
966 static void do_msg_content(
967 struct X400mtMessage *mp
974 memset(buffer,0,30000);
977 buffer,
sizeof buffer , &length);
979 printf(
"Failed to read raw content into file: %s\n",
X400mtError (status));
982 printf(
"Read raw content into file %s\n", buffer);
988 buffer,
sizeof buffer , &length);
991 printf (
"Text:\n%.*s\n", (
int)length, buffer);
1001 static int get_exempted_recips (
1002 struct X400mtMessage *mp
1005 struct X400Recipient *rp;
1007 char buffer[BUFSIZ];
1011 for ( n = 1; ; n++ ) {
1016 fprintf (stderr,
"Error in X400mtRecipGet: %s\n",
1021 buffer,
sizeof buffer , &length);
1023 printf (
"Exempted recipient OR address %d: %.*s\n",
1024 n, (
int)length, buffer);
1028 buffer,
sizeof buffer , &length);
1030 printf (
"Exempted recipient DN address %d: %.*s\n",
1031 n, (
int)length, buffer);
1035 buffer,
sizeof buffer , &length);
1037 printf (
"Exempted recipient free form name %d: %.*s\n",
1038 n, (
int)length, buffer);
1042 buffer,
sizeof buffer , &length);
1044 printf (
"Exempted recipient Tel number %d: %.*s\n",
1045 n, (
int)length, buffer);
1054 static int get_ALI (
1055 struct X400mtMessage *mp
1058 struct X400ALI *ali = NULL;
1060 char buffer[BUFSIZ];
1065 for ( n = 1; ; n++ ) {
1071 buffer,
sizeof buffer , &length);
1073 printf (
"P772 ALI recipient OR address %d: %.*s\n",
1074 n, (
int)length, buffer);
1081 buffer,
sizeof buffer , &length);
1083 printf (
"P772 ALI recipient DN address %d: %.*s\n",
1084 n, (
int)length, buffer);
1088 buffer,
sizeof buffer , &length);
1090 printf (
"P772 ALI recipient free form name %d: %.*s\n",
1091 n, (
int)length, buffer);
1095 buffer,
sizeof buffer , &length);
1097 printf (
"P772 ALI recipient Tel number %d: %.*s\n",
1098 n, (
int)length, buffer);
1103 printf (
"P772 ALI Type %d\n", int_param);
1109 printf (
"P772 ALI Notification Request %d\n", int_param);
1115 printf (
"P772 ALI Notification Request %d\n", int_param);
1124 struct X400mtMessage *mp
1127 struct X400PSS *pss = NULL;
1129 char buffer[BUFSIZ];
1134 for ( n = 1; ; n++ ) {
1141 printf (
"P772 Handling instruction %d: %.*s\n",
1142 n, (
int)length, buffer);
1150 struct X400mtMessage *mp
1153 struct X400PSS *pss = NULL;
1155 char buffer[BUFSIZ];
1160 for ( n = 1; ; n++ ) {
1167 printf (
"P772 Message instruction %d: %.*s\n",
1168 n, (
int)length, buffer);
1175 static int get_dist_codes_sic(
1176 struct X400mtMessage *mp
1179 struct X400PSS *pss = NULL;
1180 struct X400DistField *distfield = NULL;
1182 char buffer[BUFSIZ];
1187 for ( n = 1; ; n++ ) {
1197 printf (
"P772 Distribution code SIC %d: %.*s\n",
1198 n, (
int)length, buffer);
1203 for ( n = 1; ; n++ ) {
1219 printf (
"P772 Distribution code Field Extension OID %d: %.*s\n",
1220 n, (
int)length, buffer);
1231 printf (
"P772 Distribution code Field Extension value %d: %.*s\n",
1232 n, (
int)length, buffer);
1239 static int get_other_recips(
1240 struct X400mtMessage *mp
1243 struct X400OtherRecip *otherrecip = NULL;
1245 char buffer[BUFSIZ];
1250 for ( n = 1; ; n++ ) {
1258 printf (
"P772 Other Recipient type %d: %i \n",n,type);
1267 printf (
"P772 Other Recipient Designator %d: %.*s\n",
1268 n, (
int)length, buffer);
1275 static int get_recips(
1276 struct X400mtMessage *mp,
1281 char buffer[BUFSIZ];
1283 struct X400Recipient *rp;
1288 for ( n = 1; ; n++ ) {
1293 printf(
"error getting recip %d\n", n);
1294 fprintf (stderr,
"Error in X400mtRecipGet: %s\n",
1301 buffer,
sizeof buffer , &length);
1303 printf (
"%s recipient %d: %.*s\n", recip_str, n, (
int)length, buffer);
1305 printf (
"recipient %d ORAddress status %d\n", n, status);
1313 printf (
"\tResponsibility %d\n", int_param);
1320 printf (
"\tMTA report request %d\n", int_param);
1327 printf (
"\tOriginator report request %d\n", int_param);
1335 buffer,
sizeof buffer , &length);
1337 printf (
"\tOriginator requested AR %.*s\n", (
int)length, buffer);
1342 buffer,
sizeof buffer , &length);
1344 printf (
"\tOriginator requested AR DN %.*s\n", (
int)length, buffer);
1352 printf (
"\tNotification request %d\n", int_param);
1359 printf (
"\tReply Request %s\n", int_param ?
"false" :
"true");
1368 printf (
"\tFree form name %.*s\n", (
int)length, buffer);
1374 printf (
"\tDirectory Name %.*s\n", (
int)length, buffer);
1381 printf (
"\tTelephone Number %.*s\n", (
int)length, buffer);
1387 printf (
"Arrival Time: %.*s\n", (
int)length, buffer);
1394 printf (
"Subject Message Delivery Time: %.*s\n", (
int)length, buffer);
1400 printf (
"\tType of MTS user %d\n", int_param);
1408 printf (
"\tSupplementary info %.*s\n", (
int)length, buffer);
1415 printf (
"\tNon-delivery Reason %d\n", int_param);
1422 printf (
"\tNon-delivery diagnostic %d\n", int_param);
1428 buffer,
sizeof buffer , &length);
1430 printf (
"\tCEIT info %.*s\n", (
int)length, buffer);
1434 #define USE_REDIRECTION_HISTORY 1
1435 #ifdef USE_REDIRECTION_HISTORY
1438 status = do_redirection_hist(rp);
1443 printf(
"There is no Redirection History\n");
1445 printf(
"error getting Redirection History\n");
1446 fprintf (stderr,
"Error fetching Redirection History: %s\n",
1455 printf(
"P772 ACP127 Notification Request Type Negative\n");
1458 printf(
"P772 ACP127 Notification Request Type Positive\n");
1462 printf(
"P772 ACP127 Notification Request Type Transfer\n");
1471 report_sig_info(rp);
1473 printf(
"-----------------------------------------------------------\n");
1478 static int do_rep_env(
1479 struct X400mtMessage *mp
1482 char buffer[BUFSIZ];
1491 buffer,
sizeof buffer , &length);
1494 printf(
"Reports don't have an originator\n");
1496 printf(
"error getting originator address\n");
1497 fprintf (stderr,
"Error in getting originator: %s\n",
1502 printf (
"Originator: %.*s\n", (
int)length, buffer);
1508 buffer,
sizeof buffer , &length);
1510 printf(
"error getting report identifier\n");
1511 fprintf (stderr,
"Error in getting report identifier: %s\n",
1515 printf (
"report identifier: %.*s\n", (
int)length, buffer);
1522 buffer,
sizeof buffer , &length);
1524 printf (
"original EITs: %.*s\n", (
int)length, buffer);
1526 fprintf (stderr,
"Error in getting original EITs : %s\n",
1536 #ifdef WANT_TRACE_INFO
1538 status = do_trace_info(mp);
1542 printf(
"There is no Trace Info\n");
1544 printf(
"error getting Trace Info\n");
1545 fprintf (stderr,
"Error fetching trace info: %s\n",
1554 #ifdef USE_REDIRECTION_HISTORY
1556 status = do_redirection_hist_env(mp);
1561 printf(
"There is no Redirection History\n");
1563 printf(
"error getting Redirection History\n");
1564 fprintf (stderr,
"Error fetching Redirection History: %s\n",
1571 status = do_orig_and_dl(mp);
1576 printf(
"There is no orig and dl exp history\n");
1578 fprintf (stderr,
"Error getting orig and dl exp history: %s\n",
1587 buffer,
sizeof buffer , &length);
1589 printf(
"error getting latest delivery time\n");
1590 fprintf (stderr,
"Error in getting latest delivery time: %s\n",
1594 printf (
"latest delivery time: %.*s\n", (
int)length, buffer);
1599 printf(
"error getting recipients\n");
1600 fprintf (stderr,
"Error in getting recipient: %s\n",
1608 printf(
"error getting dl name\n");
1609 fprintf (stderr,
"Error in getting recipient: %s\n",
1619 static void report_sig_info(
1620 struct X400Recipient *rp
1623 char buffer[BUFSIZ];
1632 buffer,
sizeof buffer, &length);
1634 fprintf(stderr,
"Error from RecipGetStrParam: %s\n",
1637 fprintf(stderr,
"recipient in token not available\n");
1640 "Message Token(%u): recipient in Token '%.*s'\n",
1641 (
unsigned)length, (
int)length, buffer);
1646 buffer,
sizeof buffer, &length);
1648 fprintf(stderr,
"Error from RecipGetStrParam: %s (%d)\n",
1651 fprintf(stderr,
"Message Token DER not available\n");
1654 "Message Token DER available (%u bytes)\n", (
unsigned)length);
1660 fprintf(stderr,
"Error from RecipGetStrParam: %s (%d)\n",
1663 fprintf(stderr,
"Message Token seq num not available\n");
1666 "Message Token seq num %d \n", param);
1671 buffer,
sizeof buffer, &length);
1673 fprintf(stderr,
"Error from RecipGetStrParam: %s (%d)\n",
1676 fprintf(stderr,
"Message Token Security Label DER not available\n");
1679 "Message Token Security Label DER available (%u bytes)\n", (
unsigned)length);
1680 fprintf(stderr,
"Security Label from Message Token is:\n");
1681 print_sec_label((
unsigned char *)buffer, length);
1686 buffer,
sizeof buffer, &length);
1688 fprintf(stderr,
"Error from RecipGetStrParam: %s (%d)\n",
1692 "Message Token Content Integrity Check DER not available\n");
1695 "Message Token Content Integrity Check DER available (%u bytes)\n",
1705 static void print_sec_label(
1706 unsigned char slab_buffer[],
1711 char xml_buffer[XML_BUFSIZE];
1714 status = SecLabelInit(
"Example program");
1715 if (status != SECLABEL_E_NOERROR) {
1716 fprintf(stderr,
"SecLabelInit returned error %d\n", status);
1720 status = SecLabelPrint(slab_buffer,
1725 if (status != SECLABEL_E_NOERROR) {
1726 fprintf(stderr,
"SecLabelParse returned error %d\n", status);
1731 printf(
"Got security label:%s\n", xml_buffer);
1736 struct X400Recipient *rp
1739 char buffer[BUFSIZ];
1740 int status, cic_status;
1748 printf(
"No Content Integrity Check in recipient\n");
1751 printf(
"Error from RecipGetIntParam: %s\n",
X400mtError(cic_status));
1758 printf(
"Content Integrity Check succeeded\n");
1761 printf(
"Content Integrity Check error (%d): %s\n",
1768 buffer,
sizeof buffer, &length);
1770 fprintf(stderr,
"Error getting recipient cic: %s\n",
1773 printf(
"Content Integrity Check found in recipient (%d)\n",
1782 static void show_certificate (
1783 struct X400Recipient *rp,
1788 struct X400Certificate *cert;
1789 char buffer[BUFSIZ];
1795 fprintf (stderr,
"Error getting %s certificate: %s\n",
1802 buffer,
sizeof buffer, &length);
1804 fprintf(stderr,
"Error getting subject of cert used for %s: %s\n",
1807 printf(
"Subject of Cert used to verify %s (%.*s)\n",
1808 tag, (
int)length, buffer);
1813 buffer,
sizeof buffer, &length);
1815 fprintf(stderr,
"Error getting issuer of cert used for %s: %s\n",
1818 printf(
"Issuer of Cert used to verify %s (%.*s)\n",
1819 tag, (
int)length, buffer);
1825 buffer,
sizeof buffer, &length);
1827 fprintf(stderr,
"Error getting serial num of cert used for %s: %s\n",
1830 printf(
"Serial Num of Cert used to verify %s (%.*s)\n",
1831 tag, (
int)length, buffer);
1836 buffer,
sizeof buffer, &length);
1838 fprintf(stderr,
"Error getting cert der used for %s: %s\n",
1842 "Returned Cert used to verify %s (%d)\n",
1848 buffer,
sizeof buffer, &length);
1851 fprintf(stderr,
"No ORaddress subject alt. name\n");
1853 fprintf(stderr,
"Error from CertGetStrParam: %s\n",
1858 fprintf(stderr,
"ORaddress subject alt name: '%.*s'\n",
1859 (
int)length, buffer);
1865 fprintf(stderr,
"Error from CertGetStrParam: %s\n",
1870 fprintf(stderr,
"ORaddress subject alt name status: %s\n",
1874 static int do_rep_content(
1875 struct X400mtMessage *mp
1878 char buffer[BUFSIZ];
1883 printf(
"Report content\n");
1887 buffer,
sizeof buffer , &length);
1889 printf(
"error getting subject id\n");
1890 fprintf (stderr,
"Error in getting subject id: %s\n",
1894 printf (
"subject id: %.*s\n", (
int)length, buffer);
1898 buffer,
sizeof buffer , &length);
1900 printf(
"error getting icontent-correlator\n");
1901 fprintf (stderr,
"Error in getting content-correlator: %s\n",
1905 printf (
"content-correlator: %.*s\n", (
int)length, buffer);
1910 printf(
"error getting reported-recip\n");
1911 fprintf (stderr,
"Error in getting reported-recip: %s\n",
1917 #ifdef WANT_TRACE_INFO
1919 status = do_trace_info(mp);
1923 printf(
"There is no Trace Info\n");
1925 printf(
"error getting Trace Info\n");
1926 fprintf (stderr,
"Error fetching trace info: %s\n",
1937 static int do_rep_retcontent(
1938 struct X400mtMessage *mp
1941 char buffer[BUFSIZ];
1946 printf(
"Returned content\n");
1951 printf (
"\tNum attachments %d\n", int_param);
1953 printf (
"\tNum attachments STATUS %d\n", status);
1957 buffer,
sizeof buffer , &length);
1959 printf (
"Text:\n%.*s\n", (
int)length, buffer);
1964 static void usage(
void) {
1965 printf(
"usage: %s\n", optstr);
1966 printf(
"\t where:\n");
1967 printf(
"\t -u : Don't prompt to override defaults \n");
1968 printf(
"\t -o : Originator \n");
1969 printf(
"\t -O : Originator Return Address \n");
1970 printf(
"\t -r : Recipient\n");
1971 printf(
"\t -c : X.400 passive channel\n");
1972 printf(
"\t -l : Logline\n");
1973 printf(
"\t -E : Stop after one attempt to transfer a msg\n");
1977 static int do_trace_info (
1978 struct X400mtMessage *mp
1982 char DSI_arrival_time[BUFSIZ];
1983 int DSI_routing_action;
1984 char DSI_attempted_domain[BUFSIZ];
1986 char DSI_AA_def_time[BUFSIZ];
1987 char DSI_AA_CEIT[BUFSIZ];
1988 int DSI_AA_redirected = 0;
1989 int DSI_AA_dl_operation = 0;
1995 struct X400TraceInfo *info = NULL;
2003 GDI, BUFSIZ , &length);
2007 printf (
"GDI entry %d OR Address:%s\n",n,GDI);
2009 fprintf (stderr,
"Error in do_trace_info: %s\n",
2014 DSI_arrival_time, BUFSIZ , &length);
2016 DSI_arrival_time[length] =
'\0';
2017 printf (
"DSI arrival time %d :%s\n",n,DSI_arrival_time);
2019 fprintf (stderr,
"Error in do_trace_info: %s\n",
2024 &DSI_routing_action);
2026 printf (
"DSI routing action %d :%s\n",n,
2027 DSI_routing_action ?
"rerouted" :
"relayed");
2029 fprintf (stderr,
"Error in do_trace_info: %s\n",
2036 DSI_attempted_domain,
2039 DSI_attempted_domain[length] =
'\0';
2040 printf (
"DSI attempted domain %d :%s\n",n,DSI_attempted_domain);
2042 fprintf (stderr,
"Error in do_trace_info optional component: %s\n",
2052 DSI_AA_def_time[length] =
'\0';
2053 printf (
"DSI AA %d :%s\n",n,DSI_AA_def_time);
2055 fprintf (stderr,
"Error in do_trace_info optional component: %s\n",
2065 DSI_AA_CEIT[length] =
'\0';
2066 printf (
"DSI AA %d :%s\n",n,DSI_AA_CEIT);
2068 fprintf (stderr,
"Error in do_trace_info optional component: %s\n",
2075 &DSI_AA_redirected);
2077 printf (
"DSI AA redirected %d :%d\n",n,DSI_AA_redirected );
2079 fprintf (stderr,
"Error in do_trace_info: %s\n",
2085 &DSI_AA_dl_operation);
2087 printf (
"DSI AA dl operation %d :%d\n",n,DSI_AA_dl_operation );
2089 fprintf (stderr,
"Error in do_trace_info: %s\n",
2096 printf(
"No Trace Info found in message\n");
2098 printf(
"%d Trace Info entries found in message\n", n - 1);
2104 static int do_internal_trace_info (
2105 struct X400mtMessage *mp
2112 int SI_routing_action = 0;
2113 int SI_attempted_action = 0;
2117 char SI_MTA_name [BUFSIZ];
2118 char SI_time [BUFSIZ];
2119 char SI_attempted_MTA_name[BUFSIZ];
2120 char SI_attempted_domain [BUFSIZ];
2121 char SI_defered_time [BUFSIZ];
2122 char SI_CEIT [BUFSIZ];
2124 struct X400InternalTraceInfo *info = NULL;
2134 GDI, BUFSIZ , &length);
2141 printf (
"GDI entry %d Domain:%s\n",n,GDI);
2143 fprintf (stderr,
"Error in do_trace_info: %s\n",
2150 SI_time, BUFSIZ , &length);
2156 SI_time[length] =
'\0';
2157 printf (
"SI time entry %d :%s\n",n,SI_time);
2159 fprintf (stderr,
"Error in do_internal_trace_info: %s\n",
2167 SI_MTA_name, BUFSIZ , &length);
2173 SI_MTA_name[length] =
'\0';
2174 printf (
"SI MTA Name entry %d :%s\n",n,SI_MTA_name);
2176 fprintf (stderr,
"Error in do_internal_trace_info: %s\n",
2183 &SI_routing_action);
2186 printf (
"SI routing action %d :relayed\n",n);
2188 printf (
"SI routing action %d :rerouted\n",n);
2192 fprintf (stderr,
"Error in do_internal_trace_info: %s\n",
2198 &SI_attempted_action);
2201 printf (
"SI attempted action %d :MTA\n",n);
2203 printf (
"SI attempted action %d :Domain\n",n);
2207 fprintf (stderr,
"Error in do_internal_trace_info: %s\n",
2215 SI_attempted_MTA_name,
2222 SI_attempted_MTA_name[length] =
'\0';
2223 printf (
"Supplied information attempted MTA %d"
2224 ":%s\n",n,SI_attempted_MTA_name);
2226 fprintf (stderr,
"Error in do_trace_info: %s\n",
2235 SI_attempted_domain, BUFSIZ,
2242 SI_attempted_domain[length] =
'\0';
2243 printf (
"Supplied information attempted Domain entry"
2244 " %d :%s\n",n,SI_attempted_domain);
2246 fprintf (stderr,
"Error in do_internal_trace_info: %s\n",
2263 SI_defered_time[length] =
'\0';
2264 printf (
"SI_defered_time entry %d :%s\n",n,
2267 fprintf (stderr,
"Error in do_internaltrace_info: %s\n",
2281 SI_CEIT[length] =
'\0';
2282 printf (
"SI_CEIT entry %d :%s\n",n,
2285 fprintf (stderr,
"Error in do_internaltrace_info: %s\n",
2295 printf(
"SI_Other_Actions: %d: Redirected\n",n);
2298 printf(
"SI_Other_Actions: %d: DLOP\n",n);
2302 fprintf (stderr,
"Error in do_internal_trace_info: %s\n",
2309 printf(
"No Internal Trace Info found in message\n");
2311 printf(
"%d Internal Trace Info entries found in message\n", n - 1);
2317 static int do_redirection_hist (
2318 struct X400Recipient *recip
2321 char redirection_time [BUFSIZ];
2322 char or_address [BUFSIZ];
2329 struct X400RediHist *hist = NULL;
2337 redirection_time, BUFSIZ,&length);
2341 redirection_time[length] =
'\0';
2342 printf (
"Redirection time: %i %s\n",n,redirection_time);
2344 fprintf (stderr,
"Error in do_redirection_hist: %s\n",
2349 or_address, BUFSIZ , &length);
2351 or_address[length] =
'\0';
2352 printf (
"Redirection OR address %i :%s\n",n,or_address);
2354 fprintf (stderr,
"Error in do_trace_info: %s\n",
2359 dn, BUFSIZ , &length);
2362 printf (
"Redirection DN %i :%s\n",n,dn);
2364 fprintf (stderr,
"Error in do_trace_info: %s\n",
2372 fprintf (stderr,
"Error in do_redirection_hist: %s\n",
2378 printf(
"No Trace Info found in message\n");
2380 printf(
"%d Trace Info entries found in message\n", n - 1);
2386 static int do_redirection_hist_env (
2387 struct X400mtMessage *msg
2390 char redirection_time [BUFSIZ];
2391 char or_address [BUFSIZ];
2398 struct X400RediHist *hist = NULL;
2406 redirection_time, BUFSIZ,&length);
2410 redirection_time[length] =
'\0';
2411 printf (
"Redirection time: %i %s\n",n,redirection_time);
2413 fprintf (stderr,
"Error in do_redirection_hist: %s\n",
2418 or_address, BUFSIZ , &length);
2420 or_address[length] =
'\0';
2421 printf (
"Redirection OR address %i :%s\n",n,or_address);
2423 fprintf (stderr,
"Error in do_trace_info: %s\n",
2428 dn, BUFSIZ , &length);
2431 printf (
"Redirection DN %i :%s\n",n,dn);
2433 fprintf (stderr,
"Error in do_trace_info: %s\n",
2441 fprintf (stderr,
"Error in do_redirection_hist: %s\n",
2447 printf(
"No Redirection histories found in message\n");
2449 printf(
"%d Redirection histories entries found in message\n", n - 1);
2455 #ifdef HANDLING_MILITARY_IPN
2457 static int get_acp127_ali (
2458 struct X400ACP127Resp *resp
2461 struct X400ALI *ali = NULL;
2463 char buffer[BUFSIZ];
2468 for ( n = 1; ; n++ ) {
2474 buffer,
sizeof buffer , &length);
2476 printf (
"P772 ACP127 response Notification "
2477 "ALI recipient OR address %d: %.*s\n",
2478 n, (
int)length, buffer);
2485 buffer,
sizeof buffer , &length);
2487 printf (
"P772 ACP127 response Notification"
2488 " ALI recipient DN address %d: %.*s\n",
2489 n, (
int)length, buffer);
2493 buffer,
sizeof buffer , &length);
2495 printf (
"P772 ACP127 response Notification"
2496 " ALI recipient free form name %d: %.*s\n",
2497 n, (
int)length, buffer);
2501 buffer,
sizeof buffer , &length);
2503 printf (
"P772 ACP127 response Notification"
2504 "ALI recipient Tel number %d: %.*s\n",
2505 n, (
int)length, buffer);
2510 printf (
"P772 ACP127 response Notification"
2511 "ALI Type %d\n", int_param);
2517 printf (
"P772 ACP127 response Notification"
2518 "ALI Notification Request %d\n", int_param);
2524 printf (
"P772 ACP127 response Notification"
2525 "ALI Notification Request %d\n", int_param);
2536 static int get_body_parts(
2537 struct X400mtMessage *mp
2540 #define INIT_BUFFER_SIZE 10000
2548 struct X400Bodypart *bp;
2551 buf = (
char *) malloc(INIT_BUFFER_SIZE);
2553 fprintf(stderr,
"can't alloc %d bytes\n", INIT_BUFFER_SIZE);
2556 buflen = INIT_BUFFER_SIZE;
2558 for (i = 1; i <= num_atts ; i++) {
2559 printf (
"Get attachment %d\n", i);
2563 fprintf(stderr,
"X400mtMsgGetBodypart %d failed %s\n", i,
2573 printf(
"got Bodypart %d, type = %s\n", i,
2583 type ==
X400_T_MM ?
"P772 Forwarded MM" :
2593 char buffer[BUFSIZ];
2594 struct X400Message *fwd_content_env = NULL;
2599 fprintf(stderr,
"X400mtMsgGetBodypart failed %s\n",
2607 buffer,
sizeof buffer , &length);
2610 printf (
"Forwarded Content bodypart"
2611 " Message Delivery Time: %.*s\n",
2612 (
int)length, buffer);
2614 fprintf(stderr,
"X400MsgGetStrParam failed %s\n",
2620 buffer,
sizeof buffer , &length);
2623 printf (
"Forwarded Content bodypart"
2624 " Message identifier: %.*s\n",
2625 (
int)length, buffer);
2627 fprintf(stderr,
"X400MsgGetStrParam failed %s\n",
2636 buffer,
sizeof buffer , &length);
2638 printf (
"Forwarded content bodypart data: %i bytes\n",
2641 fprintf(stderr,
"X400MsgGetStrParam failed %s\n",
2651 char buffer[BUFSIZ];
2652 struct X400Message *ENC_fwd = NULL;
2657 fprintf(stderr,
"X400mtMsgGetBodypart failed %s\n",
2664 buffer,
sizeof buffer , &length);
2667 printf (
"P772 Forwarded Encrypted bodypart"
2668 " Message Delivery Time: %.*s\n",
2669 (
int)length, buffer);
2671 fprintf(stderr,
"X400MsgGetStrParam failed %s\n",
2677 buffer,
sizeof buffer , &length);
2679 printf (
"P772 Forwarded encrypted bodypart data: %i bytes\n",
2682 fprintf(stderr,
"X400MsgGetStrParam failed %s\n",
2691 char buffer[BUFSIZ];
2692 struct X400Message *MM_fwd = NULL;
2697 fprintf(stderr,
"X400mtMsgGetBodypart failed %s\n",
2704 buffer,
sizeof buffer , &length);
2707 printf (
"P772 MM bodypart Message Delivery Time: %.*s\n",
2708 (
int)length, buffer);
2710 fprintf(stderr,
"X400MsgGetStrParam failed %s\n",
2716 buffer,
sizeof buffer , &length);
2718 printf (
"Subject: %.*s\n", (
int)length, buffer);
2720 fprintf(stderr,
"X400MsgGetStrParam failed %s\n",
2732 printf(
"No P772 ADatP3 parameters present\n");
2734 fprintf(stderr,
"X400BodypartGetIntParam failed %s\n",
2740 printf(
"P772 ADatP3 Parm %d is %d\n",i,parm_type);
2745 fprintf(stderr,
"X400BodypartGetIntParam failed %s\n",
2751 printf(
"P772 ADatP3 Choice %d is %d\n",i,parm_type);
2760 printf(
"P772 ADatP3 %i data: %.*s \n",
2761 i,(
int)ret_len,buf);
2767 char buffer [BUFSIZ];
2773 fprintf(stderr,
"X400BodypartGetIntParam failed %s\n",
2778 printf(
"P772 Corrections Parm %d is %d\n",i,parm);
2786 printf(
"P772 Correction %i data: %.*s \n",i,(
int)length,buffer);
2794 char buffer [BUFSIZ];
2800 fprintf(stderr,
"X400BodypartGetIntParam failed %s\n",
2805 printf(
"P772 ACP127Data Parm %d is %d\n",i,parm);
2813 printf(
"P772 ACP127Data %i data: %.*s \n",i,(
int)length,buffer);
2820 printf (
"Skipping bodypart\n");
2831 static int do_orig_and_dl (
2832 struct X400mtMessage *mp
2835 char exp_time [BUFSIZ];
2836 char or_address [BUFSIZ];
2837 char dn_address [BUFSIZ];
2843 struct X400ORandDL *orig_and_dl = NULL;
2849 printf(
"Finished getting originator and dl expansion history\n");
2857 exp_time, BUFSIZ,&length);
2860 exp_time[length] =
'\0';
2861 printf (
"do_orig_and_dl: %i %s\n",n,exp_time);
2863 fprintf (stderr,
"Error in do_orig_and_dl: %s\n",
2868 or_address, BUFSIZ , &length);
2870 or_address[length] =
'\0';
2871 printf (
"do_orig_and_dl OR address %i :%s\n",n,or_address);
2873 fprintf (stderr,
"Error in do_orig_and_dl: %s\n",
2879 dn_address, BUFSIZ , &length);
2881 dn_address[length] =
'\0';
2882 printf (
"originator and DL expansion DN %i :%s\n",n,dn_address);
2884 fprintf (stderr,
"Error in do_orig_and_dl: %s\n",
#define X400_S_ORIGINATOR_RETURN_ADDRESS
#define X400_MTA_SI_OTHER_ACTION_REDIRECTED
#define X400_N_ACP127_NOTI_TYPE
X400COMMON_CDECL int X400ACP127RespGetStrParam(struct X400ACP127Resp *resp, int type, char *buffer, size_t buflen, size_t *paramlenp)
Get string parameter from ACP127 Notification Response object.
X400COMMON_CDECL int X400OtherRecipGetIntParam(struct X400OtherRecip *otherrecip, int *value)
Get integer parameter from the Other Recipient Indicator object.
#define X400_N_MTA_SI_ROUTING_ACTION
#define X400_S_LOG_CONFIGURATION_FILE
X400COMMON_CDECL int X400RecipGetCert(struct X400Recipient *rp, int certtype, struct X400Certificate **certp)
Get certificate object from recipient This returns a certificate which was used to sign an object in ...
#define X400_N_EXT_CODRESS
#define X400_S_ENCRYPTED_DATA_BYTES_ONLY
X400COMMON_CDECL int X400BodypartGetIntParam(struct X400Bodypart *bp, int paramtype, int *valp)
Return a integer-valued parameter from the body part object.
#define X400_S_OBSOLETED_IPMS
#define X400_S_CERT_ISSUER_DN
#define X400_N_RECIPIENT_REASSIGNMENT_PROHIBITED
#define X400_S_CONTENT_CORRELATOR_IA5_STRING
#define X400_S_REPLY_TIME
#define X400_E_ADDRESS_ERROR
#define X400_S_CONTENT_CORRELATOR
#define X400_S_ACP127_NOTI_RESP_SUPP_INFO
#define X400_S_ORIGINATOR_REQUESTED_ALTERNATE_RECIPIENT
#define X400_S_MSGTOK_RECIP
#define X400_N_DISCLOSURE
#define X400_S_ACP127_NOTI_RESP_TIME
#define X400_N_ACP127DATA_PARM
#define X400_N_MTA_SI_ATTEMPTED_ACTION
#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
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.
X400COMMON_CDECL int X400ORandDLGetStrParam(struct X400ORandDL *or_and_dl, int paramtype, char *buffer, size_t buflen, size_t *paramlenp)
Get string parameter from ACP127 Response object.
#define X400_S_DIST_CODES_SIC
X400COMMON_CDECL int X400ALIGetStrParam(struct X400ALI *ALI, int paramtype, char *buffer, size_t buflen, size_t *paramlenp)
Get string parameter from Address List Indicator object.
int X400mtInternalTraceInfoGet(struct X400mtMessage *mp, int entry, struct X400InternalTraceInfo **info)
Get an Internal Trace Info object for a message object.
X400COMMON_CDECL int X400CertGetIntParam(struct X400Certificate *cp, int paramtype, int *valp)
Return a integer-valued parameter from the certificate object.
#define X400_N_TYPE_OF_USER
int X400mtClose(struct X400mtSession *sp)
Close a X400 Session.
#define X400_S_INFO_SEC_LABEL
X400COMMON_CDECL int X400PSSGetStrParam(struct X400PSS *pss, char *buffer, size_t buflen, size_t *paramlenp)
Get string parameter from Printable String Sequence object.
X400COMMON_CDECL int X400RediHistGet(struct X400Recipient *recip, int entry, struct X400RediHist **hist)
Get the Redirection History object from a recipient.
#define X400_N_EXT_MSG_TYPE
#define X400_N_DSI_ROUTING_ACTION
X400COMMON_CDECL int X400InternalTraceInfoGetStrParam(struct X400InternalTraceInfo *info, int paramtype, char *buffer, size_t buflen, size_t *paramlenp)
Get string parameter from Internal Trace Information object.
#define X400_N_CONVERSION_WITH_LOSS_PROHIBITED
#define X400_N_ADATP3_CHOICE
int X400mtDistFieldGet(struct X400mtMessage *mp, int entry, struct X400DistField **distfield)
Get a new P772 Distribution Field object for a message object.
int X400mtMsgGetStart(struct X400mtSession *sp, struct X400mtMessage **mpp, int *typep)
Get message object for transfer out from MTA.
int X400mtMsgGetFinish(struct X400mtMessage *mp, int status, int reason, int diag, const char *info)
Finish transfer-out of message from MTA, generate DR if required.
int X400mtOtherRecipGet(struct X400mtMessage *mp, int entry, struct X400OtherRecip **otherrecip)
Get a new P772 Other Recipient object for a message object.
#define X400_S_CONVERTED_ENCODED_INFORMATION_TYPES
int X400mtMsgGetMessageBody(struct X400mtMessage *mp, int number, struct X400Message **mpp)
Return a pointer to a body part object.
int X400mtMsgGetBodypart(struct X400mtMessage *mp, int number, int *typep, struct X400Bodypart **bpp)
Return a pointer to a body part object.
#define X400_S_EXT_AUTH_INFO
#define X400_S_CONTENT_FILE_PATH
#define X400_N_MSGTOK_STATUS
int X400mtRecipGet(struct X400mtMessage *mp, int type, int number, struct X400Recipient **rpp)
Get recipient object from message.
#define X400_S_MTA_SI_ATTEMPTED_MTA
#define X400_N_ADATP3_PARM
int X400mtMarkToFault(struct X400mtSession *sp, int attType, int fault)
Control how extension attributes in Envelopes and Envelope Recipient addresses are handled....
#define X400_N_NUM_ATTACHMENTS
int X400mtOpen(const char *credentials, struct X400mtSession **spp)
Open a session to the MTA.
#define X400_S_REDIRECTION_TIME
#define X400_N_RECIP_CIC_STATUS
#define X400_S_MTA_SI_ATTEMPTED_DOMAIN
#define X400_ACP127_NOTI_TYPE_NEG
#define X400_S_MSGTOK_CIC
#define X400_S_SECURITY_LABEL
#define X400_E_MESSAGE_BODY
int X400mtMsgGetIntParam(struct X400mtMessage *mp, int paramtype, int *valp)
Return a integer-valued parameter from the message object.
#define X400_T_ACP127DATA
#define X400_EXEMPTED_ADDRESS
const char * X400mtError(int error)
Return string for error code.
X400COMMON_CDECL int X400RediHistGetStrParam(struct X400RediHist *hist, int paramtype, char *value, size_t length, size_t *lengthp)
Get string-valued parameter from the X400RediHist object.
#define X400_N_REPLY_REQUESTED
#define X400_S_DSI_ATTEMPTED_DOMAIN
#define X400_DL_EXEMPTED_RECIP
#define X400_N_EXT_COPY_PREC
X400COMMON_CDECL int X400ACP127RespGetIntParam(struct X400ACP127Resp *resp, int *value)
Get integer parameter from the ACP127 Notification Response object.
#define X400_S_MTA_SI_TIME
int X400mtRecipGetIntParam(struct X400Recipient *rp, int paramtype, int *valp)
Return a integer-valued parameter from the recipient object.
#define X400_S_TELEPHONE_NUMBER
#define X400_S_MSGTOK_SEC_LAB
#define X400_S_DIRECTORY_NAME
#define X400_S_RELATED_IPMS
int X400mtRediHistGetEnv(struct X400mtMessage *msg, int entry, struct X400RediHist **hist)
Get the Redirection History object from a message envelope this is represented by 8....
#define X400_N_OR_CANONICAL
#define X400_S_MESSAGE_DELIVERY_TIME
#define X400_S_LATEST_DELIVERY_TIME
#define X400_S_ACP127_MSG_ID
#define X400_S_MSGTOK_DER
X400COMMON_CDECL int X400InternalTraceInfoGetIntParam(struct X400InternalTraceInfo *info, int paramtype, int *valuep)
Get int parameter from Internal Trace Information object.
#define X400_T_FWD_CONTENT
#define X400_N_CERT_MSGTOK_CIC
int X400mtDLExpHistGet(struct X400mtMessage *mp, int entry, struct X400DLExpHist **hist)
Create a new DL Expansion History object from the message object.
#define X400_ACP127_NOTI_TYPE_POS
#define X400_N_ALI_NOTIFICATION_REQUEST
X400COMMON_CDECL int X400DistFieldGetStrParam(struct X400DistField *distfield, int type, char *buffer, size_t buflen, size_t *paramlenp)
Get string parameter from Distribution Code extension Field object.
#define X400_S_DIST_CODES_EXT_VALUE
#define X400_MTA_SI_OTHER_ACTION_DLOPERATION
X400COMMON_CDECL int X400ALIGetIntParam(struct X400ALI *ALI, int paramtype, int *valuep)
Get int parameter from Address List Indicator object.
#define X400_S_ACP127_NOTI_RESP_RECIPIENT
#define X400_MTA_SI_ROUTING_ACTION_RELAYED
#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
#define X400_S_ADATP3_DATA
#define X400_E_NO_MESSAGE
#define X400_S_FWD_CONTENT_STRING
#define X400_N_ALI_REPLY_REQUEST
#define X400_N_DSI_AA_REDIRECTED
#define X400_N_REPORT_REQUEST
X400COMMON_CDECL int X400RediHistGetIntParam(struct X400RediHist *info, int paramtype, int *valuep)
Get int parameter from Redirection History object.
X400COMMON_CDECL int X400MsgGetStrParam(struct X400Message *mp, int paramtype, char *buffer, size_t buflen, size_t *paramlenp)
Return a string-valued parameter from the message object.
int X400mtMsgGetStrParam(struct X400mtMessage *mp, int paramtype, char *buffer, size_t buflen, size_t *paramlenp)
Return a string-valued parameter from the message object.
#define X400_N_IMPLICIT_CONVERSION_PROHIBITED
#define X400_N_REDIRECTION_REASON
#define X400_S_EXPIRY_TIME
#define X400_S_SUBJECT_IDENTIFIER
#define X400_S_AUTHORIZATION_TIME
int X400mtPSSGet(struct X400mtMessage *mp, int type, int entry, struct X400PSS **pss)
Get a new Printable String Syntax object for a message object.
X400COMMON_CDECL int X400ACP127RespGetALI(struct X400ACP127Resp *resp, struct X400ALI **ali, int entry)
Get an Address List Indicator object associated with the X400ACP127 object.
#define X400_N_DSI_AA_DLOPERATION
#define X400_S_EXTERNAL_CONTENT_TYPE
#define X400_S_ORIGINATOR_REQUESTED_ALTERNATE_RECIPIENT_DN
#define X400_N_CERT_ORADDRESS_STATUS
#define X400_N_CONTENT_LENGTH
#define X400_N_MSGTOK_SEQ_NUM
#define X400_S_MESSAGE_INSTRUCTIONS
#define X400_S_CONTENT_CORRELATOR_OCTET_STRING
#define X400_E_MISSING_ATTR
#define X400_RECIP_PRIMARY
#define X400_S_CORREC_DATA
#define X400_N_MTA_SI_OTHER_ACTIONS
int X400mtTraceInfoGet(struct X400mtMessage *mp, int entry, struct X400TraceInfo **info, int type)
Get a Trace Info object for a message object.
#define X400_S_CERT_SERIAL_NUM
#define X400_S_FREE_FORM_NAME
#define X400_S_PILOT_FWD_INFO
#define X400_N_DL_EXPANSION_PROHIBITED
#define X400_S_ARRIVAL_TIME
#define X400_N_NON_DELIVERY_DIAGNOSTIC
#define X400_N_NON_DELIVERY_REASON
X400COMMON_CDECL int X400TraceInfoGetStrParam(struct X400TraceInfo *info, int paramtype, char *buffer, size_t buflen, size_t *paramlenp)
Get string parameter from Trace Information object.
const X400COMMON_CDECL char * X400RediReason(int redirection_reason)
Return a human readable string based on a redirection reason.
int X400mtALIGet(struct X400mtMessage *mp, int entry, struct X400ALI **ali)
Get a new Address List Indicator object for a message object.
#define X400_N_ALTERNATE_RECIPIENT_ALLOWED
#define X400_N_IMPORTANCE
#define X400_N_NOTIFICATION_REQUEST
#define X400_N_CERT_MSGTOK
#define X400_S_REPLIED_TO_IDENTIFIER
#define X400_S_MESSAGE_SUBMISSION_TIME
#define X400_S_CERT_SUBJECT_DN
#define X400_S_GLOBAL_DOMAIN_ID
#define X400_S_DSI_AA_CEIT
int X400mtORandDLGet(struct X400mtMessage *msg, int entry, struct X400ORandDL **or_and_dl)
Get Originator and DL expansion history object.
#define X400_N_CORREC_PARM
#define X400_S_SUPPLEMENTARY_INFO
#define X400_S_IPM_IDENTIFIER
#define X400_T_CORRECTIONS
#define X400_ACP127_NOTI_TYPE_TRANS
#define X400_N_EXT_PRIM_PREC
int X400mtRecipGetStrParam(struct X400Recipient *rp, int paramtype, char *buffer, size_t buflen, size_t *paramlenp)
Return a string-valued parameter from the recipient object.
#define X400_S_EXT_MSG_IDENTIFIER
#define X400_REPORTING_DL_NAME
#define X400_S_ACP127_DATA
#define X400_S_MTA_SI_DEFERRED_TIME
#define X400_S_HANDLING_INSTRUCTIONS
#define X400_S_DSI_ARRIVAL_TIME
X400COMMON_CDECL int X400OtherRecipGetStrParam(struct X400OtherRecip *otherrecip, char *buffer, size_t buflen, size_t *paramlenp)
Get string parameter from Other Recipient object.
X400COMMON_CDECL int X400TraceInfoGetIntParam(struct X400TraceInfo *info, int paramtype, int *valuep)
Get int parameter from Trace Information object.
X400COMMON_CDECL int X400CertGetStrParam(struct X400Certificate *cp, int paramtype, char *buffer, size_t buflen, size_t *paramlenp)
Return a string-valued parameter from the certificate 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 X400mtACP127RespGet(struct X400mtMessage *mp, struct X400ACP127Resp **respp)
Get the ACP127 Notification Response object from a message.
#define X400_S_DLEXP_TIME
#define X400_N_CERT_RECIP_CIC
#define X400_S_MTA_SI_CEIT
#define X400_T_GENERAL_TEXT
#define X400_N_CONTENT_TYPE
#define X400_E_INVALID_ATTR
#define X400_S_OR_ADDRESS
#define X400_S_ORIG_OR_EXAP_TIME
#define X400_S_DSI_AA_DEF_TIME
X400COMMON_CDECL int X400BodypartGetStrParam(struct X400Bodypart *bp, int paramtype, char *buffer, size_t buflen, size_t *paramlenp)
Return a string-valued parameter from the body part object.
#define X400_RECIP_REPORT
#define X400_RECIP_ENVELOPE
All rights reserved © 2002 - 2024 Isode Ltd.