+2005-09-14 02:45:44 Brendan Cully <brendan@kublai.com> (brendan)
+
+ * globals.h, init.h, sendlib.c: Add new $envelope_from_address
+ variable for manually specifying the envelope sender. Rename (with
+ compatibility synonym) $envelope_from to $use_envelope_from. Make
+ $envelope_from subordinate to $use_e_f, as $from is to $use_from.
+
+2005-09-13 20:36:17 Brendan Cully <brendan@kublai.com> (brendan)
+
+ * doc/Makefile.in: Put chunked HTML manual in top doc directory
+ instead of HTML subdirectory. Solves a weird $distdir
+ absolute/relative path nuisance.
+
+2005-09-12 06:22:21 Brendan Cully <brendan@kublai.com> (brendan)
+
+ * curs_lib.c, pop.c, pop.h, pop_lib.c: Teach pop driver about
+ mutt_progress_bar. Allow progress bar to omit total size if zero
+ (=unknown).
+
2005-09-10 18:47:17 TAKAHASHI Tamotsu <ttakah@lapis.plala.or.jp> (brendan)
* menu.c: Correct some inconsistencies introduced by
the necessary keywords to look them up in the manual, ChangeLog or other
sources of information.
+2005-09-14:
+
+ The $smtp_envelope_from variable has been removed in favor of the
+ general $envelope_from_address.
+
+ The $envelope_from option has been renamed to $use_envelope_from.
+
2005-09-07:
SASL 1.x support has been removed.
if (!NetInc)
mutt_message (progress->msg);
else {
- mutt_pretty_size (progress->sizestr, sizeof (progress->sizestr),
- progress->size);
+ if (progress->size)
+ mutt_pretty_size (progress->sizestr, sizeof (progress->sizestr),
+ progress->size);
progress->pos = 0;
}
}
progress->pos = pos;
pos = pos / (NetInc << 10) * (NetInc << 10);
mutt_pretty_size (posstr, sizeof (posstr), pos);
- mutt_message ("%s %s/%s", progress->msg, posstr, progress->sizestr);
+ if (progress->size)
+ mutt_message ("%s %s/%s", progress->msg, posstr, progress->sizestr);
+ else
+ mutt_message ("%s %s", progress->msg, posstr);
}
}
#endif
WHERE char *MuttDotlock;
#endif
+WHERE ADDRESS *EnvFrom;
WHERE ADDRESS *From;
WHERE char *AliasFile;
#if defined(USE_LIBESMTP)
WHERE char *SmtpAuthUser;
WHERE char *SmtpAuthPass;
-WHERE char *SmtpEnvFrom;
WHERE char *SmtpHost;
WHERE unsigned short SmtpPort;
WHERE char *SmtpUseTLS;
** you must take care of space-stuffing <tt/From / lines (with a trailing
** space) yourself.
*/
- {"envelope_from", DT_BOOL, R_NONE, OPTENVFROM, "no" },
+ {"envelope_from", DT_SYN, R_NONE, UL "use_envelope_from", 0 },
+ {"use_envelope_from", DT_BOOL, R_NONE, OPTENVFROM, "no" },
/*
** .pp
- ** When \fIset\fP, Mutt-ng will try to derive the message's \fIenvelope\fP
- ** sender from the ``\fTFrom:\fP'' header field. Note that this information is passed
- ** to the sendmail command using the ``\fT-f\fP" command line switch, so don't set this
- ** option if you are using that switch in $$sendmail yourself,
- ** or if the sendmail on your machine doesn't support that command
- ** line switch.
+ ** When \fIset\fP, mutt-ng will use ``$$envelope_from_address'' as the
+ ** \fIenvelope\fP sender if that is set, otherwise it will attempt to
+ ** derive it from the "From:" header.
+ **
+ ** .pp
+ ** \fBNote:\fP This information is passed
+ ** to sendmail command using the "-f" command line switch and
+ ** passed to the SMTP server for libESMTP (if support is compiled in).
*/
+ {"envelope_from_address", DT_ADDR, R_NONE, UL &EnvFrom, "" },
+ /*
+ ** Manually sets the \fIenvelope\fP sender for outgoing messages.
+ ** This value is ignored if ``$$use_envelope_from'' is unset.
+ */
{"escape", DT_STR, R_NONE, UL &EscChar, "~"},
/*
** .pp
** presents a security risk since the superuser of your machine may read it
** regardless of the file's permissions.
*/
- {"smtp_envelope", DT_STR, R_NONE, UL &SmtpEnvFrom, "" },
- /*
- ** .pp
- ** Availability: SMTP
- **
- ** .pp
- ** If this variable is non-empty, it'll be used as the envelope sender. If it's empty
- ** (the default), the value of the regular \fTFrom:\fP header will be used.
- **
- ** .pp
- ** This may be necessary as some providers don't allow for arbitrary values
- ** as the envelope sender but only a particular one which may not be the same as the
- ** user's desired \fTFrom:\fP header.
- */
+ {"smtp_envelope", DT_SYN, R_NONE, UL "envelope_from_address", 0 },
+
{"smtp_host", DT_STR, R_NONE, UL &SmtpHost, "" },
/*
** .pp
SMTPFAIL ("smtp_add_message");
/* Initialize envelope sender */
- if (SmtpEnvFrom && *SmtpEnvFrom)
- envfrom = SmtpEnvFrom;
+ if (option (OPTENVFROM) && EnvFrom)
+ envfrom = EnvFrom->mailbox;
if (!smtp_set_reverse_path (message, envfrom))
SMTPFAIL ("smtp_set_reverse_path");
#include "mx.h"
#include "pop.h"
#include "mutt_crypt.h"
+#include "mutt_curses.h"
#include "lib/mem.h"
#include "lib/str.h"
void *uidl;
char buf[LONG_STRING];
char path[_POSIX_PATH_MAX];
- char *m = _("Fetching message...");
+ progress_t bar;
POP_DATA *pop_data = (POP_DATA *) ctx->data;
POP_CACHE *cache;
HEADER *h = ctx->hdrs[msgno];
return -1;
}
- mutt_message (m);
+ bar.size = h->content->length + h->content->offset - 1;
+ bar.msg = _("Fetching message...");
+ mutt_progress_bar (&bar, 0);
mutt_mktemp (path);
msg->fp = safe_fopen (path, "w+");
snprintf (buf, sizeof (buf), "RETR %d\r\n", h->refno);
- ret = pop_fetch_data (pop_data, buf, m, fetch_message, msg->fp);
+ ret = pop_fetch_data (pop_data, buf, &bar, fetch_message, msg->fp);
if (ret == PQ_OK)
break;
#include "mx.h"
#include "mutt_socket.h"
+#include "mutt_curses.h"
#define POP_PORT 110
#define POP_SSL_PORT 995
int pop_connect (POP_DATA *);
pop_query_status pop_open_connection (POP_DATA *);
pop_query_status pop_query_d (POP_DATA *, char *, size_t, char *);
-pop_query_status pop_fetch_data (POP_DATA *, char *, char *, int (*funct) (char *, void *),
+pop_query_status pop_fetch_data (POP_DATA *, char *, progress_t*, int (*funct) (char *, void *),
void *);
pop_query_status pop_reconnect (CONTEXT *);
void pop_logout (CONTEXT *);
* -2 - invalid command or execution error,
* -3 - error in funct(*line, *data)
*/
-pop_query_status pop_fetch_data (POP_DATA * pop_data, char *query, char *msg,
+pop_query_status pop_fetch_data (POP_DATA * pop_data, char *query, progress_t* bar,
int (*funct) (char *, void *), void *data)
{
char buf[LONG_STRING];
char *inbuf;
char *p;
pop_query_status ret;
- int chunk, line = 0;
+ int chunk = 0;
+ long pos = 0;
size_t lenbuf = 0;
strfcpy (buf, query, sizeof (buf));
}
strfcpy (inbuf + lenbuf, p, sizeof (buf));
+ pos += chunk;
if (chunk >= sizeof (buf)) {
lenbuf += strlen (p);
}
else {
- line++;
- if (msg && ReadInc && (line % ReadInc == 0))
- mutt_message ("%s %d", msg, line);
+ if (bar)
+ mutt_progress_bar (bar, pos);
if (ret == 0 && funct (inbuf, data) < 0)
ret = PFD_FUNCT_ERROR;
lenbuf = 0;
{
pop_query_status ret;
POP_DATA *pop_data = (POP_DATA *) ctx->data;
+ progress_t bar;
if (pop_data->status == POP_CONNECTED)
return PQ_OK;
ret = pop_open_connection (pop_data);
if (ret == PQ_OK) {
- char *msg = _("Verifying message indexes...");
int i;
+ bar.msg = _("Verifying message indexes...");
+ bar.size = 0;
+ mutt_progress_bar (&bar, 0);
+
for (i = 0; i < ctx->msgcount; i++)
ctx->hdrs[i]->refno = -1;
- mutt_message (msg);
-
- ret = pop_fetch_data (pop_data, "UIDL\r\n", msg, check_uidl, ctx);
+ ret = pop_fetch_data (pop_data, "UIDL\r\n", &bar, check_uidl, ctx);
if (ret == PQ_ERR) {
mutt_error ("%s", pop_data->err_msg);
mutt_sleep (2);
if (eightbit && option (OPTUSE8BITMIME))
args = add_option (args, &argslen, &argsmax, "-B8BITMIME");
- if (option (OPTENVFROM) && from && !from->next) {
- args = add_option (args, &argslen, &argsmax, "-f");
- args = add_args (args, &argslen, &argsmax, from);
+ if (option (OPTENVFROM)) {
+ ADDRESS *f = NULL;
+ if (EnvFrom)
+ f = EnvFrom;
+ else if (from && !from->next)
+ f = from;
+ if (f) {
+ args = add_option (args, &argslen, &argsmax, "-f");
+ args = add_args (args, &argslen, &argsmax, f);
+ }
}
if (DsnNotify) {
args = add_option (args, &argslen, &argsmax, "-N");