Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Exim : change hostname in SMTP greeting

1,375 views
Skip to first unread message

Shaun

unread,
Feb 25, 2012, 5:40:02 AM2/25/12
to
Hi all,

I ran my domain through a DNS health checker type site, just to make
sure I fix any issues. The only 'problem' was that it said the SMTP
greeting on my MXs doesn't match that listed as the FQDN for the domain.
That's because I tend to run many services on the same box so
technically it has many hostnames.

Now if I want mail.mydomain.com in the DNS for the MX record but it's
hostname (hostname -f) is foobar.mydomain.com then if I don't want to
change it's hostname can I not set something in Exim? I tried setting

MAIN_HARDCODE_PRIMARY_HOSTNAME='mail.mydomain.com' in
update-exim4.conf.conf after some Googling. I did a restart and exim4
complained with :

Stopping MTA for restart:undocumented line
MAIN_HARDCODE_PRIMARY_HOSTNAME='mail.mydomain.com' found in
/etc/exim4/update-exim4.conf.conf, generating exim macro
exim4_listener.
Restarting MTA: exim4.

But then, strangely, it seems to work if I do an nc localhost 25.

So question: Is this the right (Debian) way of doing it?

Just want my domain to pass all the checks for a correct configuration :)


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/4F48BA31...@gmsl.co.uk

Camaleón

unread,
Feb 26, 2012, 11:20:02 AM2/26/12
to
On Sat, 25 Feb 2012 10:38:41 +0000, Shaun wrote:

> I ran my domain through a DNS health checker type site, just to make
> sure I fix any issues. The only 'problem' was that it said the SMTP
> greeting on my MXs doesn't match that listed as the FQDN for the domain.
> That's because I tend to run many services on the same box so
> technically it has many hostnames.

So you basically want to change the SMTP greeting?

> Now if I want mail.mydomain.com in the DNS for the MX record but it's
> hostname (hostname -f) is foobar.mydomain.com then if I don't want to
> change it's hostname can I not set something in Exim? I tried setting
>
> MAIN_HARDCODE_PRIMARY_HOSTNAME='mail.mydomain.com' in
> update-exim4.conf.conf after some Googling. I did a restart and exim4
> complained with :
>
> Stopping MTA for restart:undocumented line
> MAIN_HARDCODE_PRIMARY_HOSTNAME='mail.mydomain.com' found in
> /etc/exim4/update-exim4.conf.conf, generating exim macro
> exim4_listener.
> Restarting MTA: exim4.
>
> But then, strangely, it seems to work if I do an nc localhost 25.

The above seems to indicate the used variable is not recognized, at least
in that config file... Mmm, I've found this:

1.2.3. How does exim find out its host name to use in HELO/EHLO?
http://wiki.debian.org/PkgExim4UserFAQ#How_does_exim_find_out_its_host_name_to_use_in_HELO.2BAC8-EHLO.3F

So I'm not sure you really wanted to do this because editing the primary
hostname for a MUA will make deep changes on what hosts can send/relay
from/to destinations :-/

> So question: Is this the right (Debian) way of doing it?
>
> Just want my domain to pass all the checks for a correct configuration
> :)

I don't know Exim too much (I'm a Postfix fellow) but it seems there is a
variable that takes cares of the welcome message ("dc_smtp_banner")
although not sure if this will make your DNS tool checker happier :-)

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/jidlmp$69j$2...@dough.gmane.org

Shaun

unread,
Feb 27, 2012, 5:50:01 AM2/27/12
to
On 26/02/2012 16:13, Camaleón wrote:
> On Sat, 25 Feb 2012 10:38:41 +0000, Shaun wrote:
> So you basically want to change the SMTP greeting?

Yes, but I wanted to give the reason why also. Just in case it changes
the solution or recommendation.

>> MAIN_HARDCODE_PRIMARY_HOSTNAME='mail.mydomain.com' in
> The above seems to indicate the used variable is not recognized, at least
> in that config file... Mmm, I've found this:

