projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
move more stuff to the lua bindings.
[apps/madmutt.git]
/
sendlib.c
diff --git
a/sendlib.c
b/sendlib.c
index
ed4bbb9
..
838b850
100644
(file)
--- a/
sendlib.c
+++ b/
sendlib.c
@@
-829,7
+829,7
@@
int mutt_lookup_mime_type (BODY * att, const char *path)
*/
switch (count) {
case 0:
*/
switch (count) {
case 0:
- snprintf
(buf, sizeof (buf), "%s/.mime.types", NONULL (H
omedir));
+ snprintf
(buf, sizeof (buf), "%s/.mime.types", NONULL(MCore.h
omedir));
break;
case 1:
m_strcpy(buf, sizeof(buf), SYSCONFDIR "/madmutt-mime.types");
break;
case 1:
m_strcpy(buf, sizeof(buf), SYSCONFDIR "/madmutt-mime.types");
@@
-925,7
+925,7
@@
void mutt_message_to_7bit (BODY * a, FILE * fp)
a->length = sb.st_size;
}
a->length = sb.st_size;
}
- fpout = m_tempfile(temp, sizeof(temp), NONULL(
Te
mpdir), NULL);
+ fpout = m_tempfile(temp, sizeof(temp), NONULL(
MCore.t
mpdir), NULL);
if (!fpout) {
mutt_error(_("Could not create temporary file"));
goto cleanup;
if (!fpout) {
mutt_error(_("Could not create temporary file"));
goto cleanup;
@@
-990,7
+990,7
@@
static void transform_to_7bit (BODY * a, FILE * fpin)
a->noconv = 1;
a->force_charset = 1;
a->noconv = 1;
a->force_charset = 1;
- s.fpout = m_tempfile(buff, sizeof(buff), NONULL(
Te
mpdir), NULL);
+ s.fpout = m_tempfile(buff, sizeof(buff), NONULL(
MCore.t
mpdir), NULL);
if (!s.fpout) {
mutt_error(_("Could not create temporary file"));
return;
if (!s.fpout) {
mutt_error(_("Could not create temporary file"));
return;
@@
-1114,7
+1114,7
@@
BODY *mutt_make_message_attach (CONTEXT * ctx, HEADER * hdr, int attach_msg)
return (NULL);
}
return (NULL);
}
- fp = m_tempfile(buffer, sizeof(buffer), NONULL(
Te
mpdir), NULL);
+ fp = m_tempfile(buffer, sizeof(buffer), NONULL(
MCore.t
mpdir), NULL);
if (!fp)
return NULL;
if (!fp)
return NULL;
@@
-1689,7
+1689,7
@@
send_msg(const char *path, const char **args, const char *msg, char **tempfile)
sigaddset (&set, SIGTSTP);
sigprocmask (SIG_BLOCK, &set, NULL);
sigaddset (&set, SIGTSTP);
sigprocmask (SIG_BLOCK, &set, NULL);
- if (
SendmailW
ait >= 0) {
+ if (
MTransport.sendmail_w
ait >= 0) {
char tmp[_POSIX_PATH_MAX];
mutt_mktemp (tmp);
char tmp[_POSIX_PATH_MAX];
mutt_mktemp (tmp);
@@
-1720,7
+1720,7
@@
send_msg(const char *path, const char **args, const char *msg, char **tempfile)
}
unlink (msg);
}
unlink (msg);
- if (
SendmailW
ait >= 0) {
+ if (
MTransport.sendmail_w
ait >= 0) {
/* *tempfile will be opened as stdout */
if (open (*tempfile, O_WRONLY | O_APPEND | O_CREAT | O_EXCL, 0600) <
0)
/* *tempfile will be opened as stdout */
if (open (*tempfile, O_WRONLY | O_APPEND | O_CREAT | O_EXCL, 0600) <
0)
@@
-1744,11
+1744,11
@@
send_msg(const char *path, const char **args, const char *msg, char **tempfile)
_exit (S_ERR);
}
_exit (S_ERR);
}
- /*
SendmailWait > 0: interrupt waitpid() after SendmailW
ait seconds
- *
SendmailW
ait = 0: wait forever
- *
SendmailW
ait < 0: don't wait
+ /*
sendmail_wait > 0: interrupt waitpid() after sendmail_w
ait seconds
+ *
sendmail_w
ait = 0: wait forever
+ *
sendmail_w
ait < 0: don't wait
*/
*/
- if (
SendmailW
ait > 0) {
+ if (
MTransport.sendmail_w
ait > 0) {
SigAlrm = 0;
act.sa_handler = alarm_handler;
#ifdef SA_INTERRUPT
SigAlrm = 0;
act.sa_handler = alarm_handler;
#ifdef SA_INTERRUPT
@@
-1759,20
+1759,20
@@
send_msg(const char *path, const char **args, const char *msg, char **tempfile)
#endif
sigemptyset (&act.sa_mask);
sigaction (SIGALRM, &act, &oldalrm);
#endif
sigemptyset (&act.sa_mask);
sigaction (SIGALRM, &act, &oldalrm);
- alarm (
SendmailW
ait);
+ alarm (
MTransport.sendmail_w
ait);
}
}
- else if (
SendmailW
ait < 0)
+ else if (
MTransport.sendmail_w
ait < 0)
_exit (0xff & EX_OK);
if (waitpid (pid, &st, 0) > 0) {
st = WIFEXITED (st) ? WEXITSTATUS (st) : S_ERR;
_exit (0xff & EX_OK);
if (waitpid (pid, &st, 0) > 0) {
st = WIFEXITED (st) ? WEXITSTATUS (st) : S_ERR;
- if (
SendmailW
ait && st == (0xff & EX_OK)) {
+ if (
MTransport.sendmail_w
ait && st == (0xff & EX_OK)) {
unlink (*tempfile); /* no longer needed */
p_delete(tempfile);
}
} else {
unlink (*tempfile); /* no longer needed */
p_delete(tempfile);
}
} else {
- st = (
SendmailW
ait > 0 && errno == EINTR && SigAlrm) ? S_BKG : S_ERR;
- if (
SendmailW
ait > 0) {
+ st = (
MTransport.sendmail_w
ait > 0 && errno == EINTR && SigAlrm) ? S_BKG : S_ERR;
+ if (
MTransport.sendmail_w
ait > 0) {
unlink (*tempfile);
p_delete(tempfile);
}
unlink (*tempfile);
p_delete(tempfile);
}
@@
-1849,7
+1849,7
@@
static int mutt_invoke_sendmail (address_t * from, /* the sender */
} else
#endif
{
} else
#endif
{
- m_strcpy(cmd, sizeof(cmd),
ml_core
.sendmail);
+ m_strcpy(cmd, sizeof(cmd),
MTransport
.sendmail);
}
ps = cmd;
}
ps = cmd;
@@
-1876,27
+1876,25
@@
static int mutt_invoke_sendmail (address_t * from, /* the sender */
#ifdef USE_NNTP
if (!option (OPTNEWSSEND)) {
#endif
#ifdef USE_NNTP
if (!option (OPTNEWSSEND)) {
#endif
- if (eightbit &&
option (OPTUSE8BITMIME)
)
+ if (eightbit &&
MTransport.use_8bitmime
)
args = add_option(args, &argslen, &argsmax, "-B8BITMIME");
args = add_option(args, &argslen, &argsmax, "-B8BITMIME");
- if (option (OPTENVFROM)) {
- address_t *f = EnvFrom;
- if (EnvFrom)
- f = EnvFrom;
- else if (from && !from->next)
+ if (MTransport.use_envelope_from) {
+ address_t *f = MTransport.envelope_from_address;
+ if (!f && from && !from->next)
f = from;
if (f) {
args = add_option (args, &argslen, &argsmax, "-f");
args = add_args (args, &argslen, &argsmax, f);
}
}
f = from;
if (f) {
args = add_option (args, &argslen, &argsmax, "-f");
args = add_args (args, &argslen, &argsmax, f);
}
}
- if (
DsnN
otify) {
+ if (
MTransport.dsn_n
otify) {
args = add_option (args, &argslen, &argsmax, "-N");
args = add_option (args, &argslen, &argsmax, "-N");
- args = add_option (args, &argslen, &argsmax,
DsnN
otify);
+ args = add_option (args, &argslen, &argsmax,
MTransport.dsn_n
otify);
}
}
- if (
DsnR
eturn) {
+ if (
MTransport.dsn_r
eturn) {
args = add_option (args, &argslen, &argsmax, "-R");
args = add_option (args, &argslen, &argsmax, "-R");
- args = add_option (args, &argslen, &argsmax,
DsnR
eturn);
+ args = add_option (args, &argslen, &argsmax,
MTransport.dsn_r
eturn);
}
args = add_option (args, &argslen, &argsmax, "--");
args = add_args (args, &argslen, &argsmax, to);
}
args = add_option (args, &argslen, &argsmax, "--");
args = add_args (args, &argslen, &argsmax, to);
@@
-2038,7
+2036,7
@@
static int _mutt_bounce_message (FILE * fp, HEADER * h, address_t * to,
if (!fp)
fp = msg->fp;
if (!fp)
fp = msg->fp;
- f = m_tempfile(tempfile, sizeof(tempfile), NONULL(
Te
mpdir), NULL);
+ f = m_tempfile(tempfile, sizeof(tempfile), NONULL(
MCore.t
mpdir), NULL);
if (f) {
int ch_flags = CH_XMIT | CH_NONEWLINE | CH_NOQFROM;
if (f) {
int ch_flags = CH_XMIT | CH_NONEWLINE | CH_NOQFROM;
@@
-2128,7
+2126,7
@@
int mutt_write_fcc (const char *path, HEADER * hdr, const char *msgid,
* the message body begins with "From "
*/
if (f.magic == M_MMDF || f.magic == M_MBOX) {
* the message body begins with "From "
*/
if (f.magic == M_MMDF || f.magic == M_MBOX) {
- tempfp = m_tempfile(tempfile, sizeof(tempfile), NONULL(
Te
mpdir), NULL);
+ tempfp = m_tempfile(tempfile, sizeof(tempfile), NONULL(
MCore.t
mpdir), NULL);
if (!tempfp) {
mutt_error(_("Could not create temporary file"));
mx_close_mailbox (&f, NULL);
if (!tempfp) {
mutt_error(_("Could not create temporary file"));
mx_close_mailbox (&f, NULL);