Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

mh with multiple external mail accounts (pop3 & smtp)

70 views
Skip to first unread message

tamouse

unread,
Oct 29, 2011, 1:25:34 PM10/29/11
to
Hi, I am new to this group, and haven't seen this issue addressed in
the FAQ. (Please tell me if it is there and I've just missed it.)

I want to use mh-e, specifically, to read and send e-mail to different
mail accounts (e.g. 2 @ gmail, several on my VPS with different users/
domains, etc.). I've seen various setups for gathering the email from
the different servers using fetchmail, and delivering it via postfix
or procmail. What I haven't seen is if there is any way that I can set
up mh or postfix to map the smtp host to use from the pop3 host the
mail came from, after it has been delivered to my mh folders.

Thus, I fetch some mail from one of my gmail accounts from
pop3.gmail.com, for example. It eventually lands in my mh folders
somewhere. Later, I want to reply to that mail. I'd like it to go out
to smtp.gmail.com.

Then, I fetch some mail from one of my vps accounts from
mail.tamaratemple.com, for example. It too winds it's way into an mh
folder somewhere, Again, I'd like to reply to that mail, and I'd like
it to go out to mail.tamaratemple.com.

In both of these scenarios, I'd like to use secure connections, not
plain-text connections.

Any clues where I can start with this?

HASM

unread,
Oct 31, 2011, 8:32:56 PM10/31/11
to
tamouse <tamous...@gmail.com> writes:

> I want to use mh-e, specifically, to read and send e-mail to different
> mail accounts (e.g. 2 @ gmail, several on my VPS with different users/
> domains, etc.).

You may be able to use transport to accomplish this.

-- HASM

Bill Wohler

unread,
Nov 6, 2011, 9:58:02 PM11/6/11
to
Like you, I use fetchmail to grab my email from my various servers and submit it to a local postfix MTA, and procmail to file it. However, I just send it all out to my own (postfix) server using TLS and SASL.

I see how using a specific sending host could be important if you've brought your laptop, for example, in behind a firewall and want to keep your email inside of it.

I'm drawing a blank as to how to do this in MH. I'd probably approach the problem by first figuring out how to send to two different transports manually in MH.

Then you may be able to figure out a way to do it automatically in MH-E using hooks to sniff the Received header fields of your reply-to message to set your outgoing transport (perhaps, in mh-send-args).

I'd also look into identities [1]. Has anyone done any automatic setting of MH-E identities? There's a lot of functionality in the identity code and may be helpful.

1. http://mh-e.sourceforge.net/manual/html/Identities.html#Identities

Mike Kupfer

unread,
Nov 6, 2011, 10:55:04 PM11/6/11
to
Bill Wohler <bill....@gmail.com> writes:

> However, I just send it all out to my own (postfix) server using
> TLS and SASL.

I've been meaning to research how to do this with MH-E/nmh. Got any
pointers?

> Has anyone done any automatic
> setting of MH-E identities?

Yeah, I've got this sexp in my letter-mode hook:

(if (or (string-match "xemacs" (mh-get-header-field "To:"))
(string-match "xemacs" (mh-get-header-field "cc:"))
(string-match "di...@gnus.org" (mh-get-header-field "To:"))
(string-match "di...@gnus.org" (mh-get-header-field "cc:")))
(mh-insert-identity "xemacs"))

mike
--
Mike Kupfer m.ku...@acm.org

tamouse

unread,
Nov 8, 2011, 5:57:03 AM11/8/11
to
On Nov 6, 9:58 pm, Bill Wohler <bill.woh...@gmail.com> wrote:
> Like you, I use fetchmail to grab my email from my various servers and submit it to a local postfix MTA, and procmail to file it. However, I just send it all out to my own (postfix) server using TLS and SASL.

This isn't an option for me, as my external IP is spamblocked by
comcast as they don't want anyone offerring services like smtp from
their consumer accounts.

I did run across something that looks promising, but I haven't sussed
it out yet:

http://www.emacswiki.org/emacs/MH-E#toc5

Which describes how to do what I want using something called msmtp.


HASM

unread,
Nov 9, 2011, 9:52:12 AM11/9/11
to
Bill Wohler <bill....@gmail.com> writes:

> Has anyone done any automatic setting of MH-E identities?

Yup:

I have (something like) this in my configuration files:

(setq mh-identity-list
'(
("identity1" (("From" . "from_address1")))
("identity2" (("From" . "from_address2")))
))

(setq mh-auto-fields-list
'(
;; identity 1
("to_address1a" ((":identity" . "identity1")))
("to_address1b" ((":identity" . "identity1")))
;; identity 2
("to_identity2" ((":identity" . "identity2")("Fcc" . "+folder2")))
))

where "identity1" and "identity2" stand for two identities I create (up to
9 so far), "from_address1" and "from_address2" are my addresses to be used
with "identity1" and "identity2" and "to_address1a", "to_address1b" and
"to_address2" are (partial) matches to addresses I want to use those
identities for.

(I do make a tiny change to mh-comp.el to handle fcc).

-- HASM

HASM

unread,
Nov 9, 2011, 9:57:41 AM11/9/11
to
Bill Wohler <bill....@gmail.com> writes:

> I see how using a specific sending host could be important

As I said in a previous response I use transport to chose between different
postfix relayhosts. One of my transports is google smtp (google apps) but
they have the annoying "feature" of overriding the from address with the
account's main address, thus for customized from addresses I use an
alternate (less reliable and sometimes spam blocked) relay at the (huge)
ISP where I host my domain.

-- HASM

Jon Fairbairn

unread,
Nov 9, 2011, 10:21:52 AM11/9/11
to
tamouse <tam...@gmail.com> writes:

> On Nov 6, 9:58 pm, Bill Wohler <bill.woh...@gmail.com> wrote:
>> Like you, I use fetchmail to grab my email from my various
>> servers and submit it to a local postfix MTA, and procmail to
>> file it. However, I just send it all out to my own (postfix)
>> server using TLS and SASL.
>
> This isn't an option for me, as my external IP is spamblocked by
> comcast as they don't want anyone offerring services like smtp from
> their consumer accounts.

What I do have mh use the exim MTA on my local machine, which is
configured to use ssl connexions to the relevent smarthost for
each separate account, so if I send mail from my ISP provided
email address, it goes out through their smarthost and so on. My
doesn’t accept (doesn’t need to accept) incoming smtp
connexions, and the outgoing ones are not typically to port 22,
so maybe that would work for you?

--
Jón Fairbairn Jon.Fa...@cl.cam.ac.uk

0 new messages