[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Why was exim selcted as the default MTA?

Craig Sanders <cas@taz.net.au> writes:

> this isn't an exim issue. it's the anti-spam software on your
> ISP...most ISPs will reject mail from non-existant domains now
> because a) it is highly likely to be spam, and b) if it isn't spam,
> why bother accepting mail that doesn't have a valid reply
> address...better to bounce it immediately.

(I may be misunderstanding the problem, but...)

I have exim set up to change it's idea of the local address every time
I connect (actually now that I'm on a cable modem, it's every time
DHCP renegotiates my address on my server machine).  This means that
exim always has a valid address, even though that address changes.
The way I do that is from my dhcp-eth1.exe (or from ip-up for ppp
connections), I run this:

  source /etc/dhcpc/dhcpcd-eth1.info
  logger echo "`date` dhcpcd-sv: IP address changed to $IPADDR"
  RR_NAME=`host ${IPADDR} ${DNS} | grep Name | cut -b 7-`

  # Tell exim what happened.
  (cd /etc && \
   perl -pi -e "s/^RR_HOSTNAME = (.*)/RR_HOSTNAME = ${RR_NAME}/o" exim.conf)
  exit 0

(This is a little broken because I think I need to kickstart (reload)
 bind here so that it notices the change in address or the "host" call
 may screw up.  The part you care about is the perl command...)

And then in my /etc/exim.conf I have:

  RR_HOSTNAME = cs2868-35.austin.rr.com

  primary_hostname = RR_HOSTNAME


  local_domains = ${primary_hostname}:usher.localnet:usher:localhost

So that RR_HOSTNAME gets clobbered by perl to always reflect my real
address.  I suppose that mail deliveries in progress during the change
might be messed up, but that's life.

Also, for those interested in address rewriting, note that the default
exim.conf file has a commented out rule at the bottom that allows you
to trivially set up remappings in /etc/email-addresses.

Rob Browning <rlb@cs.utexas.edu> PGP=E80E0D04F521A094 532B97F5D64E3930

Reply to: