Bug#245142: marked as done (gnome-applets: Mailcheck is unable to work with preauth'd or tunnel'd IMAP)

Debian Bug Tracking System owner@bugs.debian.org
Fri, 10 Jun 2005 13:48:23 -0700


Your message dated Fri, 10 Jun 2005 16:32:35 -0400
with message-id <E1DgqB9-0002vz-00@newraff.debian.org>
and subject line Bug#245142: fixed in gnome-applets 2.10.1-3
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 21 Apr 2004 16:21:00 +0000
>From terpstra@debian.org Wed Apr 21 09:21:00 2004
Return-path: <terpstra@debian.org>
Received: from master.debian.org [146.82.138.7] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1BGKT5-00057E-00; Wed, 21 Apr 2004 09:20:59 -0700
Received: from iapetus.dvs1.informatik.tu-darmstadt.de ([127.0.0.1]) [130.83.166.230] 
	by master.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1BGKT3-0006Jx-00; Wed, 21 Apr 2004 11:20:57 -0500
Content-Type: multipart/mixed; boundary="===============0385195657=="
MIME-Version: 1.0
From: "Wesley W. Terpstra" <terpstra@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: gnome-applets: Mailcheck is unable to work with preauth'd or tunnel'd IMAP
Bcc: "Wesley W. Terpstra" <terpstra@debian.org>
X-Mailer: reportbug 2.56
Date: Wed, 21 Apr 2004 18:20:57 +0200
Message-Id: <E1BGKT3-0006Jx-00@master.debian.org>
Delivered-To: submit@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-5.0 required=4.0 tests=BAYES_00,HAS_PACKAGE,
	OUR_MTA_MSGID autolearn=no version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 
X-CrossAssassin-Score: 1

This is a multi-part MIME message sent by reportbug.

--===============0385195657==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Package: gnome-applets
Version: 2.4.2-6
Severity: wishlist
Tags: patch


I have prepared a patch which adds support to mailcheck for using an
arbitrary command to be used in establishing a connection. This allows
for running POP and IMAP over ssh.

Please forward it upstream.


-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.4
Locale: LANG=C, LC_CTYPE=C

