exim: remote host is local host?

I don't know much about email servers and I am having some problems.

I am trying to setup exim to forward emails to another port on the local host for testing purposes. Exim should basically connect to my test smtp server and send an email.

Python Test SMTP server: listens on port 9100, when an email is successfully sent, it prints it to the console. I have tested this by telnetting in and manually sending emails and it works fine

I want exim to relay all sent emails to this test server, which is on a different port on the same machine (localhost:9100).

The problem is, I keep getting the following error messages in my main log:

2010-06-24 22:29:17 1ORs6v-0002MP-Vv <= bill@bill-laptop U=bill P=local S=344 2010-06-24 22:29:18 1ORs6v-0002MP-Vv remote host address is the local host: somehwere.com 2010-06-24 22:29:18 1ORs6v-0002MP-Vv == [email protected] R=smarthost defer (-1): remote host address is the local host

Is there anyway for me to disable this check?


Solution 1:

Exim doesn't, by default, let you send mail back to yourself. You can change this behavior by using the self router option. Here's an example from my config in which I had to use self = send to get Exim to send "slow" mail to another instance on the same host:

stalemail:
  driver = manualroute
  condition = ${if > {$message_age}{900}{yes}{no}}
  self = send
  domains = ! +local_domains
  route_list = * mailhub-01.example.com::8025:mailhub-02.example.com::8025
  transport = remote_smtp