Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #172999 > unrolled thread
| Started by | mo <mo777@gmx.net> |
|---|---|
| First post | 2016-09-30 22:30 +0200 |
| Last post | 2016-10-01 22:50 +0200 |
| Articles | 20 on this page of 51 — 8 participants |
Back to article view | Back to linux.debian.user
Configuring Exim for mail delivery mo <mo777@gmx.net> - 2016-09-30 22:30 +0200
Re: Configuring Exim for mail delivery Liam O'Toole <liam.p.otoole@gmail.com> - 2016-10-01 00:50 +0200
Re: Configuring Exim for mail delivery Mark Fletcher <mark27q1@gmail.com> - 2016-10-01 04:00 +0200
Re: Configuring Exim for mail delivery mo <mo777@gmx.net> - 2016-10-01 12:40 +0200
Re: Configuring Exim for mail delivery Brian <ad44@cityscape.co.uk> - 2016-10-01 13:30 +0200
Re: Configuring Exim for mail delivery mo <mo777@gmx.net> - 2016-10-01 13:50 +0200
Re: Configuring Exim for mail delivery Clive Menzies <clive@clivemenzies.co.uk> - 2016-10-01 14:00 +0200
Re: Configuring Exim for mail delivery mo <mo777@gmx.net> - 2016-10-01 14:10 +0200
Re: Configuring Exim for mail delivery mo <mo777@gmx.net> - 2016-10-01 14:10 +0200
Re: Configuring Exim for mail delivery Mark Fletcher <mark27q1@gmail.com> - 2016-10-01 14:10 +0200
Re: Configuring Exim for mail delivery Mark Fletcher <mark27q1@gmail.com> - 2016-10-01 14:30 +0200
Re: Configuring Exim for mail delivery mo <mo777@gmx.net> - 2016-10-01 14:40 +0200
Re: Configuring Exim for mail delivery Mark Fletcher <mark27q1@gmail.com> - 2016-10-01 15:00 +0200
Re: Configuring Exim for mail delivery mo <mo777@gmx.net> - 2016-10-01 15:00 +0200
Re: Configuring Exim for mail delivery Brian <ad44@cityscape.co.uk> - 2016-10-01 15:00 +0200
Re: Configuring Exim for mail delivery mo <mo777@gmx.net> - 2016-10-01 15:10 +0200
Re: Configuring Exim for mail delivery Mark Fletcher <mark27q1@gmail.com> - 2016-10-01 15:40 +0200
Re: Configuring Exim for mail delivery mo <mo777@gmx.net> - 2016-10-01 16:20 +0200
Re: Configuring Exim for mail delivery Brian <ad44@cityscape.co.uk> - 2016-10-01 16:40 +0200
Re: Configuring Exim for mail delivery Teemu Likonen <tlikonen@iki.fi> - 2016-10-01 16:00 +0200
Re: Configuring Exim for mail delivery mo <mo777@gmx.net> - 2016-10-01 16:20 +0200
Re: Configuring Exim for mail delivery mo <mo777@gmx.net> - 2016-10-01 11:10 +0200
Re: Configuring Exim for mail delivery Brian <ad44@cityscape.co.uk> - 2016-10-01 12:10 +0200
Re: Configuring Exim for mail delivery mo <mo777@gmx.net> - 2016-10-01 12:40 +0200
Re: Configuring Exim for mail delivery mo <mo777@gmx.net> - 2016-10-01 14:10 +0200
Re: Configuring Exim for mail delivery Brian <ad44@cityscape.co.uk> - 2016-10-01 14:30 +0200
Re: Configuring Exim for mail delivery mo <mo777@gmx.net> - 2016-10-01 14:30 +0200
Re: Configuring Exim for mail delivery Mark Fletcher <mark27q1@gmail.com> - 2016-10-01 15:00 +0200
Re: Configuring Exim for mail delivery mo <mo777@gmx.net> - 2016-10-01 15:10 +0200
Re: Configuring Exim for mail delivery Mark Fletcher <mark27q1@gmail.com> - 2016-10-01 14:10 +0200
Re: Configuring Exim for mail delivery Mark Fletcher <mark27q1@gmail.com> - 2016-10-01 13:40 +0200
Re: Configuring Exim for mail delivery mo <mo777@gmx.net> - 2016-10-01 14:10 +0200
Re: Configuring Exim for mail delivery rhkramer@gmail.com - 2016-10-01 14:20 +0200
Re: Configuring Exim for mail delivery mo <mo777@gmx.net> - 2016-10-01 16:30 +0200
Re: Configuring Exim for mail delivery Liam O'Toole <liam.p.otoole@gmail.com> - 2016-10-01 18:30 +0200
Re: Configuring Exim for mail delivery Brian <ad44@cityscape.co.uk> - 2016-10-01 20:20 +0200
Re: Configuring Exim for mail delivery mo <mo777@gmx.net> - 2016-10-01 22:50 +0200
Re: Configuring Exim for mail delivery Brian <ad44@cityscape.co.uk> - 2016-10-02 00:30 +0200
Re: Configuring Exim for mail delivery Mark Fletcher <mark27q1@gmail.com> - 2016-10-02 02:30 +0200
Re: Configuring Exim for mail delivery Liam O'Toole <liam.p.otoole@gmail.com> - 2016-10-02 13:10 +0200
Re: Configuring Exim for mail delivery mo <mo777@gmx.net> - 2016-10-02 10:50 +0200
Re: Configuring Exim for mail delivery Liam O'Toole <liam.p.otoole@gmail.com> - 2016-10-01 23:10 +0200
Re: Configuring Exim for mail delivery Brian <ad44@cityscape.co.uk> - 2016-10-02 00:40 +0200
Re: Configuring Exim for mail delivery Liam O'Toole <liam.p.otoole@gmail.com> - 2016-10-02 02:10 +0200
Re: Configuring Exim for mail delivery Brian <ad44@cityscape.co.uk> - 2016-10-02 14:00 +0200
Re: Configuring Exim for mail delivery Mark Fletcher <mark27q1@gmail.com> - 2016-10-02 14:50 +0200
Re: Configuring Exim for mail delivery Gene Heskett <gheskett@shentel.net> - 2016-10-02 15:20 +0200
Re: Configuring Exim for mail delivery Mark Fletcher <mark27q1@gmail.com> - 2016-10-02 15:50 +0200
Re: Configuring Exim for mail delivery Brian <ad44@cityscape.co.uk> - 2016-10-02 15:40 +0200
Re: Configuring Exim for mail delivery Liam O'Toole <liam.p.otoole@gmail.com> - 2016-10-02 17:30 +0200
Re: Configuring Exim for mail delivery mo <mo777@gmx.net> - 2016-10-01 22:50 +0200
Page 1 of 3 [1] 2 3 Next page →
| From | mo <mo777@gmx.net> |
|---|---|
| Date | 2016-09-30 22:30 +0200 |
| Subject | Configuring Exim for mail delivery |
| Message-ID | <sncBs-6LW-5@gated-at.bofh.it> |
Hi fellow Debian users ;) First off some information. (both, the pc and the server run Debian Jessie): Distributor ID: Debian Description: Debian GNU/Linux 8.6 (jessie) Release: 8.6 Codename: jessie Exim: ii exim4 4.84.2-2+deb8u1 all metapackage to ease Exim MTA (v4) installation ii exim4-base 4.84.2-2+deb8u1 amd64 support files for all Exim MTA (v4) packages ii exim4-config 4.84.2-2+deb8u1 all configuration for the Exim MTA (v4) ii exim4-daemon-light 4.84.2-2+deb8u1 amd64 lightweight Exim MTA (v4) daemon I'm currently playing around with exim4... and to be honest i'm a little lost here. I want to do the following configuration: Send and deliver local mails between my systems. Currently exim is configured as a Internet Server (dpkg-reconfigure exim4-config). In general i kinda ask myself how i would go about doing that? I want to send mail from my server to my pc and vice versa, also i want to be able to send mail "out" to other smtp servers. Is Exim here the right choice? (I do think so at least) To be honest i never played with a smtp server before... so my knowledge is a bit foggy :P (Don't worry, i know what a MTA, MUA etc is) Thank you all in advance for your help ;) Btw: I will of course provide more information if needed ;) Greets mo
[toc] | [next] | [standalone]
| From | Liam O'Toole <liam.p.otoole@gmail.com> |
|---|---|
| Date | 2016-10-01 00:50 +0200 |
| Message-ID | <sneMV-8bV-15@gated-at.bofh.it> |
| In reply to | #172999 |
On 2016-09-30, mo <mo777@gmx.net> wrote: > Hi fellow Debian users ;) > > First off some information. (both, the pc and the server run Debian Jessie): > > Distributor ID: Debian > Description: Debian GNU/Linux 8.6 (jessie) > Release: 8.6 > Codename: jessie > > Exim: > ii exim4 4.84.2-2+deb8u1 > all metapackage to ease Exim MTA (v4) installation > ii exim4-base 4.84.2-2+deb8u1 > amd64 support files for all Exim MTA (v4) packages > ii exim4-config 4.84.2-2+deb8u1 > all configuration for the Exim MTA (v4) > ii exim4-daemon-light 4.84.2-2+deb8u1 > amd64 lightweight Exim MTA (v4) daemon > > > I'm currently playing around with exim4... and to be honest i'm a little > lost here. > I want to do the following configuration: > Send and deliver local mails between my systems. Currently exim is > configured as a Internet Server (dpkg-reconfigure exim4-config). > In general i kinda ask myself how i would go about doing that? > I want to send mail from my server to my pc and vice versa, also i want > to be able to send mail "out" to other smtp servers. > > Is Exim here the right choice? (I do think so at least) > > To be honest i never played with a smtp server before... so my knowledge > is a bit foggy :P (Don't worry, i know what a MTA, MUA etc is) > > Thank you all in advance for your help ;) > > Btw: I will of course provide more information if needed ;) > > Greets > > mo > > If you run 'dpkg-reconfigure exim4-config' again, you will see a question about "Other destinations for which mail is accepted". Here you would enter something like '*.yourdomain.com', where your PC and server belong to that domain. In that way exim4 will deliver email directly to those hosts rather than relaying outside your network. Regarding your second requirement, you probably want to choose the second option on the first screen, ie, "mail sent by smarthost; received via SMTP or fetchmail". You would then enter the name of your ISP's SMTP when prompted later for the name of the smarthost. -- Liam
[toc] | [prev] | [next] | [standalone]
| From | Mark Fletcher <mark27q1@gmail.com> |
|---|---|
| Date | 2016-10-01 04:00 +0200 |
| Message-ID | <snhKO-1ya-1@gated-at.bofh.it> |
| In reply to | #172999 |
On Fri, Sep 30, 2016 at 10:22:10PM +0200, mo wrote:
> Hi fellow Debian users ;)
> I want to do the following configuration:
> Send and deliver local mails between my systems. Currently exim is
> configured as a Internet Server (dpkg-reconfigure exim4-config).
> In general i kinda ask myself how i would go about doing that?
> I want to send mail from my server to my pc and vice versa, also i want to
> be able to send mail "out" to other smtp servers.
>
Depending on your local setup, having Exim set as an Internet server may
not be the right answer, as Liam has already said.
I'm going to make some assumptions here and you can correct them if they
are wrong.
I'll assume you have a home network and are trying to connect to send
mails between machines on that network, and additionally be able to send
email to domains outside your network.
I'm also assuming that you don't have specific domains for your own
machines, so that when you send mail outside you want to use an email
provider such as gmail, or hover, etc.
For most home network situations, ISPs don't like you trying to send
email directly from your home network. They want you to use their (or at
least SOMEONE's) smarthost. That makes it less likely they will find
themselves accessories to spamming. Also, many mainstream destination
email addresses will not accept mail from just any old place; if you try
to send mail directly to them from behind your home network router, even
if your ISP allows you to do so, the other end may reject the mail
because they can't tell what machine it is coming from.
If my assumptions above are right, you want to use "smarthost" as the
configuration. If I am wrong and you have your own domain and the right
to set up mail servers in it, then you do want the "internet" setting,
but you still want to pay attention to the rest of this message as it
addresses local network delivery.
I just figured out how to get this working myself a week or two back, so
it's fresh in my mind. The key trick is the use of "hubbed hosts".
Exim configuration has the concept of "routers" and "transports".
Routers basically decide what to do with a message, and transports do
it. One of the routers configured by default in the Debian exim
configuration is for "hubbed hosts". What this means, is machines
capable of sending and receiving email ("hosts" in exim speak) that are
on the same LAN as this machine (connected by a "hub"). Note that this
"hub" could be your local home network router, and for these purposes
machines on WiFi and machines on a wired LAN would be considered on the
same hub, even though that isn't strictly true. The point is that
network packets can be addressed directly between the machines, they
don't require a router in between.
In Debian, this is achieved with Avahi. This is what allows you, if you
have MachineA and MachineB on your network, to do for example "ping
MachineA.local" from MachineB and expect MachineA.local to be resolved
into an IP address.
As far as I can tell, Avahi is installed by default when you install a
new Debian installation. I don't know how long that has been true, but
my experience is that it is now.
In /etc/exim4, create a file owned by root called hubbed_hosts. In the
file, each line maps a "domain" (the part after the @ sign in an email
address) to a "host" (the name of a machine on your network, as it can
be reached from this machine). Put the domain first, then a tab
character (spaces may also be OK) and then the host. So for example I
have a machine on my network called affinity, and so in the hubbed_hosts
file on the machine I am sitting in front of now, I have two lines, one
saying "affinity.local<TAB>affinity.local", and the other saying
"affinity<TAB>affinity.local" (no quotes in the file). This tells the
local exim installation that any email address with @affinity.local as
the domain should be forwarded on to a machine called affinity.local,
and any mail with @affinity as the domain should be forwarded on to a
machine called affinity.local. Exim4 will then say "Connect to
affinity.local!" with no attempt to translate that into an IP address,
and Avahi daemon will answer "that is IP address WW.XX.YY.ZZ!" to which
exim will say "very well, connect to WW.XX.YY.ZZ!" and the exim4 on
affinity will wake up and co-operate to deliver the mail.
If the target email domain is not present in hubbed_hosts, then a
default "smarthost" configuration will fall through the hubbed hosts
router and arrive at the smarthost router, which in my case then tries
to use my mail provider to send a mail to a local machine, which is
doomed to failure because the outside provider cannot see my individual
machines on my local network.
If you really should be using the "internet" configuration, you still
need hubbed_hosts for local mails because whereas the hubbed_hosts
option just leaves it to the local network to figure out what it is
talking about, an internet-configured exim will attempt to find and send
to the target machine. To do so, it will send out a DNS request to
resolve the ip address of the target host. Avahi won't catch this, and
unless you are running a DNS server locally on your network (most people
don't, and many home network routers don't include one) that request
will go out of your network to the DNS server provided by your ISP. That
DNS server, being outside your network, won't be able to resolve your
local machine names and so won't be able to give you back an IP address
to use, unless your target machines are publicly individually visible on
the Internet, which is unlikely if this is a home configuration we are
talking about here.
So the configuration you are after is local domains specified in
hubbed_hosts, and everything else falls through to either a smarthost or
a dns-based attempt to send outside your network.
Hope that helps, let us know if you need more help.
Mark
[toc] | [prev] | [next] | [standalone]
| From | mo <mo777@gmx.net> |
|---|---|
| Date | 2016-10-01 12:40 +0200 |
| Message-ID | <snpS2-7al-23@gated-at.bofh.it> |
| In reply to | #173009 |
> I'll assume you have a home network and are trying to connect to send
> mails between machines on that network, and additionally be able to send
> email to domains outside your network.
That is right ;)
> I'm also assuming that you don't have specific domains for your own
> machines, so that when you send mail outside you want to use an email
> provider such as gmail, or hover, etc.
Also true ;)
> I just figured out how to get this working myself a week or two back, so
> it's fresh in my mind. The key trick is the use of "hubbed hosts".
Did you follow a specific book or guide?
> Exim configuration has the concept of "routers" and "transports".
> Routers basically decide what to do with a message, and transports do
> it. One of the routers configured by default in the Debian exim
> configuration is for "hubbed hosts". What this means, is machines
> capable of sending and receiving email ("hosts" in exim speak) that are
> on the same LAN as this machine (connected by a "hub"). Note that this
> "hub" could be your local home network router, and for these purposes
> machines on WiFi and machines on a wired LAN would be considered on the
> same hub, even though that isn't strictly true. The point is that
> network packets can be addressed directly between the machines, they
> don't require a router in between.
>
As far as i do understand this is that only machines which are defined
as hubbed hosts can be send mail in the local LAN? Or am i
misunderstanding something here? :)
> In Debian, this is achieved with Avahi. This is what allows you, if you
> have MachineA and MachineB on your network, to do for example "ping
> MachineA.local" from MachineB and expect MachineA.local to be resolved
> into an IP address.
>
I'm not a friend of avahi to be honest, i much rather ignore it :D
> In /etc/exim4, create a file owned by root called hubbed_hosts. In the
> file, each line maps a "domain" (the part after the @ sign in an email
> address) to a "host" (the name of a machine on your network, as it can
> be reached from this machine). Put the domain first, then a tab
> character (spaces may also be OK) and then the host. So for example I
> have a machine on my network called affinity, and so in the hubbed_hosts
> file on the machine I am sitting in front of now, I have two lines, one
> saying "affinity.local<TAB>affinity.local", and the other saying
> "affinity<TAB>affinity.local" (no quotes in the file). This tells the
> local exim installation that any email address with @affinity.local as
> the domain should be forwarded on to a machine called affinity.local,
> and any mail with @affinity as the domain should be forwarded on to a
> machine called affinity.local. Exim4 will then say "Connect to
> affinity.local!" with no attempt to translate that into an IP address,
> and Avahi daemon will answer "that is IP address WW.XX.YY.ZZ!" to which
> exim will say "very well, connect to WW.XX.YY.ZZ!" and the exim4 on
> affinity will wake up and co-operate to deliver the mail.
I just did that and now mailing works flawlessly :D
Just one questions: Why do i need hubbed_host entries? Should it not be
fine alone to make a entry in /etc/hosts for the machines i want to send
mail to (I do not operate a dedicated DNS server).
This is something i dont really understand...
> If the target email domain is not present in hubbed_hosts, then a
> default "smarthost" configuration will fall through the hubbed hosts
> router and arrive at the smarthost router, which in my case then tries
> to use my mail provider to send a mail to a local machine, which is
> doomed to failure because the outside provider cannot see my individual
> machines on my local network.
>
> If you really should be using the "internet" configuration, you still
> need hubbed_hosts for local mails because whereas the hubbed_hosts
> option just leaves it to the local network to figure out what it is
> talking about, an internet-configured exim will attempt to find and send
> to the target machine. To do so, it will send out a DNS request to
> resolve the ip address of the target host. Avahi won't catch this, and
> unless you are running a DNS server locally on your network (most people
> don't, and many home network routers don't include one) that request
> will go out of your network to the DNS server provided by your ISP. That
> DNS server, being outside your network, won't be able to resolve your
> local machine names and so won't be able to give you back an IP address
> to use, unless your target machines are publicly individually visible on
> the Internet, which is unlikely if this is a home configuration we are
> talking about here.
>
> So the configuration you are after is local domains specified in
> hubbed_hosts, and everything else falls through to either a smarthost or
> a dns-based attempt to send outside your network.
>
> Hope that helps, let us know if you need more help.
Your explanation helped a lot ;)
> Mark
>
Greets
mo
[toc] | [prev] | [next] | [standalone]
| From | Brian <ad44@cityscape.co.uk> |
|---|---|
| Date | 2016-10-01 13:30 +0200 |
| Message-ID | <snqEp-7JI-3@gated-at.bofh.it> |
| In reply to | #173021 |
On Sat 01 Oct 2016 at 12:36:10 +0200, mo wrote:
> >I just figured out how to get this working myself a week or two back, so
> >it's fresh in my mind. The key trick is the use of "hubbed hosts".
>
> Did you follow a specific book or guide?
The manual for exim4-config_files is the first place to look.
> >Exim configuration has the concept of "routers" and "transports".
> >Routers basically decide what to do with a message, and transports do
> >it. One of the routers configured by default in the Debian exim
> >configuration is for "hubbed hosts". What this means, is machines
> >capable of sending and receiving email ("hosts" in exim speak) that are
> >on the same LAN as this machine (connected by a "hub"). Note that this
> >"hub" could be your local home network router, and for these purposes
> >machines on WiFi and machines on a wired LAN would be considered on the
> >same hub, even though that isn't strictly true. The point is that
> >network packets can be addressed directly between the machines, they
> >don't require a router in between.
> >
>
> As far as i do understand this is that only machines which are defined as
> hubbed hosts can be send mail in the local LAN? Or am i misunderstanding
> something here? :)
hubbed_hosts can send mail wherever you want. For example:
example.com: smtp.example.com
would send mail to someone at example.com through smtp.example.com
(which could be a smarthost).
> >In Debian, this is achieved with Avahi. This is what allows you, if you
> >have MachineA and MachineB on your network, to do for example "ping
> >MachineA.local" from MachineB and expect MachineA.local to be resolved
> >into an IP address.
> >
>
> I'm not a friend of avahi to be honest, i much rather ignore it :D
Let's hope your IP addresses do not change.
> >In /etc/exim4, create a file owned by root called hubbed_hosts. In the
> >file, each line maps a "domain" (the part after the @ sign in an email
> >address) to a "host" (the name of a machine on your network, as it can
> >be reached from this machine). Put the domain first, then a tab
> >character (spaces may also be OK) and then the host. So for example I
> >have a machine on my network called affinity, and so in the hubbed_hosts
> >file on the machine I am sitting in front of now, I have two lines, one
> >saying "affinity.local<TAB>affinity.local", and the other saying
> >"affinity<TAB>affinity.local" (no quotes in the file). This tells the
> >local exim installation that any email address with @affinity.local as
> >the domain should be forwarded on to a machine called affinity.local,
> >and any mail with @affinity as the domain should be forwarded on to a
> >machine called affinity.local. Exim4 will then say "Connect to
> >affinity.local!" with no attempt to translate that into an IP address,
> >and Avahi daemon will answer "that is IP address WW.XX.YY.ZZ!" to which
> >exim will say "very well, connect to WW.XX.YY.ZZ!" and the exim4 on
> >affinity will wake up and co-operate to deliver the mail.
>
> I just did that and now mailing works flawlessly :D
> Just one questions: Why do i need hubbed_host entries? Should it not be fine
> alone to make a entry in /etc/hosts for the machines i want to send mail to
> (I do not operate a dedicated DNS server).
> This is something i dont really understand...
I'd suggest you try it and look at the logs.
--
Brian.
[toc] | [prev] | [next] | [standalone]
| From | mo <mo777@gmx.net> |
|---|---|
| Date | 2016-10-01 13:50 +0200 |
| Message-ID | <snqXL-7RK-13@gated-at.bofh.it> |
| In reply to | #173022 |
Am 01.10.2016 um 13:22 schrieb Brian:
> On Sat 01 Oct 2016 at 12:36:10 +0200, mo wrote:
>
>>> I just figured out how to get this working myself a week or two back, so
>>> it's fresh in my mind. The key trick is the use of "hubbed hosts".
>>
>> Did you follow a specific book or guide?
>
> The manual for exim4-config_files is the first place to look.
>
I will look into the manual.
I also found a book about exim from O'Reilly, it's quite old (2001) but
i guess i can get some info out of it.
>>> Exim configuration has the concept of "routers" and "transports".
>>> Routers basically decide what to do with a message, and transports do
>>> it. One of the routers configured by default in the Debian exim
>>> configuration is for "hubbed hosts". What this means, is machines
>>> capable of sending and receiving email ("hosts" in exim speak) that are
>>> on the same LAN as this machine (connected by a "hub"). Note that this
>>> "hub" could be your local home network router, and for these purposes
>>> machines on WiFi and machines on a wired LAN would be considered on the
>>> same hub, even though that isn't strictly true. The point is that
>>> network packets can be addressed directly between the machines, they
>>> don't require a router in between.
>>>
>>
>> As far as i do understand this is that only machines which are defined as
>> hubbed hosts can be send mail in the local LAN? Or am i misunderstanding
>> something here? :)
>
> hubbed_hosts can send mail wherever you want. For example:
>
> example.com: smtp.example.com
>
> would send mail to someone at example.com through smtp.example.com
> (which could be a smarthost).
>
Got it, thanks ;)
>>> In Debian, this is achieved with Avahi. This is what allows you, if you
>>> have MachineA and MachineB on your network, to do for example "ping
>>> MachineA.local" from MachineB and expect MachineA.local to be resolved
>>> into an IP address.
>>>
>>
>> I'm not a friend of avahi to be honest, i much rather ignore it :D
>
> Let's hope your IP addresses do not change.
>
No changes here, static network configuration, so that should not pose
problems. (My network only has 4 machines, so DHCP is not needed, at
least atm i don't need it :) )
>>> In /etc/exim4, create a file owned by root called hubbed_hosts. In the
>>> file, each line maps a "domain" (the part after the @ sign in an email
>>> address) to a "host" (the name of a machine on your network, as it can
>>> be reached from this machine). Put the domain first, then a tab
>>> character (spaces may also be OK) and then the host. So for example I
>>> have a machine on my network called affinity, and so in the hubbed_hosts
>>> file on the machine I am sitting in front of now, I have two lines, one
>>> saying "affinity.local<TAB>affinity.local", and the other saying
>>> "affinity<TAB>affinity.local" (no quotes in the file). This tells the
>>> local exim installation that any email address with @affinity.local as
>>> the domain should be forwarded on to a machine called affinity.local,
>>> and any mail with @affinity as the domain should be forwarded on to a
>>> machine called affinity.local. Exim4 will then say "Connect to
>>> affinity.local!" with no attempt to translate that into an IP address,
>>> and Avahi daemon will answer "that is IP address WW.XX.YY.ZZ!" to which
>>> exim will say "very well, connect to WW.XX.YY.ZZ!" and the exim4 on
>>> affinity will wake up and co-operate to deliver the mail.
>>
>> I just did that and now mailing works flawlessly :D
>> Just one questions: Why do i need hubbed_host entries? Should it not be fine
>> alone to make a entry in /etc/hosts for the machines i want to send mail to
>> (I do not operate a dedicated DNS server).
>> This is something i dont really understand...
>
> I'd suggest you try it and look at the logs.
>
I will try that out, exim has a pretty nice logging format i think ;)
Greets
mo
[toc] | [prev] | [next] | [standalone]
| From | Clive Menzies <clive@clivemenzies.co.uk> |
|---|---|
| Date | 2016-10-01 14:00 +0200 |
| Message-ID | <snr7r-7VA-3@gated-at.bofh.it> |
| In reply to | #173024 |
On 01/10/16 12:39, mo wrote:
>
>
> Am 01.10.2016 um 13:22 schrieb Brian:
>> On Sat 01 Oct 2016 at 12:36:10 +0200, mo wrote:
>>
>>>> I just figured out how to get this working myself a week or two
>>>> back, so
>>>> it's fresh in my mind. The key trick is the use of "hubbed hosts".
>>>
>>> Did you follow a specific book or guide?
>>
>> The manual for exim4-config_files is the first place to look.
>>
>
> I will look into the manual.
> I also found a book about exim from O'Reilly, it's quite old (2001)
> but i guess i can get some info out of it.
>
>>>> Exim configuration has the concept of "routers" and "transports".
>>>> Routers basically decide what to do with a message, and transports do
>>>> it. One of the routers configured by default in the Debian exim
>>>> configuration is for "hubbed hosts". What this means, is machines
>>>> capable of sending and receiving email ("hosts" in exim speak) that
>>>> are
>>>> on the same LAN as this machine (connected by a "hub"). Note that this
>>>> "hub" could be your local home network router, and for these purposes
>>>> machines on WiFi and machines on a wired LAN would be considered on
>>>> the
>>>> same hub, even though that isn't strictly true. The point is that
>>>> network packets can be addressed directly between the machines, they
>>>> don't require a router in between.
>>>>
>>>
>>> As far as i do understand this is that only machines which are
>>> defined as
>>> hubbed hosts can be send mail in the local LAN? Or am i
>>> misunderstanding
>>> something here? :)
>>
>> hubbed_hosts can send mail wherever you want. For example:
>>
>> example.com: smtp.example.com
>>
>> would send mail to someone at example.com through smtp.example.com
>> (which could be a smarthost).
>>
>
> Got it, thanks ;)
>
>>>> In Debian, this is achieved with Avahi. This is what allows you, if
>>>> you
>>>> have MachineA and MachineB on your network, to do for example "ping
>>>> MachineA.local" from MachineB and expect MachineA.local to be resolved
>>>> into an IP address.
>>>>
>>>
>>> I'm not a friend of avahi to be honest, i much rather ignore it :D
>>
>> Let's hope your IP addresses do not change.
>>
>
> No changes here, static network configuration, so that should not pose
> problems. (My network only has 4 machines, so DHCP is not needed, at
> least atm i don't need it :) )
>
>>>> In /etc/exim4, create a file owned by root called hubbed_hosts. In the
>>>> file, each line maps a "domain" (the part after the @ sign in an email
>>>> address) to a "host" (the name of a machine on your network, as it can
>>>> be reached from this machine). Put the domain first, then a tab
>>>> character (spaces may also be OK) and then the host. So for example I
>>>> have a machine on my network called affinity, and so in the
>>>> hubbed_hosts
>>>> file on the machine I am sitting in front of now, I have two lines,
>>>> one
>>>> saying "affinity.local<TAB>affinity.local", and the other saying
>>>> "affinity<TAB>affinity.local" (no quotes in the file). This tells the
>>>> local exim installation that any email address with @affinity.local as
>>>> the domain should be forwarded on to a machine called affinity.local,
>>>> and any mail with @affinity as the domain should be forwarded on to a
>>>> machine called affinity.local. Exim4 will then say "Connect to
>>>> affinity.local!" with no attempt to translate that into an IP address,
>>>> and Avahi daemon will answer "that is IP address WW.XX.YY.ZZ!" to
>>>> which
>>>> exim will say "very well, connect to WW.XX.YY.ZZ!" and the exim4 on
>>>> affinity will wake up and co-operate to deliver the mail.
>>>
>>> I just did that and now mailing works flawlessly :D
>>> Just one questions: Why do i need hubbed_host entries? Should it not
>>> be fine
>>> alone to make a entry in /etc/hosts for the machines i want to send
>>> mail to
>>> (I do not operate a dedicated DNS server).
>>> This is something i dont really understand...
>>
>> I'd suggest you try it and look at the logs.
>>
>
> I will try that out, exim has a pretty nice logging format i think ;)
>
>
Hi Mo
I tried to send this with a .pdf yesterday d'oh! Anyway, we've just
reinstalled our servers with mail and automated backup and updated our
notes. They're not finalised and hence not on the web yet but you can
access them here:
https://dl.dropboxusercontent.com/u/63603283/InstallationNotes2016.9.24.pdf
Bit's of it may help.
Regards
Clive
--
Clive Menzies
http://freecriticalthinking.org
[toc] | [prev] | [next] | [standalone]
| From | mo <mo777@gmx.net> |
|---|---|
| Date | 2016-10-01 14:10 +0200 |
| Message-ID | <snrh8-8fA-21@gated-at.bofh.it> |
| In reply to | #173025 |
> Hi Mo Hi Clive :) > I tried to send this with a .pdf yesterday d'oh! Anyway, we've just > reinstalled our servers with mail and automated backup and updated our > notes. They're not finalised and hence not on the web yet but you can > access them here: > https://dl.dropboxusercontent.com/u/63603283/InstallationNotes2016.9.24.pdf > > Bit's of it may help. It sure does! I quickly scanned over the pdf and the mail part is quite interesting for me, thanks a lot! ;) Btw: Nice setup you got there! :) > > Regards > > Clive > Greets mo
[toc] | [prev] | [next] | [standalone]
| From | mo <mo777@gmx.net> |
|---|---|
| Date | 2016-10-01 14:10 +0200 |
| Message-ID | <snrh8-8fA-9@gated-at.bofh.it> |
| In reply to | #173024 |
Am 01.10.2016 um 14:00 schrieb Mark Fletcher: > On Sat, Oct 01, 2016 at 01:39:47PM +0200, mo wrote: >> >> >> Am 01.10.2016 um 13:22 schrieb Brian: >>> On Sat 01 Oct 2016 at 12:36:10 +0200, mo wrote: >>> >>>> >>>> I just did that and now mailing works flawlessly :D >>>> Just one questions: Why do i need hubbed_host entries? Should it not be fine >>>> alone to make a entry in /etc/hosts for the machines i want to send mail to >>>> (I do not operate a dedicated DNS server). >>>> This is something i dont really understand... >>> >>> I'd suggest you try it and look at the logs. > > Watch out, you may piss off your ISP if you repeatedly send emails it > can't deliver. They'll make their displeasure felt by not delivering > _any_ mails for you for a while. My suggestion is get local delivery > working first, then turn attention to mails outside. > Thanks for the hint Mark :) So far i only tried it twice, i think i'm save for the moment. :D haha > Mark >
[toc] | [prev] | [next] | [standalone]
| From | Mark Fletcher <mark27q1@gmail.com> |
|---|---|
| Date | 2016-10-01 14:10 +0200 |
| Message-ID | <snrh8-8fA-11@gated-at.bofh.it> |
| In reply to | #173024 |
On Sat, Oct 01, 2016 at 01:39:47PM +0200, mo wrote: > > > Am 01.10.2016 um 13:22 schrieb Brian: > >On Sat 01 Oct 2016 at 12:36:10 +0200, mo wrote: > > > >> > >>I just did that and now mailing works flawlessly :D > >>Just one questions: Why do i need hubbed_host entries? Should it not be fine > >>alone to make a entry in /etc/hosts for the machines i want to send mail to > >>(I do not operate a dedicated DNS server). > >>This is something i dont really understand... > > > >I'd suggest you try it and look at the logs. Watch out, you may piss off your ISP if you repeatedly send emails it can't deliver. They'll make their displeasure felt by not delivering _any_ mails for you for a while. My suggestion is get local delivery working first, then turn attention to mails outside. Mark
[toc] | [prev] | [next] | [standalone]
| From | Mark Fletcher <mark27q1@gmail.com> |
|---|---|
| Date | 2016-10-01 14:30 +0200 |
| Message-ID | <snrAu-8pp-7@gated-at.bofh.it> |
| In reply to | #173021 |
On Sat, Oct 01, 2016 at 12:36:10PM +0200, mo wrote:
>
> Did you follow a specific book or guide?
Google "debian exim4 configuration". And look at the upstream
documentation in package exim4-doc-html.
>
> >Exim configuration has the concept of "routers" and "transports".
> >Routers basically decide what to do with a message, and transports do
> >it. One of the routers configured by default in the Debian exim
> >configuration is for "hubbed hosts". What this means, is machines
> >capable of sending and receiving email ("hosts" in exim speak) that are
> >on the same LAN as this machine (connected by a "hub"). Note that this
> >"hub" could be your local home network router, and for these purposes
> >machines on WiFi and machines on a wired LAN would be considered on the
> >same hub, even though that isn't strictly true. The point is that
> >network packets can be addressed directly between the machines, they
> >don't require a router in between.
> >
>
> As far as i do understand this is that only machines which are defined as
> hubbed hosts can be send mail in the local LAN? Or am i misunderstanding
> something here? :)
>
In essence yes you are right, because a local configuration of exim4
would determine that the addresses are not local and not in
hubbed_hosts, and tell you to eff off, while a smarthost configuration
would attempt to use the smarthost to send to the local machine, which
is doomed to failure, and the internet configuration would attempt to
use DNS to find the local machine, which is also doomed to failure.
Being in hubbed_hosts prevents exim4 for going looking for an MX record
for the receiving host, which is guaranteed to fail for a machine that
isn't registered to the world at large as an email server.
> >In Debian, this is achieved with Avahi. This is what allows you, if you
> >have MachineA and MachineB on your network, to do for example "ping
> >MachineA.local" from MachineB and expect MachineA.local to be resolved
> >into an IP address.
> >
>
> I'm not a friend of avahi to be honest, i much rather ignore it :D
All I can do here is echo Brian. But also, even if you aren't its
friend, ignoring it is fine, because it comes already configured and
will just do its job whether it gets any love from you or not. I just
assumed you'd like to know what is going on under the hood.
>
> >In /etc/exim4, create a file owned by root called hubbed_hosts. In the
> >file, each line maps a "domain" (the part after the @ sign in an email
> >address) to a "host" (the name of a machine on your network, as it can
> >be reached from this machine). Put the domain first, then a tab
> >character (spaces may also be OK) and then the host. So for example I
> >have a machine on my network called affinity, and so in the hubbed_hosts
> >file on the machine I am sitting in front of now, I have two lines, one
> >saying "affinity.local<TAB>affinity.local", and the other saying
> >"affinity<TAB>affinity.local" (no quotes in the file). This tells the
> >local exim installation that any email address with @affinity.local as
> >the domain should be forwarded on to a machine called affinity.local,
> >and any mail with @affinity as the domain should be forwarded on to a
> >machine called affinity.local. Exim4 will then say "Connect to
> >affinity.local!" with no attempt to translate that into an IP address,
> >and Avahi daemon will answer "that is IP address WW.XX.YY.ZZ!" to which
> >exim will say "very well, connect to WW.XX.YY.ZZ!" and the exim4 on
> >affinity will wake up and co-operate to deliver the mail.
>
> I just did that and now mailing works flawlessly :D
> Just one questions: Why do i need hubbed_host entries? Should it not be fine
> alone to make a entry in /etc/hosts for the machines i want to send mail to
> (I do not operate a dedicated DNS server).
> This is something i dont really understand...
hubbed_host entries apply only to exim4. I also suspect, but am not
sure, that they are a Debian extension to exim4 in the sense that the
*DEBIAN* exim4 comes configured for them out of the box, while the
upstream exim4 does not. IIRC there is no reference to hubbed_hosts in
the upstream documentation, only in the Debian docs.
They work because the debian config contains a router to handle hubbed
hosts. You can see what it is doing if you search
/var/lib/exim4/config.autogenerated for the text hubbed_hosts.
If the file is not populated this router is skipped and then exim4
requires either that the address is the local machine, or that there is
a smarthost configured that it can delegate to, or that it can find an
official MX entry for the target domain by doing a DNS lookup. All of
which will fail for a local box that isn't registered to the world as a
mail server.
Mark
[toc] | [prev] | [next] | [standalone]
| From | mo <mo777@gmx.net> |
|---|---|
| Date | 2016-10-01 14:40 +0200 |
| Message-ID | <snrK9-8sV-5@gated-at.bofh.it> |
| In reply to | #173034 |
Am 01.10.2016 um 14:23 schrieb Mark Fletcher:
> On Sat, Oct 01, 2016 at 12:36:10PM +0200, mo wrote:
>>
>> Did you follow a specific book or guide?
>
> Google "debian exim4 configuration". And look at the upstream
> documentation in package exim4-doc-html.
>
I will do so ;)
>>
>>> Exim configuration has the concept of "routers" and "transports".
>>> Routers basically decide what to do with a message, and transports do
>>> it. One of the routers configured by default in the Debian exim
>>> configuration is for "hubbed hosts". What this means, is machines
>>> capable of sending and receiving email ("hosts" in exim speak) that are
>>> on the same LAN as this machine (connected by a "hub"). Note that this
>>> "hub" could be your local home network router, and for these purposes
>>> machines on WiFi and machines on a wired LAN would be considered on the
>>> same hub, even though that isn't strictly true. The point is that
>>> network packets can be addressed directly between the machines, they
>>> don't require a router in between.
>>>
>>
>> As far as i do understand this is that only machines which are defined as
>> hubbed hosts can be send mail in the local LAN? Or am i misunderstanding
>> something here? :)
>>
>
> In essence yes you are right, because a local configuration of exim4
> would determine that the addresses are not local and not in
> hubbed_hosts, and tell you to eff off, while a smarthost configuration
> would attempt to use the smarthost to send to the local machine, which
> is doomed to failure, and the internet configuration would attempt to
> use DNS to find the local machine, which is also doomed to failure.
> Being in hubbed_hosts prevents exim4 for going looking for an MX record
> for the receiving host, which is guaranteed to fail for a machine that
> isn't registered to the world at large as an email server.
>
Alright, i finally go it ;) Thanks for the explanation Mark! :)
>>> In Debian, this is achieved with Avahi. This is what allows you, if you
>>> have MachineA and MachineB on your network, to do for example "ping
>>> MachineA.local" from MachineB and expect MachineA.local to be resolved
>>> into an IP address.
>>>
>>
>> I'm not a friend of avahi to be honest, i much rather ignore it :D
>
> All I can do here is echo Brian. But also, even if you aren't its
> friend, ignoring it is fine, because it comes already configured and
> will just do its job whether it gets any love from you or not. I just
> assumed you'd like to know what is going on under the hood.
I sure appreciate to know the inner workings of it all :)
Good to know how avahi is involved here, this paints me a clearer picture :)
>>
>>> In /etc/exim4, create a file owned by root called hubbed_hosts. In the
>>> file, each line maps a "domain" (the part after the @ sign in an email
>>> address) to a "host" (the name of a machine on your network, as it can
>>> be reached from this machine). Put the domain first, then a tab
>>> character (spaces may also be OK) and then the host. So for example I
>>> have a machine on my network called affinity, and so in the hubbed_hosts
>>> file on the machine I am sitting in front of now, I have two lines, one
>>> saying "affinity.local<TAB>affinity.local", and the other saying
>>> "affinity<TAB>affinity.local" (no quotes in the file). This tells the
>>> local exim installation that any email address with @affinity.local as
>>> the domain should be forwarded on to a machine called affinity.local,
>>> and any mail with @affinity as the domain should be forwarded on to a
>>> machine called affinity.local. Exim4 will then say "Connect to
>>> affinity.local!" with no attempt to translate that into an IP address,
>>> and Avahi daemon will answer "that is IP address WW.XX.YY.ZZ!" to which
>>> exim will say "very well, connect to WW.XX.YY.ZZ!" and the exim4 on
>>> affinity will wake up and co-operate to deliver the mail.
>>
>> I just did that and now mailing works flawlessly :D
>> Just one questions: Why do i need hubbed_host entries? Should it not be fine
>> alone to make a entry in /etc/hosts for the machines i want to send mail to
>> (I do not operate a dedicated DNS server).
>> This is something i dont really understand...
>
> hubbed_host entries apply only to exim4. I also suspect, but am not
> sure, that they are a Debian extension to exim4 in the sense that the
> *DEBIAN* exim4 comes configured for them out of the box, while the
> upstream exim4 does not. IIRC there is no reference to hubbed_hosts in
> the upstream documentation, only in the Debian docs.
>
> They work because the debian config contains a router to handle hubbed
> hosts. You can see what it is doing if you search
> /var/lib/exim4/config.autogenerated for the text hubbed_hosts.
I will consult the Debian docs, currently reading over the wiki page of
exim :)
> If the file is not populated this router is skipped and then exim4
> requires either that the address is the local machine, or that there is
> a smarthost configured that it can delegate to, or that it can find an
> official MX entry for the target domain by doing a DNS lookup. All of
> which will fail for a local box that isn't registered to the world as a
> mail server.
I see, thanks for the info :)
> Mark
>
Thanks again Mark ;)
Greets
mo
[toc] | [prev] | [next] | [standalone]
| From | Mark Fletcher <mark27q1@gmail.com> |
|---|---|
| Date | 2016-10-01 15:00 +0200 |
| Message-ID | <sns3B-97-19@gated-at.bofh.it> |
| In reply to | #173036 |
On Sat, Oct 01, 2016 at 02:33:27PM +0200, mo wrote: > > > > I sure appreciate to know the inner workings of it all :) > Good to know how avahi is involved here, this paints me a clearer picture :) > I just want to correct one thing I said here, having read your other posts. In one of them you mentioned you have static routing mappings set up for your network machines in /etc/hosts. That is a perfectly valid setup, albeit it is not the default "Debian way" (by which I mean only that it is not how Debian comes configured out of the box, or more accurately out of the .iso) and not how I do it. What a pain if you buy a new computer to add to your network! But absolutely nothing invalid about it. In this case, Avahi is probably *not* involved because exim4 gets an answer to the question of what IP the host name maps to, without having to consult it. But it *would be* involved if you did not have static mappings set up in /etc/hosts. Mark
[toc] | [prev] | [next] | [standalone]
| From | mo <mo777@gmx.net> |
|---|---|
| Date | 2016-10-01 15:00 +0200 |
| Message-ID | <sns3B-97-25@gated-at.bofh.it> |
| In reply to | #173040 |
Am 01.10.2016 um 14:51 schrieb Mark Fletcher: > On Sat, Oct 01, 2016 at 02:33:27PM +0200, mo wrote: >> >> >> >> I sure appreciate to know the inner workings of it all :) >> Good to know how avahi is involved here, this paints me a clearer picture :) >> > > I just want to correct one thing I said here, having read your other > posts. In one of them you mentioned you have static routing mappings set > up for your network machines in /etc/hosts. That is a perfectly valid > setup, albeit it is not the default "Debian way" (by which I mean only > that it is not how Debian comes configured out of the box, or more > accurately out of the .iso) and not how I do it. What a pain if you buy > a new computer to add to your network! But absolutely nothing invalid > about it. Well i'm using the static network config since quite some time, but i had planned to change over to DHCP... But for now it works ;) (The work is not so hard, adding a machine to the network is done quickly with Debian ;) - My other machines use different Operating Systems, got FreeBSD and OpenBSD here to on the LAN, works like a charm :) ) > In this case, Avahi is probably *not* involved because exim4 gets an > answer to the question of what IP the host name maps to, without having > to consult it. But it *would be* involved if you did not have static > mappings set up in /etc/hosts. Good to know ;) > Mark > Thanks Mark ;) Greets mo
[toc] | [prev] | [next] | [standalone]
| From | Brian <ad44@cityscape.co.uk> |
|---|---|
| Date | 2016-10-01 15:00 +0200 |
| Message-ID | <sns3v-97-1@gated-at.bofh.it> |
| In reply to | #173034 |
On Sat 01 Oct 2016 at 21:23:33 +0900, Mark Fletcher wrote: > On Sat, Oct 01, 2016 at 12:36:10PM +0200, mo wrote: > > > > I just did that and now mailing works flawlessly :D > > Just one questions: Why do i need hubbed_host entries? Should it not be fine > > alone to make a entry in /etc/hosts for the machines i want to send mail to > > (I do not operate a dedicated DNS server). > > This is something i dont really understand... > > hubbed_host entries apply only to exim4. I also suspect, but am not > sure, that they are a Debian extension to exim4 in the sense that the > *DEBIAN* exim4 comes configured for them out of the box, while the > upstream exim4 does not. IIRC there is no reference to hubbed_hosts in > the upstream documentation, only in the Debian docs. Correct. I'll add: the upstream documentation spec.txt.gz covers hubbed_hosts in sections 20.3 to 20.7. It is not obligatory to read it. > They work because the debian config contains a router to handle hubbed > hosts. You can see what it is doing if you search > /var/lib/exim4/config.autogenerated for the text hubbed_hosts. Fine. > If the file is not populated this router is skipped and then exim4 > requires either that the address is the local machine, or that there is > a smarthost configured that it can delegate to, or that it can find an > official MX entry for the target domain by doing a DNS lookup. All of > which will fail for a local box that isn't registered to the world as a > mail server. The thing for Mo to grasp is that exim *always* does an MX lookup, often using the ISP's DNS server. user@server will fail (as has been found out) because the domain "server" is not in the DNS. /etc/hosts is not consulted when the lookup is done. exim can be made to look at /etc/hosts but for such a simple setup it is not worth the effort and would likely lead to a world of pain. -- Brian.
[toc] | [prev] | [next] | [standalone]
| From | mo <mo777@gmx.net> |
|---|---|
| Date | 2016-10-01 15:10 +0200 |
| Message-ID | <snsdb-s2-5@gated-at.bofh.it> |
| In reply to | #173038 |
Am 01.10.2016 um 14:56 schrieb Brian: > On Sat 01 Oct 2016 at 21:23:33 +0900, Mark Fletcher wrote: > >> On Sat, Oct 01, 2016 at 12:36:10PM +0200, mo wrote: >>> >>> I just did that and now mailing works flawlessly :D >>> Just one questions: Why do i need hubbed_host entries? Should it not be fine >>> alone to make a entry in /etc/hosts for the machines i want to send mail to >>> (I do not operate a dedicated DNS server). >>> This is something i dont really understand... >> >> hubbed_host entries apply only to exim4. I also suspect, but am not >> sure, that they are a Debian extension to exim4 in the sense that the >> *DEBIAN* exim4 comes configured for them out of the box, while the >> upstream exim4 does not. IIRC there is no reference to hubbed_hosts in >> the upstream documentation, only in the Debian docs. > > Correct. I'll add: the upstream documentation spec.txt.gz covers > hubbed_hosts in sections 20.3 to 20.7. It is not obligatory to read it. > >> They work because the debian config contains a router to handle hubbed >> hosts. You can see what it is doing if you search >> /var/lib/exim4/config.autogenerated for the text hubbed_hosts. > > Fine. > >> If the file is not populated this router is skipped and then exim4 >> requires either that the address is the local machine, or that there is >> a smarthost configured that it can delegate to, or that it can find an >> official MX entry for the target domain by doing a DNS lookup. All of >> which will fail for a local box that isn't registered to the world as a >> mail server. > > The thing for Mo to grasp is that exim *always* does an MX lookup, often > using the ISP's DNS server. user@server will fail (as has been found > out) because the domain "server" is not in the DNS. > > /etc/hosts is not consulted when the lookup is done. exim can be made to > look at /etc/hosts but for such a simple setup it is not worth the > effort and would likely lead to a world of pain. just out of curiosity: What did i have to do to make exim honor the /etc/hosts file? :) (I quite often find myself in the world of pain :D ) Greets mo
[toc] | [prev] | [next] | [standalone]
| From | Mark Fletcher <mark27q1@gmail.com> |
|---|---|
| Date | 2016-10-01 15:40 +0200 |
| Message-ID | <snsGe-D4-13@gated-at.bofh.it> |
| In reply to | #173038 |
On Sat, Oct 01, 2016 at 01:56:40PM +0100, Brian wrote: > The thing for Mo to grasp is that exim *always* does an MX lookup, often > using the ISP's DNS server. user@server will fail (as has been found > out) because the domain "server" is not in the DNS. > > /etc/hosts is not consulted when the lookup is done. exim can be made to > look at /etc/hosts but for such a simple setup it is not worth the > effort and would likely lead to a world of pain. > With great respect I think that confuses the issue. A DNS lookup will *not* explicitly get done by exim4 if the target domain is in hubbed_hosts, or if exim4 has been told it is the local domain. The point is one wishes to PREVENT a DNS lookup that is doomed to fail, and one does so for machines that are not the machine-local domain by putting them in hubbed_hosts, which will cause exim4 to throw out a connection request for the local network infrastructure (starting with the network infra on the local machine) to handle, without doing an explicit DNS lookup. That is handled by /etc/hosts if it is populated, and by Avahi if it is present and /etc/hosts is not populated, and no doubt by a few other alternatives I am not familiar with as well. If none of them succeed, the delivery will fail, because if I recall correctly hubbed_hosts router config ends with no_more which prevents other routers having a go. However, for domains NOT listed in hubbed_hosts, if not in smarthost mode, yes exim4's next move will be an explicit DNS lookup on the domain. It is trying to find out what *machine* it should contact to make the delivery to that domain. If it is in smarthost mode, it throws its hands in the air and passes the problem to the smarthost to solve. Mark
[toc] | [prev] | [next] | [standalone]
| From | mo <mo777@gmx.net> |
|---|---|
| Date | 2016-10-01 16:20 +0200 |
| Message-ID | <sntiV-1bp-5@gated-at.bofh.it> |
| In reply to | #173046 |
Am 01.10.2016 um 15:36 schrieb Mark Fletcher: > On Sat, Oct 01, 2016 at 01:56:40PM +0100, Brian wrote: > >> The thing for Mo to grasp is that exim *always* does an MX lookup, often >> using the ISP's DNS server. user@server will fail (as has been found >> out) because the domain "server" is not in the DNS. >> >> /etc/hosts is not consulted when the lookup is done. exim can be made to >> look at /etc/hosts but for such a simple setup it is not worth the >> effort and would likely lead to a world of pain. >> > > With great respect I think that confuses the issue. A DNS lookup will > *not* explicitly get done by exim4 if the target domain is in > hubbed_hosts, or if exim4 has been told it is the local domain. The > point is one wishes to PREVENT a DNS lookup that is doomed to fail, and > one does so for machines that are not the machine-local domain by > putting them in hubbed_hosts, which will cause exim4 to throw out a > connection request for the local network infrastructure (starting with > the network infra on the local machine) to handle, without doing an > explicit DNS lookup. That is handled by /etc/hosts if it is populated, > and by Avahi if it is present and /etc/hosts is not populated, and no > doubt by a few other alternatives I am not familiar with as well. If > none of them succeed, the delivery will fail, because if I recall > correctly hubbed_hosts router config ends with no_more which prevents > other routers having a go. > > However, for domains NOT listed in hubbed_hosts, if not in smarthost > mode, yes exim4's next move will be an explicit DNS lookup on the > domain. It is trying to find out what *machine* it should contact to > make the delivery to that domain. If it is in smarthost mode, it throws > its hands in the air and passes the problem to the smarthost to solve. Oh yes, i see. Indeed i can understand your point! Thanks for the explanation ;) My picture of exim is getting better and better :) > Mark > Greets mo
[toc] | [prev] | [next] | [standalone]
| From | Brian <ad44@cityscape.co.uk> |
|---|---|
| Date | 2016-10-01 16:40 +0200 |
| Message-ID | <sntCi-1jD-13@gated-at.bofh.it> |
| In reply to | #173046 |
On Sat 01 Oct 2016 at 22:36:09 +0900, Mark Fletcher wrote: > On Sat, Oct 01, 2016 at 01:56:40PM +0100, Brian wrote: > > > The thing for Mo to grasp is that exim *always* does an MX lookup, often > > using the ISP's DNS server. user@server will fail (as has been found > > out) because the domain "server" is not in the DNS. > > > > /etc/hosts is not consulted when the lookup is done. exim can be made to > > look at /etc/hosts but for such a simple setup it is not worth the > > effort and would likely lead to a world of pain. > > I hope we are not talking at cross-purposes. I was explicitly addressing the issue of why an entry in /etc/hosts for machines on the network will not replace a hubbed_hosts file. > With great respect I think that confuses the issue. A DNS lookup will > *not* explicitly get done by exim4 if the target domain is in > hubbed_hosts, or if exim4 has been told it is the local domain. The A hubbed_hosts file is for overriding or augmenting MX information from the DNS (exim4-config_files). If you had lists.debian.org: 91.221.168.152 the DNS would not be used and any mail to debian-user@lists.debian.org would go to 91.221.168.152. MX information would be overriden. With server: 192.168.5.100 or server: server.local MX information is augmented. > point is one wishes to PREVENT a DNS lookup that is doomed to fail, and No. The point is you want to override or augment MX information. Ok, a DNS lookup is prevented but it is not because it is one which is doomed to fail. A lookup on lists.debian.org would succeed but for some reason the user wants the mail to go to 91.221.168.152. > one does so for machines that are not the machine-local domain by > putting them in hubbed_hosts, which will cause exim4 to throw out a > connection request for the local network infrastructure (starting with > the network infra on the local machine) to handle, without doing an > explicit DNS lookup. That is handled by /etc/hosts if it is populated, > and by Avahi if it is present and /etc/hosts is not populated, and no > doubt by a few other alternatives I am not familiar with as well. If > none of them succeed, the delivery will fail, because if I recall > correctly hubbed_hosts router config ends with no_more which prevents > other routers having a go. exim does not use /etc/hosts; user@server will fail with '192.168.7.88 server' in it. user@server,local succeeds because server.local is in the DNS. -- Brian.
[toc] | [prev] | [next] | [standalone]
| From | Teemu Likonen <tlikonen@iki.fi> |
|---|---|
| Date | 2016-10-01 16:00 +0200 |
| Message-ID | <snsZz-KX-13@gated-at.bofh.it> |
| In reply to | #173021 |
[Multipart message — attachments visible in raw view] — view raw
mo [2016-10-01 12:36:10+02] wrote: > I'm not a friend of avahi to be honest, i much rather ignore it :D Avahi is great. My ethernet-connected printer uses DHCP to get IP address and network configuration. The printer announces itself to the network with <mac-address>.local name so a print server can use that name to connect to it. CUPS print server also announces its printers by names. No static IP address configuration needed anywhere. I think the underlying technique is called multicast DNS. -- /// Teemu Likonen - .-.. <https://github.com/tlikonen> // // PGP: 4E10 55DC 84E9 DFF6 13D7 8557 719D 69D3 2453 9450 ///
[toc] | [prev] | [next] | [standalone]
Page 1 of 3 [1] 2 3 Next page →
Back to top | Article view | linux.debian.user
csiph-web