Gnus development mailing list
 help / color / mirror / Atom feed
From: Ted Zlatanov <tzz@lifelogs.com>
To: ding@gnus.org
Cc: emacs-devel@gnu.org
Subject: Re: Outgoing mail defaults
Date: Thu, 17 Mar 2011 14:35:46 -0500	[thread overview]
Message-ID: <87bp19v8tp.fsf@lifelogs.com> (raw)
In-Reply-To: <m3ei65sikt.fsf@quimbies.gnus.org>

On Thu, 17 Mar 2011 19:33:22 +0100 Lars Magne Ingebrigtsen <larsi@gnus.org> wrote: 

LMI> Ted Zlatanov <tzz@lifelogs.com> writes:
LMI> machine smtp.gmail.com port smtp
>> 
>> Right, it would be the first SMTP host found or none if they don't have
>> one.  I think that's the right thing either way for most new cases.

LMI> The complicating factor here is that auth-source writes to
LMI> ~/.authinfo.gpg by default, which probably isn't appropriate if you just
LMI> want to store the SMTP server name.  Hm.  Perhaps auth-source could
LMI> write to ~/.authinfo if there's nothing secret in the credentials? 

LMI> But then it'd have to move stuff from ~/.authinfo to ~/.authinfo.gpg if
LMI> the user later is prompted for a password from the SMTP server.

Why isn't it appropriate to encrypt authentication tokens and connection
parameters by default?  All we need to "bootstrap" `auth-source-search'
is the port in this case and we can add the server to the query if the
user specifies it:

(let* ((auth-source-creation-prompts
        '((user  . "SMTP user at %h: ")
          (host . "SMTP host: ")
          (port . "SMTP port (25 or 993 or smtp typically): ")
          (secret . "SMTP password for %u@%h: ")))
       (search '(:max 1 :create t
                      :require '(:user :host :secret :foo)
                      :port '("smtp" "25" "993")))
       (search (if smtpmail-server
                   (append search (list :host smtpmail-server))
                 search))
       (cred (nth 0 (apply 'auth-source-search search)))
       (saver (plist-get cred :save-function))
       (host (plist-get cred :host))
       (user (plist-get cred :user))
       (secret (plist-get cred :secret))
       (secret (if (functionp secret)
                   (funcall secret)
                 secret)))
  (when (debug user host secret) ; do connection here
    (funcall saver))) ; save result if the entry worked (does nothing if the entry is not newly created)

LMI> Sounds overly complicated.  :-)

Compared to doing the same setup in Customize it's not much more,
especially since choosing the auth-source backend is a one-time task.

But you can prepend the step where we configure smtpmail-server by some
external means, like a defcustom.

On Thu, 17 Mar 2011 15:02:08 -0400 David Reitter <david.reitter@gmail.com> wrote: 

DR> On Mar 17, 2011, at 1:43 PM, Lars Magne Ingebrigtsen wrote:

>> And the open SMTP server could also listen on an alternative port to
>> avoid firewall issues slightly more.

DR> Making it listen on port 80 would be easier than installing a
DR> server-side script taking a POST request on port 80.

Most firewalls will do packet inspection so this is not as useful as it
used to be.  It sucks but it's what people consider "normal" security I
guess...

DR> OTOH, Ted's suggestion about the hashcash seems very attractive,
DR> especially if the SMTP server would forward bug reports to other
DR> packages in the process.

Yay! :)

Ted




  reply	other threads:[~2011-03-17 19:35 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-17 17:04 Lars Magne Ingebrigtsen
2011-03-17 17:17 ` Ted Zlatanov
2011-03-17 17:31   ` Lars Magne Ingebrigtsen
2011-03-17 18:18     ` Ted Zlatanov
2011-03-17 18:33       ` Lars Magne Ingebrigtsen
2011-03-17 19:35         ` Ted Zlatanov [this message]
2011-03-17 17:25 ` David Reitter
2011-03-17 17:43   ` Lars Magne Ingebrigtsen
2011-03-17 18:22     ` Ted Zlatanov
2011-03-18 14:10       ` John Sullivan
2011-03-17 19:02     ` David Reitter
2011-03-17 22:27       ` chad
2011-03-18  2:38         ` Ted Zlatanov
2011-03-18  4:17           ` chad
2011-03-21 19:46           ` Adam Sjøgren
2011-03-21 19:50             ` Ted Zlatanov
2011-03-17 20:23 ` James Cloos
2011-03-17 20:30   ` Lars Magne Ingebrigtsen
2011-03-17 20:35     ` James Cloos
     [not found] ` <87d3ln9b7y.fsf@stupidchicken.com>
2011-03-20  1:41   ` Ted Zlatanov
2011-03-20  3:06     ` Stefan Monnier
2011-03-20 12:20       ` Ted Zlatanov
2011-03-21 14:20         ` Stefan Monnier
2011-03-21 19:42           ` Ted Zlatanov
2011-03-21 22:14             ` Stefan Monnier
2011-03-22  2:01               ` Ted Zlatanov
2011-03-29 19:22     ` Lars Magne Ingebrigtsen
2011-03-29 19:34       ` Application resource storage (was: Outgoing mail defaults) Lars Magne Ingebrigtsen
2011-03-29 19:58         ` Application resource storage Ted Zlatanov
2011-03-29 20:14           ` Lars Magne Ingebrigtsen
2011-03-29 21:02             ` Ted Zlatanov
2011-03-29 20:51           ` chad
2011-03-22 11:26 ` Outgoing mail defaults Simon Josefsson
2011-04-16 16:45 ` Lars Magne Ingebrigtsen
2011-04-16 16:47   ` Lars Magne Ingebrigtsen
2011-04-16 16:51   ` Ted Zlatanov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bp19v8tp.fsf@lifelogs.com \
    --to=tzz@lifelogs.com \
    --cc=ding@gnus.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).