Versions of packages gnome-applets depends on:
ii  gnome-applets-data          2.4.2-6      Various applets for GNOME 2 panel 
ii  gnome-panel                 2.4.2-4      Launch and/or dock GNOME 2 applica
ii  libapm1                     3.2.1-4      Library for interacting with APM d
ii  libart-2.0-2                2.3.16-5     Library of functions for 2D graphi
ii  libatk1.0-0                 1.4.1-1      The ATK accessibility toolkit
ii  libaudiofile0               0.2.6-3      Open-source version of SGI's audio
ii  libbonobo2-0                2.4.3-1      Bonobo CORBA interfaces library
ii  libbonoboui2-0              2.4.3-2      The Bonobo UI library
ii  libc6                       2.3.2.ds1-11 GNU C Library: Shared libraries an
ii  libesd0                     0.2.29-1     Enlightened Sound Daemon - Shared 
ii  libgail-common              1.4.1-1      GNOME Accessibility Implementation
ii  libgail17                   1.4.1-1      GNOME Accessibility Implementation
ii  libgconf2-4                 2.4.0.1-4    GNOME configuration database syste
ii  libgcrypt1                  1.1.12-4     LGPL Crypto library - runtime libr
ii  libglade2-0                 1:2.0.1-13   Library to load .glade files at ru
ii  libglib2.0-0                2.2.3-1      The GLib library of C routines
ii  libgnome2-0                 2.4.0-11     The GNOME 2 library - runtime file
ii  libgnomecanvas2-0           2.4.0-3      A powerful object-oriented display
ii  libgnomeui-0                2.4.0.1-12   The GNOME 2 libraries (User Interf
ii  libgnomevfs2-0              2.4.1-5      The GNOME virtual file-system libr
ii  libgnomevfs2-common         2.4.1-5      The GNOME virtual file-system libr
ii  libgnutls7                  0.8.12-5     GNU TLS library - runtime library
ii  libgtk2.0-0                 2.2.4-3      The GTK+ graphical user interface 
ii  libgtop2                    2.0.8-7      Libraries for gtop system monitori
ii  libice6                     4.3.0-7      Inter-Client Exchange library
ii  libjpeg62                   6b-9         The Independent JPEG Group's JPEG 
ii  liborbit2                   1:2.8.3-2    libraries for ORBit2 - a CORBA ORB
ii  libpanel-applet2-0          2.4.2-4      Library for GNOME 2 Panel applets
ii  libpango1.0-0               1.2.5-3      Layout and rendering of internatio
ii  libpopt0                    1.7-4        lib for parsing cmdline parameters
ii  libsm6                      4.3.0-7      X Window System Session Management
ii  libtasn1-0                  0.1.2-1      Manage ASN.1 structures (runtime)
ii  libx11-6                    4.3.0-7      X Window System protocol client li
ii  libxml2                     2.6.8-2      GNOME XML library
ii  xlibs                       4.3.0-7      X Window System client libraries m
ii  zlib1g                      1:1.2.1-5    compression library - runtime

-- no debconf information

--===============0385195657==
Content-Type: text/x-c; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="gnome-applets-imap-tunnel.patch"

diff -cr gnome-applets-2.4.2.orig/mailcheck/mailcheck.c gnome-applets-2.4.2/mailcheck/mailcheck.c
*** gnome-applets-2.4.2.orig/mailcheck/mailcheck.c	Mon Sep 15 23:24:58 2003
--- gnome-applets-2.4.2/mailcheck/mailcheck.c	Wed Apr 21 17:38:39 2004
***************
*** 91,97 ****
  
  	/* execute a command before checking email (fetchmail etc.) */
  	char *pre_check_cmd;
! 	gboolean pre_check_enabled;	
  
  	PanelApplet *applet;
  	/* This is the event box for catching events */
--- 91,101 ----
  
  	/* execute a command before checking email (fetchmail etc.) */
  	char *pre_check_cmd;
! 	gboolean pre_check_enabled;
! 	
! 	/* execute a command to establish connection (ssh tunnel etc.) */
! 	char *connection_cmd;
! 	gboolean connection_enabled;	
  
  	PanelApplet *applet;
  	/* This is the event box for catching events */
***************
*** 137,142 ****
--- 141,147 ----
  	GtkWidget *property_window;
  	GtkWidget *min_spin, *sec_spin;
  	GtkWidget *pre_check_cmd_entry, *pre_check_cmd_check;
+ 	GtkWidget *connection_cmd_entry, *connection_cmd_check;
  	GtkWidget *newmail_cmd_entry, *newmail_cmd_check;
  	GtkWidget *clicked_cmd_entry, *clicked_cmd_check;
  
***************
*** 727,733 ****
  static void
  check_remote_mailbox (MailCheck *mc)
  {
! 	if (!mc->real_password || !mc->remote_username || !mc->remote_server)
  		return;
  
  	if (mc->mailbox_type == MAILBOX_POP3)
--- 732,739 ----
  static void
  check_remote_mailbox (MailCheck *mc)
  {
! 	if ((!mc->real_password || !mc->remote_username || !mc->remote_server)
! 	    && !mc->connection_cmd)
  		return;
  
  	if (mc->mailbox_type == MAILBOX_POP3)
***************
*** 736,741 ****
--- 742,748 ----
  						       mc,
  						       null_remote_handle,
  						       NULL,
+ 						       mc->connection_cmd,
  						       mc->remote_server,
  						       mc->remote_username,
  						       mc->real_password);
***************
*** 745,750 ****
--- 752,758 ----
  						       mc,
  						       null_remote_handle,
  						       NULL,
+ 						       mc->connection_cmd,
  						       mc->remote_server,
  						       mc->remote_username,
  						       mc->real_password,
***************
*** 949,955 ****
  			g_free (mc->real_password);
  			mc->real_password = g_strdup (mc->remote_password);
  
! 		} else if (!mc->real_password)
  			get_remote_password (mc);
  
  		check_remote_mailbox (mc);
--- 957,963 ----
  			g_free (mc->real_password);
  			mc->real_password = g_strdup (mc->remote_password);
  
! 		} else if (!mc->real_password && !mc->connection_cmd)
  			get_remote_password (mc);
  
  		check_remote_mailbox (mc);
***************
*** 1562,1567 ****
--- 1570,1587 ----
  }
  
  static void
+ connection_toggled (GtkToggleButton *button, gpointer data)
+ {
+ 	MailCheck *mc = data;
+ 	
+ 	mc->connection_enabled = gtk_toggle_button_get_active (button);
+ 	panel_applet_gconf_set_bool(mc->applet, "connection_enabled", 
+ 				    mc->connection_enabled, NULL);
+ 	soft_set_sensitive (mc->connection_cmd_entry, mc->connection_enabled);
+ 
+ }
+ 
+ static void
  remote_password_save_toggled (GtkToggleButton *button, gpointer data)
  {
  	MailCheck *mc = data;
***************
*** 1602,1607 ****
--- 1622,1646 ----
  }
  
  static void
