Commit dce5e1fb dce5e1fbf5c94871d4d7e663fab26909bf4037b9 by Alain Magloire

Enable NNTP.

1 parent e58ae413
2004-07-03 Sergey Poznyakoff
2004-07-05 Alain Magloire
* configure.ac: enable NNTP support.
* example/Makefile.am: Enable NNTP.
* frm/Makefile.am: Enable NNTP.
* from/Makefile.am: Enable NNTP.
* messages/Makefile.am: Enable NNTP.
* readmsg/Makefile.am: Enable NNTP.
* guimb/Makefile.am: Enable NNTP.
* mail/Makefile.am: Enable NNTP.
* sieve/Makefile.am: Enable NNTP.
* imap4d/Makefile.am: Put @AUTHLIBS@ before libmailbox.a (failed on cygwin if not).
* pop3d/Makefile.am: Put @AUTHLIBS@ before libmailbox.a (failed on cygwin if not).
* mail.local/Makefile.am: Put @AUTHLIBS@ before libmailbox.a (failed on cygwin if not).
* mailbox/stream.c (stream_wait): Bugfix. If we buffer return true if the cache still
have data.
* include/mailutils/nntp.h: Define the default NNTP port number.
* include/mailutils/pop3.h: Define the default POP3 port number.
* include/mailutils/registrar.h: Enable NNTP.
* mailbox/nntp/folder.c: New file.
* mailbox/nntp/mbox.c: New file.
* mailbox/nntp/url.c: New file.
* mailbox/nntp/Makefile.am: Updated.
2004-07-03 Sergey Poznyakoff
* mailbox/list.c (list_data_dup): Bugfix: *ptr was not assigned.
* doc/texinfo/muint.texi: Automake does not allow two independent
texi sources to include the same file (version.texi, in this
case). What a stupid lossage! However it handles all files whose
name matches "vers*.texi" as version.texi, which allows to
override the bug: include vers-muint.texi instead of version.texi.
override the bug: include vers-muint.texi instead of version.texi.
2004-07-01 Sergey Poznyakoff
......@@ -25,7 +54,7 @@
* examples/nntpclient.c: Fixed printf formats
(com_newgroups,com_newnews): Variable declarations are only allowed
before the statements.
* mailbox/nntp/nntp_article.c: Fixed printf formats
* mailbox/nntp/nntp_body.c: Likewise
* mailbox/nntp/nntp_head.c: Likewise
......@@ -35,7 +64,7 @@
* mailbox/pop/pop3_iterator.c (pop3_itr_getitem): Changed
declaration
2004-06-30 Alain Magloire
* configure.ac: Add nntp directory.
......
dnl Configuration for GNU Mailutils -- a suite of utilities for electronic mail
dnl
dnl Copyright (C) 1999,2000,2001,2002,2003,2004 Free Software Foundation, Inc.
dnl
dnl
dnl GNU Mailutils is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2, or (at your option)
......@@ -262,7 +262,7 @@ AC_CHECK_HEADERS(errno.h fcntl.h inttypes.h libgen.h limits.h\
malloc.h obstack.h paths.h shadow.h socket.h sys/socket.h stdarg.h stdio.h\
stdlib.h string.h strings.h sys/file.h sysexits.h syslog.h termcap.h\
termios.h termio.h sgtty.h utmp.h utmpx.h unistd.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_UID_T
......@@ -426,7 +426,7 @@ AC_ARG_WITH([postgres],
AH_TEMPLATE(USE_SQL,[Enables SQL support])
AH_TEMPLATE(HAVE_MYSQL,[Define if you have libmysql])
AH_TEMPLATE(HAVE_PGSQL,[Define if you have libpq])
AH_TEMPLATE(HAVE_PGSQL,[Define if you have libpq])
if test x"$use_mysql" = x"yes" -a x"$use_postgres" = x"yes"; then
AC_MSG_ERROR(Use either --with-mysql or --with-postgres, not both)
......@@ -471,6 +471,7 @@ AC_ARG_WITH([virtual-pwddir],
MU_ENABLE_SUPPORT(imap)
MU_ENABLE_SUPPORT(pop)
MU_ENABLE_SUPPORT(nntp)
AC_SUBST(BUILD_SMTP_PROGRAMS)
AC_SUBST(RUN_SMTP_DEJATOOL)
......@@ -590,12 +591,12 @@ if test x"$usereadline" = x"yes"; then
dnl FIXME This should only link in the curses libraries if it's
dnl really needed!
saved_LIBS=$LIBS
LIBS="$LIBS $CURSES_LIBS"
AC_CHECK_LIB(readline, readline, mu_have_readline=yes)
LIBS=$saved_LIBS
if test x"$mu_have_readline" = x"yes"; then
AC_CHECK_HEADERS(readline/readline.h,
AC_DEFINE(WITH_READLINE,1,[Enable use of readline]))
......
......@@ -68,6 +68,7 @@ sfrom_LDADD =\
../mailbox/mbox/libmu_mbox.la\
../mailbox/imap/libmu_imap.la\
../mailbox/pop/libmu_pop.la\
../mailbox/nntp/libmu_nntp.la\
../mailbox/mh/libmu_mh.la\
../mailbox/maildir/libmu_maildir.la\
../mailbox/libmailbox.la\
......
......@@ -27,6 +27,7 @@ frm_LDADD = \
../mailbox/mbox/libmu_mbox.la\
../mailbox/imap/libmu_imap.la\
../mailbox/pop/libmu_pop.la\
../mailbox/nntp/libmu_nntp.la\
../mailbox/mh/libmu_mh.la\
../mailbox/maildir/libmu_maildir.la\
../mailbox/libmailbox.la\
......
......@@ -26,6 +26,7 @@ from_LDADD = \
../mailbox/mbox/libmu_mbox.la\
../mailbox/imap/libmu_imap.la\
../mailbox/pop/libmu_pop.la\
../mailbox/nntp/libmu_nntp.la\
../mailbox/mh/libmu_mh.la\
../mailbox/maildir/libmu_maildir.la\
../mailbox/libmailbox.la\
......
......@@ -31,6 +31,7 @@ guimb_LDADD = \
../mailbox/mbox/libmu_mbox.la\
../mailbox/imap/libmu_imap.la\
../mailbox/pop/libmu_pop.la\
../mailbox/nntp/libmu_nntp.la\
../mailbox/mh/libmu_mh.la\
../mailbox/maildir/libmu_maildir.la\
../mailbox/libmailbox.la\
......
......@@ -62,12 +62,13 @@ imap4d_SOURCES = \
imap4d_LDADD = \
@IMAP_AUTHOBJS@\
@AUTHLIBS@ \
../mailbox/mbox/libmu_mbox.la\
../mailbox/mh/libmu_mh.la\
../mailbox/maildir/libmu_maildir.la\
../mailbox/libmailbox.la\
../lib/libmailutils.la\
@AUTHLIBS@ @SERV_AUTHLIBS@ @MU_COMMON_LIBRARIES@
@SERV_AUTHLIBS@ @MU_COMMON_LIBRARIES@
## This kludge is necessary to correctly establish imap4d -> IMAP_AUTHOBJS
## dependency. Think about better approach --gray
......
......@@ -28,6 +28,9 @@ extern "C" {
struct _mu_nntp;
typedef struct _mu_nntp* mu_nntp_t;
#define MU_NNTP_DEFAULT_PORT 119
#define MU_NNTP_URL_SCHEME "nntp"
extern int mu_nntp_create (mu_nntp_t *nntp);
extern void mu_nntp_destroy (mu_nntp_t *nntp);
......
......@@ -29,6 +29,8 @@ extern "C" {
struct _mu_pop3;
typedef struct _mu_pop3* mu_pop3_t;
#define MU_POP3_DEFAULT_PORT 110
extern int mu_pop3_create (mu_pop3_t *pop3);
extern void mu_pop3_destroy (mu_pop3_t *pop3);
......
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 1999, 2000 Free Software Foundation, Inc.
Copyright (C) 1999, 2000, 2004 Free Software Foundation, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
......@@ -88,16 +88,18 @@ extern int record_set_get_folder __P ((record_t, int (*_get_folder)
extern record_t imap_record;
/* Remote Mailbox POP3, pop:// */
extern record_t pop_record;
/* Remote newsgroup NNTP, nntp:// */
extern record_t nntp_record;
/* Local Mailbox Unix Mailbox, "mbox:" */
extern record_t mbox_record;
/* Local Folder/Mailbox, / */
extern record_t path_record;
/* Local MH, "mh:" */
/* Local MH, "mh:" */
extern record_t mh_record;
/* Maildir, "maildir:" */
extern record_t maildir_record;
/* SMTP mailer, "smtp://" */
extern record_t smtp_record;
/* Sendmail, "sendmail:" */
......@@ -112,6 +114,7 @@ extern record_t sendmail_record;
list_append (bookie, imap_record);\
list_append (bookie, mh_record);\
list_append (bookie, maildir_record);\
list_append (bookie, nntp_record);\
} while (0)
#define mu_register_local_mbox_formats() do {\
......@@ -128,8 +131,9 @@ extern record_t sendmail_record;
registrar_get_list (&bookie);\
list_append (bookie, pop_record);\
list_append (bookie, imap_record);\
list_append (bookie, nntp_record);\
} while (0)
#define mu_register_all_mailer_formats() do {\
list_t bookie = 0;\
registrar_get_list (&bookie);\
......@@ -141,7 +145,7 @@ extern record_t sendmail_record;
mu_register_all_mbox_formats ();\
mu_register_all_mailer_formats ();\
} while (0)
#ifdef __cplusplus
}
#endif
......
......@@ -26,9 +26,9 @@ mail_local_SOURCES = main.c mailquota.c script.c mail.local.h
mail_local_LDADD = \
@LIBMU_SCM@ @GUILE_LIBS@\
@LIBMU_SCM_DEPS@\
@AUTHLIBS@\
../mailbox/mbox/libmu_mbox.la \
../mailbox/libmailbox.la \
@AUTHLIBS@\
../libsieve/libsieve.la\
../lib/libmailutils.la @MU_COMMON_LIBRARIES@
......
......@@ -27,6 +27,7 @@ mail_LDADD = \
../mailbox/mbox/libmu_mbox.la\
../mailbox/imap/libmu_imap.la\
../mailbox/pop/libmu_pop.la\
../mailbox/nntp/libmu_nntp.la\
../mailbox/mh/libmu_mh.la\
../mailbox/maildir/libmu_maildir.la\
../mailbox/libmailbox.la\
......
......@@ -27,6 +27,7 @@ messages_LDADD =\
../mailbox/mbox/libmu_mbox.la\
../mailbox/imap/libmu_imap.la\
../mailbox/pop/libmu_pop.la\
../mailbox/nntp/libmu_nntp.la\
../mailbox/mh/libmu_mh.la\
../mailbox/maildir/libmu_maildir.la\
../mailbox/libmailbox.la\
......
......@@ -24,6 +24,7 @@ movemail_LDADD = \
../mailbox/mbox/libmu_mbox.la\
../mailbox/imap/libmu_imap.la\
../mailbox/pop/libmu_pop.la\
../mailbox/nntp/libmu_nntp.la\
../mailbox/mh/libmu_mh.la\
../mailbox/maildir/libmu_maildir.la\
../mailbox/libmailbox.la\
......
......@@ -29,12 +29,13 @@ pop3d_SOURCES = apop.c auth.c capa.c dele.c extra.c pop3d.c pop3d.h \
uidl.c user.c logindelay.c expire.c
pop3d_LDADD = \
@AUTHLIBS@ \
../mailbox/mbox/libmu_mbox.la\
../mailbox/mh/libmu_mh.la\
../mailbox/maildir/libmu_maildir.la\
../mailbox/libmailbox.la\
../lib/libmailutils.la\
@AUTHLIBS@ @MU_COMMON_LIBRARIES@
@MU_COMMON_LIBRARIES@
popauth_SOURCES = popauth.c
popauth_LDADD = ../mailbox/libmailbox.la ../lib/libmailutils.la @MU_COMMON_LIBRARIES@
......
......@@ -28,6 +28,7 @@ readmsg_LDADD =\
../mailbox/mbox/libmu_mbox.la\
../mailbox/imap/libmu_imap.la\
../mailbox/pop/libmu_pop.la\
../mailbox/nntp/libmu_nntp.la\
../mailbox/mh/libmu_mh.la\
../mailbox/maildir/libmu_maildir.la\
../mailbox/libmailbox.la\
......
......@@ -27,6 +27,7 @@ sieve_LDADD =\
../mailbox/mbox/libmu_mbox.la\
../mailbox/imap/libmu_imap.la\
../mailbox/pop/libmu_pop.la\
../mailbox/nntp/libmu_nntp.la\
../mailbox/mh/libmu_mh.la\
../mailbox/maildir/libmu_maildir.la\
../mailbox/libmailbox.la\
......