[Pkg-exim4-users] relaying not working, temporarily?
Ross Boylan
RossBoylan at stanfordalumni.org
Mon Nov 19 20:21:57 UTC 2012
Running exim4-daemon-heavy 4.69-9+lenny4 to use a smarthost, initially
update-exim4.conf.conf had
dc_relay_nets=''.
I edited the file so that it was
dc_relay_nets='127.0.0.1 : ::1 : 192.168.0.0/16'
and ran update-exim4.conf and then /etc/init.d/exim4 reload
But relays were still rejected:
2012-11-19 11:02:34 H=htpc.local (htpc.betterworld.us) [192.168.40.62] F=<RossBoylan at stanfordalumni.org> rejected RCPT <submit at bugs.debian.org>: relay not permitted
2012-11-19 11:02:34 H=htpc.local (htpc.betterworld.us) [192.168.40.62] F=<RossBoylan at stanfordalumni.org> rejected RCPT <RossBoylan at stanfordalumni.org>: relay not permitted
2012-11-19 11:02:35 H=htpc.local (htpc.betterworld.us) [192.168.40.62] F=<> rejected RCPT <RossBoylan at stanfordalumni.org>: relay not permitted
Then, later, it seemed to be working. Does reload not affect the ACL's,
or at least not for awhile? I don't think I've done
an /etc/init.d/exim4 restart since altering the config.
Is my theory about reload not affecting ACLs correct? What else could
be going on?
One suspicion: my test run of exim, since from scratch, picked up the
new config even though the daemon didn't know about it
Thanks.
Ross Boylan
Gory details, all of which seem to indicate relaying is fine:
I checked /var/lib/exim4/config.autogenerated and found
.ifndef MAIN_RELAY_NETS
MAIN_RELAY_NETS=127.0.0.1 : ::1 : 192.168.0.0/16 : 127.0.0.1 : ::::1
.endif
(so obviously I didn't need to specify the first 2 IPs).
....
hostlist relay_from_hosts = MAIN_RELAY_NETS
....
accept
hosts = +relay_from_hosts
control = submission/sender_retain
accept
authenticated = *
control = submission/sender_retain
require
message = relay not permitted
domains = +local_domains : +relay_to_domains
Then I tested using exim -d -bh 192.168.40.62. It produced this message along the way
DNS lookup of 62.40.168.192.in-addr.arpa (PTR) gave HOST_NOT_FOUND
(I haven't been able to get dynamic dns updates working), but eventually
processing "accept"
check hosts = +relay_from_hosts
host in "127.0.0.1 : ::1 : 192.168.0.0/16 : 127.0.0.1 : ::::1"? yes (matched "192.168.0.0/16")
host in "+relay_from_hosts"? yes (matched "+relay_from_hosts")
check control = submission/sender_retain
accept: condition test succeeded
Then I tried sending another message from the 40.62 host and it
succeeded. The one that failed was from reportbug, while the one that
succeeded was a mutt message to myself.
More information about the Pkg-exim4-users
mailing list