fix esmtp.
authorPierre Habouzit <madcoder@debian.org>
Sat, 31 Mar 2007 13:51:27 +0000 (15:51 +0200)
committerPierre Habouzit <madcoder@debian.org>
Sat, 31 Mar 2007 13:51:27 +0000 (15:51 +0200)
crude hack because libesmtp-config sucks.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
configure.ac
doconfig.sh
functions.def
m4/libesmtp.m4
mutt_libesmtp.c

index c61cb1f..bd9bd84 100644 (file)
@@ -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
index e842c31..c5cd8e3 100755 (executable)
@@ -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
index 06bbc04..e1fd6dd 100644 (file)
@@ -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")
index b6b10db..e1f20e3 100644 (file)
@@ -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
index c77d4d2..fce3580 100644 (file)
@@ -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");