Re: Perdition Problems
Filipe Carvalho <[email protected]>
| Newsgroups | gmane.mail.perdition.user |
|---|---|
| Message-ID | <[email protected]> |
On 07/09/2010 02:36 AM, Simon Horman wrote: > On Fri, Jul 09, 2010 at 10:06:30AM +0900, Simon Horman wrote: >> On Thu, Jul 08, 2010 at 04:48:52PM +0100, Filipe Carvalho wrote: >>> Hi, >>> >>> We've installed the latest version of perdition, from the mercurial >>> repository, on Debian Squeeze. From the source we created deb packages >>> and only installed the main perdition package. >>> With the imap and managesieve protocols activated, perdition starts up >>> correctly, the imap is working without problem, but with managesieve, >>> the following happens: >>> >>> webmail1:etc/perdition# telnet localhost 2000 >>> Trying 127.0.0.1... >>> Connected to localhost.localdomain. >>> Escape character is '^]'. >>> Connection closed by foreign host. >>> >>> On syslog we get: >>> >>> Jul 8 16:42:09 webmail1 perdition.managesieve[2302]: Connect: >>> 127.0.0.1:40425->127.0.0.1:2000 >>> Jul 8 16:42:09 webmail1 perdition.managesieve[2302]: Exiting on signal 11 >>> >>> We have the debug mode activated, but don't seem to get any more info. >>> >>> Could you please help? >> >> Ouch. That seems to be present in 1.19-rc1. >> I'll investigate ASAP. > > Hi Filipe, > > could you test this patch to see if it resolves the problem that you are > seeing? > > BTW, prior to the release of 1.19-rc1 the default port for managesieve mode > was changed to the IANA registered port which is sieve/4190. Watch out > for that if you update your tree. > > > From: Simon Horman<[email protected]> > > Perdition exits with a segmentation fault very early on > when run in managesieve mode. This is because the default > capability is NULL and the capability code expects non-NULL. > > This patch addresses the problem by setting the default capability > to a non-NULL value. > > Reported-by: Filipe Carvalho<[email protected]> > Signed-off-by: Simon Horman<[email protected]> > > --- > > This looks like a problem that was introduced when the managesieve, > based on 1.18, was merged into the development tree. My bad. > > diff -r 191bfdc5a6d0 perdition/managesieve.c > --- a/perdition/managesieve.c Tue Jul 06 10:58:05 2010 +0900 > +++ b/perdition/managesieve.c Fri Jul 09 10:29:14 2010 +0900 > @@ -229,20 +229,16 @@ > char *managesieve_capability(flag_t tls_flags, flag_t tls_state) > { > flag_t mode; > - char *capability = NULL; > + char *capability; > char *old_capability; > > - capability = opt.managesieve_capability; > - if (!strcmp(capability, PERDITION_PROTOCOL_DEPENDANT)) > - capability = MANAGESIEVE_DEFAULT_CAPA; > - > if ((tls_flags& SSL_MODE_TLS_LISTEN)&& > !(tls_state& SSL_MODE_TLS_LISTEN)) > mode = PROTOCOL_C_ADD; > else > mode = PROTOCOL_C_DEL; > > - capability = protocol_capability(mode, capability, > + capability = protocol_capability(mode, opt.managesieve_capability, > MANAGESIEVE_CAPA_STARTTLS, > MANAGESIEVE_CAPA_DELIMITER); > if (!capability) { > diff -r 191bfdc5a6d0 perdition/options.h > --- a/perdition/options.h Tue Jul 06 10:58:05 2010 +0900 > +++ b/perdition/options.h Fri Jul 09 10:29:14 2010 +0900 > @@ -35,6 +35,8 @@ > #include<vanessa_adt.h> > #include<popt.h> > > +#include "managesieve_write.h" > + > #ifdef HAVE_CONFIG_H > #include "config.h" > #endif > @@ -130,7 +132,7 @@ > #define DEFAULT_LOG_FACILITY "mail" > #define DEFAULT_LOGIN_DISABLED 0 > #define DEFAULT_LOWER_CASE STATE_NONE > -#define DEFAULT_MANAGESIEVE_CAPABILITY NULL > +#define DEFAULT_MANAGESIEVE_CAPABILITY MANAGESIEVE_DEFAULT_CAPA > #define DEFAULT_MAP_LIB_OPT NULL > #define DEFAULT_NO_BIND_BANNER 0 > #define DEFAULT_NO_DAEMON 0 Hi, It's working now. Many thanks! Filipe -- Filipe André Romualdo de Carvalho Unidade de Administração de Sistemas (UAS) Centro de Informática Prof. Correia de Araújo (CICA) Faculdade de Engenharia da Universidade do Porto (FEUP) Tlf: (+351) 22 508 15 06 - SIP/VoIP: [email protected] / Ext: 3092 ______________________________________________ Perdition-users mailing list [email protected] http://lists.vergenet.net/listinfo/perdition-users