Commit 2e878c30 2e878c30999411781ca304afab2cfa1b49505a06 by Alain Magloire

Added the new docs

1 parent 3d4474e7
...@@ -26,7 +26,9 @@ EXTRA_DIST = \ ...@@ -26,7 +26,9 @@ EXTRA_DIST = \
26 ## Sam, the examples dir is not part of the distribution so this will not work 26 ## Sam, the examples dir is not part of the distribution so this will not work
27 ## but we should probably have a "addrmsg" program and reenable this. 27 ## but we should probably have a "addrmsg" program and reenable this.
28 ## Alain. 28 ## Alain.
29 #ex-address.texi: ${top_srcdir}/examples/addr.c 29 #ex-address.texi: ${top_srcdir}/doc/examples/addr.c
30 # sed -es/{/@{/g -e s/}/@}/g < $< > $@
31 #sfrom.texi: ${top_srcdir}/doc/examples/sfrom.c
30 # sed -es/{/@{/g -e s/}/@}/g < $< > $@ 32 # sed -es/{/@{/g -e s/}/@}/g < $< > $@
31 33
32 #mailutils.info: mailutils.texi version.texi ex-address.texi 34 #mailutils.info: mailutils.texi version.texi ex-address.texi
......
1 @example
2 @code{/* Prefix @emph{address_} is reserve */}
1 @code{#include <mailutils/address.h>} 3 @code{#include <mailutils/address.h>}
2 4
5 @end example
3 The internet address format is defined in RFC 822. RFC 822 has been 6 The internet address format is defined in RFC 822. RFC 822 has been
4 updated, and is now superceeded by RFC 2822, which 7 updated, and is now superceeded by RFC 2822, which
5 makes some corrections and clarifications. References to RFC 822 8 makes some corrections and clarifications. References to RFC 822
......
1 @example
2 @code{/* Prefix @emph{attribute_} is reserve */}
1 @code{#include <mailutils/attribute.h>} 3 @code{#include <mailutils/attribute.h>}
2 4
5 @end example
6
3 @deftypefun int attribute_create (attribute_t *@var{pattribute}) 7 @deftypefun int attribute_create (attribute_t *@var{pattribute})
4 @end deftypefun 8 @end deftypefun
5 9
......
1 @example
2 @code{/* Prefix @emph{auth_} is reserve */}
3 @code{#include <mailutils/auth.h>}
4
5 @end example
6
1 There are many ways to authenticate to a server, to be flexible the 7 There are many ways to authenticate to a server, to be flexible the
2 authentication process is provided by two objects @code{auth_t} and 8 authentication process is provided by two objects @code{auth_t} and
3 @code{ticket_t}. The @code{auth_t} can implement different protocol like 9 @code{ticket_t}. The @code{auth_t} can implement different protocol like
......
1 @example
2 @code{/* Prefix @emph{body_} is reserve */}
1 @code{#include <mailutils/body.h>} 3 @code{#include <mailutils/body.h>}
2 4
5 @end example
6
3 @deftypefun int body_create (body_t *@var{body}, void *@var{owner}) 7 @deftypefun int body_create (body_t *@var{body}, void *@var{owner})
4 Initialize an object @var{bdy}. 8 Initialize an object @var{bdy}.
5 @end deftypefun 9 @end deftypefun
......
1 @menu
2 * POP3:: POP3
3 * IMAP4:: IMAP4
4 * Mbox:: Mbox
5 * Mh:: Mh
6 * Maildir:: Maildir
7 * SMTP:: SMTP
8 * Sendmail:: Sendmail
9 * NNTP:: NNTP
10 * Parse822:: Parse822
11 @end menu
12
13 @node POP3
14 @comment node-name, next, previous, up
15 @section POP3
16 @cindex POP3
17 @include pop3.texi
18
19 @node IMAP4
20 @comment node-name, next, previous, up
21 @section IMAP4
22 @cindex IMAP4
23 @include imap4.texi
24
25 @node Mbox
26 @comment node-name, next, previous, up
27 @section Mbox
28 @cindex Mbox
29 @include mbox.texi
30
31 @node Mh
32 @comment node-name, next, previous, up
33 @section Mh
34 @cindex Mh
35 @include mh.texi
36
37 @node Maildir
38 @comment node-name, next, previous, up
39 @section Maildir
40 @cindex Maildir
41 @include maildir.texi
42
43 @node SMTP
44 @comment node-name, next, previous, up
45 @section SMTP
46 @cindex SMTP
47 @include smtp.texi
48
49 @node Sendmail
50 @comment node-name, next, previous, up
51 @section Sendmail
52 @cindex Sendmail
53 @include sendmail.texi
54
55 @node NNTP
56 @comment node-name, next, previous, up
57 @section NNTP
58 @cindex NNTP
59 @include nntp.texi
60
61 @node Parse822
62 @comment node-name, next, previous, up
63 @section Parse822
64 @cindex Parse822
65 @include parse822.texi
1 @example
2 @code{/* Prefix @emph{envelope_} is reserve */}
3 @code{#include <mailutils/envelope.h>}
4
5 @end example
6
7 @deftypefun int envelope_create (envelope_t *, void *);
8 @end deftypefun
9
10 @deftypefun void envelope_destroy (envelope_t *, void *);
11 @end deftypefun
12
13 @deftypefun int envelope_get_message (envelope_t, message_t *);
14 @end deftypefun
15
16 @deftypefun int envelope_set_sender (envelope_t, int (*_sender) __P ((envelope_t, char *, size_t, size_t*)), void *);
17 @end deftypefun
18
19 @deftypefun int envelope_sender (envelope_t, char *, size_t, size_t *);
20 @end deftypefun
21
22 @deftypefun int envelope_set_date (envelope_t, int (*_date) __P ((envelope_t, char *, size_t, size_t *)), void *);
23 @end deftypefun
24
25 @deftypefun int envelope_date (envelope_t, char *, size_t, size_t *);
26 @end deftypefun
1 @example
2 @code{/* Prefix @emph{folder_} is reserve */}
3 @code{#include <mailutils/folder.h>}
4
5 @end example
6
7 @example
8 @group
9 folder_t url_t
10 -/var/mail- +---//---->/-----------------\ +-->/-----------\
11 ( alain *-)-+ | | url_t *-|----+ | port |
12 ----------- | | |-----------------+ | hostname |
13 ( jakob *-)-+--+ | observer_t *-| | file |
14 ----------- | |-----------------+ | ... |
15 ( jeff *-)-+ | stream_t | \-----------/
16 ----------- | |-----------------|
17 ( sean *-)-+ | auth_t |
18 ---------- |-----------------|
19 | mailbox_t(1) |
20 |-----------------|
21 | mailbox_t(2) |
22 | ...... |
23 | mailbox_t(n) |
24 \-----------------/
25 @end group
26 @end example
27
28 @deftypefun int folder_create (folder_t *, const char *@var{url})
29 @end deftypefun
30
31 @deftypefun void folder_destroy (folder_t *)
32 @end deftypefun
33
34 @deftypefun int folder_open (folder_t, int @var{flag})
35 @end deftypefun
36
37 @deftypefun int folder_close (folder_t)
38 @end deftypefun
39
40 @deftypefun int folder_delete (folder_t, const char *@var{mailbox})
41 @end deftypefun
42
43 @deftypefun int folder_rename (folder_t, const char *, const char *@var{mailbox})
44 @end deftypefun
45
46 @deftypefun int folder_subscribe (folder_t, const char *@var{mailbox})
47 @end deftypefun
48
49 @deftypefun int folder_unsubscribe (folder_t, const char *@var{mailbox})
50 @end deftypefun
51
52 @deftypefun int folder_list (folder_t, const char *@var{ref}, const char *@var{wcard}, iterator_t *)
53 @end deftypefun
54
55 @deftypefun int folder_lsub (folder_t, const char *@var{ref}, const char *@var{wcar}, iterator_t *)
56 @end deftypefun
57
58 @deftypefun int folder_get_stream (folder_t, stream_t *)
59 @end deftypefun
60
61 @deftypefun int folder_set_stream (folder_t, stream_t)
62 @end deftypefun
63
64 @deftypefun int folder_get_observable (folder_t, observable_t *)
65 @end deftypefun
66
67 @deftypefun int folder_get_debug (folder_t, debug_t *)
68 @end deftypefun
69
70 @deftypefun int folder_set_debug (folder_t, debug_t)
71 @end deftypefun
72
73 @deftypefun int folder_get_authority (folder_t, authority_t *)
74 @end deftypefun
75
76 @deftypefun int folder_set_authority (folder_t, authority_t)
77 @end deftypefun
78
79 @deftypefun int folder_get_url (folder_t, url_t *)
80 @end deftypefun
81
82 @deftypefun int folder_set_url (folder_t, url_t)
83 @end deftypefun
1 @menu
2 * Folder:: Folder.
3 * Mailbox:: Mailbox.
4 * Mailer:: Protocol Used to Send Mail.
5 * Message:: Message.
6 * Envelope:: Envelope.
7 * Headers:: Headers.
8 * Body:: Body.
9 * Attribute:: Attribute.
10 * Stream:: Stream.
11 * Iterator:: Iterator.
12 * Authenticator:: Authenticator.
13 * Address:: Address.
14 * Locker:: Locker.
15 * URL:: Unified Ressource Locator.
16
17 @end menu
18
19 Where ever the mail is and whatever format it is store in, the same operations
20 to manipulate emails are common. To unified the C API, GNU mailutils offers
21 an heteroclite set of objects that work in aggregation to do operations on
22 emails. Each object do a specific task and delegate non related tasks to
23 others. The object comes alive by specifying a @emph{URL} parameter when
24 created, it will indicate the storage format or protocol
25 (POP3, IMAP4, MH, MAILDIR, etc ..).
26
27 @example
28 @group
29
30 folder_t url_t
31 -/var/mail- +- .. ->+-----------------+ +-->+------------+
32 ( alain *-)-+ | | url_t *-|---+ | port |
33 ----------- | | |-----------------| | hostname |
34 ( jakob *-)-+--+ | auth_t *-|---+ | file |
35 ----------- | |-----------------| | | ... |
36 ( jeff *-)-+ | stream_t | | +------------+
37 ----------- | |-----------------| |
38 ( shaleh*-)-+ | ..... | | auth_t
39 ---------- |-----------------| +-->+------------+
40 +---|-* mailbox_t[] | | ticket_t |
41 mailbox_t | +-----------------+ +------------+
42 +----------------+<-+
43 | locker_t *--|-------------+
44 |----------------| |
45 | url_t | | locker_t
46 |----------------| +-------->+---------+
47 | stream_t | | lock |
48 |----------------| | unlock |
49 | message_t[] *-|-------+ +---------+
50 +----------------+ | envelope_t
51 | +-------->+-----------+
52 message_t | | | date |
53 +----------------+<------+ | | from |
54 | envelope_t *-|------------------+ | to |
55 |----------------| header_t +-----------+
56 | header_t *-|------------>+--------------+
57 |----------------| | stream_t |
58 | body_t *-|----+ +--------------+
59 +----------------+ | body_t
60 +-->+--------------+
61 | stream_t |
62 +--------------+
63 @end group
64 @end example
65
66 For example writing a simple @code{from} command that will list the
67 @emph{From} and @emph{Subject} headers of every mail in a mailbox.
68
69 @example
70 @include sfrom.c.texi
71 @end example
72
73 @example
74 @cartouche
75 % MAIL=pop://alain@@localhost ./sfrom
76 Passwd: xxxx
77 Jim Meyering <meyering@@foo.org> fetish(shellutils) beta
78 Fran@,{c}ois Pinard <pinard@@bar.org> recode new alpha
79 @dots{}
80 @end cartouche
81 @end example
82
83 @node Folder
84 @comment node-name, next, previous, up
85 @section Folder
86 @cindex Folder
87
88 @include folder.texi
89
90 @node Mailbox
91 @comment node-name, next, previous, up
92 @section Mailbox
93 @cindex Mailbox
94
95 @include mailbox.texi
96
97 @node Mailer
98 @comment node-name, next, previous, up
99 @section Mailer
100 @cindex Mailer
101
102 @include mailer.texi
103
104 @node Message
105 @comment node-name, next, previous, up
106 @section Message
107 @cindex Message
108
109 @include message.texi
110
111 @node Envelope
112 @comment node-name, next, previous, up
113 @section Envelope
114 @cindex Envelope
115
116 @include envelope.texi
117
118 @node Headers
119 @comment node-name, next, previous, up
120 @section Headers
121 @cindex Headers
122
123 @include headers.texi
124
125 @node Body
126 @comment node-name, next, previous, up
127 @section Body
128 @cindex Body
129
130 @include body.texi
131
132 @node Attribute
133 @comment node-name, next, previous, up
134 @section Attribute
135 @cindex Attribute
136
137 @include attribute.texi
138
139 @node Stream
140 @comment node-name, next, previous, up
141 @section Stream
142 @cindex Stream
143
144 @include stream.texi
145
146 @node Iterator
147 @comment node-name, next, previous, up
148 @section Iterator
149 @cindex Iterator
150
151 @include iterator.texi
152
153 @node Authenticator
154 @comment node-name, next, previous, up
155 @section Authenticator
156 @cindex Authenticator
157
158 @include auth.texi
159
160 @node Address
161 @comment node-name, next, previous, up
162 @section Address
163 @cindex Address
164
165 @include address.texi
166
167 @node Locker
168 @comment node-name, next, previous, up
169 @section Locker
170 @cindex Locker
171
172 @include locker.texi
173
174 @node URL
175 @comment node-name, next, previous, up
176 @section URL
177 @cindex URL
178
179 @include url.texi
1 @example
2 @code{/* Prefix @emph{header_} is reserve */}
3 @code{#include <mailutils/header.h>}
4
5 @end example
6
1 So far we plan support for RFC822 and plan for RFC1522. with RFC1522 non ASCII 7 So far we plan support for RFC822 and plan for RFC1522. with RFC1522 non ASCII
2 characters will be encoded. 8 characters will be encoded.
3 9
......
1 @example
2 @code{/* Prefix @emph{imap4_} is reserve */}
3 @code{#include <mailutils/imap4.h>}
4
5 @end example
6
7 Internet Message Access Protocol - Version (4rev1). Not implemented.
8
9 @subsection Commands
10
11 @subsubsection Initialisation
12 @cindex IMAP4 Inintialisation
13
14 @deftypefun int imap4_create (imap4_t *)
15 @end deftypefun
16
17 @deftypefun int imap4_open (imap4_t, const char *@var{hostname}, unsigned int @var{port}, int @var{flags})
18 @end deftypefun
19
20 @deftypefun int imap4d_set_timeout (imap4_t, unsigned int @var{seconds})
21 @end deftypefun
22
23 @subsubsection Append
24 @cindex IMAP4 Append
25
26 @deftypefun int imap4_append (imap4_t)
27 @end deftypefun
28
29 @subsubsection Capability
30 @cindex IMAP4 Capability
31
32 @deftypefun int imap4_capability (imap4_t)
33 @end deftypefun
34
35 @subsubsection Create
36 @cindex IMAP4 Create
37
38 @deftypefun int imap4_create_mailbox (imap4_t, const char *@var{mbox})
39 @end deftypefun
40
41 @subsubsection Check
42 @cindex IMAP4 Check
43
44 @deftypefun int imap4_check (imap4_t)
45 @end deftypefun
46
47 @subsubsection Close
48 @cindex IMAP4 Close
49
50 @deftypefun int imap4_close (imap4_t)
51 @end deftypefun
52
53 @subsubsection Copy
54 @cindex IMAP4 Copy
55
56 @deftypefun int imap4_copy (imap4_t)
57 @end deftypefun
58
59 @subsubsection UID Copy
60 @cindex IMAP4 UID Copy
61
62 @deftypefun int imap4_uid_copy (imap4_t)
63 @end deftypefun
64
65 @subsubsection Delete
66 @cindex IMAP4 Delete
67
68 @deftypefun int imap4_delete (imap4_t)
69 @end deftypefun
70
71 @subsubsection Fetch
72 @cindex IMAP4 Fetch
73
74 @deftypefun int imap4_fetch (imap4_t)
75 @end deftypefun
76
77 @subsubsection UID Fetch
78 @cindex IMAP4 UID Fetch
79
80 @deftypefun int imap4_uid_fetch (imap4_t)
81 @end deftypefun
82
83 @subsubsection Examine
84 @cindex IMAP4 Examine
85
86 @deftypefun int imap4_examine (imap4_t)
87 @end deftypefun
88
89 @subsubsection Expunge
90 @cindex IMAP4 Expunge
91
92 @deftypefun int imap4_expunge (imap4_t)
93 @end deftypefun
94
95 @subsubsection List
96 @cindex IMAP4 List
97
98 @deftypefun int imap4_list (imap4_t)
99 @end deftypefun
100
101 @subsubsection Lsub
102 @cindex IMAP4 Lsub
103
104 @deftypefun int imap4_lsub (imap4_t)
105 @end deftypefun
106
107 @subsubsection Namespace
108 @cindex IMAP4 Namespace
109
110 @deftypefun int imap4_namespace (imap4_t)
111 @end deftypefun
112
113 @subsubsection Rename
114 @cindex IMAP4 Rename
115
116 @deftypefun int imap4_rename (imap4_t)
117 @end deftypefun
118
119 @subsubsection Search
120 @cindex IMAP4 Search
121
122 @deftypefun int imap4_search (imap4_t)
123 @end deftypefun
124
125 @subsubsection UID Search
126 @cindex IMAP4 UID Search
127
128 @deftypefun int imap4_uid_search (imap4_t)
129 @end deftypefun
130
131 @subsubsection Select
132 @cindex IMAP4 Select
133
134 @deftypefun int imap4_select (imap4_t)
135 @end deftypefun
136
137 @subsubsection Status
138 @cindex IMAP4 Status
139
140 @deftypefun int imap4_status (imap4_t)
141 @end deftypefun
142
143 @subsubsection Store
144 @cindex IMAP4 Store
145
146 @deftypefun int imap4_store (imap4_t)
147 @end deftypefun
148
149 @subsubsection UID Store
150 @cindex IMAP4 UID Store
151
152 @deftypefun int imap4_uid_store (imap4_t)
153 @end deftypefun
154
155 @subsubsection Subscribe
156 @cindex IMAP4 Subscribe
157
158 @deftypefun int imap4_subscribe (imap4_t)
159 @end deftypefun
160
161 @subsubsection Unsubscribe
162 @cindex IMAP4 Unsubscribe
163
164 @deftypefun int imap4_unsubscribe (imap4_t)
165 @end deftypefun
1 @example
2 @code{/* Prefix @emph{iterator_} is reserve */}
3 @code{#include <mailutils/iterator.h>}
4
5 @end example
6
7 @deftypefun int iterator_create (iterator_t *)
8 @end deftypefun
9
10 @deftypefun void iterator_destroy (iterator_t *)
11 @end deftypefun
12
13 @deftypefun int iterator_first (iterator_t)
14 @end deftypefun
15
16 @deftypefun int iterator_next (iterator_t)
17 @end deftypefun
18
19 @deftypefun int iterator_current (iterator_t, void **pitem)
20 @end deftypefun
21
22 @deftypefun int iterator_is_done (iterator_t)
23 @end deftypefun
24
1 @example
2 @code{/* Prefix @emph{locker_} is reserve */}
1 @code{#include <mailutils/locker.h>} 3 @code{#include <mailutils/locker.h>}
2 4
5 @end example
6
3 @deftypefun int locker_create (locker_t * @var{plocker}, char *@var{filename}, size_t @var{len}, int @var{flags}) 7 @deftypefun int locker_create (locker_t * @var{plocker}, char *@var{filename}, size_t @var{len}, int @var{flags})
4 @end deftypefun 8 @end deftypefun
5 9
......
1 @example
2 @code{/* Prefix @emph{mailbox_} is reserve */}
1 @code{#include <mailutils/mailbox.h>} 3 @code{#include <mailutils/mailbox.h>}
4
5 @end example
6
2 @deftp {Data Type} mailbox_t 7 @deftp {Data Type} mailbox_t
3 The @code{mailbox_t} object is used to hold information and it is an opaque 8 The @code{mailbox_t} object is used to hold information and it is an opaque
4 data structure to the user. Functions are provided to retrieve the information. 9 data structure to the user. Functions are provided to retrieve the information.
...@@ -9,15 +14,15 @@ data structure to the user. Functions are provided to retrieve the information. ...@@ -9,15 +14,15 @@ data structure to the user. Functions are provided to retrieve the information.
9 -/var/mail- +---//---->/-----------------\ +-->/-----------\ 14 -/var/mail- +---//---->/-----------------\ +-->/-----------\
10 ( alain ) | | url_t *-|----+ | port | 15 ( alain ) | | url_t *-|----+ | port |
11 ----------- | |-----------------+ | hostname | 16 ----------- | |-----------------+ | hostname |
12 ( jakob *-)----+ | auth_t *-|----+ | file | 17 ( jakob *-)----+ | observer_t *-| | file |
13 ----------- |-----------------+ | | ... | 18 ----------- |-----------------+ | ... |
14 ( jeff ) | stream_t | | \-----------/ 19 ( jeff ) | stream_t | \-----------/
15 ----------- |-----------------| | 20 ----------- |-----------------|
16 ( sean ) | locker_t | | auth_t 21 ( sean ) | locker_t |
17 ---------- |-----------------| +-->/----------\ 22 ---------- |-----------------|
18 | message_t(1) | | user | 23 | message_t(1) |
19 |-----------------| | passwd | 24 |-----------------|
20 | message_t(2) | \----------/ 25 | message_t(2) |
21 | ...... | 26 | ...... |
22 | message_t(n) | 27 | message_t(n) |
23 \-----------------/ 28 \-----------------/
...@@ -29,7 +34,7 @@ The @var{message} is appended to the mailbox @var{mbox}. ...@@ -29,7 +34,7 @@ The @var{message} is appended to the mailbox @var{mbox}.
29 34
30 The return value is @code{0} on success and a code number on error conditions: 35 The return value is @code{0} on success and a code number on error conditions:
31 @table @code 36 @table @code
32 @item EINVAL 37 @item MU_ERROR_INVALID_PARAMETER
33 @var{mbox} is null or @var{message} is invalid. 38 @var{mbox} is null or @var{message} is invalid.
34 @end table 39 @end table
35 @end deftypefun 40 @end deftypefun
...@@ -39,7 +44,7 @@ The stream attach to @var{mbox} is closed. ...@@ -39,7 +44,7 @@ The stream attach to @var{mbox} is closed.
39 44
40 The return value is @code{0} on success and a code number on error conditions: 45 The return value is @code{0} on success and a code number on error conditions:
41 @table @code 46 @table @code
42 @item EINVAL 47 @item MU_ERROR_INVALID_PARAMETER
43 @var{mbox} is null. 48 @var{mbox} is null.
44 @end table 49 @end table
45 @end deftypefun 50 @end deftypefun
...@@ -50,7 +55,7 @@ The concrete mailbox type instanciate is based on the scheme of the url @var{nam ...@@ -50,7 +55,7 @@ The concrete mailbox type instanciate is based on the scheme of the url @var{nam
50 55
51 The return value is @code{0} on success and a code number on error conditions: 56 The return value is @code{0} on success and a code number on error conditions:
52 @table @code 57 @table @code
53 @item EINVAL 58 @item MU_ERROR_INVALID_PARAMETER
54 The url @var{name} supplied is invalid or not supported. 59 The url @var{name} supplied is invalid or not supported.
55 @var{pmbox} is NULL. 60 @var{pmbox} is NULL.
56 @item ENOMEM 61 @item ENOMEM
...@@ -58,7 +63,7 @@ Not enough memory to allocate resources. ...@@ -58,7 +63,7 @@ Not enough memory to allocate resources.
58 @end table 63 @end table
59 @end deftypefun 64 @end deftypefun
60 65
61 @deftypefun int mailbox_create_default (mailbox_t *@var{pmbox}, const char *@var{user}) 66 @deftypefun int mailbox_create_default (mailbox_t *@var{pmbox}, const char *@var{name})
62 The environment variable @emph{$MAIL} or the string formed by 67 The environment variable @emph{$MAIL} or the string formed by
63 @emph{_PATH_MAILDIR}/@var{user}" or @emph{$LOGNAME} if @var{user} is null, 68 @emph{_PATH_MAILDIR}/@var{user}" or @emph{$LOGNAME} if @var{user} is null,
64 for a default mailbox and calls @code{mailbox_create}. 69 for a default mailbox and calls @code{mailbox_create}.
...@@ -73,17 +78,17 @@ All messages marked for deletion are removed. ...@@ -73,17 +78,17 @@ All messages marked for deletion are removed.
73 78
74 The return value is @code{0} on success and a code number on error conditions: 79 The return value is @code{0} on success and a code number on error conditions:
75 @table @code 80 @table @code
76 @item EINVAL 81 @item MU_ERROR_INVALID_PARAMETER
77 @var{mbox} is null. 82 @var{mbox} is null.
78 @end table 83 @end table
79 @end deftypefun 84 @end deftypefun
80 85
81 @deftypefun int mailbox_get_auth (mailbox_t @var{mbox}, auth_t *@var{pauth}) 86 @deftypefun int mailbox_get_folder (mailbox_t @var{mbox}, folder_t *@var{folder})
82 Retrieve the @var{*pauth} of the @var{mbox}. 87 Get the @var{folder}.
83 88
84 The return value is @code{0} on success and a code number on error conditions: 89 The return value is @code{0} on success and a code number on error conditions:
85 @table @code 90 @table @code
86 @item EINVAL 91 @item MU_ERROR_INVALID_PARAMETER
87 @var{mbox} is null. 92 @var{mbox} is null.
88 @end table 93 @end table
89 @end deftypefun 94 @end deftypefun
...@@ -92,7 +97,7 @@ The return value is @code{0} on success and a code number on error conditions: ...@@ -92,7 +97,7 @@ The return value is @code{0} on success and a code number on error conditions:
92 Get a debug object. 97 Get a debug object.
93 The return value is @code{0} on success and a code number on error conditions: 98 The return value is @code{0} on success and a code number on error conditions:
94 @table @code 99 @table @code
95 @item EINVAL 100 @item MU_ERROR_INVALID_PARAMETER
96 @var{mbox} is null. 101 @var{mbox} is null.
97 @item ENOMEM 102 @item ENOMEM
98 @end table 103 @end table
...@@ -103,7 +108,7 @@ Return the @var{locker} object. ...@@ -103,7 +108,7 @@ Return the @var{locker} object.
103 108
104 The return value is @code{0} on success and a code number on error conditions: 109 The return value is @code{0} on success and a code number on error conditions:
105 @table @code 110 @table @code
106 @item EINVAL 111 @item MU_ERROR_INVALID_PARAMETER
107 @var{mbox} is null. 112 @var{mbox} is null.
108 @end table 113 @end table
109 @end deftypefun 114 @end deftypefun
...@@ -114,7 +119,7 @@ initialized. ...@@ -114,7 +119,7 @@ initialized.
114 119
115 The return value is @code{0} on success and a code number on error conditions: 120 The return value is @code{0} on success and a code number on error conditions:
116 @table @code 121 @table @code
117 @item EINVAL 122 @item MU_ERROR_INVALID_PARAMETER
118 @var{mbox} is null or @var{msgno} is invalid. 123 @var{mbox} is null or @var{msgno} is invalid.
119 @item ENOMEM 124 @item ENOMEM
120 Not enough memory. 125 Not enough memory.
...@@ -126,7 +131,7 @@ Get the observable object. ...@@ -126,7 +131,7 @@ Get the observable object.
126 131
127 The return value is @code{0} on success and a code number on error conditions: 132 The return value is @code{0} on success and a code number on error conditions:
128 @table @code 133 @table @code
129 @item EINVAL 134 @item MU_ERROR_INVALID_PARAMETER
130 @var{mbox} is null. 135 @var{mbox} is null.
131 @item ENOMEM 136 @item ENOMEM
132 Not enough memory. 137 Not enough memory.
...@@ -137,7 +142,7 @@ Not enough memory. ...@@ -137,7 +142,7 @@ Not enough memory.
137 Get the property object. 142 Get the property object.
138 The return value is @code{0} on success and a code number on error conditions: 143 The return value is @code{0} on success and a code number on error conditions:
139 @table @code 144 @table @code
140 @item EINVAL 145 @item MU_ERROR_INVALID_PARAMETER
141 @var{mbox} is null. 146 @var{mbox} is null.
142 @item ENOMEM 147 @item ENOMEM
143 @end table 148 @end table
...@@ -148,7 +153,7 @@ Gives the @var{mbox} size. ...@@ -148,7 +153,7 @@ Gives the @var{mbox} size.
148 153
149 The return value is @code{0} on success and a code number on error conditions: 154 The return value is @code{0} on success and a code number on error conditions:
150 @table @code 155 @table @code
151 @item EINVAL 156 @item MU_ERROR_INVALID_PARAMETER
152 @var{mbox} is null. 157 @var{mbox} is null.
153 @end table 158 @end table
154 @end deftypefun 159 @end deftypefun
...@@ -158,7 +163,7 @@ The mailbox stream is put in @var{pstream}. ...@@ -158,7 +163,7 @@ The mailbox stream is put in @var{pstream}.
158 163
159 The return value is @code{0} on success and a code number on error conditions: 164 The return value is @code{0} on success and a code number on error conditions:
160 @table @code 165 @table @code
161 @item EINVAL 166 @item MU_ERROR_INVALID_PARAMETER
162 @var{mbox} is invalid or @var{pstream} is NULL. 167 @var{mbox} is invalid or @var{pstream} is NULL.
163 @end table 168 @end table
164 @end deftypefun 169 @end deftypefun
...@@ -167,7 +172,7 @@ The return value is @code{0} on success and a code number on error conditions: ...@@ -167,7 +172,7 @@ The return value is @code{0} on success and a code number on error conditions:
167 The return value is @code{0} on success and a code number on error conditions: 172 The return value is @code{0} on success and a code number on error conditions:
168 173
169 @table @code 174 @table @code
170 @item EINVAL 175 @item MU_ERROR_INVALID_PARAMETER
171 @var{mbox} is null. 176 @var{mbox} is null.
172 @end table 177 @end table
173 @end deftypefun 178 @end deftypefun
...@@ -177,17 +182,17 @@ Gives the constructed @var{url}. ...@@ -177,17 +182,17 @@ Gives the constructed @var{url}.
177 182
178 The return value is @code{0} on success and a code number on error conditions: 183 The return value is @code{0} on success and a code number on error conditions:
179 @table @code 184 @table @code
180 @item EINVAL 185 @item MU_ERROR_INVALID_PARAMETER
181 @var{mbox} is null. 186 @var{mbox} is null.
182 @end table 187 @end table
183 @end deftypefun 188 @end deftypefun
184 189
185 @deftypefun int mailbox_is_updated (mailbox_t @var{mbox}) 190 @deftypefun int mailbox_is_modified (mailbox_t @var{mbox})
186 Check if the mailbox is up-to-date. 191 Check if the mailbox been modified by an external source.
187 192
188 The return value is @code{0} on success and a code number on error conditions: 193 The return value is @code{0} on success and a code number on error conditions:
189 @table @code 194 @table @code
190 @item EINVAL 195 @item MU_ERROR_INVALID_PARAMETER
191 @var{mbox} is null. 196 @var{mbox} is null.
192 @end table 197 @end table
193 @end deftypefun 198 @end deftypefun
...@@ -197,7 +202,7 @@ Give the number of first unseen message in @var{mbox}. ...@@ -197,7 +202,7 @@ Give the number of first unseen message in @var{mbox}.
197 202
198 The return value is @code{0} on success and a code number on error conditions: 203 The return value is @code{0} on success and a code number on error conditions:
199 @table @code 204 @table @code
200 @item EINVAL 205 @item MU_ERROR_INVALID_PARAMETER
201 @var{mbox} is null. 206 @var{mbox} is null.
202 @end table 207 @end table
203 @end deftypefun 208 @end deftypefun
...@@ -207,7 +212,7 @@ Give the number of messages in @var{mbox}. ...@@ -207,7 +212,7 @@ Give the number of messages in @var{mbox}.
207 212
208 The return value is @code{0} on success and a code number on error conditions: 213 The return value is @code{0} on success and a code number on error conditions:
209 @table @code 214 @table @code
210 @item EINVAL 215 @item MU_ERROR_INVALID_PARAMETER
211 @var{mbox} is null. 216 @var{mbox} is null.
212 @end table 217 @end table
213 @end deftypefun 218 @end deftypefun
...@@ -217,7 +222,7 @@ Give the number of recent messages in @var{mbox}. ...@@ -217,7 +222,7 @@ Give the number of recent messages in @var{mbox}.
217 222
218 The return value is @code{0} on success and a code number on error conditions: 223 The return value is @code{0} on success and a code number on error conditions:
219 @table @code 224 @table @code
220 @item EINVAL 225 @item MU_ERROR_INVALID_PARAMETER
221 @var{mbox} is null. 226 @var{mbox} is null.
222 @end table 227 @end table
223 @end deftypefun 228 @end deftypefun
...@@ -234,7 +239,7 @@ The return value is @code{0} on success and a code number on error conditions: ...@@ -234,7 +239,7 @@ The return value is @code{0} on success and a code number on error conditions:
234 Operation in progress. 239 Operation in progress.
235 @item EBUSY 240 @item EBUSY
236 Resource busy. 241 Resource busy.
237 @item EINVAL 242 @item MU_ERROR_INVALID_PARAMETER
238 @var{mbox} is null or flag is invalid. 243 @var{mbox} is null or flag is invalid.
239 @item ENOMEM 244 @item ENOMEM
240 Not enough memory. 245 Not enough memory.
...@@ -246,29 +251,19 @@ Scan the mailbox for new messages starting at message @var{msgno}. ...@@ -246,29 +251,19 @@ Scan the mailbox for new messages starting at message @var{msgno}.
246 251
247 The return value is @code{0} on success and a code number on error conditions: 252 The return value is @code{0} on success and a code number on error conditions:
248 @table @code 253 @table @code
249 @item EINVAL 254 @item MU_ERROR_INVALID_PARAMETER
250 @var{mbox} is null. 255 @var{mbox} is null.
251 @item ENOMEM 256 @item ENOMEM
252 Not enough memory. 257 Not enough memory.
253 @end table 258 @end table
254 @end deftypefun 259 @end deftypefun
255 260
256 @deftypefun int mailbox_set_auth (mailbox_t @var{mbox}, auth_t @var{auth})
257 Set the type of authentication for the mailbox.
258
259 The return value is @code{0} on success and a code number on error conditions:
260 @table @code
261 @item EINVAL
262 @var{mbox} is null.
263 @end table
264 @end deftypefun
265
266 @deftypefun int mailbox_set_locker (mailbox_t @var{mbox}, locker_t @var{locker}) 261 @deftypefun int mailbox_set_locker (mailbox_t @var{mbox}, locker_t @var{locker})
267 Set the type of locking done by the @var{mbox}. 262 Set the type of locking done by the @var{mbox}.
268 263
269 The return value is @code{0} on success and a code number on error conditions: 264 The return value is @code{0} on success and a code number on error conditions:
270 @table @code 265 @table @code
271 @item EINVAL 266 @item MU_ERROR_INVALID_PARAMETER
272 @var{mbox} is null. 267 @var{mbox} is null.
273 @end table 268 @end table
274 @end deftypefun 269 @end deftypefun
...@@ -278,7 +273,7 @@ Set the @var{stream} connection to use for the mailbox. ...@@ -278,7 +273,7 @@ Set the @var{stream} connection to use for the mailbox.
278 273
279 The return value is @code{0} on success and a code number on error conditions: 274 The return value is @code{0} on success and a code number on error conditions:
280 @table @code 275 @table @code
281 @item EINVAL 276 @item MU_ERROR_INVALID_PARAMETER
282 @var{mbox} or @var{stream} is NULL. 277 @var{mbox} or @var{stream} is NULL.
283 @end table 278 @end table
284 @end deftypefun 279 @end deftypefun
...@@ -288,7 +283,7 @@ The @var{ticket} will be set on the @code{auth_t} object on creation. ...@@ -288,7 +283,7 @@ The @var{ticket} will be set on the @code{auth_t} object on creation.
288 283
289 The return value is @code{0} on success and a code number on error conditions: 284 The return value is @code{0} on success and a code number on error conditions:
290 @table @code 285 @table @code
291 @item EINVAL 286 @item MU_ERROR_INVALID_PARAMETER
292 @var{mbox} is null. 287 @var{mbox} is null.
293 @end table 288 @end table
294 @end deftypefun 289 @end deftypefun
...@@ -298,7 +293,7 @@ Give the next predicted uid for @var{mbox}. ...@@ -298,7 +293,7 @@ Give the next predicted uid for @var{mbox}.
298 293
299 The return value is @code{0} on success and a code number on error conditions: 294 The return value is @code{0} on success and a code number on error conditions:
300 @table @code 295 @table @code
301 @item EINVAL 296 @item MU_ERROR_INVALID_PARAMETER
302 @var{mbox} is null. 297 @var{mbox} is null.
303 @end table 298 @end table
304 @end deftypefun 299 @end deftypefun
...@@ -308,8 +303,7 @@ Give the uid validity of @var{mbox}. ...@@ -308,8 +303,7 @@ Give the uid validity of @var{mbox}.
308 303
309 The return value is @code{0} on success and a code number on error conditions: 304 The return value is @code{0} on success and a code number on error conditions:
310 @table @code 305 @table @code
311 @item EINVAL 306 @item MU_ERROR_INVALID_PARAMETER
312 @var{mbox} is null. 307 @var{mbox} is null.
313 @end table 308 @end table
314 @end deftypefun 309 @end deftypefun
315
......
1 @example
2 @code{/* Prefix @emph{maildir_} is reserve */}
3 @code{#include <mailutils/maildir.h>}
4
5 @end example
6
7 QMail mailbox format. Not implemented.
1 @example
2 @code{/* Prefix @emph{mailer_} is reserve */}
3 @code{#include <mailutils/mailer.h>}
4
5 @end example
1 6
2 The API is still shaky and undefined. 7 The API is still shaky and undefined.
3 8
9 @deftypefun int mailer_create (mailer_t *, const char *)
10 @end deftypefun
11
12 @deftypefun void mailer_destroy (mailer_t *)
13 @end deftypefun
14
15 @deftypefun int mailer_open (mailer_t, int flags)
16 @end deftypefun
17
18 @deftypefun int mailer_close (mailer_t)
19 @end deftypefun
20
21 @deftypefun int mailer_send_message (mailer_t, message_t)
22 @end deftypefun
23
24 @deftypefun int mailer_get_property (mailer_t, property_t *)
25 @end deftypefun
26
27 @deftypefun int mailer_get_stream (mailer_t, stream_t *)
28 @end deftypefun
29
30 @deftypefun int mailer_set_stream (mailer_t, stream_t)
31 @end deftypefun
32
33 @deftypefun int mailer_get_debug (mailer_t, debug_t *)
34 @end deftypefun
35
36 @deftypefun int mailer_set_debug (mailer_t, debug_t)
37 @end deftypefun
38
39 @deftypefun int mailer_get_observable (mailer_t, observable_t *)
40 @end deftypefun
41
42 @deftypefun int mailer_get_url (mailer_t, url_t *)
43 @end deftypefun
......
...@@ -62,7 +62,7 @@ by the Foundation. ...@@ -62,7 +62,7 @@ by the Foundation.
62 @setchapternewpage off 62 @setchapternewpage off
63 63
64 @titlepage 64 @titlepage
65 @title mailutils, library API. 65 @title mailutils, SDK.
66 @subtitle version @value{VERSION}, @value{UPDATED} 66 @subtitle version @value{VERSION}, @value{UPDATED}
67 @author Alain Magloire et al. 67 @author Alain Magloire et al.
68 68
...@@ -92,6 +92,8 @@ by the Foundation. ...@@ -92,6 +92,8 @@ by the Foundation.
92 @end titlepage 92 @end titlepage
93 @page 93 @page
94 94
95 @summarycontents
96 @page
95 97
96 @node Top, Introduction, (dir), (dir) 98 @node Top, Introduction, (dir), (dir)
97 @comment node-name, next, previous, up 99 @comment node-name, next, previous, up
...@@ -102,26 +104,17 @@ This document was produced for version @value{VERSION} of @sc{gnu} ...@@ -102,26 +104,17 @@ This document was produced for version @value{VERSION} of @sc{gnu}
102 @end ifinfo 104 @end ifinfo
103 @menu 105 @menu
104 * Introduction:: GNU @sc{mailutils} 106 * Introduction:: GNU @sc{mailutils}
105 * Mailbox:: Mailbox API. 107 * C API:: C API.
106 * Mailer:: Protocol Used to Send Mail. 108 * Framework:: Framework.
107 * Message:: Message API. 109 * Programs:: Programs.
108 * Headers:: Headers API.
109 * Body:: Body API.
110 * Attribute:: Attribute.
111 * Stream:: Stream API.
112 * Authenticator:: Authenticator.
113 * Address:: Address.
114 * Locker:: Locker.
115 * Encoding:: Encoding API.
116 * URL:: Unified Ressource Locator.
117 * Reporting Bugs:: Reporting Bugs. 110 * Reporting Bugs:: Reporting Bugs.
118 * Acknowledgement:: Thanks and Credits. 111 * Acknowledgement:: Thanks and Credits.
119 * Concept Index :: 112 * Concept Index:: All @sc{Mailutils} Functions.
120 * Index:: All @sc{Mailutils} Functions. 113 * Index::
121 114
122 @end menu 115 @end menu
123 116
124 @node Introduction, Mailbox, Top, Top 117 @node Introduction, C API, Top, Top
125 @comment node-name, next, previous, up 118 @comment node-name, next, previous, up
126 @chapter Introduction 119 @chapter Introduction
127 @cindex Introduction 120 @cindex Introduction
...@@ -130,127 +123,122 @@ This document was produced for version @value{VERSION} of @sc{gnu} ...@@ -130,127 +123,122 @@ This document was produced for version @value{VERSION} of @sc{gnu}
130 provide a rich set of functions for accessing different mailbox formats and 123 provide a rich set of functions for accessing different mailbox formats and
131 mailers. 124 mailers.
132 125
133 @example 126 @section References
134 @group
135
136 mailbox_t url_t
137 -/var/mail- +---//---->+-----------------+ +-->+------------+
138 ( alain ) | | url_t *-|----+ | port |
139 ----------- | |-----------------| | hostname |
140 ( jakob *-)----+ | auth_t *-|----+ | file |
141 ----------- |-----------------| | | ... |
142 ( jeff ) | locker_t *-|--+ | +------------+
143 ----------- |-----------------| | |
144 ( shaleh ) | stream_t | | | auth_t
145 ---------- |-----------------| | +-->+------------+
146 +---|-* message_t[] | | | ticket_t |
147 message_t | +-----------------+ | +------------+
148 +----------------+<----+ |
149 | envelope_t | |
150 |----------------| header_t | locker_t
151 | header_t *-|------------>+--------------+ +---->+------+
152 |----------------| | stream_t | +------+
153 | body_t *-|----+ +--------------+
154 +----------------+ | body_t
155 +---+--------------+
156 | stream_t |
157 +--------------+
158 @end group
159 @end example
160
161 For example writing a simple @code{from} command that will list the
162 @emph{From} and @emph{Subject} headers of every mail in a folder.
163
164 @example
165 @include sfrom.c.texi
166 @end example
167
168 @node Mailbox, Mailer, Introduction, Top
169 @comment node-name, next, previous, up
170 @chapter Mailbox
171 @cindex Mailbox
172 127
173 @include mailbox.texi 128 For more information on,
174 129
175 @node Mailer, Message, Mailbox, Top 130 @itemize @bullet
176 @comment node-name, next, previous, up 131 @item
177 @chapter Mailer 132 SMTP RFCs:
178 @cindex Mailer
179 133
180 @include mailer.texi 134 @itemize @minus
135 @item
136 @cite{RFC 2821: Simple Mail Transfer Protocol}
181 137
182 @node Message, Headers , Mailer, Top 138 @item
183 @comment node-name, next, previous, up 139 @cite{RFC 2822: Internet Message Format}
184 @chapter Message
185 @cindex Message
186 140
187 @include message.texi 141 @item
142 @cite{RFC 2368: The mailto URL scheme}
143 @end itemize
188 144
189 @node Headers , Body, Message, Top 145 @item
190 @comment node-name, next, previous, up 146 on POP3
191 @chapter Headers
192 @cindex Headers
193 147
194 @include headers.texi 148 @itemize @minus
149 @item
150 @cite{RFC 1734: POP3 AUTHentication command}
195 151
196 @node Body, Attribute, Headers, Top 152 @item
197 @comment node-name, next, previous, up 153 @cite{RFC 1957: Some Observations on Implementations of the Post Office
198 @chapter Body 154 Protocol (POP3)}
199 @cindex Body
200 155
201 @include body.texi 156 @item
157 @cite{RFC 1939: Post Office Protocol - Version 3}
202 158
203 @node Attribute, Stream, Body, Top 159 @item
204 @comment node-name, next, previous, up 160 @cite{RFC 2449: POP3 Extension Mechanism}
205 @chapter Attribute
206 @cindex Attribute
207 161
208 @include attribute.texi 162 @item
163 @cite{RFC 2384: POP URL Scheme}
164 @end itemize
209 165
210 @node Stream, Authenticator, Attribute, Top 166 @item
211 @comment node-name, next, previous, up 167 On IMAP4
212 @chapter Stream
213 @cindex Stream
214 168
215 @include stream.texi 169 @itemize @minus
170 @item
171 @cite{RFC 2088: IMAP4 non-synchronizing literals}
216 172
217 @node Authenticator, Address, Stream, Top 173 @item
218 @comment node-name, next, previous, up 174 @cite{RFC 2193: IMAP4 Mailbox Referrals}
219 @chapter Authenticator
220 @cindex Authenticator
221 175
222 @include auth.texi 176 @item
177 @cite{RFC 2221: IMAP4 Login Referrals}
223 178
224 @node Address, Locker, Authenticator, Top 179 @item
225 @comment node-name, next, previous, up 180 @cite{RFC 2342: IMAP4 Namespace}
226 @chapter Address
227 @cindex Address
228 181
229 @include address.texi 182 @item
183 @cite{RFC 1738: Uniform Resource Locators (URL)}
230 184
231 @node Locker, Encoding, Address, Top 185 @item
232 @comment node-name, next, previous, up 186 @cite{RFC 2192: IMAP URL Scheme}
233 @chapter Locker 187 @end itemize
234 @cindex Locker 188
189 @item
190 On MIME
235 191
236 @include locker.texi 192 @itemize @minus
193 @item
194 @cite{RFC 2060: INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1}
237 195
238 @node Encoding, URL, Locker , Top 196 @item
197 @cite{RFC 2045: Multipurpose Internet Mail Extensions (MIME) Part One:
198 Format of Internet Message Bodies}
199
200 @item
201 @cite{RFC 2047: MIME (Multipurpose Internet Mail Extensions) Part Three:
202 Message Header Extensions for Non-ASCII Text}
203
204 @item
205 @cite{RFC 2049: Multipurpose Internet Mail Extensions (MIME) Part Five:
206 Conformance Criteria and Examples}
207
208 @item
209 @cite{RFC 2111: Content-ID and Message-ID Uniform Resource Locators}
210 @end itemize
211
212 @item
213 Misc
214 @cite{RFC 3028: Sieve: A Mail Filtering Language}
215
216 @item
217 @cite{Internet Email Protocols a Developer's Guide by Kevin Johnson}
218 @end itemize
219
220 @node C API, Framework, Introduction, Top
239 @comment node-name, next, previous, up 221 @comment node-name, next, previous, up
240 @chapter Encoding 222 @chapter C API
241 @cindex Encoding 223 @cindex C API
242 224
243 @include encoding.texi 225 @include c-api.texi
244 226
245 @node URL, Reporting Bugs, Encoding, Top 227 @node Framework, Programs, C API, Top
246 @comment node-name, next, previous, up 228 @comment node-name, next, previous, up
247 @chapter URL 229 @chapter Framework
248 @cindex URL 230 @cindex Framework
249 231
250 @include url.texi 232 @include framework.texi
251 233
234 @node Programs, Reporting Bugs, Framework, Top
235 @comment node-name, next, previous, up
236 @chapter Programs
237 @cindex Programs
238
239 @include programs.texi
252 240
253 @node Reporting Bugs, Acknowledgement, URL, Top 241 @node Reporting Bugs, Acknowledgement, Programs, Top
254 @comment node-name, next, previous, up 242 @comment node-name, next, previous, up
255 @chapter Reporting Bugs 243 @chapter Reporting Bugs
256 @cindex Reporting Bugs 244 @cindex Reporting Bugs
...@@ -266,14 +254,16 @@ Be sure to include the word ``mailutils'' somewhere in the ``Subject:'' field. ...@@ -266,14 +254,16 @@ Be sure to include the word ``mailutils'' somewhere in the ``Subject:'' field.
266 In no particular order, 254 In no particular order,
267 Jakob Kaivo @email{jkaivo@@ndn.net}, 255 Jakob Kaivo @email{jkaivo@@ndn.net},
268 Jeff Bailey @email{jbailey@@gnu.org}, 256 Jeff Bailey @email{jbailey@@gnu.org},
269 Sean 'Shaleh' Perry @email{shaleh@@debian.org}, 257 Sean Perry @email{shaleh@@debian.org},
270 Thomas Fletcher @email{thomasf@@qnx.com}, 258 Thomas Fletcher @email{thomasf@@qnx.com},
271 Dave Inglis @email{dinglis@@qnx.com}, 259 Dave Inglis @email{dinglis@@qnx.com},
272 Brian Edmond @email{briane@@qnx.com}, 260 Brian Edmond @email{briane@@qnx.com},
273 Sam Roberts @email{sroberts@@uniserve.com}. 261 Sam Roberts @email{sroberts@@uniserve.com},
274 262 Sergey Poznyakoff @email{gray@@Mirddin.farlep.net},
263 Fran@,{c}ois Pinard @email{pinard@@IRO.UMontreal.CA}.
275 @page 264 @page
276 @node Concept Index , Index, Acknowledgement, Top 265
266 @node Concept Index, Index, Acknowledgement, Top
277 @comment node-name, next, previous, up 267 @comment node-name, next, previous, up
278 @unnumbered Concept Index 268 @unnumbered Concept Index
279 269
...@@ -282,7 +272,8 @@ This is a general index of all issues discussed in this manual ...@@ -282,7 +272,8 @@ This is a general index of all issues discussed in this manual
282 @printindex cp 272 @printindex cp
283 @page 273 @page
284 274
285 @node Index, , Concept Index , Top 275 @node Index, , Concept Index, Top
276 @comment node-name, next, previous, up
286 @unnumbered Index 277 @unnumbered Index
287 278
288 This is an alphabetical list of all @sc{mailutils} functions. 279 This is an alphabetical list of all @sc{mailutils} functions.
......
1 @example
2 @code{/* Prefix @emph{mbox_} is reserve */}
3 @code{#include <mailutils/mbox.h>}
4
5 @end example
6
7 Standard Unix Mailbox. Not implemented.
1 @example
1 @code{#include <mailutils/message.h>} 2 @code{#include <mailutils/message.h>}
3 @code{/* Prefix @emph{message_} is reserve */}
4
5 @end example
2 6
3 The @code{message_t} object is a convenient way to manipulate messages. It 7 The @code{message_t} object is a convenient way to manipulate messages. It
4 encapsulates the @code{envelope_t}, the @code{header_t} and the @code{body_t}. 8 encapsulates the @code{envelope_t}, the @code{header_t} and the @code{body_t}.
......
1 @example
2 @code{/* Prefix @emph{mh_} is reserve */}
3 @code{#include <mailutils/mh.h>}
4
5 @end example
6
7 Mail Handler mailbox format. Not implemented.
1 Mime stuff in the Body. 1 @example
2 @code{/* Prefix @emph{pop3_} is reserve */}
3 @code{#include <mailutils/pop3.h>}
4
5 @end example
6
7 Multipurpose Internet Mail Extensions (MIME).
8
9 @deftypefun int mime_create (mime_t *pmime, message_t msg, int flags)
10 @end deftypefun
11
12 @deftypefun void mime_destroy (mime_t *pmime)
13 @end deftypefun
14
15 @deftypefun int mime_is_multipart (mime_t mime)
16 @end deftypefun
17
18 @deftypefun int mime_get_num_parts (mime_t mime, size_t *nparts)
19 @end deftypefun
20
21 @deftypefun int mime_get_part (mime_t mime, size_t part, message_t *msg)
22 @end deftypefun
23
24 @deftypefun int mime_add_part (mime_t mime, message_t msg)
25 @end deftypefun
26
27 @deftypefun int mime_get_message (mime_t mime, message_t *msg)
28 @end deftypefun
......
1 @example
2 @code{/* Prefix @emph{nntp_} is reserve */}
3 @code{#include <mailutils/nntp.h>}
4
5 @end example
6
7 Network News Transfer Protocol. Not implemented.
8
9 @subsection Commands
10
11 @subsubsection Initialisation
12 @cindex NNTP Initialisation
13 @deftypefun int nntp_create (nnpt_t *)
14 @end deftypefun
15
16 @deftypefun int nntp_destroy (nnpt_t *)
17 @end deftypefun
18
19 @deftypefun int nntp_open (nnpt_t)
20 @end deftypefun
21
22 @subsubsection Article
23 @cindex NNTP Article
24 @deftypefun int nntp_article (nnpt_t)
25 @end deftypefun
26
27 @subsubsection Body
28 @cindex NNTP Body
29 @deftypefun int nntp_body (nntp_t)
30 @end deftypefun
31
32 @subsubsection Group
33 @cindex NNTP Group
34 @deftypefun int nntp_group (nntp_t)
35 @end deftypefun
36
37 @subsubsection Head
38 @cindex NNTP Head
39 @deftypefun int nntp_head (nntp_t)
40 @end deftypefun
41
42 @subsubsection Help
43 @cindex NNTP Help
44 @deftypefun int nntp_help (nntp_t)
45 @end deftypefun
46
47 @subsubsection IHave
48 @cindex NNTP IHave
49 @deftypefun int nntp_ihave (nntp_t)
50 @end deftypefun
51
52 @subsubsection Last
53 @cindex NNTP Last
54 @deftypefun int nntp_last (nntp_t)
55 @end deftypefun
56
57 @subsubsection List
58 @cindex NNTP List
59 @deftypefun int nntp_list (nntp_t)
60 @end deftypefun
61
62 @subsubsection NewGroups
63 @cindex NNTP NewGroups
64 @deftypefun int nntp_newgroups (nntp_t)
65 @end deftypefun
66
67 @subsubsection NewNews
68 @cindex NNTP NewNews
69 @deftypefun int nntp_newnews (nntp_t)
70 @end deftypefun
71
72 @subsubsection Next
73 @cindex NNTP Next
74 @deftypefun int nntp_next (nntp_t)
75 @end deftypefun
76
77 @subsubsection Post
78 @cindex NNTP Post
79 @deftypefun int nntp_post (nntp_t)
80 @end deftypefun
81
82 @subsubsection Quit
83 @cindex NNTP Quit
84 @deftypefun int nntp_quit (nntp_t)
85 @end deftypefun
86
87 @subsubsection Slave
88 @cindex NNTP Slave
89 @deftypefun int nntp_slave (nntp_t)
90 @end deftypefun
91
92 @subsubsection Stat
93 @cindex NNTP Stat
94 @deftypefun int nntp_stat (nntp_t)
95 @end deftypefun
1 @example
2 @code{/* Prefix @emph{parse822_} is reserve */}
3 @code{#include <mailutils/parse822.h>}
4
5 @end example
6
7 Internet Message Format, see Address node for the discusion.
8
9 @deftypefun int parse822_address_list (address_t* a, const char* s)
10 @end deftypefun
11
12 @deftypefun int parse822_mail_box (const char** p, const char* e, address_t* a)
13 @end deftypefun
14
15 @deftypefun int parse822_group (const char** p, const char* e, address_t* a)
16 @end deftypefun
17
18 @deftypefun int parse822_address (const char** p, const char* e, address_t* a)
19 @end deftypefun
20
21 @deftypefun int parse822_route_addr (const char** p, const char* e, address_t* a)
22 @end deftypefun
23
24 @deftypefun int parse822_route (const char** p, const char* e, char** route)
25 @end deftypefun
26
27 @deftypefun int parse822_addr_spec (const char** p, const char* e, address_t* a)
28 @end deftypefun
29
30 @deftypefun int parse822_unix_mbox (const char** p, const char* e, address_t* a)
31 @end deftypefun
32
33 @deftypefun int parse822_local_part (const char** p, const char* e, char** local_part)
34 @end deftypefun
35
36 @deftypefun int parse822_domain (const char** p, const char* e, char** domain)
37 @end deftypefun
38
39 @deftypefun int parse822_sub_domain (const char** p, const char* e, char** sub_domain)
40 @end deftypefun
41
42 @deftypefun int parse822_domain_ref (const char** p, const char* e, char** domain_ref)
43 @end deftypefun
44
45 @deftypefun int parse822_domain_literal (const char** p, const char* e, char** domain_literal)
46 @end deftypefun
47
48 @deftypefun int parse822_quote_string (char** quoted, const char* raw)
49 @end deftypefun
50
51 @deftypefun int parse822_quote_local_part (char** quoted, const char* raw)
52 @end deftypefun
53
54
55 @deftypefun int parse822_field_body (const char** p, const char *e, char** fieldbody)
56 @end deftypefun
57
58 @deftypefun int parse822_field_name (const char** p, const char *e, char** fieldname)
59 @end deftypefun
1
2 @section frm
3 List header from a mailbox.
4
5 @section imap4d
6 Imap4 daemon.
7
8 @section mail
9 Send and receive mail.
10
11 @section parse822
12 Parse RFC 822 fields.
13
14 @section pop3d
15 POP3 daemon.
16
17 @section readmsg
18 Extract messages from a folder.
19
20 @section sendmsg
21 Send a message.
22
23 @section sieve
24 Filter a mailbox.
25
1 @example
2 @code{/* Prefix @emph{sendmail_} is reserve */}
3 @code{#include <mailutils/sendmail.h>}
4
5 @end example
6
7 Spawning Sedmail daemon to deliver mail. Not implemented.
...@@ -74,13 +74,3 @@ main (int argc, const char **argv) ...@@ -74,13 +74,3 @@ main (int argc, const char **argv)
74 mailbox_destroy (&mbox); 74 mailbox_destroy (&mbox);
75 return 0; 75 return 0;
76 @} 76 @}
77
78 @example
79 @cartouche
80 % MAIL=pop://alain@@localhost ./sfrom
81 Passwd: xxxx
82 Jim Meyering <meyering@@foo.org> fetish(shellutils) beta
83 Fran@,{c}ois Pinard <pinard@@bar.org> recode new alpha
84 @dots{}
85 @end cartouche
86 @end example
......
1 @example
2 @code{/* Prefix @emph{smtp_} is reserve */}
3 @code{#include <mailutils/smtp.h>}
4
5 @end example
6
7 Simple Mail Transfer Protocol. Not implemented.
8
9 @subsection Commands
10 @cindex smtp_t
11
12 @subsubsection Initialisation
13 @cindex SMTP Initialisation
14 @deftypefun int smtp_create (smtp_t *)
15 @end deftypefun
16
17 @deftypefun void smtp_destroy (smtp_t *)
18 @end deftypefun
19
20 @deftypefun int smtp_open (smtp_t, const char *@var{host}, unsigned int @var{port}, int @var{flags})
21 @end deftypefun
22
23
24 @subsubsection Data
25 @cindex SMTP Data
26 @deftypefun int smtp_data (smtp_t, stream_t @var{stream})
27 @end deftypefun
28
29 @subsubsection Helo
30 @cindex SMTP Helo
31 @deftypefun int smtp_helo (smtp_t, const char *@var{domain})
32 @end deftypefun
33
34 @deftypefun int smtp_ehlo (smtp_t, const char *@var{domain})
35 @end deftypefun
36
37 @subsubsection Expn
38 @cindex SMTP Expn
39 @deftypefun int smtp_expn (smtp_t, const char *@var{list}, iterator_t *)
40 @end deftypefun
41
42 @subsubsection Help
43 @cindex SMTP Help
44 @deftypefun int smtp_help (smtp_t, const char *@var{help}, iterator_t *)
45 @end deftypefun
46
47 @subsubsection Mail From
48 @cindex SMTP Mail From
49 @deftypefun int smtp_mail_from (smtp_t, const char *@var{address}, const char *@var{param})
50 @end deftypefun
51
52 @subsubsection Noop
53 @cindex SMTP Noop
54 @deftypefun int smtp_noop (smtp_t)
55 @end deftypefun
56
57 @subsubsection Quit
58 @cindex SMTP Quit
59 @deftypefun int smtp_quit (smtp_t)
60 @end deftypefun
61
62 @subsubsection Recpt To
63 @cindex SMTP Recpt To
64 @deftypefun int smtp_rcpt_to (smtp_t, const char *@var{address}, const char *@var{param})
65 @end deftypefun
66
67 @subsubsection Reset
68 @cindex SMTP Reset
69 @deftypefun int smtp_reset (smtp_t)
70 @end deftypefun
71
72 @subsubsection Verify
73 @cindex SMTP Verify
74 @deftypefun int smtp_verify (smtp_t, const char *@var{user})
75 @end deftypefun
76
77 @subsubsection Help functions
78 @cindex SMTP Help functions
79 @deftypefun extern int smtp_readline (smtp_t, char *@var{buffer}, size_t @var{len}, size_t *@var{len})
80 @end deftypefun
81
82 @deftypefun extern int smtp_response (smtp_t, char *@var{buffer}, size_t @var{len}, size_t *@var{len})
83 @end deftypefun
84
85 @deftypefun extern int smtp_writeline (smtp_t, const char *@var{format}, @var{...})
86 @end deftypefun
87
88 @deftypefun extern int smtp_sendline (smtp_t, const char *@var{line})
89 @end deftypefun
90
91 @deftypefun extern int smtp_send (smtp_t
92 @end deftypefun
...@@ -4,7 +4,7 @@ A mailbox and mailer can be described in a URL, the string will contain the ...@@ -4,7 +4,7 @@ A mailbox and mailer can be described in a URL, the string will contain the
4 necessary information to initialize @code{mailbox_t}, or @code{mailer_t} 4 necessary information to initialize @code{mailbox_t}, or @code{mailer_t}
5 properly. 5 properly.
6 6
7 @section POP3 7 @subsection POP3
8 The POP URL scheme contains a pop server, optional port number 8 The POP URL scheme contains a pop server, optional port number
9 and the authentication mechanism. The general form is 9 and the authentication mechanism. The general form is
10 10
...@@ -25,12 +25,12 @@ a default scheme base on the capability of the server. ...@@ -25,12 +25,12 @@ a default scheme base on the capability of the server.
25 25
26 For more complete information see @cite{rfc2368}. 26 For more complete information see @cite{rfc2368}.
27 27
28 @section IMAP 28 @subsection IMAP
29 imap://..... 29 imap://.....
30 30
31 Description of the fields and examples are needed. 31 Description of the fields and examples are needed.
32 32
33 @section File 33 @subsection File
34 34
35 Local folder should be handle by this URL. It is preferable to let 35 Local folder should be handle by this URL. It is preferable to let
36 the mailbox recognize the type of mailbox and take the appropriate 36 the mailbox recognize the type of mailbox and take the appropriate
...@@ -50,7 +50,7 @@ use @url{file://path} and let the library figure out which one. ...@@ -50,7 +50,7 @@ use @url{file://path} and let the library figure out which one.
50 @url{mh://path} 50 @url{mh://path}
51 @end example 51 @end example
52 52
53 @section Mailto 53 @subsection Mailto
54 54
55 After setting a mailer, @url{mailto:} is used to tell the mailer where 55 After setting a mailer, @url{mailto:} is used to tell the mailer where
56 and to whom the message is for. 56 and to whom the message is for.
...@@ -67,7 +67,7 @@ to mailing lists. ...@@ -67,7 +67,7 @@ to mailing lists.
67 67
68 For more complete information see @cite{rfc2368}. 68 For more complete information see @cite{rfc2368}.
69 69
70 @section URL functions 70 @subsection URL functions
71 71
72 Helper functions are provided to retrieve and set the @emph{URL} fields. 72 Helper functions are provided to retrieve and set the @emph{URL} fields.
73 73
...@@ -91,7 +91,7 @@ Initialize and parse the @var{url} ...@@ -91,7 +91,7 @@ Initialize and parse the @var{url}
91 @end example 91 @end example
92 @end deftp 92 @end deftp
93 93
94 @section URL registration 94 @subsection URL registration
95 95
96 @deftypefun int url_list_type (struct url_type @var{list}[], size_t @var{len}, size_t *@var{n}) 96 @deftypefun int url_list_type (struct url_type @var{list}[], size_t @var{len}, size_t *@var{n})
97 @end deftypefun 97 @end deftypefun
...@@ -105,7 +105,7 @@ Initialize and parse the @var{url} ...@@ -105,7 +105,7 @@ Initialize and parse the @var{url}
105 @deftypefun int url_get_id (const url_t @var{url}, int *@var{id}) 105 @deftypefun int url_get_id (const url_t @var{url}, int *@var{id})
106 @end deftypefun 106 @end deftypefun
107 107
108 @section Helper functions 108 @subsection Helper functions
109 109
110 @example 110 @example
111 #include <mailutils/url.h> 111 #include <mailutils/url.h>
......