summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPhilip Hazel <ph10@hermes.cam.ac.uk>2007-06-19 14:41:31 +0000
committerPhilip Hazel <ph10@hermes.cam.ac.uk>2007-06-19 14:41:31 +0000
commita96603a0e5a7283a9275fb090dac95a42e05a423 (patch)
treee1aa6ce1a15a0a23e58d86e0aec05273751f9c0c /src
parentaa6dc51334206deff2ec80bfcbcf543714efe6d6 (diff)
Add -Mvc option.
Diffstat (limited to 'src')
-rw-r--r--src/src/exim.c9
-rw-r--r--src/src/macros.h7
-rw-r--r--src/src/queue.c17
3 files changed, 24 insertions, 9 deletions
diff --git a/src/src/exim.c b/src/src/exim.c
index 49830c0de..3a89d8b91 100644
--- a/src/src/exim.c
+++ b/src/src/exim.c
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/exim.c,v 1.55 2007/01/30 15:10:59 ph10 Exp $ */
+/* $Cambridge: exim/src/src/exim.c,v 1.56 2007/06/19 14:41:31 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -2283,6 +2283,7 @@ for (i = 1; i < argc; i++)
-Mes edit sender
-Mset load a message for use with -be
-Mvb show body
+ -Mvc show copy (of whole message, in RFC 2822 format)
-Mvh show header
-Mvl show log
*/
@@ -2330,6 +2331,11 @@ for (i = 1; i < argc; i++)
msg_action = MSG_SHOW_BODY;
one_msg_action = TRUE;
}
+ else if (Ustrcmp(argrest, "vc") == 0)
+ {
+ msg_action = MSG_SHOW_COPY;
+ one_msg_action = TRUE;
+ }
else if (Ustrcmp(argrest, "vh") == 0)
{
msg_action = MSG_SHOW_HEADER;
@@ -3474,7 +3480,6 @@ if (real_uid == root_uid || real_uid == exim_uid || real_gid == exim_gid)
else
{
int i, j;
-
for (i = 0; i < group_count; i++)
{
if (group_list[i] == exim_gid) admin_user = TRUE;
diff --git a/src/src/macros.h b/src/src/macros.h
index f6aca465c..00f9f8eb2 100644
--- a/src/src/macros.h
+++ b/src/src/macros.h
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/macros.h,v 1.33 2007/03/13 15:32:48 ph10 Exp $ */
+/* $Cambridge: exim/src/src/macros.h,v 1.34 2007/06/19 14:41:31 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -732,7 +732,10 @@ enum {
enum { MSG_DELIVER, MSG_FREEZE, MSG_REMOVE, MSG_THAW, MSG_ADD_RECIPIENT,
MSG_MARK_ALL_DELIVERED, MSG_MARK_DELIVERED, MSG_EDIT_SENDER,
- MSG_SHOW_BODY, MSG_SHOW_HEADER, MSG_SHOW_LOG, MSG_LOAD };
+ MSG_SHOW_COPY, MSG_LOAD,
+ /* These ones must be last: a test for >= MSG_SHOW_BODY is used
+ to test for actions that list individual spool files. */
+ MSG_SHOW_BODY, MSG_SHOW_HEADER, MSG_SHOW_LOG };
/* Returns from the spool_read_header() function */
diff --git a/src/src/queue.c b/src/src/queue.c
index 441f1d5d4..84f957c0f 100644
--- a/src/src/queue.c
+++ b/src/src/queue.c
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/queue.c,v 1.11 2007/01/08 10:50:18 ph10 Exp $ */
+/* $Cambridge: exim/src/src/queue.c,v 1.12 2007/06/19 14:41:31 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -936,9 +936,9 @@ for (; f != NULL; f = f->next)
* Act on a specific message *
*************************************************/
-/* Actions that require a list of addresses make use of
-argv/argc/recipients_arg. Other actions do not. This function does its
-own authority checking.
+/* Actions that require a list of addresses make use of argv/argc/
+recipients_arg. Other actions do not. This function does its own
+authority checking.
Arguments:
id id of the message to work on
@@ -1093,10 +1093,17 @@ username = (pw != NULL)?
/* Take the necessary action. */
-printf("Message %s ", id);
+if (action != MSG_SHOW_COPY) printf("Message %s ", id);
switch(action)
{
+ case MSG_SHOW_COPY:
+ deliver_in_buffer = store_malloc(DELIVER_IN_BUFFER_SIZE);
+ deliver_out_buffer = store_malloc(DELIVER_OUT_BUFFER_SIZE);
+ transport_write_message(NULL, 1, 0, 0, NULL, NULL, NULL, NULL, NULL, 0);
+ break;
+
+
case MSG_FREEZE:
if (deliver_freeze)
{