rev |
line source |
meillo@0
|
1 /* MasqMail
|
meillo@0
|
2 Copyright (C) 1999-2001 Oliver Kurth
|
meillo@271
|
3 Copyright (C) 2010 markus schnalke <meillo@marmaro.de>
|
meillo@0
|
4
|
meillo@0
|
5 This program is free software; you can redistribute it and/or modify
|
meillo@0
|
6 it under the terms of the GNU General Public License as published by
|
meillo@0
|
7 the Free Software Foundation; either version 2 of the License, or
|
meillo@0
|
8 (at your option) any later version.
|
meillo@0
|
9
|
meillo@0
|
10 This program is distributed in the hope that it will be useful,
|
meillo@0
|
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
|
meillo@0
|
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
meillo@0
|
13 GNU General Public License for more details.
|
meillo@0
|
14
|
meillo@0
|
15 You should have received a copy of the GNU General Public License
|
meillo@0
|
16 along with this program; if not, write to the Free Software
|
meillo@0
|
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
meillo@0
|
18 */
|
meillo@0
|
19
|
meillo@0
|
20 #ifndef PARSE_TEST
|
meillo@0
|
21 #include "masqmail.h"
|
meillo@0
|
22 #endif
|
meillo@0
|
23
|
meillo@0
|
24 /* This is really dangerous. I hope that I was careful enough,
|
meillo@0
|
25 but maybe there is some malformed address possible that causes
|
meillo@0
|
26 this to segfault or be caught in endless loops.
|
meillo@0
|
27
|
meillo@0
|
28 If you find something like that, PLEASE mail the string to me
|
meillo@0
|
29 (no matter how idiotic it is), so that I can debug that.
|
meillo@0
|
30 Those things really should not happen.
|
meillo@0
|
31 */
|
meillo@0
|
32
|
meillo@0
|
33 static gchar *specials = "()<>@,;:\\\".[]`";
|
meillo@0
|
34
|
meillo@0
|
35 char *parse_error = NULL;
|
meillo@0
|
36
|
meillo@10
|
37 static gchar*
|
meillo@10
|
38 skip_comment(gchar * p)
|
meillo@0
|
39 {
|
meillo@0
|
40
|
meillo@0
|
41 #ifdef PARSE_TEST
|
meillo@10
|
42 g_print("skip_comment: %s\n", p);
|
meillo@0
|
43 #endif
|
meillo@0
|
44
|
meillo@10
|
45 p++;
|
meillo@10
|
46 while (*p && *p != ')') {
|
meillo@10
|
47 p++;
|
meillo@271
|
48 if (*p == '(') {
|
meillo@10
|
49 p = skip_comment(p);
|
meillo@271
|
50 }
|
meillo@10
|
51 }
|
meillo@10
|
52 p++;
|
meillo@0
|
53
|
meillo@10
|
54 return p;
|
meillo@0
|
55 }
|
meillo@0
|
56
|
meillo@10
|
57 static gboolean
|
meillo@10
|
58 read_word(gchar * p, gchar ** b, gchar ** e)
|
meillo@0
|
59 {
|
meillo@0
|
60 #ifdef PARSE_TEST
|
meillo@10
|
61 g_print("read_word: %s\n", p);
|
meillo@0
|
62 #endif
|
meillo@10
|
63 /* eat leading spaces */
|
meillo@271
|
64 while (*p && isspace(*p)) {
|
meillo@10
|
65 p++;
|
meillo@271
|
66 }
|
meillo@10
|
67
|
meillo@10
|
68 *b = p;
|
meillo@10
|
69 /* b = &p; */
|
meillo@10
|
70 if (*p == '\"') {
|
meillo@10
|
71 /* quoted-string */
|
meillo@10
|
72 p++;
|
meillo@271
|
73 while (*p && (*p != '\"')) {
|
meillo@10
|
74 p++;
|
meillo@271
|
75 }
|
meillo@10
|
76 p++;
|
meillo@10
|
77 } else {
|
meillo@10
|
78 /* atom */
|
meillo@271
|
79 while (*p && !strchr(specials, *p) && !iscntrl(*p) && !isspace(*p)) {
|
meillo@10
|
80 p++;
|
meillo@271
|
81 }
|
meillo@10
|
82 }
|
meillo@10
|
83 *e = p;
|
meillo@10
|
84 return TRUE;
|
meillo@0
|
85 }
|
meillo@0
|
86
|
meillo@10
|
87 static gboolean
|
meillo@10
|
88 read_word_with_dots(gchar * p, gchar ** b, gchar ** e)
|
meillo@0
|
89 {
|
meillo@10
|
90 gchar *b0 = p;
|
meillo@0
|
91
|
meillo@0
|
92 #ifdef PARSE_TEST
|
meillo@10
|
93 g_print("read_word_with_dots: %s\n", p);
|
meillo@0
|
94 #endif
|
meillo@10
|
95 while (TRUE) {
|
meillo@271
|
96 if (!read_word(p, b, e)) {
|
meillo@10
|
97 return FALSE;
|
meillo@271
|
98 }
|
meillo@10
|
99 p = *e;
|
meillo@271
|
100 if (*p != '.') {
|
meillo@10
|
101 break;
|
meillo@271
|
102 }
|
meillo@10
|
103 p++;
|
meillo@10
|
104 }
|
meillo@10
|
105 *b = b0;
|
meillo@10
|
106 *e = p;
|
meillo@10
|
107 return TRUE;
|
meillo@0
|
108 }
|
meillo@0
|
109
|
meillo@10
|
110 static gboolean
|
meillo@10
|
111 read_domain(gchar * p, gchar ** b, gchar ** e)
|
meillo@0
|
112 {
|
meillo@0
|
113 #ifdef PARSE_TEST
|
meillo@10
|
114 g_print("read_domain: %s\n", p);
|
meillo@0
|
115 #endif
|
meillo@10
|
116 *b = p;
|
meillo@10
|
117 if (*p != '[') {
|
meillo@271
|
118 while (isalnum(*p) || (*p == '-') || (*p == '.')) {
|
meillo@10
|
119 p++;
|
meillo@271
|
120 }
|
meillo@10
|
121 } else {
|
meillo@10
|
122 p++;
|
meillo@271
|
123 while (isalpha(*p) || (*p == '.')) {
|
meillo@10
|
124 p++;
|
meillo@271
|
125 }
|
meillo@10
|
126 if (*p != ']') {
|
meillo@10
|
127 parse_error = g_strdup_printf("']' expected at end of literal address %s", *b);
|
meillo@10
|
128 return FALSE;
|
meillo@10
|
129 }
|
meillo@10
|
130 p++;
|
meillo@10
|
131 }
|
meillo@10
|
132 *e = p;
|
meillo@10
|
133 return TRUE;
|
meillo@0
|
134 }
|
meillo@0
|
135
|
meillo@10
|
136 gboolean
|
meillo@15
|
137 parse_address_rfc822(gchar* string, gchar** local_begin, gchar** local_end, gchar** domain_begin,
|
meillo@15
|
138 gchar** domain_end, gchar** address_end)
|
meillo@0
|
139 {
|
meillo@10
|
140 gint angle_brackets = 0;
|
meillo@0
|
141
|
meillo@10
|
142 gchar *p = string;
|
meillo@10
|
143 gchar *b, *e;
|
meillo@0
|
144
|
meillo@10
|
145 *local_begin = *local_end = NULL;
|
meillo@10
|
146 *domain_begin = *domain_end = NULL;
|
meillo@0
|
147
|
meillo@10
|
148 /* might be some memory left from previous call: */
|
meillo@10
|
149 if (parse_error != NULL) {
|
meillo@10
|
150 g_free(parse_error);
|
meillo@10
|
151 parse_error = NULL;
|
meillo@10
|
152 }
|
meillo@0
|
153
|
meillo@10
|
154 /* leading spaces and angle brackets */
|
meillo@10
|
155 while (*p && (isspace(*p) || (*p == '<'))) {
|
meillo@271
|
156 if (*p == '<') {
|
meillo@10
|
157 angle_brackets++;
|
meillo@271
|
158 }
|
meillo@10
|
159 p++;
|
meillo@10
|
160 }
|
meillo@10
|
161
|
meillo@271
|
162 if (!*p) {
|
meillo@271
|
163 return FALSE;
|
meillo@271
|
164 }
|
meillo@271
|
165
|
meillo@271
|
166 while (TRUE) {
|
meillo@271
|
167 if (!read_word_with_dots(p, &b, &e)) {
|
meillo@271
|
168 return FALSE;
|
meillo@271
|
169 }
|
meillo@271
|
170
|
meillo@271
|
171 p = e;
|
meillo@0
|
172 #ifdef PARSE_TEST
|
meillo@271
|
173 g_print("after read_word_with_dots: %s\n", p);
|
meillo@0
|
174 #endif
|
meillo@271
|
175 /* eat white spaces and comments */
|
meillo@271
|
176 while ((*p && (isspace(*p))) || (*p == '(')) {
|
meillo@271
|
177 if (*p == '(') {
|
meillo@271
|
178 if (!(p = skip_comment(p))) {
|
meillo@271
|
179 parse_error = g_strdup("missing right bracket ')'");
|
meillo@10
|
180 return FALSE;
|
meillo@10
|
181 }
|
meillo@271
|
182 } else {
|
meillo@271
|
183 p++;
|
meillo@271
|
184 }
|
meillo@271
|
185 }
|
meillo@271
|
186 /* we now have a non-space char that is not
|
meillo@271
|
187 the beginning of a comment */
|
meillo@271
|
188
|
meillo@271
|
189 if (*p == '@') {
|
meillo@271
|
190 /* the last word was the local_part of an addr-spec */
|
meillo@271
|
191 *local_begin = b;
|
meillo@271
|
192 *local_end = e;
|
meillo@271
|
193 #ifdef PARSE_TEST
|
meillo@271
|
194 g_print("found local part: %s\n", *local_begin);
|
meillo@271
|
195 #endif
|
meillo@271
|
196 if (*p == '@') {
|
meillo@271
|
197 p++; /* skip @ */
|
meillo@271
|
198 /* now the domain */
|
meillo@271
|
199 if (!read_domain(p, &b, &e)) {
|
meillo@271
|
200 return FALSE;
|
meillo@271
|
201 }
|
meillo@271
|
202 p = e;
|
meillo@271
|
203 *domain_begin = b;
|
meillo@271
|
204 *domain_end = e;
|
meillo@271
|
205 } else {
|
meillo@271
|
206 /* unqualified? */
|
meillo@271
|
207 *domain_begin = *domain_end = NULL;
|
meillo@271
|
208 }
|
meillo@271
|
209 break;
|
meillo@271
|
210
|
meillo@271
|
211 } else if (*p == '<') {
|
meillo@271
|
212 /* addr-spec follows */
|
meillo@271
|
213 while (isspace(*p) || (*p == '<')) {
|
meillo@271
|
214 if (*p == '<') {
|
meillo@271
|
215 angle_brackets++;
|
meillo@271
|
216 }
|
meillo@271
|
217 p++;
|
meillo@271
|
218 }
|
meillo@271
|
219 if (!read_word_with_dots(p, &b, &e)) {
|
meillo@10
|
220 return FALSE;
|
meillo@271
|
221 }
|
meillo@271
|
222 p = e;
|
meillo@271
|
223 *local_begin = b;
|
meillo@271
|
224 *local_end = e;
|
meillo@271
|
225 #ifdef PARSE_TEST
|
meillo@271
|
226 g_print("found local part: %s\n", *local_begin);
|
meillo@271
|
227 #endif
|
meillo@271
|
228 if (*p == '@') {
|
meillo@271
|
229 p++;
|
meillo@271
|
230 if (!read_domain(p, &b, &e)) {
|
meillo@271
|
231 return FALSE;
|
meillo@271
|
232 }
|
meillo@271
|
233 p = e;
|
meillo@271
|
234 *domain_begin = b;
|
meillo@271
|
235 *domain_end = e;
|
meillo@271
|
236 } else {
|
meillo@271
|
237 /* may be unqualified address */
|
meillo@271
|
238 *domain_begin = *domain_end = NULL;
|
meillo@271
|
239 }
|
meillo@271
|
240 break;
|
meillo@271
|
241
|
meillo@271
|
242 } else if (!*p || *p == '>') {
|
meillo@271
|
243 *local_begin = b;
|
meillo@271
|
244 *local_end = e;
|
meillo@271
|
245 #ifdef PARSE_TEST
|
meillo@271
|
246 g_print("found local part: %s\n", *local_begin);
|
meillo@271
|
247 #endif
|
meillo@271
|
248 *domain_begin = *domain_end = NULL;
|
meillo@271
|
249 break;
|
meillo@271
|
250
|
meillo@271
|
251 } else if (strchr(specials, *p) || iscntrl(*p) || isspace(*p)) {
|
meillo@271
|
252 parse_error = g_strdup_printf("unexpected character: %c", *p);
|
meillo@271
|
253 return FALSE;
|
meillo@10
|
254 }
|
meillo@271
|
255 }
|
meillo@271
|
256
|
meillo@271
|
257 /* trailing spaces and angle brackets */
|
meillo@10
|
258 #ifdef PARSE_TEST
|
meillo@271
|
259 g_print("down counting trailing '>'\n");
|
meillo@10
|
260 #endif
|
meillo@271
|
261 while (*p && (isspace(*p) || (*p == '>'))) {
|
meillo@271
|
262 if (*p == '>') {
|
meillo@271
|
263 angle_brackets--;
|
meillo@10
|
264 }
|
meillo@271
|
265 p++;
|
meillo@271
|
266 }
|
meillo@10
|
267
|
meillo@271
|
268 *address_end = p;
|
meillo@10
|
269
|
meillo@271
|
270 if (angle_brackets > 0) {
|
meillo@271
|
271 parse_error = g_strdup("missing '>' at end of string");
|
meillo@271
|
272 return FALSE;
|
meillo@271
|
273 } else if (angle_brackets < 0) {
|
meillo@271
|
274 parse_error = g_strdup("superfluous '>' at end of string");
|
meillo@271
|
275 return FALSE;
|
meillo@0
|
276 }
|
meillo@271
|
277
|
meillo@271
|
278 /* we successfully parsed the address */
|
meillo@271
|
279 return TRUE;
|
meillo@0
|
280 }
|
meillo@0
|
281
|
meillo@10
|
282 gboolean
|
meillo@15
|
283 parse_address_rfc821(gchar* string, gchar** local_begin, gchar** local_end, gchar** domain_begin,
|
meillo@15
|
284 gchar** domain_end, gchar** address_end)
|
meillo@0
|
285 {
|
meillo@10
|
286 gint angle_brackets = 0;
|
meillo@0
|
287
|
meillo@10
|
288 gchar *p = string;
|
meillo@10
|
289 gchar *b, *e;
|
meillo@0
|
290
|
meillo@10
|
291 *local_begin = *local_end = NULL;
|
meillo@10
|
292 *domain_begin = *domain_end = NULL;
|
meillo@0
|
293
|
meillo@10
|
294 /* might be some memory left from previous call: */
|
meillo@10
|
295 if (parse_error != NULL) {
|
meillo@10
|
296 g_free(parse_error);
|
meillo@10
|
297 parse_error = NULL;
|
meillo@10
|
298 }
|
meillo@0
|
299
|
meillo@10
|
300 /* leading spaces and angle brackets */
|
meillo@10
|
301 while (*p && (isspace(*p) || (*p == '<'))) {
|
meillo@271
|
302 if (*p == '<') {
|
meillo@10
|
303 angle_brackets++;
|
meillo@271
|
304 }
|
meillo@10
|
305 p++;
|
meillo@10
|
306 }
|
meillo@10
|
307
|
meillo@271
|
308 if (!*p) {
|
meillo@271
|
309 return FALSE;
|
meillo@271
|
310 }
|
meillo@271
|
311
|
meillo@271
|
312 while (TRUE) {
|
meillo@271
|
313 if (!read_word_with_dots(p, &b, &e)) {
|
meillo@271
|
314 return FALSE;
|
meillo@10
|
315 }
|
meillo@10
|
316
|
meillo@271
|
317 p = e;
|
meillo@10
|
318 #ifdef PARSE_TEST
|
meillo@271
|
319 g_print("after read_word_with_dots: %s\n", p);
|
meillo@10
|
320 #endif
|
meillo@271
|
321 *local_begin = b;
|
meillo@271
|
322 *local_end = e;
|
meillo@271
|
323 #ifdef PARSE_TEST
|
meillo@271
|
324 g_print("found local part: %s\n", *local_begin);
|
meillo@271
|
325 g_print("local_end = %s\n", *local_end);
|
meillo@271
|
326 #endif
|
meillo@271
|
327 if (!(*p) || isspace(*p) || (*p == '>')) {
|
meillo@271
|
328 /* unqualified ? */
|
meillo@271
|
329 domain_begin = domain_end = NULL;
|
meillo@271
|
330 break;
|
meillo@271
|
331 } else if (*p == '@') {
|
meillo@10
|
332 p++;
|
meillo@271
|
333 if (read_domain(p, &b, &e)) {
|
meillo@271
|
334 p = e;
|
meillo@271
|
335 *domain_begin = b;
|
meillo@271
|
336 *domain_end = e;
|
meillo@271
|
337 }
|
meillo@271
|
338 break;
|
meillo@271
|
339 } else {
|
meillo@271
|
340 parse_error = g_strdup_printf ("unexpected character after local part '%c'", *p);
|
meillo@271
|
341 return FALSE;
|
meillo@10
|
342 }
|
meillo@271
|
343 }
|
meillo@10
|
344
|
meillo@271
|
345 /* trailing spaces and angle brackets */
|
meillo@271
|
346 #ifdef PARSE_TEST
|
meillo@271
|
347 g_print("down counting trailing '>'\n");
|
meillo@271
|
348 #endif
|
meillo@271
|
349 while (*p && (isspace(*p) || (*p == '>'))) {
|
meillo@271
|
350 if (*p == '>') {
|
meillo@271
|
351 angle_brackets--;
|
meillo@10
|
352 }
|
meillo@271
|
353 p++;
|
meillo@0
|
354 }
|
meillo@271
|
355 *address_end = p;
|
meillo@271
|
356
|
meillo@271
|
357 if (angle_brackets > 0) {
|
meillo@271
|
358 parse_error = g_strdup("missing '>' at end of string");
|
meillo@271
|
359 return FALSE;
|
meillo@271
|
360 } else if (angle_brackets < 0) {
|
meillo@271
|
361 parse_error = g_strdup("superfluous '>' at end of string");
|
meillo@271
|
362 return FALSE;
|
meillo@271
|
363 }
|
meillo@271
|
364
|
meillo@271
|
365 /* we successfully parsed the address */
|
meillo@271
|
366 return TRUE;
|
meillo@0
|
367 }
|
meillo@0
|
368
|
meillo@0
|
369 /*
|
meillo@0
|
370 allocate address, reading from string.
|
meillo@0
|
371 On failure, returns NULL.
|
meillo@114
|
372 after call, end contains a pointer to the end of the parsed string
|
meillo@0
|
373 end may be NULL, if we are not interested.
|
meillo@0
|
374
|
meillo@0
|
375 parses both rfc 821 and rfc 822 addresses, depending on flag is_rfc821
|
meillo@0
|
376 */
|
meillo@10
|
377 address*
|
meillo@10
|
378 _create_address(gchar * string, gchar ** end, gboolean is_rfc821)
|
meillo@0
|
379 {
|
meillo@10
|
380 gchar *loc_beg, *loc_end;
|
meillo@10
|
381 gchar *dom_beg, *dom_end;
|
meillo@10
|
382 gchar *addr_end;
|
meillo@271
|
383 gboolean ret;
|
meillo@0
|
384
|
meillo@271
|
385 if (string && (string[0] == '\0')) {
|
meillo@10
|
386 address *addr = g_malloc(sizeof(address));
|
meillo@10
|
387 addr->address = g_strdup("");
|
meillo@10
|
388 addr->local_part = g_strdup("");
|
meillo@271
|
389 /* 'NULL' address (failure notice),
|
meillo@271
|
390 "" makes sure it will not be qualified with a hostname */
|
meillo@271
|
391 addr->domain = g_strdup("");
|
meillo@10
|
392 return addr;
|
meillo@10
|
393 }
|
meillo@0
|
394
|
meillo@271
|
395 if (is_rfc821) {
|
meillo@271
|
396 ret = parse_address_rfc821(string, &loc_beg, &loc_end, &dom_beg, &dom_end, &addr_end);
|
meillo@271
|
397 } else {
|
meillo@271
|
398 ret = parse_address_rfc822(string, &loc_beg, &loc_end, &dom_beg, &dom_end, &addr_end);
|
meillo@271
|
399 }
|
meillo@271
|
400 if (!ret) {
|
meillo@271
|
401 return NULL;
|
meillo@271
|
402 }
|
meillo@0
|
403
|
meillo@271
|
404 address *addr = g_malloc(sizeof(address));
|
meillo@271
|
405 gchar *p = addr_end;
|
meillo@0
|
406
|
meillo@271
|
407 memset(addr, 0, sizeof(address));
|
meillo@0
|
408
|
meillo@271
|
409 if (loc_beg[0] == '|') {
|
meillo@271
|
410 parse_error = g_strdup("no pipe allowed for RFC 822/821 address");
|
meillo@271
|
411 return NULL;
|
meillo@271
|
412 }
|
meillo@10
|
413
|
meillo@271
|
414 while (*p && (*p != ',')) {
|
meillo@271
|
415 p++;
|
meillo@271
|
416 }
|
meillo@271
|
417 addr->address = g_strndup(string, p - string);
|
meillo@271
|
418 addr->local_part = g_strndup(loc_beg, loc_end - loc_beg);
|
meillo@0
|
419
|
meillo@0
|
420 #ifdef PARSE_TEST
|
meillo@271
|
421 g_print("addr->local_part = %s\n", addr->local_part);
|
meillo@0
|
422 #endif
|
meillo@0
|
423
|
meillo@271
|
424 if (dom_beg != NULL) {
|
meillo@271
|
425 addr->domain = g_strndup(dom_beg, dom_end - dom_beg);
|
meillo@271
|
426 } else if (addr->local_part[0] == 0) {
|
meillo@271
|
427 /* 'NULL' address (failure notice),
|
meillo@271
|
428 "" makes sure it will not be qualified with a hostname */
|
meillo@271
|
429 addr->domain = g_strdup("");
|
meillo@271
|
430 } else {
|
meillo@271
|
431 addr->domain = NULL;
|
meillo@271
|
432 }
|
meillo@0
|
433
|
meillo@271
|
434 if (end != NULL) {
|
meillo@271
|
435 *end = p;
|
meillo@271
|
436 }
|
meillo@0
|
437
|
meillo@0
|
438 #ifndef PARSE_TEST
|
meillo@271
|
439 addr_unmark_delivered(addr);
|
meillo@0
|
440 #endif
|
meillo@0
|
441
|
meillo@271
|
442 return addr;
|
meillo@0
|
443 }
|
meillo@0
|
444
|
meillo@10
|
445 address*
|
meillo@10
|
446 create_address_rfc822(gchar * string, gchar ** end)
|
meillo@10
|
447 {
|
meillo@10
|
448 return _create_address(string, end, FALSE);
|
meillo@0
|
449 }
|
meillo@0
|
450
|
meillo@10
|
451 address*
|
meillo@10
|
452 create_address_rfc821(gchar * string, gchar ** end)
|
meillo@10
|
453 {
|
meillo@10
|
454 return _create_address(string, end, TRUE);
|
meillo@0
|
455 }
|
meillo@0
|
456
|
meillo@10
|
457 GList*
|
meillo@10
|
458 addr_list_append_rfc822(GList * addr_list, gchar * string, gchar * domain)
|
meillo@0
|
459 {
|
meillo@10
|
460 gchar *p = string;
|
meillo@10
|
461 gchar *end;
|
meillo@0
|
462
|
meillo@10
|
463 while (*p) {
|
meillo@10
|
464 address *addr = _create_address(p, &end, FALSE);
|
meillo@271
|
465 fprintf(stderr, "string: %s\n", p);
|
meillo@0
|
466
|
meillo@271
|
467 if (!addr) {
|
meillo@10
|
468 break;
|
meillo@271
|
469 }
|
meillo@271
|
470
|
meillo@271
|
471 fprintf(stderr, " addr: %s (%s<@>%s)\n", addr->address, addr->local_part, addr->domain);
|
meillo@271
|
472 if (domain && !addr->domain) {
|
meillo@271
|
473 addr->domain = g_strdup(domain);
|
meillo@271
|
474 }
|
meillo@271
|
475 fprintf(stderr, " %s (%s<@>%s)\n", addr->address, addr->local_part, addr->domain);
|
meillo@271
|
476
|
meillo@271
|
477 addr_list = g_list_append(addr_list, addr);
|
meillo@271
|
478 p = end;
|
meillo@271
|
479
|
meillo@271
|
480 while (*p == ',' || isspace(*p)) {
|
meillo@10
|
481 p++;
|
meillo@271
|
482 }
|
meillo@10
|
483 }
|
meillo@10
|
484 return addr_list;
|
meillo@0
|
485 }
|