I have a different box running exim+courier, and decided on my Gentoo
box to try using Courier only.
Somewhat painful, but ok. The gentoo install needed a fair amount of
tweaking and creation of extra directories, etc to work right, but now
I'm (almost) victorious...
...except for smarthosting. This is a family server (ok, basically
it's just for me), so I want local mail delivered locally and
everything else sent through my ISP's mail server. Good so far (it
really is; I love the webadmin/webmail interfaces, etc).
But the smarthosting doesn't work, because Courier is correctly
setting my server ID; here's what my ISP's relay says:
Your message to the following recipients cannot be delivered:
>>> MAIL FROM:<me@myserver> BODY=7BIT SIZE=641
<<< 553 myserver.isp.net does not exist
(where "target@ip_address" is the To: address, "mail.myisp.net" is my
ISP's mailserver, and "myserver.isp.net" is my ISP's best guess at
what my machine might be, which of course doesn't exist in DNS).
...when I was using sendmail, I think I remember a "masquerade_as"
ability. In the Exim configuration files that I'm using, I don't see
anything at all that looks like a masquerade, yet it's working.
Now, I was able to send an email from the command line (well, from
mutt) to an outside address by setting the MAILHOST environment
variable to a real mail host (my external mail host, not part of the
But I'd rather have this set in courier proper, so that I don't need
to configure all my external mail programs. And yet I'd still like to
maintain the convention that emailing "user" will go to user@myserver
while "user@ip_address" will go through the smarthost.
What's the combination of configuration variables necessary here?