Browse Source

PREAUTH support from Oswald Buddenhagen <ossi@kde.org>

Added Tunnel directive to allow the user to specify a shell command to run
to set up an IMAP connection in place of a TCP socket (eg., to run over
an SSH session).
0.9
Michael Elkins 23 years ago
parent
commit
fe438026b0
  1. 7
      config.c
  2. 2
      configure.in
  3. 1113
      imap.c
  4. 7
      isync.1
  5. 9
      isync.h
  6. 10
      isyncrc.sample
  7. 2
      main.c

7
config.c

@ -230,6 +230,13 @@ load_config (const char *where)
else
global.copy_deleted_to = strdup (val);
}
else if (!strcasecmp ("Tunnel", cmd))
{
if (*cur)
(*cur)->tunnel = strdup (val);
else
global.tunnel = strdup (val);
}
else if (!strcasecmp ("Expunge", cmd))
{
if (*cur)

2
configure.in

@ -1,5 +1,5 @@
AC_INIT(isync.h)
AM_INIT_AUTOMAKE(isync,0.8)
AM_INIT_AUTOMAKE(isync,0.9)
AM_PROG_CC_STDC
AC_ARG_WITH(ssl-dir, [ --with-ssl-dir=DIR location where openssl is insalled],
[if test -d $withval/lib; then

1113
imap.c

File diff suppressed because it is too large Load Diff

7
isync.1

@ -16,7 +16,7 @@
\" along with this program; if not, write to the Free Software
\" Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
..
.TH isync 1 "2002 Jan 16"
.TH isync 1 "2002 Apr 19"
..
.SH NAME
isync - synchronize IMAP4 and maildir mailboxes
@ -224,6 +224,11 @@ is 0, the maximum file size is
.B unlimited.
..
.TP
\fBTunnel\fR \fIcommand\fR
Specify a command to run to establish a connection rather than opening a TCP
socket. This allows you to run an IMAP session over an SSH tunnel, for
example.
.TP
\fBUseNamespace\fR \fIyes|no\fR
Selects whether
.B isync

9
isync.h

@ -30,7 +30,8 @@
typedef struct
{
int fd;
int rdfd; /* read filedes */
int wrfd; /* write filedes */
#if HAVE_LIBSSL
SSL *ssl;
unsigned int use_ssl:1;
@ -61,6 +62,7 @@ struct config
char *box;
char *alias;
char *copy_deleted_to;
char *tunnel;
unsigned int max_messages;
off_t max_size;
config_t *next;
@ -119,7 +121,8 @@ typedef struct _list list_t;
#define NIL (void*)0x1
#define LIST (void*)0x2
struct _list {
struct _list
{
char *val;
list_t *next;
list_t *child;
@ -187,7 +190,7 @@ int imap_copy_message (imap_t * imap, unsigned int uid, const char *mailbox);
int imap_fetch_message (imap_t *, unsigned int, int);
int imap_set_flags (imap_t *, unsigned int, unsigned int);
int imap_expunge (imap_t *);
imap_t *imap_open (config_t *, unsigned int, imap_t *);
imap_t *imap_open (config_t *, unsigned int, imap_t *, int);
int imap_append_message (imap_t *, int, message_t *);
mailbox_t *maildir_open (const char *, int flags);

10
isyncrc.sample

@ -40,3 +40,13 @@ Host host.play.com
# use a non-default port for this connection
Port 6789
Alias personal
###
### Remote mailbox over a SSH tunnel
###
Mailbox /home/me/Mail/remote
Host host.remote.com
Tunnel "ssh -q host.remote.com /usr/sbin/imapd"
Alias remote

2
main.c

@ -292,7 +292,7 @@ main (int argc, char **argv)
break;
}
imap = imap_open (box, fast ? mail->maxuid + 1 : 1, imap);
imap = imap_open (box, fast ? mail->maxuid + 1 : 1, imap, 0);
if (!imap)
{
fprintf (stderr, "%s: skipping mailbox due to IMAP error\n",

Loading…
Cancel
Save