projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
autoconf cleanups.
[apps/madmutt.git]
/
sendlib.c
diff --git
a/sendlib.c
b/sendlib.c
index
669140d
..
b79d3c1
100644
(file)
--- a/
sendlib.c
+++ b/
sendlib.c
@@
-10,7
+10,6
@@
#include <lib-lib/lib-lib.h>
#include <signal.h>
#include <lib-lib/lib-lib.h>
#include <signal.h>
-#include <sys/utsname.h>
#include <lib-lua/lib-lua.h>
#include <lib-sys/exit.h>
#include <lib-lua/lib-lua.h>
#include <lib-sys/exit.h>
@@
-19,19
+18,15
@@
#include <lib-ui/curses.h>
#include <lib-mx/mx.h>
#include <lib-ui/curses.h>
#include <lib-mx/mx.h>
-#include <lib-crypt/crypt.h>
-
#include "mutt.h"
#include "handler.h"
#include "mutt.h"
#include "handler.h"
+#include "crypt.h"
#include "recvattach.h"
#include "copy.h"
#include "pager.h"
#include "charset.h"
#include "mutt_idna.h"
#include "recvattach.h"
#include "copy.h"
#include "pager.h"
#include "charset.h"
#include "mutt_idna.h"
-
-#ifdef USE_LIBESMTP
-# include "mutt_libesmtp.h"
-#endif /* USE_LIBESMTP */
+#include "send_smtp.h"
#ifdef USE_NNTP
#include <nntp/nntp.h>
#ifdef USE_NNTP
#include <nntp/nntp.h>
@@
-1111,8
+1106,6
@@
BODY *mutt_make_message_attach (CONTEXT * ctx, HEADER * hdr, int attach_msg)
if ((option (OPTMIMEFORWDECODE) || option (OPTFORWDECRYPT)) &&
(hdr->security & ENCRYPT)) {
if ((option (OPTMIMEFORWDECODE) || option (OPTFORWDECRYPT)) &&
(hdr->security & ENCRYPT)) {
- if (!crypt_valid_passphrase (hdr->security))
- return (NULL);
}
fp = m_tempfile(buffer, sizeof(buffer), NONULL(MCore.tmpdir), NULL);
}
fp = m_tempfile(buffer, sizeof(buffer), NONULL(MCore.tmpdir), NULL);
@@
-1498,16
+1491,12
@@
int mutt_write_rfc822_header (FILE * fp, ENVELOPE * env, BODY * attach,
}
if (mode == 0 && !privacy && option (OPTXMAILER) && !has_agent) {
}
if (mode == 0 && !privacy && option (OPTXMAILER) && !has_agent) {
- const char *os;
-
- if (OperatingSystem != NULL) {
- os = OperatingSystem;
+ if (MCore.operating_system) {
+ fprintf(fp, "User-Agent: %s (%s)\n", mutt_make_version(),
+ MCore.operating_system);
} else {
} else {
- struct utsname un;
- os = (uname(&un) == -1) ? "UNIX" : un.sysname;
+ fprintf(fp, "User-Agent: %s\n", mutt_make_version());
}
}
- /* Add a vanity header */
- fprintf (fp, "User-Agent: %s (%s)\n", mutt_make_version(), os);
}
return (ferror (fp) == 0 ? 0 : -1);
}
return (ferror (fp) == 0 ? 0 : -1);
@@
-1539,22
+1528,22
@@
static void encode_headers (string_list_t * h)
}
}
}
}
-const char *mutt_fqdn
(short may_hide_host)
+const char *mutt_fqdn(short may_hide_host)
{
char *p = NULL, *q;
{
char *p = NULL, *q;
- if (
Fqdn && Fqdn
[0] != '@') {
- p =
Fqdn
;
+ if (
MCore.hostname && MCore.hostname
[0] != '@') {
+ p =
MCore.hostname
;
if (may_hide_host && option (OPTHIDDENHOST)) {
if (may_hide_host && option (OPTHIDDENHOST)) {
- if ((p = strchr
(Fqdn
, '.')))
+ if ((p = strchr
(MCore.hostname
, '.')))
p++;
/* sanity check: don't hide the host if
the fqdn is something like detebe.org. */
p++;
/* sanity check: don't hide the host if
the fqdn is something like detebe.org. */
- if (!p || !(q = strchr
(p, '.')))
- p =
Fqdn
;
+ if (!p || !(q = strchr(p, '.')))
+ p =
MCore.hostname
;
}
}
}
}
@@
-1657,7
+1646,7
@@
static char *mutt_gen_msgid (void)
const char *fqdn;
if (!(fqdn = mutt_fqdn(0)))
const char *fqdn;
if (!(fqdn = mutt_fqdn(0)))
- fqdn = NONULL(
Hostname
);
+ fqdn = NONULL(
MCore.shorthost
);
mutt_gen_localpart(localpart, sizeof(localpart), MsgIdFormat);
snprintf(buf, sizeof(buf), "<%s@%s>", localpart, fqdn);
mutt_gen_localpart(localpart, sizeof(localpart), MsgIdFormat);
snprintf(buf, sizeof(buf), "<%s@%s>", localpart, fqdn);
@@
-1918,8
+1907,7
@@
static int mutt_invoke_sendmail (address_t * from, /* the sender */
struct stat st;
if (!stat(childout, &st) && st.st_size > 0)
struct stat st;
if (!stat(childout, &st) && st.st_size > 0)
- mutt_do_pager(_("Output of the delivery process"), childout, 0,
- NULL);
+ mutt_pager(_("Output of the delivery process"), childout, 0, NULL);
}
}
} else {
}
}
} else {
@@
-1949,7
+1937,7
@@
int mutt_invoke_mta (address_t * from, /* the sender */
if (!option (OPTNEWSSEND))
#endif
if (SmtpHost)
if (!option (OPTNEWSSEND))
#endif
if (SmtpHost)
- return
mutt_libe
smtp_invoke (from, to, cc, bcc, msg, eightbit);
+ return
send_
smtp_invoke (from, to, cc, bcc, msg, eightbit);
#endif
return mutt_invoke_sendmail (from, to, cc, bcc, msg, eightbit);
#endif
return mutt_invoke_sendmail (from, to, cc, bcc, msg, eightbit);
@@
-1985,12
+1973,7
@@
void mutt_prepare_envelope (ENVELOPE * env, int final)
rfc2047_encode_adrlist(env->reply_to, "Reply-To");
if (env->subject)
rfc2047_encode_adrlist(env->reply_to, "Reply-To");
if (env->subject)
-#ifdef USE_NNTP
- if (!option (OPTNEWSSEND) || option (OPTMIMESUBJECT))
-#endif
- {
- rfc2047_encode_string (&env->subject);
- }
+ rfc2047_encode_string (&env->subject);
encode_headers (env->userhdrs);
}
encode_headers (env->userhdrs);
}