comparison src/accept.c @ 268:7b12d081b939

removed ACC_DEL_RCPTS because it's always used with ACC_RCPT_FROM_HEAD They are used for -t and always together.
author markus schnalke <meillo@marmaro.de>
date Fri, 03 Dec 2010 11:40:58 -0300
parents 409552c5647f
children fd1d77e5a5da
comparison
equal deleted inserted replaced
267:8be687c06c20 268:7b12d081b939
57 /* accept message from anywhere. 57 /* accept message from anywhere.
58 A locally originating message is indicated by msg->recieved_host == NULL 58 A locally originating message is indicated by msg->recieved_host == NULL
59 59
60 The -t option: 60 The -t option:
61 The ACC_RCPT_FROM_HEAD flag adds the recipients found in To/Cc/Bcc 61 The ACC_RCPT_FROM_HEAD flag adds the recipients found in To/Cc/Bcc
62 headers to the recipients list. 62 headers to the recipients list. The recipients given on the
63 The ACC_DEL_RCPTS flag makes only sense if the ACC_RCPT_FROM_HEAD
64 flag is given too. With ACC_DEL_RCPTS the recipients given on the
65 command line are removed from the ones given in headers. 63 command line are removed from the ones given in headers.
66 */ 64 */
67 65
68 accept_error 66 accept_error
69 accept_message_stream(FILE * in, message * msg, guint flags) 67 accept_message_stream(FILE * in, message * msg, guint flags)
210 msg->return_path = create_address(path, TRUE); 208 msg->return_path = create_address(path, TRUE);
211 g_free(path); 209 g_free(path);
212 } 210 }
213 211
214 /* -t option (see comment above) */ 212 /* -t option (see comment above) */
215 if (flags & ACC_DEL_RCPTS) { 213 if (flags & ACC_RCPT_FROM_HEAD) {
216 non_rcpt_list = msg->rcpt_list; 214 non_rcpt_list = msg->rcpt_list;
217 msg->rcpt_list = NULL; 215 msg->rcpt_list = NULL;
218 } 216 }
219 217
220 /* scan headers */ 218 /* scan headers */
324 msg->hdr_list = g_list_append(msg->hdr_list, create_header(HEAD_UNKNOWN, 322 msg->hdr_list = g_list_append(msg->hdr_list, create_header(HEAD_UNKNOWN,
325 "X-Warning: real return path is unknown\n")); 323 "X-Warning: real return path is unknown\n"));
326 } 324 }
327 } 325 }
328 326
329 if (flags & ACC_DEL_RCPTS) { 327 if (flags & ACC_RCPT_FROM_HEAD) {
330 /* remove the recipients given on the command line from the ones given in headers 328 /* remove the recipients given on the command line
329 from the ones given in headers
331 -t option (see comment above) */ 330 -t option (see comment above) */
332 GList *rcpt_node; 331 GList *rcpt_node;
333 foreach(non_rcpt_list, rcpt_node) { 332 foreach(non_rcpt_list, rcpt_node) {
334 address *rcpt = (address *) (rcpt_node->data); 333 address *rcpt = (address *) (rcpt_node->data);
335 GList *node; 334 GList *node;