26 #include <seclabel_api.h>
28 #include "ms_example.h"
30 int num_unsigned_rcvd;
31 int num_unverified_rcvd;
32 int num_verified_rcvd;
34 static char *optstr =
"u37m:d:p:w:M:D:P:W:e:b:x:Y:U:";
36 static void usage(
void);
40 struct X400msSession *sp
43 static void setup_default_new_sec_env(
44 struct X400msSession *sp,
45 char *sec_trusted_cert_dir
48 static void setup_default_old_sec_env(
49 struct X400msSession *sp,
55 static int report_moac_info(
56 struct X400msMessage *mp
59 static void show_4406_certificate (
struct X400msMessage *mp);
60 static void show_certificate (
struct X400msMessage *mp);
61 static int report_4406_info(
62 struct X400msMessage *mp
65 static void print_sec_label(
83 struct X400msSession *sp;
89 if (get_args(argc, argv, optstr)) {
94 printf(
"Connection type (0 = P7, 1 = P3 submit only, 2 = P3 both directions) [%d]: ", x400_contype);
95 contype = ic_fgetc(x400_contype, stdin);
97 ic_fgetc(x400_contype, stdin);
99 if ( contype <
'0' ||
'2' < contype )
100 contype = x400_contype;
105 def_oraddr = x400_ms_user_addr;
106 def_dn = x400_ms_user_dn;
107 def_pa = x400_ms_presentation_address;
110 def_oraddr = x400_mta_user_addr;
111 def_dn = x400_mta_user_dn;
112 def_pa = x400_mta_presentation_address;
115 printf(
"Your ORAddress [%s] > ", def_oraddr);
116 ic_fgets(orn,
sizeof orn, stdin);
118 if (orn[strlen(orn) - 1] ==
'\n')
119 orn[strlen(orn) - 1] =
'\0';
122 strcpy(orn, def_oraddr);
125 printf(
"Password [%s]: ",
126 contype == 0 ? x400_p7_password : x400_p3_password);
127 if (ic_fgets(buffer,
sizeof buffer, stdin) == NULL)
130 if (buffer[strlen(buffer) - 1] ==
'\n')
131 buffer[strlen(buffer) - 1] =
'\0';
132 if (buffer[0] ==
'\0')
133 strcpy(buffer, contype == 0 ? x400_p7_password : x400_p3_password);
135 printf(
"Presentation Address [%s] > ", def_pa);
136 ic_fgets(pa,
sizeof pa, stdin);
138 if (pa[strlen(pa) - 1] ==
'\n')
139 pa[strlen(pa) - 1] =
'\0';
144 status =
X400msOpen(contype, orn, def_dn, buffer, pa, &nummsg, &sp);
146 fprintf(stderr,
"Error in Open: %s\n",
X400msError(status));
162 #ifdef WANT_AUTOFORWARDING
163 struct X400msAutoActionParameter *aa_param;
199 "This message was autoforwarded",
204 "This is a cover note", -1);
208 "AutoForwarded:", -1);
214 "Error in RegisterAutoAction: %s\n",
X400msError(status));
219 printf(
"Registered AutoForwarding autoaction (id = 4) OK\n");
228 fprintf(stderr,
"Error in RegisterAutoAction: %s\n",
234 printf(
"Registered AutoAlert autoaction (id = 9) OK\n");
240 fprintf(stderr,
"Error in RegisterAutoAction: %s\n",
246 printf(
"Registered AutoAlert autoaction (id = 10) OK\n");
251 fprintf(stderr,
"Error in DeregisterAutoAction: %s\n",
257 printf(
"Deregistered AutoAlert autoaction (id = 10) OK\n");
261 printf (
"no messages - waiting 60 seconds for a message to be delivered.....\n");
264 printf(
"%d messages waiting\n", nummsg);
267 status = get_msg(sp);
269 fprintf(stderr,
"Error in getting msg: %s\n",
273 fprintf(stderr,
"got first\n");
274 status = get_msg(sp);
276 fprintf(stderr,
"Error in getting msg: %s\n",
280 fprintf(stderr,
"got second\n");
282 status = get_msg(sp);
284 fprintf(stderr,
"Error in getting msg: %s\n",
288 fprintf(stderr,
"got third\n");
290 status = get_msg(sp);
292 fprintf(stderr,
"Error in getting msg: %s\n",
296 fprintf(stderr,
"got third\n");
298 status = get_msg(sp);
300 fprintf(stderr,
"Error in getting msg: %s\n",
304 fprintf(stderr,
"got third\n");
306 status = get_msg(sp);
308 fprintf(stderr,
"Error in getting msg: %s\n",
312 fprintf(stderr,
"got third\n");
315 printf(
"%d num_unsigned_rcvd\n", num_unsigned_rcvd);
316 printf(
"%d num_unverified_rcvd\n", num_unverified_rcvd);
317 printf(
"%d num_verified_rcvd\n", num_verified_rcvd);
323 struct X400msSession *sp
327 int status, sig_status;
331 struct X400msMessage *mp;
332 struct X400Recipient *rp;
336 char recipient_str[BUFSIZ];
338 printf(
"Waiting for new messages for 10 seconds\n");
341 fprintf(stderr,
"Error from Wait: %s\n",
X400msError(status));
346 printf(
"------------- New Message ----------------\n");
361 if (use_new_sec_env) {
362 setup_default_new_sec_env(sp, trusted_ca_certs_dir);
364 setup_default_old_sec_env(sp, security_id, identity_dn, passphrase);
375 if (x400_default_recipient != NULL)
376 printf(
"Getting message\n");
380 fprintf(stderr,
"MsgGet successfully got message\n");
383 fprintf(stderr,
"Error from MsgGet: %s\n",
X400msError(status));
391 fprintf(stderr,
"Got a report (printing only some attributes)\n");
395 buffer,
sizeof buffer, &length);
397 fprintf(stderr,
"Error from MsgGetStrParam: %s\n",
403 printf(
"Subject Identifier: %.*s\n", (
int)length, buffer);
411 fprintf(stderr,
"Error from RecipGet: %s\n",
421 sizeof recipient_str, &length);
423 fprintf(stderr,
"Error from RecipGetStrParam: %s\n",
430 printf(
"Positive Delivery Report for recipient %d: %.*s\n", n,
431 (
int)length, recipient_str);
436 buffer,
sizeof buffer, &length);
439 printf(
"Delivery Time: %.*s\n", (
int)length, buffer);
443 printf(
"Negative Delivery Report for recipient %d: %s\n", n,
448 buffer,
sizeof buffer,
451 fprintf(stderr,
"Error from RecipGetStrParam: %s\n",
455 printf(
"Supplementary Info: %.*s\n", (
int)length, buffer);
462 fprintf(stderr,
"Error from MsgGetIntParam: %s\n",
465 printf(
"Non-Delivery Reason: %d\n", intparam);
472 fprintf(stderr,
"Error from MsgGetIntParam: %s\n",
475 printf(
"Non-Delivery Diagnostic: %d\n", intparam);
479 num_unsigned_rcvd++ ;
482 fprintf(stderr,
"Error from X400msMsgDelete: %s\n",
489 (void) report_moac_info(mp);
492 sig_status = report_4406_info(mp);
496 buffer,
sizeof buffer, &length);
498 printf(
"X.411 Security Label returned OK (%d chars)\n", (
int)length);
499 print_sec_label(buffer, length);
501 printf(
"X.411 Security Label not returned (%d) (%s)\n", status,
508 printf (
"Content type : P%d\n", intparam);
510 fprintf(stderr,
"No content type: Error from MsgGetStrParam: %s\n",
516 buffer,
sizeof buffer, &length);
518 printf(
"External Content Type: %.*s\n", (
int)length, buffer);
520 fprintf(stderr,
"No content type: Error from MsgGetStrParam: %s\n",
527 buffer,
sizeof buffer, &length);
529 fprintf(stderr,
"Error from MsgGetStrParam: %s\n",
535 printf(
"Message Identifier: %.*s\n", (
int)length, buffer);
539 buffer,
sizeof buffer, &length);
541 fprintf(stderr,
"Error from MsgGetStrParam: %s\n",
547 printf(
"Originator: %.*s\n", (
int)length, buffer);
551 printf(
"Deleting triple wrapped message\n");
564 fprintf(stderr,
"Error from RecipGet: %s\n",
X400msError(status));
572 buffer,
sizeof buffer, &length);
574 printf(
"Recipient %d: %.*s\n", n, (
int)length, buffer);
579 printf(
"Primary Recipient Precedence %d\n", intparam);
581 fprintf(stderr,
"Error from RecipGet: %s\n",
X400msError(status));
588 buffer,
sizeof buffer, &length);
590 printf(
"Subject: %.*s\n", (
int)length, buffer);
594 buffer,
sizeof buffer, &length);
596 printf(
"External Content Type: %.*s\n", (
int)length, buffer);
600 buffer,
sizeof buffer, &length);
602 printf(
"\nIA5 Text:\n%.*s\n\n", (
int)length, buffer);
604 fprintf (stderr,
"No IA5 text in message");
605 fprintf (stderr,
"X400msMsgGetStrParam returned error: %s\n",
610 printf(
"Getting body parts\n");
628 static void setup_default_new_sec_env(
629 struct X400msSession *sp,
630 char *trusted_ca_certs_directory
636 printf(
"Adding %s as trusted CA cert dir\n", trusted_ca_certs_directory);
638 trusted_ca_certs_directory, -1);
640 fprintf (stderr,
"X400msSetStrDefault returned error: %s\n",
657 static void setup_default_old_sec_env(
658 struct X400msSession *sp,
677 fprintf (stderr,
"X400msSetStrDefault returned error: %s\n",
685 fprintf (stderr,
"X400msSetStrDefault returned error: %s\n",
693 static int report_moac_info(
694 struct X400msMessage *mp
704 num_unverified_rcvd++ ;
705 fprintf (stderr,
"No MOAC in message\n");
709 num_unverified_rcvd++ ;
710 fprintf (stderr,
"Unexpected error getting MOAC status: %s\n",
715 fprintf (stderr,
"Have MOAC in message (%d)\n", intparam);
719 "MsgGet successfully verified signature in message\n");
720 show_certificate (mp);
721 fprintf(stderr,
"continuing ...\n");
722 num_verified_rcvd++ ;
726 "MOAC validation cannot take place because the security environment is invalid (%d):\n",
733 "MOAC validation cannot take place because the security environment is invalid (%d):\n",
738 fprintf(stderr,
"Verification Error from MsgGet: %s\n",
740 show_certificate (mp);
741 fprintf(stderr,
"continuing ...\n");
742 num_unverified_rcvd++ ;
745 fprintf(stderr,
"Verification Error from MsgGet: %s\n",
747 fprintf(stderr,
"continuing ...\n");
748 num_unverified_rcvd++ ;
751 fprintf(stderr,
"Verification Error from MsgGet: %s\n",
753 show_certificate (mp);
754 fprintf(stderr,
"continuing ...\n");
755 num_unverified_rcvd++ ;
758 fprintf(stderr,
"Verification Error from MsgGet: %s\n",
760 show_certificate (mp);
761 fprintf(stderr,
"continuing ...\n");
762 num_unverified_rcvd++ ;
765 fprintf(stderr,
"Verification Error from MsgGet: %s\n",
767 show_certificate (mp);
768 fprintf(stderr,
"continuing ...\n");
769 num_unverified_rcvd++ ;
772 fprintf(stderr,
"Verification Error from MsgGet: %s\n",
774 show_certificate (mp);
775 fprintf(stderr,
"continuing ...\n");
776 num_unverified_rcvd++ ;
779 fprintf(stderr,
"Verification Error from MsgGet: %s\n",
781 show_certificate (mp);
782 fprintf(stderr,
"continuing ...\n");
783 num_unverified_rcvd++ ;
787 "Unexpected verification error from MsgGet(%d): %s\n",
790 show_certificate (mp);
791 fprintf(stderr,
"continuing ...\n");
792 num_unverified_rcvd++ ;
800 static int report_4406_info(
801 struct X400msMessage *mp
813 num_unverified_rcvd++ ;
814 fprintf (stderr,
"No 4406 signature in message\n");
818 num_unverified_rcvd++ ;
819 fprintf (stderr,
"Unexpected error getting 4406 signature status: %s\n",
824 fprintf (stderr,
"Have 4406 signature in message (%d)\n", intparam);
828 "MsgGet successfully verified signature in message\n");
829 show_4406_certificate (mp);
830 fprintf(stderr,
"continuing ...\n");
831 num_verified_rcvd++ ;
835 "4406 signature validation cannot take place because the security environment is invalid (%d):\n",
842 "4406 signature validation cannot take place because the security environment is invalid (%d):\n",
847 fprintf(stderr,
"Verification Error from MsgGet: %s\n",
849 show_4406_certificate (mp);
850 fprintf(stderr,
"continuing ...\n");
851 num_unverified_rcvd++ ;
854 fprintf(stderr,
"Verification Error from MsgGet: %s\n",
856 fprintf(stderr,
"continuing ...\n");
857 num_unverified_rcvd++ ;
860 fprintf(stderr,
"Verification Error from MsgGet: %s\n",
862 show_4406_certificate (mp);
863 fprintf(stderr,
"continuing ...\n");
864 num_unverified_rcvd++ ;
867 fprintf(stderr,
"Verification Error from MsgGet: %s\n",
869 show_4406_certificate (mp);
870 fprintf(stderr,
"continuing ...\n");
871 num_unverified_rcvd++ ;
874 fprintf(stderr,
"Verification Error from MsgGet: %s\n",
876 show_4406_certificate (mp);
877 fprintf(stderr,
"continuing ...\n");
878 num_unverified_rcvd++ ;
881 fprintf(stderr,
"Verification Error from MsgGet: %s\n",
883 show_4406_certificate (mp);
884 fprintf(stderr,
"continuing ...\n");
885 num_unverified_rcvd++ ;
888 fprintf(stderr,
"Verification Error from MsgGet: %s\n",
890 show_4406_certificate (mp);
891 fprintf(stderr,
"continuing ...\n");
892 num_unverified_rcvd++ ;
895 fprintf(stderr,
"Verification Error from MsgGet: %s\n",
897 show_certificate (mp);
898 fprintf(stderr,
"continuing ...\n");
899 num_unverified_rcvd++ ;
902 fprintf(stderr,
"Unexpected verification error from MsgGet: %s\n",
904 show_4406_certificate (mp);
905 fprintf(stderr,
"continuing ...\n");
906 num_unverified_rcvd++ ;
912 printf(
"------------- 4406 Info ----------------\n");
914 buffer,
sizeof buffer, &length);
916 printf(
"4406 Security Label returned OK (%d chars)\n", (
int)length);
917 print_sec_label(buffer, length);
919 printf(
"4406 Security Label not returned (%d) (%s)\n", status,
925 buffer,
sizeof buffer, &length);
927 printf(
"4406 signing time returned OK\n%.*s\n", (
int)length, buffer);
929 printf(
"4406 signing time not returned (%d) (%s)\n", status,
932 printf(
"------------ End 4406 Info -----------\n");
936 static void show_certificate (
struct X400msMessage *mp)
939 struct X400Certificate *cert;
946 fprintf (stderr,
"Error getting MOAC certificate: %s\n",
952 buffer,
sizeof buffer, &length);
954 fprintf(stderr,
"Error from CertGetStrParam: %s\n",
959 "subject DN of originator certificate '%.*s'\n", (
int)length, buffer);
961 buffer,
sizeof buffer, &length);
963 fprintf(stderr,
"Error from CertGetStrParam: %s\n",
968 "issuer DN of originator certificate '%.*s'\n", (
int)length, buffer);
971 buffer,
sizeof buffer, &length);
974 fprintf(stderr,
"No ORaddress subject alt. name\n");
976 fprintf(stderr,
"Error from CertGetStrParam: %s\n",
981 fprintf(stderr,
"ORaddress subject alt name: '%.*s'\n", (
int)length, buffer);
987 fprintf(stderr,
"Error from CertGetStrParam: %s\n",
992 fprintf(stderr,
"ORaddress subject alt name status: %s\n",
997 static void show_4406_certificate (
struct X400msMessage *mp)
1000 struct X400Certificate *cert;
1001 char buffer[BUFSIZ];
1007 fprintf (stderr,
"Error getting 4406 certificate: %s\n",
1013 buffer,
sizeof buffer, &length);
1015 fprintf(stderr,
"Error from CertGetStrParam: %s\n",
1019 fprintf(stderr,
"subject DN of originator certificate '%.*s'\n",
1020 (
int)length, buffer);
1022 buffer,
sizeof buffer, &length);
1024 fprintf(stderr,
"Error from CertGetStrParam: %s\n",
1028 fprintf(stderr,
"issuer DN of originator certificate '%.*s'\n",
1029 (
int)length, buffer);
1032 buffer,
sizeof buffer, &length);
1035 fprintf(stderr,
"No ORaddress subject alt. name\n");
1037 fprintf(stderr,
"Error from CertGetStrParam: %s\n",
1042 fprintf(stderr,
"ORaddress subject alt name: '%.*s'\n",
1043 (
int)length, buffer);
1049 fprintf(stderr,
"Error from CertGetStrParam: %s\n",
1054 fprintf(stderr,
"ORaddress subject alt name status: %s\n",
1060 static void print_sec_label(
1066 #define XML_BUFSIZE 1024
1068 char xml_buffer[XML_BUFSIZE];
1071 status = SecLabelInit(
"Example program");
1072 if (status != SECLABEL_E_NOERROR) {
1073 fprintf(stderr,
"SecLabelInit returned error %d\n", status);
1077 status = SecLabelPrint((
const unsigned char *) slab_buffer,
1082 if (status != SECLABEL_E_NOERROR) {
1083 fprintf(stderr,
"SecLabelParse returned error %d\n", status);
1088 printf(
"Got security label:\n%s\n", xml_buffer);
1093 static void usage(
void) {
1094 printf(
"usage: %s\n", optstr);
1095 printf(
"\t where:\n");
1096 printf(
"\t -u : Don't prompt to override defaults \n");
1097 printf(
"\t -3 : Use P3 connection \n");
1098 printf(
"\t -7 : Use P7 connection \n");
1099 printf(
"\t -m : OR Address in P7 bind arg \n");
1100 printf(
"\t -d : DN in P7 bind arg \n");
1101 printf(
"\t -p : Presentation Address of P7 Store \n");
1102 printf(
"\t -w : P7 password of P7 user \n");
1103 printf(
"\t -M : OR Address in P3 bind arg \n");
1104 printf(
"\t -D : DN in P3 bind arg \n");
1105 printf(
"\t -P : Presentation Address of P3 server\n");
1106 printf(
"\t -W : P3 password of P3 user \n");
1107 printf(
"\t -e : Security Environment (dir with x509 subdir): obsolete, use -Y <p12file>\n");
1108 printf(
"\t -x : DN of X.509 Digital Identity\n");
1109 printf(
"\t -b : Passphrase for private key in PKCS12 file\n");
1110 printf(
"\t -Y : Filename of PKCS12 file containing Digital Identity\n");
#define X400_S_LOG_CONFIGURATION_FILE
#define X400_S_CERT_ISSUER_DN
#define X400_N_DISCLOSURE
#define X400_N_S4406_CERTIFICATE
int X400msAutoActionParameterAddIntParam(struct X400msAutoActionParameter *aap, int paramtype, int value)
Add integer-valued parameter to the autoaction parameter.
int X400msAutoActionParameterAddRecip(struct X400msAutoActionParameter *aap, int reciptype, struct X400Recipient *recip)
Add a receipient to the autoaction parameter.
#define X400_N_CONTENT_RETURN_REQUEST
#define X400_S_THIS_IPM_PREFIX
#define X400_E_SIGN_NO_IDENTITY
#define X400_N_S4406_STATUS
int X400msOpen(int type, const char *oraddr, const char *dirname, const char *credentials, const char *pa, int *messages, struct X400msSession **spp)
Open a session to a Message Store (P7) or MTA (P3) in synchronous mode.
#define X400_S_COVER_NOTE
struct X400msAutoActionParameter * X400msNewAutoActionParameter(void)
Create a new (empty) autoaction parameter structure.
#define X400_S_SEC_IDENTITY
int X400msSetStrDefault(struct X400msSession *sp, int paramtype, const char *value, size_t length)
Set a default string parameter value in a session.
#define X400_E_X509_CERT_INVALID
int X400CertGetIntParam(struct X400Certificate *cp, int paramtype, int *valp)
Return a integer-valued parameter from the certificate object.
void X400msFreeAutoActionParameter(struct X400msAutoActionParameter *aa_param)
Free an autoaction parameter.
int X400msMsgGetCert(struct X400msMessage *mp, int certtype, struct X400Certificate **certp)
Get certificate object from message This returns a certificate which was used to sign an object in th...
#define X400_E_X509_VERIFY_FAIL_NO_CERT
#define X400_E_X509_VERIFY_FAIL_NO_PUBKEY
#define X400_S_SECURITY_LABEL
int X400msClose(struct X400msSession *sp)
Close a X400 Session.
int X400msDeregisterAutoAction(struct X400msSession *sp, int type, int id)
Deregister an autoaction from the Message Store.
int X400msRecipGetIntParam(struct X400Recipient *rp, int paramtype, int *valp)
Return a integer-valued parameter from the recipient object.
#define X400_S_S4406_SIGNING_TIME
#define X400_S_S4406_SECURITY_LABEL
int X400msMsgGet(struct X400msSession *sp, int number, struct X400msMessage **mpp, int *typep, int *seqp)
Get message object for transfer out from MS or MTA via P3.
int X400RecipAddStrParam(struct X400Recipient *rp, int paramtype, const char *value, size_t length)
Add string-valued parameter to the recipient.
#define X400_S_MESSAGE_DELIVERY_TIME
#define X400_E_X509_ITEM_INVALID
#define X400_E_S4406_TRIPLE_WRAPPED
#define X400_AUTO_FORWARDING
int X400RecipNew(int type, struct X400Recipient **rpp)
Create a new recipient object.
const char * X400msError(int error)
Obtain a string describing the meaning of the given error code.
#define X400_S_SEC_IDENTITY_DN
#define X400_RECIP_STANDARD
#define X400_S_AUTO_FORWARDING_COMMENT
#define X400_S_CONTENT_IDENTIFIER
int X400msWait(struct X400msSession *sp, int seconds, int *count)
Wait for messages to be ready to be read.
#define X400_S_MESSAGE_IDENTIFIER
#define X400_S_SEC_IDENTITY_PASSPHRASE
#define X400_N_WAIT_INTERVAL
#define X400_N_IMPLICIT_CONVERSION_PROHIBITED
#define X400_N_MOAC_STATUS
#define X400_S_SUBJECT_IDENTIFIER
int X400msRecipGet(struct X400msMessage *mp, int type, int number, struct X400Recipient **rpp)
Get recipient object from message.
int X400msRecipGetStrParam(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_EXTERNAL_CONTENT_TYPE
X400 MA/MS (P3/P7) Interface.
#define X400_E_X509_VERIFY_FAIL_UNSUPPORTED_ALG
#define X400_E_X509_VERIFY_FAIL
int X400msAutoActionParameterAddStrParam(struct X400msAutoActionParameter *aap, int paramtype, const char *value, size_t length)
Add string-valued parameter to the autoaction parameter.
#define X400_N_CERT_ORADDRESS_STATUS
int X400msMsgGetIntParam(struct X400msMessage *mp, int paramtype, int *valp)
Return a integer-valued parameter from the message object.
#define X400_RECIP_PRIMARY
#define X400_E_X509_VERIFY_FAIL_INCOMPAT_ALG
int X400msSetIntDefault(struct X400msSession *sp, int paramtype, int value)
Set a default integer parameter value in a session.
#define X400_N_NON_DELIVERY_DIAGNOSTIC
#define X400_N_NON_DELIVERY_REASON
#define X400_B_RETURN_VERIFICATION_ERRORS
#define X400_N_ALTERNATE_RECIPIENT_ALLOWED
#define X400_S_CERT_SUBJECT_DN
int X400msMsgGetStrParam(struct X400msMessage *mp, int paramtype, char *buffer, size_t buflen, size_t *paramlenp)
Return a string-valued parameter from the message object.
#define X400_S_SUPPLEMENTARY_INFO
int X400CertGetStrParam(struct X400Certificate *cp, int paramtype, char *buffer, size_t buflen, size_t *paramlenp)
Return a string-valued parameter from the certificate object.
#define X400_S_SEC_TRUSTED_CERTS_DIR
int X400msRegisterAutoAction(struct X400msSession *sp, int type, int id, struct X400msAutoActionParameter *aa_param)
Register an autoaction with the Message Store.
#define X400_N_PRECEDENCE
#define X400_N_CONTENT_TYPE
#define X400_S_OR_ADDRESS
int X400msMsgDelete(struct X400msMessage *mp, int retain)
Delete message object.
#define X400_RECIP_REPORT