Subject: [sup-talk] multiple accounts

From: [email-masked] (Brian)
Date: Wed, 23 May 2007 03:49:58 -0500

What should config.yaml look like for multiple accounts? I have several
accounts that use different SMTP relays. My plan is to do stuff like
:sendmail: /usr/bin/nbsmtp -c /home/brian/.nbsmtp_brian_lorf_org
in each account, but I don't understand how to make sup use any account
other than :default:.

How do I tell sup to use a certain account when I compose a new message?

---

From: [email-masked] (William Morgan)
Date: Sun, 27 May 2007 20:15:55 -0700

Excerpts from Brian's message of Wed May 23 01:49:58 -0700 2007:
> What should config.yaml look like for multiple accounts? I have
> several accounts that use different SMTP relays. My plan is to do
> stuff like :sendmail: /usr/bin/nbsmtp -c
> /home/brian/.nbsmtp_brian_lorf_org in each account, but I don't
> understand how to make sup use any account other than :default:.

So the status of the multiple account stuff is that I started at one
point, but never got very far, and so basically none of it works, and
stuff that I added after that point (like the ability to send mail) I
just threw at the top level.

But multiple account support is certainly on my todo list. I would like
to be able to specify at least the signature, from line, and sendmail or
SMTP configuration on a per-account basis, and I would like to be able
to explicitly choose the from address on a per-email basis, with
defaults based on the recipient.

Currently this is of fairly high priority for me, so expect it to happen
soonish.

-- 
William <wmorgan-sup at masanjin.net>

---

From: [email-masked] (William Morgan)
Date: Fri, 08 Jun 2007 16:43:59 -0700

> > understand how to make sup use any account other than :default:.

Oh, there actually is a good answer for this. I forgot that the one part
of the multiple accounts stuff that is actually functional is the
sendmail aspect.

For each different account, add an entry under the :accounts: section of
config.yaml, copying the fields from the :default: block. E.g.:

  :account_name:
    :name: A Name
    :signature: /home/whatever/.signature
    :alternates: []
    :email: email at address
    :sendmail: /sendmail/command

So this should be a sibling of the :default: block. The :account_name:
thing should be something unique, but can be anything---it's not used
other than to distinguish them.

Then when you send mail with a From: line set to the primary (or an
alternate) email address of an account, sup will use the corresponding
sendmail command. I just gave it a quick try and it seemed to work, but
test it before accidentally spamming your boss.

The next step will be to be able to select a From address from a list
when composing (so that the right signature can be put in).