+ connection_changed (GtkEntry *entry, gpointer data)
+ {
+ 	MailCheck *mc = data;
+ 	gchar *text;
+ 	
+ 	text = gtk_editable_get_chars (GTK_EDITABLE (entry), 0, -1);
+ 	if (!text)
+ 		return;
+ 		
+ 	if (mc->connection_cmd)
+ 		g_free (mc->connection_cmd);	
+ 	mc->connection_cmd = g_strdup (text);
+ 	panel_applet_gconf_set_string(mc->applet, "connection_command", 
+ 				      mc->connection_cmd, NULL);
+ 	g_free (text);
+ 	
+ }
+ 
+ static void
  newmail_toggled (GtkToggleButton *button, gpointer data)
  {
  	MailCheck *mc = data;
***************
*** 2173,2179 ****
  	gtk_box_pack_start (GTK_BOX (hbox), control_vbox, TRUE, TRUE, 0);
  	gtk_widget_show (control_vbox);
  
! 	table = gtk_table_new (3, 2, FALSE);
  	gtk_table_set_col_spacings (GTK_TABLE (table), 12);
  	gtk_table_set_row_spacings (GTK_TABLE (table), 6);
  	gtk_container_set_border_width (GTK_CONTAINER (table), 0);
--- 2212,2218 ----
  	gtk_box_pack_start (GTK_BOX (hbox), control_vbox, TRUE, TRUE, 0);
  	gtk_widget_show (control_vbox);
  
! 	table = gtk_table_new (4, 2, FALSE);
  	gtk_table_set_col_spacings (GTK_TABLE (table), 12);
  	gtk_table_set_row_spacings (GTK_TABLE (table), 6);
  	gtk_container_set_border_width (GTK_CONTAINER (table), 0);
***************
*** 2209,2220 ****
  	if ( ! key_writable (mc->applet, "exec_command"))
  		hard_set_sensitive (mc->pre_check_cmd_entry, FALSE);
  
  	l = gtk_check_button_new_with_mnemonic (_("When new mail _arrives:"));
  	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(l), mc->newmail_enabled);
  	g_signal_connect(G_OBJECT(l), "toggled",
  			   G_CALLBACK(newmail_toggled), mc);
  	gtk_widget_show(l);
! 	gtk_table_attach (GTK_TABLE (table), l, 0, 1, 1, 2, GTK_FILL, 0, 0, 0);
  	mc->newmail_cmd_check = l;
  	if ( ! key_writable (mc->applet, "newmail_enabled"))
  		hard_set_sensitive (l, FALSE);
--- 2248,2288 ----
  	if ( ! key_writable (mc->applet, "exec_command"))
  		hard_set_sensitive (mc->pre_check_cmd_entry, FALSE);
  
+ 	l = gtk_check_button_new_with_mnemonic(_("Establish _connection:"));
+ 	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(l), mc->connection_enabled);
+ 	g_signal_connect(G_OBJECT(l), "toggled",
+ 			   G_CALLBACK(connection_toggled), mc);
+ 	gtk_widget_show(l);
+ 	mc->connection_cmd_check = l;
+ 	if ( ! key_writable (mc->applet, "connection_enabled"))
+ 		hard_set_sensitive (l, FALSE);
+ 
+ 	gtk_table_attach (GTK_TABLE (table), mc->connection_cmd_check, 
+ 			  0, 1, 1, 2, GTK_FILL, 0, 0, 0);
+ 			   
+ 
+ 	mc->connection_cmd_entry = gtk_entry_new();
+ 	if(mc->connection_cmd)
+ 		gtk_entry_set_text(GTK_ENTRY(mc->connection_cmd_entry), 
+ 				   mc->connection_cmd);
+ 	set_atk_name_description (mc->connection_cmd_entry, _("Command to execute to establish POP/IMAP connection"), "");
+ 	set_atk_relation (mc->connection_cmd_entry, mc->connection_cmd_check, ATK_RELATION_CONTROLLED_BY);
+ 	set_atk_relation (mc->connection_cmd_check, mc->connection_cmd_entry, ATK_RELATION_CONTROLLER_FOR);
+ 	soft_set_sensitive (mc->connection_cmd_entry, mc->connection_enabled);
+ 	g_signal_connect(G_OBJECT(mc->connection_cmd_entry), "changed",
+ 			   G_CALLBACK(connection_changed), mc);
+ 	gtk_widget_show(mc->connection_cmd_entry);
+ 	gtk_table_attach_defaults (GTK_TABLE (table), mc->connection_cmd_entry,
+ 				   1, 2, 1, 2);
+ 	if ( ! key_writable (mc->applet, "connection_command"))
+ 		hard_set_sensitive (mc->connection_cmd_entry, FALSE);
+ 
  	l = gtk_check_button_new_with_mnemonic (_("When new mail _arrives:"));
  	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(l), mc->newmail_enabled);
  	g_signal_connect(G_OBJECT(l), "toggled",
  			   G_CALLBACK(newmail_toggled), mc);
  	gtk_widget_show(l);
! 	gtk_table_attach (GTK_TABLE (table), l, 0, 1, 2, 3, GTK_FILL, 0, 0, 0);
  	mc->newmail_cmd_check = l;
  	if ( ! key_writable (mc->applet, "newmail_enabled"))
  		hard_set_sensitive (l, FALSE);
