Mercurial > masqmail
annotate src/pop3_in.h @ 91:3e7136221104
correct masqmail path in rmail script; remove docs on uninstall
on install the correct path to the masqmail executable gets
inserted into the rmail script now.
now documentation, examples, and the templates are removed on
uninstall. Empty directories are the only thing that may remain
if one installs masqmail into an unusual path.
author | meillo@marmaro.de |
---|---|
date | Mon, 21 Jun 2010 09:40:16 +0200 |
parents | 26e34ae9a3e3 |
children | f186650135c3 |
rev | line source |
---|---|
0 | 1 /* pop3_in.h, Copyright 2000 (C) Oliver Kurth, |
2 * | |
3 * This program is free software; you can redistribute it and/or modify | |
4 * it under the terms of the GNU General Public License as published by | |
5 * the Free Software Foundation; either version 2 of the License, or | |
6 * (at your option) any later version. | |
10
26e34ae9a3e3
changed indention and line wrapping to a more consistent style
meillo@marmaro.de
parents:
0
diff
changeset
|
7 * |
0 | 8 * This program is distributed in the hope that it will be useful, |
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 * GNU General Public License for more details. | |
12 * | |
13 * You should have received a copy of the GNU General Public License | |
14 * along with this program; if not, write to the Free Software | |
15 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | |
16 */ | |
17 | |
18 #ifdef ENABLE_POP3 | |
19 | |
20 #define POP3_BUF_LEN 1024 | |
21 | |
22 #define POP3_INITIAL_TIMEOUT 5*60 | |
23 #define POP3_CMD_TIMEOUT 5*60 | |
24 #define POP3_DATA_TIMEOUT 5*60 | |
25 #define POP3_FINAL_TIMEOUT 10*60 | |
26 | |
27 #define POP3_FLAG_DELETE 0x01 | |
28 #define POP3_FLAG_UIDL 0x02 | |
29 #define POP3_FLAG_UIDL_DELE 0x04 | |
30 #define POP3_FLAG_APOP 0x08 | |
31 | |
32 #define POP3_MAX_CHILDREN 2 | |
33 | |
10
26e34ae9a3e3
changed indention and line wrapping to a more consistent style
meillo@marmaro.de
parents:
0
diff
changeset
|
34 typedef enum _pop3_error { |
26e34ae9a3e3
changed indention and line wrapping to a more consistent style
meillo@marmaro.de
parents:
0
diff
changeset
|
35 pop3_ok = 0, |
26e34ae9a3e3
changed indention and line wrapping to a more consistent style
meillo@marmaro.de
parents:
0
diff
changeset
|
36 pop3_fail, |
26e34ae9a3e3
changed indention and line wrapping to a more consistent style
meillo@marmaro.de
parents:
0
diff
changeset
|
37 pop3_eof, |
26e34ae9a3e3
changed indention and line wrapping to a more consistent style
meillo@marmaro.de
parents:
0
diff
changeset
|
38 pop3_timeout, |
26e34ae9a3e3
changed indention and line wrapping to a more consistent style
meillo@marmaro.de
parents:
0
diff
changeset
|
39 pop3_login_failure, |
26e34ae9a3e3
changed indention and line wrapping to a more consistent style
meillo@marmaro.de
parents:
0
diff
changeset
|
40 pop3_syntax |
0 | 41 } pop3_error; |
42 | |
10
26e34ae9a3e3
changed indention and line wrapping to a more consistent style
meillo@marmaro.de
parents:
0
diff
changeset
|
43 typedef struct pop3_base { |
26e34ae9a3e3
changed indention and line wrapping to a more consistent style
meillo@marmaro.de
parents:
0
diff
changeset
|
44 FILE *in; |
26e34ae9a3e3
changed indention and line wrapping to a more consistent style
meillo@marmaro.de
parents:
0
diff
changeset
|
45 FILE *out; |
26e34ae9a3e3
changed indention and line wrapping to a more consistent style
meillo@marmaro.de
parents:
0
diff
changeset
|
46 gint sock; |
26e34ae9a3e3
changed indention and line wrapping to a more consistent style
meillo@marmaro.de
parents:
0
diff
changeset
|
47 gint dup_sock; |
0 | 48 |
10
26e34ae9a3e3
changed indention and line wrapping to a more consistent style
meillo@marmaro.de
parents:
0
diff
changeset
|
49 gchar *remote_host; |
26e34ae9a3e3
changed indention and line wrapping to a more consistent style
meillo@marmaro.de
parents:
0
diff
changeset
|
50 gchar *buffer; |
0 | 51 |
10
26e34ae9a3e3
changed indention and line wrapping to a more consistent style
meillo@marmaro.de
parents:
0
diff
changeset
|
52 gint next_id; |
26e34ae9a3e3
changed indention and line wrapping to a more consistent style
meillo@marmaro.de
parents:
0
diff
changeset
|
53 gint msg_cnt; |
26e34ae9a3e3
changed indention and line wrapping to a more consistent style
meillo@marmaro.de
parents:
0
diff
changeset
|
54 gint uidl_known_cnt; |
26e34ae9a3e3
changed indention and line wrapping to a more consistent style
meillo@marmaro.de
parents:
0
diff
changeset
|
55 gint mbox_size; |
0 | 56 |
10
26e34ae9a3e3
changed indention and line wrapping to a more consistent style
meillo@marmaro.de
parents:
0
diff
changeset
|
57 GList *list_uid_old; |
26e34ae9a3e3
changed indention and line wrapping to a more consistent style
meillo@marmaro.de
parents:
0
diff
changeset
|
58 GList *drop_list; |
0 | 59 |
10
26e34ae9a3e3
changed indention and line wrapping to a more consistent style
meillo@marmaro.de
parents:
0
diff
changeset
|
60 gchar *timestamp; |
0 | 61 |
10
26e34ae9a3e3
changed indention and line wrapping to a more consistent style
meillo@marmaro.de
parents:
0
diff
changeset
|
62 guint flags; |
0 | 63 |
10
26e34ae9a3e3
changed indention and line wrapping to a more consistent style
meillo@marmaro.de
parents:
0
diff
changeset
|
64 pop3_error error; |
0 | 65 } pop3_base; |
66 | |
10
26e34ae9a3e3
changed indention and line wrapping to a more consistent style
meillo@marmaro.de
parents:
0
diff
changeset
|
67 typedef struct _msg_info { |
26e34ae9a3e3
changed indention and line wrapping to a more consistent style
meillo@marmaro.de
parents:
0
diff
changeset
|
68 gint number; |
26e34ae9a3e3
changed indention and line wrapping to a more consistent style
meillo@marmaro.de
parents:
0
diff
changeset
|
69 gint size; |
26e34ae9a3e3
changed indention and line wrapping to a more consistent style
meillo@marmaro.de
parents:
0
diff
changeset
|
70 gchar *uid; |
26e34ae9a3e3
changed indention and line wrapping to a more consistent style
meillo@marmaro.de
parents:
0
diff
changeset
|
71 gboolean is_fetched; |
26e34ae9a3e3
changed indention and line wrapping to a more consistent style
meillo@marmaro.de
parents:
0
diff
changeset
|
72 gboolean is_in_uidl; |
0 | 73 } msg_info; |
74 | |
10
26e34ae9a3e3
changed indention and line wrapping to a more consistent style
meillo@marmaro.de
parents:
0
diff
changeset
|
75 pop3_base *pop3_in_open(gchar * host, gint port, GList * resolve_list, guint flags); |
26e34ae9a3e3
changed indention and line wrapping to a more consistent style
meillo@marmaro.de
parents:
0
diff
changeset
|
76 pop3_base *pop3_in_open_child(gchar * cmd, guint flags); |
26e34ae9a3e3
changed indention and line wrapping to a more consistent style
meillo@marmaro.de
parents:
0
diff
changeset
|
77 void pop3_in_close(pop3_base * popb); |
26e34ae9a3e3
changed indention and line wrapping to a more consistent style
meillo@marmaro.de
parents:
0
diff
changeset
|
78 gboolean pop3_get(pop3_base * popb, gchar * user, gchar * pass, address * rcpt, address * return_path, gint max_count, gint max_size, gboolean max_size_delete); |
26e34ae9a3e3
changed indention and line wrapping to a more consistent style
meillo@marmaro.de
parents:
0
diff
changeset
|
79 gboolean pop3_login(gchar * host, gint port, GList * resolve_list, gchar * user, gchar * pass, guint flags); |
0 | 80 |
81 | |
82 | |
83 #endif |