From jykke.voutilainen at gmail.com Thu Mar 17 07:41:50 2016 From: jykke.voutilainen at gmail.com (Jyrki Voutilainen) Date: Tue Jun 12 15:15:01 2018 Subject: [Alpine-info] Just Testing, Please Ignore Message-ID: Just testing if this list is still running after having been unsubscribed ?for ages?. -- Jyrki Voutilainen mailto:jykke.voutilainen@gmail.com From jykke.voutilainen at gmail.com Thu Mar 17 08:07:36 2016 From: jykke.voutilainen at gmail.com (Jyrki Voutilainen) Date: Tue Jun 12 15:15:01 2018 Subject: [Alpine-info] Just Testing, Please Ignore In-Reply-To: References: Message-ID: On Thu, 17 Mar 2016, Jyrki Voutilainen wrote: > Just testing if this list is still running after having been unsubscribed > ?for ages?. It seems to run, because I got this message from the list. :) When posting my previous message, I used a general Alpine role for international mailing lists, but found it better to change to a list-specific one with a list-specific signature and a Reply-To header like earlier. This is just one of Alpine's great features, thanks! To avoid the signature to end just one line above the list footer, I've addet two line breaks at the end of the signature file. It might not have been necessary on this list, but on some lists it is. Now one blank line is addded between the signature and the list footer just as expected. -- Jyrki Voutilainen mailto:jykke.voutilainen@gmail.com From Heinrich.Mislik at univie.ac.at Fri Mar 18 05:01:24 2016 From: Heinrich.Mislik at univie.ac.at (Heinrich Mislik) Date: Tue Jun 12 15:15:01 2018 Subject: [Alpine-info] alpine hangs after use of LDAP Adressbook Message-ID: <56EBEE14.10491.477B6830@Heinrich.Mislik.univie.ac.at> Hello, alpine hangs after the following steps: open some Mail Press b (Bounce) Press ^t (Adressbooks) Select directory based an LDAP Do arbitrary search (result doesn't matter) Press e (exit) Press ^C (cancel bounce) Press i (back to index) Press enter (open mail again) alpine screen disapears, busybox is running. The process needs to be killed with -9. I've seen this on Fedora 22, Centos6. Cheers Heinrich -- Heinrich Mislik Zentraler Informatikdienst der Universitaet Wien A-1010 Wien, Universitaetsstrasse 7 Tel.: (+43 1) 4277-14056, Fax: (+43 1) 4277-9140 From dsewell at virginia.edu Fri Mar 18 06:27:49 2016 From: dsewell at virginia.edu (David Sewell) Date: Tue Jun 12 15:15:01 2018 Subject: [Alpine-info] alpine hangs after use of LDAP Adressbook In-Reply-To: <56EBEE14.10491.477B6830@Heinrich.Mislik.univie.ac.at> References: <56EBEE14.10491.477B6830@Heinrich.Mislik.univie.ac.at> Message-ID: I reproduced this behavior. Alpine 2.20 under OS X. Only in my case Alpine crashed instead of hanging, with this error message: alpine(58401,0x7fff721b1300) malloc: *** error for object 0x7fd64e21f950: pointer being freed was not allocated set a breakpoint in malloc_error_break to debug Abort trap: 6 On Fri, 18 Mar 2016, Heinrich Mislik wrote: > Hello, > > alpine hangs after the following steps: > > open some Mail > Press b (Bounce) > Press ^t (Adressbooks) > Select directory based an LDAP > Do arbitrary search (result doesn't matter) > Press e (exit) > Press ^C (cancel bounce) > Press i (back to index) > Press enter (open mail again) > > alpine screen disapears, busybox is running. The process needs to be > killed with -9. > > I've seen this on Fedora 22, Centos6. > > Cheers > > Heinrich > -- David Sewell, Editorial and Technical Manager ROTUNDA, The University of Virginia Press PO Box 400318, Charlottesville, VA 22904-4314 USA Email: dsewell@virginia.edu Tel: +1 434 924 9973 Web: http://rotunda.upress.virginia.edu/ From mattack at apple.com Fri Mar 18 11:02:43 2016 From: mattack at apple.com (Matt Ackeret) Date: Tue Jun 12 15:15:01 2018 Subject: [Alpine-info] alpine hangs after use of LDAP Adressbook In-Reply-To: References: <56EBEE14.10491.477B6830@Heinrich.Mislik.univie.ac.at> Message-ID: On Fri, 18 Mar 2016, David Sewell wrote: > I reproduced this behavior. Alpine 2.20 under OS X. Only in my case Alpine > crashed instead of hanging, with this error message: > > alpine(58401,0x7fff721b1300) malloc: *** error for object 0x7fd64e21f950: > pointer being freed was not allocated > set a breakpoint in malloc_error_break to debug > Abort trap: 6 Umm, I'm not trying to be too sarcastic, but did you try just that? Run it under lldb and set a breakpoint, reproduce the steps, and get a backtrace.. That'll find a bug.. (Not exactly related, but I sometimes see alpine hang just when I get to the To field composing a message.. it's relatively rare, and I always thought it was doing some LDAP lookup, but I haven't been able to get a sample of it.. plus I run an ancient alpine so have mostly been ignoring it until I try on the latest.) From scateu at gmail.com Fri Mar 18 12:50:12 2016 From: scateu at gmail.com (Wang Kang) Date: Tue Jun 12 15:15:01 2018 Subject: [Alpine-info] Add support for LDAP over SSL Message-ID: <1458330612.2118642.553367522.236EA350@webmail.messagingengine.com> Recently, I have been working around on setting up my LDAP account with alpine. I got my configuration from my LDAP provider: Server ldap.messagingengine.com Port 636 SSL/TLS Encryption Enabled (but not STARTTLS) Username/Bind DN cn=your-username@your-domain,dc=User Login PLAIN Password Your FastMail password Search base/Base DN dc=AddressBook However, what alpine supports for now, is STARTTLS. After some research, I managed to build up a local TLS offload tunnel with `stunnel` . sudo stunnel -c -d 127.0.0.1:9636 -r ldap.messagingengine.com:636 It works well, I can search in my LDAP address book within alpine now. But I am *not* happy, I don't like to fire up another `stunnel` when using alpine. Finally, after a whole night's hacking and testing, I made a patch adding this feature. [X] require-ldaps-on-connection LDAP FEATURE: Require-LDAPS-On-Connection When connecting to this server Alpine will use LDAPS (LDAP over SSL/TLS) on the connection. This feature shouldn't be used along with "Require-TLS-On-Connection" or "Attempt-TLS-On-Connection" I hope this patch could be integrated in alpine distributions such as debian or homebrew someday. Then it will be more convenient for me to introduce alpine to my friends. Feedbacks and code reviews are welcome! -- Wang Kang Blog: http://scateu.me Fingerprint: 011F 0492 97D6 5D75 8AC4 6458 D43F 3CE2 3353 B7BD -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Add-a-require-ldapssl-on-connection-switch-to-suppor.patch Type: text/x-diff Size: 6147 bytes Desc: not available URL: From scateu at gmail.com Fri Mar 18 12:59:53 2016 From: scateu at gmail.com (Wang Kang) Date: Tue Jun 12 15:15:01 2018 Subject: [Alpine-info] Add support for LDAP over SSL In-Reply-To: <1458330612.2118642.553367522.236EA350@webmail.messagingengine.com> References: <1458330612.2118642.553367522.236EA350@webmail.messagingengine.com> Message-ID: <1458331193.2121765.553374250.43AD93BF@webmail.messagingengine.com> >From be87b5fcb39cf4af4f708fe060026b729a8f6ad2 Mon Sep 17 00:00:00 2001 From: "Wang Kang" Date: Sat, 19 Mar 2016 02:20:49 +0800 Subject: [PATCH 1/1] Add a "require-ldapssl-on-connection" switch to support LDAPSSL (Port 636) --- alpine/ldapconf.c | 12 ++++++++++-- pith/ldap.c | 11 ++++++++++- pith/ldap.h | 1 + pith/pine.hlp | 21 +++++++++++++++++++++ 4 files changed, 42 insertions(+), 3 deletions(-) diff --git a/alpine/ldapconf.c b/alpine/ldapconf.c index 714bf0c..4981364 100644 --- a/alpine/ldapconf.c +++ b/alpine/ldapconf.c @@ -1145,6 +1145,7 @@ dir_config_edit(struct pine *ps, CONF_S **cl) #define LDAP_F_NOSUB 3 #define LDAP_F_TLS 4 #define LDAP_F_TLSMUST 5 +#define LDAP_F_LDAPS 6 bitmap_t ldap_option_list; struct variable *ldap_srch_rule_ptr; @@ -1351,6 +1352,8 @@ dir_edit_screen(struct pine *ps, LDAP_SERV_S *def, char *title, char **raw_serve setbitn(LDAP_F_TLS, ldap_option_list); if(def && def->tlsmust) setbitn(LDAP_F_TLSMUST, ldap_option_list); + if(def && def->ldaps) + setbitn(LDAP_F_LDAPS, ldap_option_list); /* save the old opt_screen before calling scroll screen again */ saved_screen = opt_screen; @@ -1499,6 +1502,9 @@ dir_edit_screen(struct pine *ps, LDAP_SERV_S *def, char *title, char **raw_serve case LDAP_F_TLSMUST: ctmp->help = h_config_ldap_opts_tlsmust; break; + case LDAP_F_LDAPS: + ctmp->help = h_config_ldap_opts_ldaps; //TODO: SSL and TLS as radiobutton + break; } ctmp->tool = ldap_checkbox_tool; @@ -1919,7 +1925,7 @@ dir_edit_screen(struct pine *ps, LDAP_SERV_S *def, char *title, char **raw_serve } } - snprintf(dir_tmp, sizeof(dir_tmp), "%s%s%s \"/base=%s/binddn=%s/impl=%d/rhs=%d/ref=%d/nosub=%d/tls=%d/tlsm=%d/type=%s/srch=%s%s/time=%s/size=%s/cust=%s/nick=%s/matr=%s/catr=%s/satr=%s/gatr=%s\"", + snprintf(dir_tmp, sizeof(dir_tmp), "%s%s%s \"/base=%s/binddn=%s/impl=%d/rhs=%d/ref=%d/nosub=%d/tls=%d/tlsm=%d/ldaps=%d/type=%s/srch=%s%s/time=%s/size=%s/cust=%s/nick=%s/matr=%s/catr=%s/satr=%s/gatr=%s\"", server ? server : "", (portval >= 0 && port && *port) ? ":" : "", (portval >= 0 && port && *port) ? port : "", @@ -1931,6 +1937,7 @@ dir_edit_screen(struct pine *ps, LDAP_SERV_S *def, char *title, char **raw_serve bitnset(LDAP_F_NOSUB, ldap_option_list) ? 1 : 0, bitnset(LDAP_F_TLS, ldap_option_list) ? 1 : 0, bitnset(LDAP_F_TLSMUST, ldap_option_list) ? 1 : 0, + bitnset(LDAP_F_LDAPS, ldap_option_list) ? 1 : 0, srch_type ? srch_type : "", srch_rule ? srch_rule : "", custom_scope, @@ -2364,7 +2371,8 @@ ldap_feature_list(int index) {"save-search-criteria-not-result", NULL, LDAP_F_REF}, {"disable-ad-hoc-space-substitution", NULL, LDAP_F_NOSUB}, {"attempt-tls-on-connection", NULL, LDAP_F_TLS}, - {"require-tls-on-connection", NULL, LDAP_F_TLSMUST} + {"require-tls-on-connection", NULL, LDAP_F_TLSMUST}, // TODO rename tls to starttls + {"require-ldaps-on-connection", NULL, LDAP_F_LDAPS} }; return((index >= 0 && diff --git a/pith/ldap.c b/pith/ldap.c index a007873..7af48ea 100644 --- a/pith/ldap.c +++ b/pith/ldap.c @@ -472,7 +472,12 @@ ldap_lookup(LDAP_SERV_S *info, char *string, CUSTOM_FILT_S *cust, if((ld = ldap_init(serv, info->port)) == NULL) #else #if (LDAPAPI >= 11) - if((ld = ldap_init(serv, info->port)) == NULL) + char _URI[900]; + if(info->ldaps) + snprintf(_URI, sizeof(_URI), "ldaps://%s:%d", serv, info->port); + else + snprintf(_URI, sizeof(_URI), "ldap://%s:%d", serv, info->port); + if(ldap_initialize(&ld, _URI) != LDAP_SUCCESS) #else if((ld = ldap_open(serv, info->port)) == NULL) #endif @@ -1345,6 +1350,10 @@ break_up_ldap_server(char *serv_str) if((q = srchstr(tail, "/tlsm=1")) != NULL) info->tlsmust = 1; + /* get the ldaps parameter */ + if((q = srchstr(tail, "/ldaps=1")) != NULL) + info->ldaps = 1; + /* get the search type value */ if((q = srchstr(tail, "/type=")) != NULL){ NAMEVAL_S *v; diff --git a/pith/ldap.h b/pith/ldap.h index 2168e5f..d6c7e28 100644 --- a/pith/ldap.h +++ b/pith/ldap.h @@ -48,6 +48,7 @@ typedef struct ldap_serv { nosub, /* Disable space sub feature */ tls, /* Attempt TLS */ tlsmust, /* Require TLS */ + ldaps, /* Require LDAPS */ type, /* Search type (surname...) */ srch, /* Search rule (contains...) */ scope; /* Scope of search (base...) */ diff --git a/pith/pine.hlp b/pith/pine.hlp index 19d86d4..7aa2111 100644 --- a/pith/pine.hlp +++ b/pith/pine.hlp @@ -3355,6 +3355,7 @@ There are also additional details on
  • LDAP FEATURE: Disable-Ad-Hoc-Space-Substitution
  • LDAP FEATURE: Lookup-Addrbook-Contents
  • LDAP FEATURE: Require-TLS-On-Connection +
  • LDAP FEATURE: Require-LDAPS-On-Connection
  • LDAP FEATURE: Save-Search-Criteria-Not-Result
  • LDAP FEATURE: Use-Implicitly-From-Composer
  • LDAP OPTION: Bind-DN @@ -14290,6 +14291,26 @@ If the StartTLS operation fails then the connection will not be used. <End of help on this topic> +======= h_config_ldap_opts_ldaps ======= + + +LDAP FEATURE: Require-LDAPS-On-Connection + + +

    LDAP FEATURE: Require-LDAPS-On-Connection

    + +When connecting to this server Alpine will use LDAPS (LDAP over SSL/TLS) +on the connection. + +This feature shouldn't be used along with +"Require-TLS-On-Connection" + or +"Attempt-TLS-On-Connection" + +

    +<End of help on this topic> + + ====== h_config_ldap_opts_rhs ===== -- 1.9.1 From chappa at gmx.com Sat Mar 19 10:53:46 2016 From: chappa at gmx.com (Eduardo Chappa) Date: Tue Jun 12 15:15:01 2018 Subject: [Alpine-info] alpine hangs after use of LDAP Adressbook In-Reply-To: <56EBEE14.10491.477B6830@Heinrich.Mislik.univie.ac.at> References: <56EBEE14.10491.477B6830@Heinrich.Mislik.univie.ac.at> Message-ID: Dear Heinrich, thank you for the report. The issue has existed in all versions of Alpine! This issue exists due to a corruption of memory in the generation of the title bar (the first line in the screen). This issue is reproduced in the situation you described, and it does not have to do directly with the LDAP search (so it can not be reproduced from the composer). I have added a fix in the current git repository (see address below.) Thank you! -- Eduardo http://patches.freeiz.com/alpine/ (Web) http://repo.or.cz/alpine.git (Git) From i at scateu.me Sat Mar 19 22:09:28 2016 From: i at scateu.me (Wang Kang) Date: Tue Jun 12 15:15:01 2018 Subject: [Alpine-info] Unicode character broken when line wraps in alternative display mode Message-ID: <1458450568.2511677.554222290.705AC866@webmail.messagingengine.com> Hi, Eduardo I found out that emails with long line including unicode character will break the character into '??' at the wrap position. This problem only exists in HTML emails. For example, if you get a line like: ??????????????????????????????????????????????????????????????????????? Press 'A' to render HTML, then it will be displayed as: ???????????????????????????????????? ???????????????????????????????????? I have already composed this email in HTML mode, in order to help you reproduce this problem. Could you please help me fix this, or give me some hints? Thanks! -- Wang Kang Blog: http://scateu.me Fingerprint: 011F 0492 97D6 5D75 8AC4? 6458 D43F 3CE2 3353 B7BD HAM Callsign: BH1RLW -------------- next part -------------- An HTML attachment was scrubbed... URL: From chappa at gmx.com Mon Mar 21 19:16:48 2016 From: chappa at gmx.com (Eduardo Chappa) Date: Tue Jun 12 15:15:01 2018 Subject: [Alpine-info] Unicode character broken when line wraps in alternative display mode In-Reply-To: <1458450568.2511677.554222290.705AC866@webmail.messagingengine.com> References: <1458450568.2511677.554222290.705AC866@webmail.messagingengine.com> Message-ID: On Sun, 20 Mar 2016, Wang Kang wrote: > I found out that emails with long line including unicode character will > break the character into '??' at the wrap position. Dear Wang, thank you for the report and the example. It was a very good example. The problem is in the html_output_normal function, which although takes into consideration the width of a character when making wrapping decisions, it does not take into consideration if the full character has been written into the buffer before wrapping. When one adds that test, the problem is gone. There is however another place where this happens, and it is in the html_output_centered function. If you had produced centered text in your example you would have seen even more problems. I also worked on fixing that issue. The result is in the git repository (address below). Please let me know if these changes fix the issue you are reporting. Thank you. -- Eduardo http://patches.freeiz.com/alpine/ (Web) http://repo.or.cz/alpine.git (Git) From i at scateu.me Mon Mar 21 19:57:44 2016 From: i at scateu.me (Wang Kang) Date: Tue Jun 12 15:15:01 2018 Subject: [Alpine-info] Unicode character broken when line wraps in alternative display mode In-Reply-To: References: <1458450568.2511677.554222290.705AC866@webmail.messagingengine.com> Message-ID: Dear Eduardo, It works! Thanks very much, and now I can proudly introduce alpine to my friends! -- Wang Kang Blog: http://scateu.me Fingerprint: 011F 0492 97D6 5D75 8AC4 6458 D43F 3CE2 3353 B7BD HAM Callsign: BH1RLW On Mon, 21 Mar 2016, Eduardo Chappa wrote: > On Sun, 20 Mar 2016, Wang Kang wrote: > >> I found out that emails with long line including unicode character will >> break the character into '??' at the wrap position. > > Dear Wang, > > thank you for the report and the example. It was a very good example. The > problem is in the html_output_normal function, which although takes > into consideration the width of a character when making wrapping decisions, > it does not take into consideration if the full character has been written > into the buffer before wrapping. When one adds that test, the problem is > gone. > > There is however another place where this happens, and it is in the > html_output_centered function. If you had produced centered text in your > example you would have seen even more problems. I also worked on fixing that > issue. > > The result is in the git repository (address below). Please let me know if > these changes fix the issue you are reporting. > > Thank you. > > -- > Eduardo > http://patches.freeiz.com/alpine/ (Web) > http://repo.or.cz/alpine.git (Git) >