***************
*** 2232,2238 ****
  			   G_CALLBACK(newmail_changed), mc);
  	gtk_widget_show(mc->newmail_cmd_entry);
  	gtk_table_attach_defaults (GTK_TABLE (table), mc->newmail_cmd_entry,
! 				    1, 2, 1, 2);
  	if ( ! key_writable (mc->applet, "newmail_command"))
  		hard_set_sensitive (mc->newmail_cmd_entry, FALSE);
  
--- 2300,2306 ----
  			   G_CALLBACK(newmail_changed), mc);
  	gtk_widget_show(mc->newmail_cmd_entry);
  	gtk_table_attach_defaults (GTK_TABLE (table), mc->newmail_cmd_entry,
! 				    1, 2, 2, 3);
  	if ( ! key_writable (mc->applet, "newmail_command"))
  		hard_set_sensitive (mc->newmail_cmd_entry, FALSE);
  
***************
*** 2241,2247 ****
  	g_signal_connect(G_OBJECT(l), "toggled",
  			   G_CALLBACK(clicked_toggled), mc);
          gtk_widget_show(l);
! 	gtk_table_attach (GTK_TABLE (table), l, 0, 1, 2, 3, GTK_FILL, 0, 0, 0);
  	mc->clicked_cmd_check = l;
  	if ( ! key_writable (mc->applet, "clicked_enabled"))
  		hard_set_sensitive (l, FALSE);
--- 2309,2315 ----
  	g_signal_connect(G_OBJECT(l), "toggled",
  			   G_CALLBACK(clicked_toggled), mc);
          gtk_widget_show(l);
! 	gtk_table_attach (GTK_TABLE (table), l, 0, 1, 3, 4, GTK_FILL, 0, 0, 0);
  	mc->clicked_cmd_check = l;
  	if ( ! key_writable (mc->applet, "clicked_enabled"))
  		hard_set_sensitive (l, FALSE);
***************
*** 2259,2265 ****
                             G_CALLBACK(clicked_changed), mc);
          gtk_widget_show(mc->clicked_cmd_entry);
  	gtk_table_attach_defaults (GTK_TABLE (table), mc->clicked_cmd_entry,
! 				   1, 2, 2, 3);
  	if ( ! key_writable (mc->applet, "clicked_command"))
  		hard_set_sensitive (mc->clicked_cmd_entry, FALSE);
  
--- 2327,2333 ----
                             G_CALLBACK(clicked_changed), mc);
          gtk_widget_show(mc->clicked_cmd_entry);
  	gtk_table_attach_defaults (GTK_TABLE (table), mc->clicked_cmd_entry,
! 				   1, 2, 3, 4);
  	if ( ! key_writable (mc->applet, "clicked_command"))
  		hard_set_sensitive (mc->clicked_cmd_entry, FALSE);
  
***************
*** 2395,2400 ****
--- 2463,2470 ----
  	mc->update_freq = panel_applet_gconf_get_int(mc->applet, "update_frequency", NULL);
  	mc->pre_check_cmd = panel_applet_gconf_get_string(mc->applet, "exec_command", NULL);
  	mc->pre_check_enabled = panel_applet_gconf_get_bool(mc->applet, "exec_enabled", NULL);
+ 	mc->connection_cmd = panel_applet_gconf_get_string(mc->applet, "connection_command", NULL);
+ 	mc->connection_enabled = panel_applet_gconf_get_bool(mc->applet, "connection_enabled", NULL);
  	mc->newmail_cmd = panel_applet_gconf_get_string(mc->applet, "newmail_command", NULL);
  	mc->newmail_enabled = panel_applet_gconf_get_bool(mc->applet, "newmail_enabled", NULL);
  	mc->clicked_cmd = panel_applet_gconf_get_string(mc->applet, "clicked_command", NULL);
diff -cr gnome-applets-2.4.2.orig/mailcheck/popcheck.c gnome-applets-2.4.2/mailcheck/popcheck.c
*** gnome-applets-2.4.2.orig/mailcheck/popcheck.c	Mon Sep 15 23:24:58 2003
--- gnome-applets-2.4.2/mailcheck/popcheck.c	Wed Apr 21 18:04:06 2004
***************
*** 29,34 ****
--- 29,35 ----
  static int get_server_port(const char *);
  static char* get_server_hostname(const char *);
  static int connect_socket(const char *, int);
+ static int connect_command(const char *);
  static char *read_line(int);
  static int write_line(int, char *);
  static int is_pop3_answer_ok(const char *);
***************
*** 221,226 ****
--- 222,260 ----
    return fd; 
   }  
  
