From mboxrd@z Thu Jan 1 00:00:00 1970 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sat, 08 Dec 2007 14:00:01 -0800 Subject: [sup-talk] Email extensions/alternate emails In-Reply-To: <1196423833-sup-2326@tomsk> References: <1196423833-sup-2326@tomsk> Message-ID: <1197150436-sup-2569@south> Hi Marcus, Great questions and sorry for the delay in replying. Excerpts from Marcus Williams's message of Fri Nov 30 04:05:27 -0800 2007: > I've never quite figured out why I'd add alternate emails to my > config/accounts. Last time I used them it appeared that emails coming > into an alternate address used the default email address on that > account to reply with - is this still the case? I believe it was this way for a while, but only because of a bug. The current behavior (reply-mode.rb circa line 144) is a sequence of three steps: 1. First, if the message contains an Envelope-To, X-Original-To, or Delivered-To header (in that order of precedence), the address in that header is used. 2. If not, if any of the addresses in To: or Cc: are an "account address", the DEFAULT address for that account is used. 3. Failing either of those options, the default address of the default account is used. Step #1 is the most important, and I think it should capture what you describe below. But that particular selection and sequence of headers was determinted empirically, by me, so it may need adjustment. So the alternate emails on an account aren't directly useful for replies, since they won't ever be used as a From: unless they happen to have come in on a Delivered-To/Envelope-To/etc header, in which case the fact that they're an alternate email is irrelevant. But they are used to determine when a message is to or cc you (the ">" and "+" widgets you see in thread-index-mode). > I ask because I'm trying to implement support for email extensions > basically an email address like name-someotherid at domain.tld where > -someotherid is the extension. I added an "extensions" config option > that allowed me to add regexes for my extensions. I then extended > account_for to return the correct account given an email that matched > one of these extensions. An excellent idea. There actually was something like that in Sup much earlier, but was the victim of a refactor at some point. > But... what I really wanted sup to do then was what I expected it to > do with alternates, is to reply to an email that came in on one of > these extensions with the same email address, not with the account > email address. Does it not do this in recent SVN checkouts? If not, is there a header like Delivered-To: in the incoming email that contains the address? -- William