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

Re: Lenny/exim4: how to set helo for outgoing SMTP



James Richardson wrote:

> The settings you want to look at are smtp_banner and helo_data. If I
> remember correctly, helo_data defaults to $primary_hostname and smtp_banner
> defaults to something with $primary_host_name and exim's version number.

I've gotten that far as to understand helo_data is what I want, but
where and how do I set it so it actually gets set for outoing SMTP
connections?

> In my configuration, I just have primary_hostname to my hostname (e.g.
> primay_hostname = dune.jamesr.biz) which also sets the smtp banner displayed
> when connecting to remote hosts.

So, you have primary_hostname = dune.jamesr.biz in
/etc/exim4/update-exim4.conf.conf ?

> My relavent debconf configs are
> internet site, number of dns-queries minimal to no. I am thinking the 
> primary_hostname gets set in the config file by doing a reverse lookup on the
> ip of my server. Does a lookup of the ip of the interface you are sending mail
> resolve to the name of your firewall?

No, it doesn't, and it never will, as this would break other stuff
inside the DMZ.

However, the way I see it, exim *should* only get the hostname it puts
in helo_data from DNS if REMOTE_SMTP_HELO_FROM_DNS is defined because
/etc/exim4/conf.d/transport/10_exim4-config_transport-macros says the
following:

.ifdef REMOTE_SMTP_HELO_FROM_DNS
REMOTE_SMTP_HELO_DATA=${lookup dnsdb
{ptr=$sending_ip_address}{$value}{$primary_hostname}}
.endif

So if I understand the README.Debian of exim4-config correctly, I should
be able to simply put the following into /etc/exim4/exim4.conf.localmacros:

REMOTE_SMTP_HELO_FROM_DNS='false'
REMOTE_SMTP_HELO_DATA='my.desired.helo.hostname'

But when I do this and run update-exim4.conf, I get:

macro "REMOTE_SMTP_HELO_DATA" is already defined (use "==" if you want
to redefine it

And when I change the second line to

REMOTE_SMTP_HELO_DATA=='my.desired.helo.hostname'

i get:

can't redefine an undefined macro "REMOTE_SMTP_HELO_DATA"

Now when I leave out the second line, update-exim4.conf runs through
without any error, but the HELO hostname is still being set by DNS lookup.

Either I have simply not understood something fundamental (which is very
well possible) or this is broken...

	-- Kilian


Reply to: