Commit a2a064bf a2a064bf14a11b98d61b68551ab5703993137534 by Alain Magloire

headers.texi mailbox.texi mailer.texi mailutils.texi

 	sfrom.c.texi url.texi
updated.
1 parent abc2ec73
So far we plan support for RFC822 and RFC1522;
So far we plan support for RFC822 and plan for RFC1522. with RFC1522 non ASCII
characters will be encoded.
@subsubsection Init/Destroy
The header should be initiliaze before any use.
@deftypefun int header_init (header_t *@var{hdr}, const char *@var{blurb}, size_t @var{len}, int @var{flag})
Initialize a @var{hdr} to a supported type. If @var{blurb} is not NULL, it is
parsed. @var{Flag} can be set to RFC8222 or RFC1522 so far onlyr rfc822 is
supported.
@end deftypefun
@defmac MU_HDR_RFC822
Supports rfc 822, header style.
@end defmac
@defmac MU_HDR_RFC1522
Supports rfc 1522, encoding policy.
@end defmac
@deftypefun void header_destroy (header_t *@var{hdr})
The ressources allocate for @var{hdr} or freed.
@end deftypefun
......@@ -15,6 +28,87 @@ Set the field-name @var{fn} to field-value @var{fv} of size @var{n} in
it is append.
@end deftypefun
Some basic macros is already provided for rfc822.
@defmac MU_HDR_UNIX_FROM
"From "
@end defmac
@defmac MU_HDR_RETURN_PATH
"Return-Path"
@end defmac
@defmac MU_HDR_RECEIVED
"Received"
@end defmac
@defmac MU_HDR_DATE
"Date"
@end defmac
@defmac MU_HDR_FROM
"From"
@end defmac
@defmac MU_HDR_RESENT_FROM
"Resent-From"
@end defmac
@defmac MU_HDR_SUBJECT
"Subject"
@end defmac
@defmac MU_HDR_SENDER
"Sender"
@end defmac
@defmac MU_HDR_RESENT_SENDER
"Resent-SENDER"
@end defmac
@defmac MU_HDR_TOs
"To"
@end defmac
@defmac MU_HDR_RESENT_TO
"Resent-To"
@end defmac
@defmac MU_HDR_CC
"Cc"
@end defmac
@defmac MU_HDR_RESENT_CC
"Resent-Cc"
@end defmac
@defmac MU_HDR_BCC
"Bcc"
@end defmac
@defmac MU_HDR_RESENT_BCC
"Resent-Bcc"
@end defmac
@defmac MU_HDR_REPLY_TO
"Reply-To"
@end defmac
@defmac MU_HDR_RESENT_REPLY_TO
"Resent-Reply-To"
@end defmac
@defmac MU_HDR_MESSAGE_ID
"Message-ID"
@end defmac
@defmac MU_HDR_RESENT_MESSAGE_ID
"Resent-Message-ID"
@end defmac
@defmac MU_HDR_IN_REPLY_TO
"In-Reply-To"
@end defmac
@defmac MU_HDR_ENCRYPTED
"Encrypted"
@end defmac
@defmac MU_HDR_PRECEDENCE
"Precedence"
@end defmac
@defmac MU_HDR_STATUS
"Status"
@end defmac
@defmac MU_HDR_CONTENT_LENGTH
"Content-Length"
@end defmac
@defmac MU_HDR_CONTENT_TYPE
"Content-Type"
@end defmac
@defmac MU_HDR_MIME_VERSION
"MIME-Version"
@end defmac
@deftypefun int header_get_value (header_t @var{hdr}, const char *fn, char *fv, size_t len, size_t *n)
Value of field-name @var{fn} is return in buffer @var{fv} of size @var{len}.
The number of bytes written is put in @var{n}.
......
Mail Delivery is done here. Nothing is implemented and the API is still shaky.
@subsubsection Init/Destroy
Initialize the mailer object.
@deftypefun int mailer_init (mailer_t *@var{mailer}, const char *@var{name}, int @var{flag})
Not Implemented.
@end deftypefun
@defmac MU_ML_PROGRAM
Program like sendmail, mail, mailx to deliver the mail
@end defmac
@defmac MU_ML_SMTP
Contact the host directly with SMTP.
@end defmac
@defmac MU_ML_MPP
Use MPP protocol.
@end defmac
@deftypefun int mailer_destroy (mailer_r *@var{mailer})
Not Implemented.
@end deftypefun
@subsubsection User/Passwd
On some mailer like MMP you need to identify.
@deftypefun int mailer_user (mailer_t @var{mailer}, const char *@var{user})
Not Implemented.
@end deftypefun
......@@ -17,6 +37,9 @@ Not Implemented.
Not Implemented.
@end deftypefun
@subsubsection Open/Close
The mailer is spawn, if it is a program, or the host is contacted.
@deftypefun int mailer_open (mailer_t @var{mailer}, int @var{flag})
Not Implemented.
@end deftypefun
......@@ -25,6 +48,14 @@ Not Implemented.
Not Implemented.
@end deftypefun
@subsubsection Sending
Sending a message.
@deftypefun int mailer_create_envelope (mailer_t @var{mailer}, size_t *)
Not Implemented.
@end deftypefun
@deftypefun int mailer_set_body (mailer_t @var{mailer}, char *, size_t)
Not Implemented.
@end deftypefun
......@@ -33,22 +64,26 @@ Not Implemented.
Not Implemented.
@end deftypefun
@deftypefun int mailer_set_timeout (mailer_t @var{mailer}, size_t)
@deftypefun int mailbox_add_attachment (mailer_t, size_t msgno, const char *boundary, const char *header, FILE *file, int encoding)
@end deftypefun
@deftypefun int mailer_send_envelope (mailer_t @var{mailer}, size_t)
Not Implemented.
@end deftypefun
@deftypefun int mailer_get_timeout (mailer_t @var{mailer}, size_t)
@subsubsection Timeout
@deftypefun int mailer_set_timeout (mailer_t @var{mailer}, size_t)
Not Implemented.
@end deftypefun
@deftypefun int mailer_send_envelope (mailer_t @var{mailer}, size_t)
@deftypefun int mailer_get_timeout (mailer_t @var{mailer}, size_t)
Not Implemented.
@end deftypefun
@subsection Mailto
@cindex Mailto
The URL mailto: is supported.
The URL mailto: should be supported.
TODO: example of mailto, and mailing lists,
......
......@@ -35,7 +35,7 @@ Published by the Free Software Foundation,
59 Temple Place - Suite 330
Boston, MA 02111-1307, USA
Copyright 1999 Free Software Foundation, Inc.
Copyright 1999, 2000 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
......
......@@ -14,9 +14,10 @@ int main (int argc, char **argv)
char buffer[1024];
char from[64];
char subject[64];
char *header;
mailbox_t mbox;
int status, id, msg_no;
char *mail;
mailbox_t mbox;
int status
size_t msgno, msg_total, size;
if (argc == 2)
@{
......@@ -28,7 +29,7 @@ int main (int argc, char **argv)
if (mail == NULL)
@{
char * user = getlogin ();
int len = strlen (_PATH_MAILDIR) + strlen (user) + 1;
size_t len = strlen (_PATH_MAILDIR) + strlen (user) + 1;
mail = malloc (len);
if (mail == NULL)
@{
......
See rfc2368, rfc2369, rfc2384
@comment See rfc2368, rfc2369, rfc2384
Instead of providing different functions to create a mailbox_t and mailer_t the
information is encoded in the form of a URL.
@itemize @bullet
@item
POP3 Post Office Protocol, Not Implemented.
@item
IMAP, not implemented
@item
QMAIL, not implemented
@item
Unix mbox
@item
MMDF, not implemented
@item
SMail, not implemented
@end itemize
The URL will contain the necessary information to initialize @code{mailbox_t}
properly.
@subsection POP3
pop://<user>;AUTH=<auth>@@<hostname>:<port>
Description of the fields and examples are needed.
@subsection IMAP
imap://.....
Description of the fields and examples are needed.
@subsection File
file://path
Description of the fields and examples are needed.
@subsection MMDF
mmdf://path
Description of the fields and examples are needed.
@subsection MH
mh://path
Description of the fields and examples are needed.
@subsection Mailto
mailto://
Description of the fields and examples are needed.
@subsection mmp
mmp://
Description of the fields and examples are needed.
......