Indeed. But strangely, despite this, it still works. The hostname in the
SMTP greeting _is_ changed. Bizarre.


> 1.2.3. How does exim find out its host name to use in HELO/EHLO?
> http://wiki.debian.org/PkgExim4UserFAQ#How_does_exim_find_out_its_host_name_to_use_in_HELO.2BAC8-EHLO.3F
>
> So I'm not sure you really wanted to do this because editing the primary
> hostname for a MUA will make deep changes on what hosts can send/relay
> from/to destinations :-/

I read this and it basically says primary_hostname isn't used by Debian
and changing it is dangerous. changing the hostname _should_ only
change what is regarded as another delivery location _aside_ from the
configured dc_other_hostnames. i.e. the domains in dc_other_hostnames
should still be accepted just fine.

> I don't know Exim too much (I'm a Postfix fellow) but it seems there is a
> variable that takes cares of the welcome message ("dc_smtp_banner")
> although not sure if this will make your DNS tool checker happier :-)

I'll take a look into dc_smtp_banner to see if it can be used. Thanks. I
also wanted to just check with the people here that the suggestion by
this DNS health checking tool was actually good. i.e. I'm not following
bad advice.

Shaun


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/4F4B5E54...@gmsl.co.uk

Camaleón

unread,
Feb 27, 2012, 9:40:02 AM2/27/12
to
On Mon, 27 Feb 2012 10:43:32 +0000, Shaun wrote:

> On 26/02/2012 16:13, Camaleón wrote:
>> On Sat, 25 Feb 2012 10:38:41 +0000, Shaun wrote: So you basically want
>> to change the SMTP greeting?
>
> Yes, but I wanted to give the reason why also. Just in case it changes
> the solution or recommendation.

Sure, just wanted to confirm your main goal :-)

>>> MAIN_HARDCODE_PRIMARY_HOSTNAME='mail.mydomain.com' in
>> The above seems to indicate the used variable is not recognized, at
>> least in that config file... Mmm, I've found this:
>
> Indeed. But strangely, despite this, it still works. The hostname in the
> SMTP greeting _is_ changed. Bizarre.

Such varible exists, but it is placed in a different file ("/var/lib/
exim4/config.autogenerated"), or maybe is just I use a "non-splitted"
Exim configuration? I'm afraid I'll never understand Exim's inners :-)

>> 1.2.3. How does exim find out its host name to use in HELO/EHLO?
>> http://wiki.debian.org/PkgExim4UserFAQ#How_does_exim_find_out_its_host_name_to_use_in_HELO.2BAC8-EHLO.3F
>>
>> So I'm not sure you really wanted to do this because editing the
>> primary hostname for a MUA will make deep changes on what hosts can
>> send/relay from/to destinations :-/
>
> I read this and it basically says primary_hostname isn't used by Debian
> and changing it is dangerous. changing the hostname _should_ only
> change what is regarded as another delivery location _aside_ from the
> configured dc_other_hostnames. i.e. the domains in dc_other_hostnames
> should still be accepted just fine.

Yes, that variable manages the main hostname and at least in other mail
servers is a vital variable you won't like to play with on a production
system because it can break many things.

>> I don't know Exim too much (I'm a Postfix fellow) but it seems there is
>> a variable that takes cares of the welcome message ("dc_smtp_banner")
>> although not sure if this will make your DNS tool checker happier :-)
>
> I'll take a look into dc_smtp_banner to see if it can be used. Thanks. I
> also wanted to just check with the people here that the suggestion by
> this DNS health checking tool was actually good. i.e. I'm not following
> bad advice.

Well, my e-mail server usually fails for some DNS checks because I'm not the
owner of the IP I have assigned, but my ISP, and the ISP does not have a PTR
setting that matches with my domain name but theirs.

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/jig4e5$288$7...@dough.gmane.org
0 new messages