From: Pierre Habouzit Date: Sat, 31 Mar 2007 13:51:27 +0000 (+0200) Subject: fix esmtp. X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=commitdiff_plain;h=9b2475d3970fb70c443ac5035a41208cd9db1569 fix esmtp. crude hack because libesmtp-config sucks. Signed-off-by: Pierre Habouzit --- diff --git a/configure.ac b/configure.ac index c61cb1f..bd9bd84 100644 --- a/configure.ac +++ b/configure.ac @@ -642,7 +642,8 @@ dnl -- libesmtp -- MUTT_AM_LIBESMTP if test x$use_libesmtp = xyes; then CFLAGS="$CFLAGS $mutt_libesmtp_cflags" - MUTTLIBS="$MUTTLIBS $mutt_libesmtp_libs" + dnl HACK MUTTLIBS="$MUTTLIBS $mutt_libesmtp_libs" + MUTTLIBS="$MUTTLIBS -lesmtp" MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS mutt_libesmtp.o" AC_DEFINE(USE_LIBESMTP, 1, [Define to enable the use of libesmtp]) fi diff --git a/doconfig.sh b/doconfig.sh index e842c31..c5cd8e3 100755 --- a/doconfig.sh +++ b/doconfig.sh @@ -3,4 +3,4 @@ --with-sharedir=/usr/share/mutt-ng --with-docdir=/usr/share/doc/mutt-ng \ --with-mailpath=/var/mail --enable-fcntl --with-sasl2 \ --with-idn --with-curses --enable-nntp --with-gss --with-gnutls \ - --enable-gpgme --enable-hcache --enable-doc + --with-libesmtp --enable-gpgme --enable-hcache --enable-doc diff --git a/functions.def b/functions.def index 06bbc04..e1fd6dd 100644 --- a/functions.def +++ b/functions.def @@ -351,7 +351,6 @@ LIST(OpCompose) ITEM("filter-entry", OP_FILTER, "F") ITEM("get-attachment", OP_COMPOSE_GET_ATTACHMENT, "G") ITEM("display-toggle-weed", OP_DISPLAY_HEADERS, "h") - ITEM("ispell", OP_COMPOSE_ISPELL, "i") ITEM("print-entry", OP_PRINT, "l") ITEM("edit-mime", OP_COMPOSE_EDIT_MIME, "m") ITEM("new-mime", OP_COMPOSE_NEW_MIME, "n") diff --git a/m4/libesmtp.m4 b/m4/libesmtp.m4 index b6b10db..e1f20e3 100644 --- a/m4/libesmtp.m4 +++ b/m4/libesmtp.m4 @@ -42,19 +42,7 @@ AC_DEFUN([MUTT_AM_LIBESMTP], AC_MSG_ERROR([Could not find libesmtp.h])) CFLAGS="$temp_CFLAGS" - dnl 4. Verify the libesmtp library can be linked in - temp_CFLAGS="$CFLAGS" - temp_LIBS="$LIBS" - CFLAGS="$CFLAGS $mutt_libesmtp_cflags" - LIBS="$LIBS $mutt_libesmtp_libs" - AC_CHECK_LIB([esmtp], - [smtp_create_session], - [], - AC_MSG_ERROR([Could not find libesmtp])) - CFLAGS="$temp_CFLAGS" - LIBS="$temp_LIBS" - - dnl 5. Export use_libesmtp variable so configure.in can + dnl 4. Export use_libesmtp variable so configure.in can dnl act accordingly. use_libesmtp=yes fi diff --git a/mutt_libesmtp.c b/mutt_libesmtp.c index c77d4d2..fce3580 100644 --- a/mutt_libesmtp.c +++ b/mutt_libesmtp.c @@ -251,15 +251,15 @@ static void do_dsn_notify (smtp_message_t message, const char* from) { int flags = Notify_NOTSET; smtp_recipient_t self = NULL; - if (m_strisempty(DsnNotify) || !message || m_strisempty(from) || - strstr (DsnNotify, "never") != NULL) + if (m_strisempty(MTransport.dsn_notify) || !message || m_strisempty(from) || + strstr (MTransport.dsn_notify, "never") != NULL) return; - if (strstr (DsnNotify, "failure") != NULL) + if (strstr (MTransport.dsn_notify, "failure") != NULL) flags |= Notify_FAILURE; - if (strstr (DsnNotify, "delay") != NULL) + if (strstr (MTransport.dsn_notify, "delay") != NULL) flags |= Notify_DELAY; - if (strstr (DsnNotify, "success") != NULL) + if (strstr (MTransport.dsn_notify, "success") != NULL) flags |= Notify_SUCCESS; if (flags != Notify_NOTSET) { @@ -270,11 +270,11 @@ static void do_dsn_notify (smtp_message_t message, const char* from) { } static void do_dsn_ret (smtp_message_t message) { - if (m_strisempty(DsnReturn) || !message) + if (m_strisempty(MTransport.dsn_return) || !message) return; - if (ascii_strncasecmp (DsnReturn, "hdrs", 4) == 0) + if (ascii_strncasecmp (MTransport.dsn_return, "hdrs", 4) == 0) smtp_dsn_set_ret (message, Ret_HDRS); - else if (ascii_strncasecmp (DsnReturn, "full", 4) == 0) + else if (ascii_strncasecmp (MTransport.dsn_return, "full", 4) == 0) smtp_dsn_set_ret (message, Ret_FULL); } @@ -355,7 +355,7 @@ int mutt_libesmtp_invoke (address_t * from, /* the sender */ SMTPFAIL ("smtp_add_message"); /* Initialize envelope sender */ - if (MTransport.use_envelope_fromoption && MTransport.envelope_from_address) + if (MTransport.use_envelope_from && MTransport.envelope_from_address) envfrom = MTransport.envelope_from_address->mailbox; if (!smtp_set_reverse_path (message, envfrom)) SMTPFAIL ("smtp_set_reverse_path");