+ static int connect_command(const char *cmd)
+  {
+   int socks[2], child;
+   
+   if (socketpair(AF_UNIX, SOCK_STREAM, 0, socks) < 0)
+    {
+     return NETWORK_ERROR;
+    }
+   
+   if ((child = fork()) == -1)
+    {
+     close(socks[0]);
+     close(socks[1]);
+     return NETWORK_ERROR;
+    }
+   
+   if (!child)
+    {
+     setsid();
+     close(socks[1]);
+     close(0);
+     dup(socks[0]);
+     close(1);
+     dup(socks[0]);
+     close(socks[0]);
+     execl("/bin/sh", "sh", "-c", cmd, NULL);
+     exit(1);
+    }
+   
+   close(socks[0]);
+   return socks[1];
+  }  
+ 
  static char *read_line(int s)
   {
    static char response[1024];
***************
*** 284,290 ****
    return 0;
   }
  
! int pop3_check(const char *h, const char* n, const char* e)
  {
    int s;
    char *c;
--- 318,324 ----
    return 0;
   }
  
! int pop3_check(const char *cmd, const char *h, const char* n, const char* e)
  {
    int s;
    char *c;
***************
*** 293,299 ****
    
    if (!h || !n || !e) return -1;
    
!   s = connect_socket(h, 110);
  
    if (s > 0) {
      if (!is_pop3_answer_ok(read_line(s))) {
--- 327,335 ----
    
    if (!h || !n || !e) return -1;
    
!   if (cmd && cmd[0])
!   	s = connect_command(cmd);
!   else  s = connect_socket(h, 110);
  
    if (s > 0) {
      if (!is_pop3_answer_ok(read_line(s))) {
***************
*** 362,367 ****
--- 398,421 ----
    return 0;
   }
  
+ static int is_imap_answer_preauth(const char *p)
+  {
+   if (p) 
+    {
+     const char *b = strchr(p, ' ');
+     if (b)
+      {
+       if (*(++b) == 'P' && *(++b) == 'R' &&
+           *(++b) == 'E' && *(++b) == 'A' &&
+           *(++b) == 'U' && *(++b) == 'T' &&
+           *(++b) == 'H') 
+        return 1;
+      }
+    }
+   
+   return 0;
+  }
+ 
  static char *wait_for_imap_answer(int s, char *tag)
   {
    char *p;
***************
*** 378,384 ****
   }
  
  int 
! imap_check(const char *h, const char* n, const char* e, const char* f)
  {
  	int s;
  	char *c = NULL;
--- 432,438 ----
   }
  
  int 
! imap_check(const char *cmd, const char *h, const char* n, const char* e, const char* f)
  {
  	int s;
  	char *c = NULL;
***************
*** 387,420 ****
  	int total = 0, unseen = 0;
  	int count = 0;
  	
! 	if (!h || !n || !e) return NO_SERVER_INFO;
  	
  	if (f == NULL ||
  	    f[0] == '\0')
  		f = "INBOX";
  	
! 	s = connect_socket(h, 143);
  	
  	if (s < 0)
  		return s;
  	
  	x = read_line(s);
  	/* The greeting us untagged */
  	if (!is_imap_answer_untagged(x))
  		goto return_from_imap_check;
  	
! 	if (!is_imap_answer_ok(x))
! 		goto return_from_imap_check;
! 	
! 	
! 	c = g_strdup_printf("A1 LOGIN \"%s\" \"%s\"", n, e);
! 	if (!write_line(s, c))
  		goto return_from_imap_check;
  	
! 	if (!is_imap_answer_ok(wait_for_imap_answer(s, "A1"))) {
! 		g_free (c);
! 		close (s);
! 		return INVALID_PASS;
  	}
  	
  	c = g_strdup_printf("A2 STATUS \"%s\" (MESSAGES UNSEEN)",f);
--- 441,480 ----
  	int total = 0, unseen = 0;
  	int count = 0;
  	
! 	if (!cmd && (!h || !n || !e)) return NO_SERVER_INFO;
  	
  	if (f == NULL ||
  	    f[0] == '\0')
  		f = "INBOX";
  	
! 	if (cmd && cmd[0])
! 		s = connect_command(cmd);
! 	else	s = connect_socket(h, 143);
  	
  	if (s < 0)
  		return s;
  	
  	x = read_line(s);
+ 	
  	/* The greeting us untagged */
  	if (!is_imap_answer_untagged(x))
  		goto return_from_imap_check;
  	
! 	if (!is_imap_answer_ok(x) &&
! 	    !is_imap_answer_preauth(x))
  		goto return_from_imap_check;
  	
! 	/* tunneled connections are often preauthenticated */
! 	if (!is_imap_answer_preauth(x)) {
! 		c = g_strdup_printf("A1 LOGIN \"%s\" \"%s\"", n, e);
! 		if (!write_line(s, c))
! 			goto return_from_imap_check;
! 		
! 		if (!is_imap_answer_ok(wait_for_imap_answer(s, "A1"))) {
! 			g_free (c);
! 			close (s);
! 			return INVALID_PASS;
! 		}
  	}
  	
  	c = g_strdup_printf("A2 STATUS \"%s\" (MESSAGES UNSEEN)",f);
diff -cr gnome-applets-2.4.2.orig/mailcheck/popcheck.h gnome-applets-2.4.2/mailcheck/popcheck.h
*** gnome-applets-2.4.2.orig/mailcheck/popcheck.h	Thu Mar  6 07:16:26 2003
--- gnome-applets-2.4.2/mailcheck/popcheck.h	Wed Apr 21 17:24:58 2004
***************
*** 11,24 ****
  /* Returns how many mails are available on POP3-server "h" with username "n" and password "e"
   * The server-name may be given with or without port-number in form "host:port". 
   */
! int pop3_check(const char *h, const char* n, const char* e);
  
  /* Returns how many mails are available on IMAP-server "h"
   *     in folder "f" with username "n" and password "e"
   * Hi: unseen/recent; Lo: total
   * The server-name may be given with or without port-number in form "host:port".
   */
! int imap_check(const char *h, const char* n, const char* e, const char* f);
  
  #define NO_SERVER_INFO		-1
  #define NETWORK_ERROR		-2
--- 11,24 ----
  /* Returns how many mails are available on POP3-server "h" with username "n" and password "e"
   * The server-name may be given with or without port-number in form "host:port". 
   */
! int pop3_check(const char *c, const char *h, const char* n, const char* e);
  
  /* Returns how many mails are available on IMAP-server "h"
   *     in folder "f" with username "n" and password "e"
   * Hi: unseen/recent; Lo: total
   * The server-name may be given with or without port-number in form "host:port".
   */
! int imap_check(const char *c, const char *h, const char* n, const char* e, const char* f);
  
  #define NO_SERVER_INFO		-1
  #define NETWORK_ERROR		-2
diff -cr gnome-applets-2.4.2.orig/mailcheck/remote-helper.c gnome-applets-2.4.2/mailcheck/remote-helper.c
*** gnome-applets-2.4.2.orig/mailcheck/remote-helper.c	Thu Mar  6 07:16:26 2003
--- gnome-applets-2.4.2/mailcheck/remote-helper.c	Wed Apr 21 17:23:50 2004
***************
*** 185,191 ****
  		   gpointer data,
  		   GDestroyNotify destroy_notify,
  		   const char *command,
! 		   const char *h, const char* n, const char* e)
  {
  	RemoteHandlerData *handler_data;
  
--- 185,191 ----
  		   gpointer data,
  		   GDestroyNotify destroy_notify,
  		   const char *command,
! 		   const char *c, const char *h, const char* n, const char* e)
  {
  	RemoteHandlerData *handler_data;
  
***************
*** 195,201 ****
  	if (handler_data == NULL) {
  		int mails;
  
! 		mails = pop3_check (h, n, e);
  
  		if (mails < 0)
  			error_handler (mails, data);
--- 195,201 ----
  	if (handler_data == NULL) {
  		int mails;
  
! 		mails = pop3_check (c, h, n, e);
  
  		if (mails < 0)
  			error_handler (mails, data);
***************
*** 214,220 ****
  		    command[0] != '\0')
  			system (command);
  	       
! 		mails = pop3_check (h, n, e);
  
  		write (handler_data->fd, &mails, sizeof (mails));
  
--- 214,220 ----
  		    command[0] != '\0')
  			system (command);
  	       
! 		mails = pop3_check (c, h, n, e);
  
  		write (handler_data->fd, &mails, sizeof (mails));
  
***************
*** 229,235 ****
  		   gpointer data,
  		   GDestroyNotify destroy_notify,
  		   const char *command,
! 		   const char *h, const char* n, const char* e, const char *f)
  {
  	RemoteHandlerData *handler_data;
  
--- 229,235 ----
  		   gpointer data,
  		   GDestroyNotify destroy_notify,
  		   const char *command,
! 		   const char *c, const char *h, const char* n, const char* e, const char *f)
  {
  	RemoteHandlerData *handler_data;
  
***************
*** 239,245 ****
  	if (handler_data == NULL) {
  		int mails;
  
! 		mails = imap_check (h, n, e, f);
  
  		if (mails < 0)
  			error_handler (mails, data);
--- 239,245 ----
  	if (handler_data == NULL) {
  		int mails;
  
! 		mails = imap_check (c, h, n, e, f);
  
  		if (mails < 0)
  			error_handler (mails, data);
***************
*** 256,262 ****
  		    command[0] != '\0')
  			system (command);
  	       
! 		mails = imap_check (h, n, e, f);
  
  		write (handler_data->fd, &mails, sizeof (mails));
  
--- 256,262 ----
  		    command[0] != '\0')
  			system (command);
  	       
! 		mails = imap_check (c, h, n, e, f);
  
  		write (handler_data->fd, &mails, sizeof (mails));
  
diff -cr gnome-applets-2.4.2.orig/mailcheck/remote-helper.h gnome-applets-2.4.2/mailcheck/remote-helper.h
*** gnome-applets-2.4.2.orig/mailcheck/remote-helper.h	Thu Mar  6 07:16:26 2003
--- gnome-applets-2.4.2/mailcheck/remote-helper.h	Wed Apr 21 17:23:05 2004
***************
*** 14,25 ****
  			    gpointer data,
  			    GDestroyNotify destroy_notify,
  			    const char *command,
! 			    const char *h, const char* n, const char* e);
  gpointer helper_imap_check (RemoteHandler handler, RemoteHandler error_handler,
  			    gpointer data,
  			    GDestroyNotify destroy_notify,
  			    const char *command,
! 			    const char *h, const char* n, const char* e,
  			    const char *f);
  void helper_whack_handle (gpointer handle);
  
--- 14,25 ----
  			    gpointer data,
  			    GDestroyNotify destroy_notify,
  			    const char *command,
! 			    const char *c, const char *h, const char* n, const char* e);
  gpointer helper_imap_check (RemoteHandler handler, RemoteHandler error_handler,
  			    gpointer data,
  			    GDestroyNotify destroy_notify,
  			    const char *command,
! 			    const char *c, const char *h, const char* n, const char* e,
  			    const char *f);
  void helper_whack_handle (gpointer handle);
  

--===============0385195657==--

---------------------------------------
Received: (at 245142-close) by bugs.debian.org; 10 Jun 2005 20:38:31 +0000
>From katie@ftp-master.debian.org Fri Jun 10 13:38:31 2005
Return-path: <katie@ftp-master.debian.org>
Received: from newraff.debian.org [208.185.25.31] (mail)
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1DgqGs-0008AV-00; Fri, 10 Jun 2005 13:38:30 -0700
Received: from katie by newraff.debian.org with local (Exim 3.35 1 (Debian))
	id 1DgqB9-0002vz-00; Fri, 10 Jun 2005 16:32:35 -0400
From: =?utf-8?b?TWFyYyBEZXF1w6huZXMgKER1Y2sp?= <Duck@DuckCorp.org>
To: 245142-close@bugs.debian.org
X-Katie: $Revision: 1.56 $
Subject: Bug#245142: fixed in gnome-applets 2.10.1-3
Message-Id: <E1DgqB9-0002vz-00@newraff.debian.org>
Sender: Archive Administrator <katie@ftp-master.debian.org>
Date: Fri, 10 Jun 2005 16:32:35 -0400
Delivered-To: 245142-close@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
	autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level: 
X-CrossAssassin-Score: 3

Source: gnome-applets
Source-Version: 2.10.1-3

We believe that the bug you reported is fixed in the latest version of
gnome-applets, which is due to be installed in the Debian FTP archive:

gnome-applets-data_2.10.1-3_all.deb
  to pool/main/g/gnome-applets/gnome-applets-data_2.10.1-3_all.deb
gnome-applets-dbg_2.10.1-3_i386.deb
  to pool/main/g/gnome-applets/gnome-applets-dbg_2.10.1-3_i386.deb
gnome-applets-dev_2.10.1-3_i386.deb
  to pool/main/g/gnome-applets/gnome-applets-dev_2.10.1-3_i386.deb
gnome-applets_2.10.1-3.diff.gz
  to pool/main/g/gnome-applets/gnome-applets_2.10.1-3.diff.gz
gnome-applets_2.10.1-3.dsc
  to pool/main/g/gnome-applets/gnome-applets_2.10.1-3.dsc
gnome-applets_2.10.1-3_i386.deb
  to pool/main/g/gnome-applets/gnome-applets_2.10.1-3_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 245142@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Marc Dequènes (Duck) <Duck@DuckCorp.org> (supplier of updated gnome-applets package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Fri, 10 Jun 2005 21:17:02 +0200
Source: gnome-applets
Binary: gnome-applets-data gnome-applets-dbg gnome-applets gnome-applets-dev
Architecture: source i386 all
Version: 2.10.1-3
Distribution: unstable
Urgency: low
Maintainer: Marc Dequènes (Duck) <Duck@DuckCorp.org>
Changed-By: Marc Dequènes (Duck) <Duck@DuckCorp.org>
Description: 
 gnome-applets - Various applets for GNOME 2 panel - binary files
 gnome-applets-data - Various applets for GNOME 2 panel - data files
 gnome-applets-dbg - Various applets for GNOME 2 panel - binary files with debugging s
 gnome-applets-dev - Various applets for GNOME 2 panel - development files
Closes: 70456 82874 89940 89940 115732 173420 173545 184186 201984 207355 220796 233702 245142 247209 273429 280436 285331 285478 286125 286360 292349 292679 302733 304137 306871
Changes: 
 gnome-applets (2.10.1-3) unstable; urgency=low
 .
   * Upload to unstable.
 .
 gnome-applets (2.10.1-2) experimental; urgency=low
 .
   * Get rid of buggy mc-install-default-macros ; made a .entries file to
     be loaded with gconftool-2 as replacement.
   * Added necessary Conflicts/Replaces/Provices for trashapplet to ease
     migration from Sarge (trashapplet is now included into applets)
     (Closes: #306871).
 .
 gnome-applets (2.10.1-1) experimental; urgency=low
 .
   * New upstream release
   * Mass build-depends and depends update (Closes: #292679).
   * Added Replaces/Conflicts/Provides on gnome-cpufreq-applet.
   * Now depending on gnome-icon-theme where several applet icons lies.
   * Defaulting to 'gstreamer0.8-alsa' dependency instead of
     'gstreamer0.8-oss' (OSS is DEPRECATED and must die).
   * Removed the following patches now included upstream :
     + 06_gweather_utf8.patch
     + 11_batstat_ui_fix.patch
   * Removed the following patches now obsolete :
     + 01_keep_keyprop.patch
     + 02_gkb_xmmap.patch
     + 03_modemlights_ppp_commands.patch
     + 07_inboxmonitor_ssl.patch
     + 10_batstat_transparent_background.patch
     + 12_buildsys_relibtoolized.patch
   * Regenerated patches :
     + 08_gweather_locations.patch
     + 09_drivemount_mediamount.patch
   * Removed obsolete Indian & Latvian language support files.
   * Fixed 'debian/gnome-keyboard-layout.xml' man page source typo
     (Closes: #302733).
   * Fixed in 2.10 branch :
     + gkb disables VT switching in XFree86 4.3 (Closes: #233702).
     + gweather: would be nice to show a moon during night-time clear sky
       (Closes: #201984).
     + include NYC Central Park (Closes: #304137).
     + xml parsing errors during upgrade (Closes: #286125).
     + gnome-keyboard-applet no longer show flag icon (flags removed)
       (Closes: #285478) (see the "NO Flags Policy" thread  :
       http://mail.gnome.org/archives/desktop-devel-list/2003-November/ \
        msg00267.html )
   * Invalidated by major upstream changes :
     + mailcheck removed (Closes: #285331, #89940, #82874, #292349, #207355,
       #245142, #286360, #89940, #184186).
     + cdplayer removed (Closes: #280436).
     + wireless removed (no bugs).
     + modemlights rewritten (Closes: #247209, #273429, #220796, #115732,
       #173420).
     + drivemount rewritten (Closes: #70456, #173545).
   * Added 'gnome-applets-dbg.' binary package.
   * Renamed 'postinst' to 'gnome-applets.postinst'.
   * Added 'debian/README.Debian' with information about cpufreq applet
     SUID parameter.
   * Patch stolen from Ubuntu package (thanks to seb128's work) :
     + 05_battstat-icon.patch : patch from Ryan Lortie <desrt@desrt.ca> to
       fix some refresh issue with battstat.
     + 06_battstat-default.patch : changed the default configuration for the
       battstat applet (show battery activated by default).
     + 08_battstat-no-suspend.patch : disable the suspend-on-double-click,
       which is not yet working.
     + 13_stickynotes-docs-dupe-id.patch : documentation fix.
   * Reindexed patches.
   * Removed extra cleanup rules (buildsys has learned hygiene).
   * Fixed stupid cut-and-paste mistake in 'debian/copyright'.
   * Updated 'debian/watch'.
   * Temporarily reverted 'debian/control' generation to please ftpmasters
     before a real solution is found and accepted.
Files: 
 c8d161ac300bae24e9ed8fe27552e360 2351 gnome optional gnome-applets_2.10.1-3.dsc
 0d3de4b667ed4793cef18221a19f33bb 19544 gnome optional gnome-applets_2.10.1-3.diff.gz
 ae4a8da9532608e52bd1e6c06b2d47d9 6574898 gnome optional gnome-applets-data_2.10.1-3_all.deb
 5db7b0c1c3955b03fa0f384b43d8f92d 386660 gnome optional gnome-applets_2.10.1-3_i386.deb
 bdb845efe8b1a2d8a0be1b2eee085d22 7470438 gnome optional gnome-applets-dbg_2.10.1-3_i386.deb
 23a2801801a850ff8b7881bea59b3368 88012 gnome optional gnome-applets-dev_2.10.1-3_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFCqewnsczZcpAmcIYRAqk5AJ0anIOOerQ6RHtfbqCBeEO3tMtsdwCeP5uf
8ApZu4gVifJhSDh8uMX5MBY=
=4BR7
-----END PGP SIGNATURE-----