comparison src/accept.c @ 367:b27f66555ba8

Reformated multiline comments to have leading asterisks on each line Now we use: /* ** comment */ This makes the indent style simpler, too.
author markus schnalke <meillo@marmaro.de>
date Thu, 20 Oct 2011 10:20:59 +0200
parents 41958685480d
children 9bc3e47b0222
comparison
equal deleted inserted replaced
366:41958685480d 367:b27f66555ba8
1 /* MasqMail 1 /*
2 Copyright (C) 1999-2001 Oliver Kurth 2 ** MasqMail
3 Copyright (C) 2010 markus schnalke <meillo@marmaro.de> 3 ** Copyright (C) 1999-2001 Oliver Kurth
4 4 ** Copyright (C) 2010 markus schnalke <meillo@marmaro.de>
5 This program is free software; you can redistribute it and/or modify 5 **
6 it under the terms of the GNU General Public License as published by 6 ** This program is free software; you can redistribute it and/or modify
7 the Free Software Foundation; either version 2 of the License, or 7 ** it under the terms of the GNU General Public License as published by
8 (at your option) any later version. 8 ** the Free Software Foundation; either version 2 of the License, or
9 9 ** (at your option) any later version.
10 This program is distributed in the hope that it will be useful, 10 **
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 ** This program is distributed in the hope that it will be useful,
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
13 GNU General Public License for more details. 13 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 14 ** GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License 15 **
16 along with this program; if not, write to the Free Software 16 ** You should have received a copy of the GNU General Public License
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 ** along with this program; if not, write to the Free Software
18 ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 */ 19 */
19 20
20 #include "masqmail.h" 21 #include "masqmail.h"
21 #include "readsock.h" 22 #include "readsock.h"
22 23
52 return strcmp(addr1->local_part, addr2->local_part); 53 return strcmp(addr1->local_part, addr2->local_part);
53 } 54 }
54 return ret; 55 return ret;
55 } 56 }
56 57
57 /* accept message from anywhere. 58 /*
58 A message from local is indicated by msg->recieved_host == NULL 59 ** accept message from anywhere.
59 60 ** A message from local is indicated by msg->recieved_host == NULL
60 The -t option: With the ACC_RCPT_FROM_HEAD flag the addrs found found 61 **
61 in To/Cc/Bcc headers are added to the recipient list. 62 ** The -t option: With the ACC_RCPT_FROM_HEAD flag the addrs found found
63 ** in To/Cc/Bcc headers are added to the recipient list.
62 */ 64 */
63 65
64 accept_error 66 accept_error
65 accept_message_stream(FILE *in, message *msg, guint flags) 67 accept_message_stream(FILE *in, message *msg, guint flags)
66 { 68 {
144 } else { 146 } else {
145 /* in all other cases we expect another header */ 147 /* in all other cases we expect another header */
146 if ((hdr = get_header(line1))) { 148 if ((hdr = get_header(line1))) {
147 msg->hdr_list = g_list_append(msg->hdr_list, hdr); 149 msg->hdr_list = g_list_append(msg->hdr_list, hdr);
148 } else { 150 } else {
149 /* if get_header() returns NULL, no header was recognized, 151 /*
150 so this seems to be the first data line of a broken mailer 152 ** if get_header() returns NULL,
151 which does not send an empty line after the headers */ 153 ** no header was recognized,
154 ** so this seems to be the first
155 ** data line of a broken mailer
156 ** which does not send an empty
157 ** line after the headers
158 */
152 in_headers = FALSE; 159 in_headers = FALSE;
153 msg->data_list = g_list_prepend(msg->data_list, g_strdup(line1)); 160 msg->data_list = g_list_prepend(msg->data_list, g_strdup(line1));
154 } 161 }
155 } 162 }
156 } else { 163 } else {
288 break; /* make compiler happy */ 295 break; /* make compiler happy */
289 } 296 }
290 } 297 }
291 298
292 if (!msg->return_path) { 299 if (!msg->return_path) {
293 /* TODO: do we still need this as we don't fetch 300 /*
294 mail anymore? */ 301 ** TODO: do we still need this as we don't fetch
295 /* this can happen for pop3 accept only and if no 302 ** mail anymore?
296 Return-Path: header was given */ 303 ** This can happen for pop3 accept only and if no
304 ** Return-Path: header was given
305 */
297 GList *hdr_list; 306 GList *hdr_list;
298 header *hdr; 307 header *hdr;
299 308
300 DEBUG(3) debugf("return_path == NULL\n"); 309 DEBUG(3) debugf("return_path == NULL\n");
301 310