From: Brendan Cully Date: Wed, 11 Apr 2007 20:40:10 +0000 (-0700) Subject: Add $smtp_pass (closes #2116) X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9fe791abe17dd1df1193ed1acf2adb35f35356ae;p=neomutt Add $smtp_pass (closes #2116) --- diff --git a/ChangeLog b/ChangeLog index 5f20190a0..660921db0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,10 @@ -2007-04-11 07:37 -0700 Brendan Cully (29faa739ed01) +2007-04-11 12:53 -0700 Brendan Cully (cdac16f99c5f) + + * doc/Makefile.am: Explicit -j1 breaks some versions of make (see + #2538) + + * imap/util.c: Make imap_hcache_open robust against missing + idata->ctx * imap/util.c: Do not attempt to parse idata->ctx->path if an explicit path is given diff --git a/account.c b/account.c index 99951e25d..ca65754d5 100644 --- a/account.c +++ b/account.c @@ -213,6 +213,10 @@ int mutt_account_getpass (ACCOUNT* account) #ifdef USE_POP else if ((account->type == M_ACCT_TYPE_POP) && PopPass) strfcpy (account->pass, PopPass, sizeof (account->pass)); +#endif +#ifdef USE_SMTP + else if ((account->type == M_ACCT_TYPE_SMTP) && SmtpPass) + strfcpy (account->pass, SmtpPass, sizeof (account->pass)); #endif else { diff --git a/globals.h b/globals.h index c32ec8289..15c0d1404 100644 --- a/globals.h +++ b/globals.h @@ -118,8 +118,9 @@ WHERE char *Shell; WHERE char *Signature; WHERE char *SimpleSearch; #if USE_SMTP -WHERE char *SmtpUrl INITVAL (NULL); WHERE char *SmtpAuthenticators INITVAL (NULL); +WHERE char *SmtpPass INITVAL (NULL); +WHERE char *SmtpUrl INITVAL (NULL); #endif /* USE_SMTP */ WHERE char *Spoolfile; WHERE char *SpamSep; diff --git a/init.h b/init.h index 0801cd1aa..07e96721e 100644 --- a/init.h +++ b/init.h @@ -2559,17 +2559,6 @@ struct option_t MuttVars[] = { ** a value of zero for this option suppresses the pause. */ #ifdef USE_SMTP - { "smtp_url", DT_STR, R_NONE, UL &SmtpUrl, UL 0 }, - /* - ** .pp - ** Defines the SMTP ``smart'' host where sent messages should relayed for - ** delivery. This should take the form of an SMTP URL, eg: - ** .pp - ** smtp[s]://[user[:pass]@]host[:port]/ - ** .pp - ** Setting this variable overrides the value of the ``$$sendmail'' - ** variable. - */ # ifdef USE_SASL { "smtp_authenticators", DT_STR, R_NONE, UL &SmtpAuthenticators, UL 0 }, /* @@ -2585,6 +2574,27 @@ struct option_t MuttVars[] = { ** Example: set smtp_authenticators="digest-md5:cram-md5" */ # endif /* USE_SASL */ + { "smtp_pass", DT_STR, R_NONE, UL &SmtpPass, UL 0 }, + /* + ** .pp + ** Specifies the password for your SMTP account. If \fIunset\fP, Mutt will + ** prompt you for your password when you first send mail via SMTP. + ** See ``$smtp_url'' to configure mutt to send mail via SMTP. + ** \fBWarning\fP: you should only use this option when you are on a + ** fairly secure machine, because the superuser can read your muttrc even + ** if you are the only one who can read the file. + */ + { "smtp_url", DT_STR, R_NONE, UL &SmtpUrl, UL 0 }, + /* + ** .pp + ** Defines the SMTP ``smart'' host where sent messages should relayed for + ** delivery. This should take the form of an SMTP URL, eg: + ** .pp + ** smtp[s]://[user[:pass]@]host[:port]/ + ** .pp + ** Setting this variable overrides the value of the ``$$sendmail'' + ** variable. + */ #endif /* USE_SMTP */ { "sort", DT_SORT, R_INDEX|R_RESORT, UL &Sort, SORT_DATE }, /*