[exim] More struggles with Exchange

Top Page
Delete this message
Reply to this message
Author: Norman Walsh
Date:  
To: exim-users
Subject: [exim] More struggles with Exchange
Hello again,

Some of you may recall that I posted a couple of months ago. I'm using
Exim as a local MTA, sending mail through employer.com for mail to
*.employer.com and through outbound.mailhop.com for everyone else.

Works fine, but the external SMTP server I've been using is being
phased out by my employer.

Initially, I wanted to attack this problem by setting up an SSH
connection to the exchange server behind the firewall and talk to
that. Which, with your help (thank you), I was able to do.

Unfortunately, I get weird TLS errors:

2014-08-15 11:50:10 1XIKhZ-0001cv-0Q TLS error on connection to
exchange.employer.com [172.18.1.141] (recv): A TLS packet with
unexpected length was received.

I'm using the same TLS certificates that work on the server that's
being phased out. I'm not qualified to say whether this is a simple
case of user error (do I need different certs or something?) or
something deeper.

It turns out that there will still be deficiencies even if I get that
to work, because of configuration issues outside of my control. (Don't
ask.)

I decided instead to try DavMail which functions as an SMTP->OWA
gateway.

The good news is that it seems to work just fine and corporate IT will
think I'm using OWA so they'll be content.

There's a rub, however. And I don't know if this is fixable or not.

Regardless of whether I'm sending mail as my "work persona" or my
"personal persona", Exim routes mail to *.employer.com through the
DavMail gateway. But if my "from" address is not my work persona,
Exchange rejects the mail (not unreasonably, I suppose).

I can see two options that would fix this problem (well, two that are
within my control):

1. If the mail is being routed through localhost to the gateway,
rewrite the From: address to be my employer address. If the message
was going to several people, I wouldn't want the rewrite to happen
for the non-employer.com recipients.

2. If the mail is not being sent from my employer address, don't
use the gateway, use my default router (outbound.mailhop.com).

After a few minutes thought, I think option 2 is probably the better
answer.

Are either of those things possible?

For reference, here are the router and transport configs I'm using:

# mail for employer addresses
employer:
debug_print = "R: employer for $local_part@$domain"
driver = manualroute
transport = remote_smtp_employer
route_list = *employer.com localhost
self = send

remote_smtp_employer:
debug_print = "T: remote_smtp_employer for $local_part@$domain"
driver = smtp
port = 1025
hosts_require_auth = localhost

                                        Be seeing you,
                                          norm


-- 
Norman Walsh <ndw@???> | Art is not a mirror held up to reality
http://nwalsh.com/            | but a hammer with which to shape
                              | it.--Bertold Brecht