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

[CentOS 6.2]Dovecot trusted network syntax please.

1,141 views
Skip to first unread message

Ohmster

unread,
Apr 2, 2012, 7:35:09 PM4/2/12
to
Fast question,

Can somebody please give the the correct syntax for the Dovecot.conf file
for trusted networks? I see the dovecot.conf page, there is no example
given, and everything I google are blank config sheets with no syntax
example.

i.e.: Logwatch Report, Dovecot
dovecot: pop3-login: Error: login_trusted_networks: Invalid network
'192.168.15.1/150': 42 Time(s)

I use a home network and pop3 on a closed Postfix server and use Dovecot
to supply mail to Win 7 Windows Mail program. I can fetch fine but the
trusted network config is giving me errors every day in my Logwatch report
that I would like to correct it.

Home Network: 192.168.15.1, CentOS Server
Laptop: 192.168.15.4
Desktop PC, 192.168.15.3
DHCP enabled on router.

I just want any computer on home network, in this range, to be on the
trusted network for email. So I could use my phone or another PC if I
wanted to. Range 192.168.15.1-192.168.15.150 should be good enough, I could
got to 255, but do not know the syntax for Dovecot trusted network setting.
How do you type in an I.P. address range?

Thanks.

--
~Ohmster | ohmster59 /a/t/ gmail dot com

J.O. Aho

unread,
Apr 3, 2012, 12:27:41 AM4/3/12
to
Ohmster wrote:

> i.e.: Logwatch Report, Dovecot
> dovecot: pop3-login: Error: login_trusted_networks: Invalid network
> '192.168.15.1/150': 42 Time(s)

> I just want any computer on home network, in this range, to be on the
> trusted network for email. So I could use my phone or another PC if I
> wanted to. Range 192.168.15.1-192.168.15.150 should be good enough, I could
> got to 255, but do not know the syntax for Dovecot trusted network setting.
> How do you type in an I.P. address range?

192.168.15.0/24 = 1 - 255




--

//Aho

Ohmster

unread,
Apr 4, 2012, 1:19:13 AM4/4/12
to
"J.O. Aho" <us...@example.net> wrote in news:9tvchtFqmiU1
@mid.individual.net:

> 192.168.15.0/24 = 1 - 255

Really? Just like that? Let me try that out, thanks JO!

Ohmster

unread,
Apr 4, 2012, 1:23:44 AM4/4/12
to
"J.O. Aho" <us...@example.net> wrote in news:9tvchtFqmiU1
@mid.individual.net:

> 192.168.15.0/24 = 1 - 255

Wait, I don't get it. You mean like this?
login_trusted_networks = 1 - 255
or exactly like above with two equal signs?
login_trusted_networks = 192.168.15.0/24 = 1 - 255

--

Loki Harfagr

unread,
Apr 4, 2012, 3:13:53 AM4/4/12
to
Wed, 04 Apr 2012 00:23:44 -0500, Ohmster did cat :

> "J.O. Aho" <us...@example.net> wrote in news:9tvchtFqmiU1
> @mid.individual.net:
>
>> 192.168.15.0/24 = 1 - 255
>
> Wait, I don't get it. You mean like this? login_trusted_networks = 1 -
> 255
> or exactly like above with two equal signs? login_trusted_networks =
> 192.168.15.0/24 = 1 - 255

he just corrected your incorrect idea of a cidr notation and
suggested you used /24 which would give you the full "1 to 255",
(there is no one-shot way in cidr notation to get "1 to 150" (*)
and a /150 doesn't mean anything sensible or related to what
you imagined it would do :-)


(*) if you insist on "1 to 150" range this should do:
192.168.15.0/25
192.168.15.128/28
192.168.15.144/30
192.168.15.148/31
192.168.15.150/32
Message has been deleted

J G Miller

unread,
Apr 4, 2012, 2:05:10 PM4/4/12
to
On Wednesday, April 4th, 2012, at 08:42:16h -0700, Steve Ackman explained:

> Conversely then, for a bit of a potentially aha moment, do
> $ ipcalc 192.168.15.0/24

Would that not be more of an "Aho" moment? ;)

Ohmster

unread,
Apr 7, 2012, 11:49:43 PM4/7/12
to
J G Miller <mil...@yoyo.ORG> wrote in news:jli2gl$rcp$1...@dont-email.me:

> Would that not be more of an "Aho" moment? ;)

LOL!

Ohmster

unread,
Apr 7, 2012, 11:58:48 PM4/7/12
to
Steve Ackman <st...@SNIP-THIS.twoloonscoffee.com> wrote in
news:slrnjnoquo...@wizard.dyndns.org:

> On Wed, 04 Apr 2012 00:19:13 -0500, Ohmster wrote:
>> "J.O. Aho" <us...@example.net> wrote in news:9tvchtFqmiU1
>> @mid.individual.net:
>>
>>> 192.168.15.0/24 = 1 - 255
>>
>> Really? Just like that? Let me try that out, thanks JO!
>
> No, like this:
>
> 192.168.15.0/24
>
> That means hosts 192.168.15.1 through 192.168.15.254
> with 192.168.15.255 serving as the broadcast address.
>
> If you don't have it installed, grab 'ipcalc'
>
> $ ipcalc 192.168.15.0 - 192.168.15.254
> 192.168.15.0/24
>
> Conversely then, for a bit of a potentially aha moment, do
> $ ipcalc 192.168.15.0/24
>

For sure, this did NOT work at all:
login_trusted_networks = 1 - 255

dovecot: pop3-login: Error: login_trusted_networks: Invalid network '-':
48 Time(s)

Trying this now:
login_trusted_networks = 192.168.15.0/24

Will keep an eye on the log files to see if Logwatch stops complaining
about it. Thnx.

Oh, I do have ipcalc installed. Your suggestion is giving me different
results though.
---------------------------------------------------------------------
$ ipcalc 192.168.15.0 - 192.168.15.254
ipcalc: unexpected argument: -
Usage: ipcalc [OPTION...]
-c, --check Validate IP address for specified address family
-4, --ipv4 IPv4 address family (default)
-6, --ipv6 IPv6 address family
-b, --broadcast Display calculated broadcast address
-h, --hostname Show hostname determined via DNS
-m, --netmask Display default netmask for IP (class A, B, or C)
-n, --network Display network address
-p, --prefix Display network prefix
-s, --silent Don't ever display error messages

Help options:
-?, --help Show this help message
--usage Display brief usage message
$
---------------------------------------------------------------------
Let's try that "Ah ho" moment, shall we?
---------------------------------------------------------------------
$ ipcalc 192.168.15.0/24
Usage: ipcalc [OPTION...]
-c, --check Validate IP address for specified address family
-4, --ipv4 IPv4 address family (default)
-6, --ipv6 IPv6 address family
-b, --broadcast Display calculated broadcast address
-h, --hostname Show hostname determined via DNS
-m, --netmask Display default netmask for IP (class A, B, or C)
-n, --network Display network address
-p, --prefix Display network prefix
-s, --silent Don't ever display error messages

Help options:
-?, --help Show this help message
--usage Display brief usage message
$
---------------------------------------------------------------------

I think my ipcalc must be broken. :(

Thank you Mr. Aho.

Ohmster

unread,
Apr 8, 2012, 2:26:07 PM4/8/12
to
Steve Ackman <st...@SNIP-THIS.twoloonscoffee.com> wrote in
news:slrnjnoquo...@wizard.dyndns.org:

> On Wed, 04 Apr 2012 00:19:13 -0500, Ohmster wrote:
>> "J.O. Aho" <us...@example.net> wrote in news:9tvchtFqmiU1
>> @mid.individual.net:
>>
>>> 192.168.15.0/24 = 1 - 255
>>
>> Really? Just like that? Let me try that out, thanks JO!
>
> No, like this:
>
> 192.168.15.0/24
>
> That means hosts 192.168.15.1 through 192.168.15.254
> with 192.168.15.255 serving as the broadcast address.
>
[..]


This worked perfectly. Thank you JO and Steve. Happy Easter!

login_trusted_networks = 192.168.15.0/24

Moe Trin

unread,
Apr 8, 2012, 4:28:19 PM4/8/12
to
On Sat, 07 Apr 2012, in the Usenet newsgroup alt.os.linux, in article
<XnsA02EF3DF86...@216.196.97.131>, Ohmster wrote:

>Steve Ackman <st...@SNIP-THIS.twoloonscoffee.com> wrote

>> If you don't have it installed, grab 'ipcalc'

>Oh, I do have ipcalc installed. Your suggestion is giving me different
>results though.

Ah, you have to tell it what you're looking for:

[fermi ~]$ ipcalc -bmnp 192.168.15.0/24
NETMASK=255.255.255.0
PREFIX=24
BROADCAST=192.168.15.255
NETWORK=192.168.15.0
[fermi ~]$

Not entirely the most helpful application, I'll agree. You might find
it easier to look at an old (formerly INFORMATIONAL) RFC:

1878 Variable Length Subnet Table For IPv4. T. Pummill, B. Manning.
December 1995. (Format: TXT=19414 bytes) (Obsoletes RFC1860)
(Status: HISTORIC)

I dunno - try http://www.ietf.org/rfc/rfc1878.txt This is also
discussed in RFC0791 section 3.2, and RFC1122 section 3.2.1.3, but
they're not well written either.

Old guy

Ohmster

unread,
Apr 21, 2012, 4:02:17 PM4/21/12
to
Moe Trin <ibup...@painkiller.example.tld.invalid> wrote in
news:slrnjo3t73.1...@fermi.phx.az.us:

>>Oh, I do have ipcalc installed. Your suggestion is giving me different
>>results though.
>
> Ah, you have to tell it what you're looking for:
>
> [fermi ~]$ ipcalc -bmnp 192.168.15.0/24
> NETMASK=255.255.255.0
> PREFIX=24
> BROADCAST=192.168.15.255
> NETWORK=192.168.15.0
> [fermi ~]$
>
> Not entirely the most helpful application, I'll agree. You might find
> it easier to look at an old (formerly INFORMATIONAL) RFC:
>
> 1878 Variable Length Subnet Table For IPv4. T. Pummill, B. Manning.
> December 1995. (Format: TXT=19414 bytes) (Obsoletes RFC1860)
> (Status: HISTORIC)
>
> I dunno - try http://www.ietf.org/rfc/rfc1878.txt This is also
> discussed in RFC0791 section 3.2, and RFC1122 section 3.2.1.3, but
> they're not well written either.
>
> Old guy
>

This is a a wee tad over my head and the chances that I will understand
and be able to use this are pretty much slim to none. However, I most
certainly do appreciate your efforts to explain something that is
inherently very complicated to the best of your ability. Thanks OG.

Aho got it right with:
login_trusted_networks = 192.168.15.0/24

I can see how that would work, as to how to figure it out with ipcalc,
that is something that even I must admit is not going to happen. But that
is why I come here, there are lots of guys that do this stuff and know
exactly how to get this done.

I know a lot about electronics and if someone wanted me to show them how
to bridge a powerful audio amplifier, say a stereo amp that pushes 200
WRMS into 8 ohms, they had two of them (I did this when I was younger and
it worked great.), they make a small bridge box to run both amps in each
unit, on with an inverted signal and then use the two hot terminals for
one speaker set. Hence, you get a single 400 WRMS amplifier at 8 ohms.
Just use a dirt cheap dual op amp from Radio Shack, small power supply
like something from a thrown away cordless phone, and I would give them a
simple circuit with a few resistors that will yield unity gain (Same
amplitude output as you put in.) that would invert the signal to one of
the channels to the stereo amp.

I do not mind giving someone a circuit that can do something like that
because for me it is easy, it would take me all of 5 minutes, whilst to
someone else, it is totally Greek. People here like you and Aho can give
me something that is simple to you like the network range syntax, where
someone like I would spend a lifetime trying to figure it out.

Even though I do not understand the workings of ipcalc, I do like
listening to the explanation because if one hears it enough times, it
sinks in. Like in middle school, I *hated* multiplication tables. Because
there was no way to "cheat", it was rote memorization, period. We got
"times tables" cards of all numbers up to 12 and had to memorize ALL of
them. 1-5 was easy, anyone can do it, once I got to 6, 7, & 8, it got
hard because these are "in between numbers" that do not round off to ten
or anything easy to remember. 56, 64, & 49 just did not come easy for
me.

Thanks again OG.

Moe Trin

unread,
Apr 22, 2012, 6:18:47 PM4/22/12
to
On Sat, 21 Apr 2012, in the Usenet newsgroup alt.os.linux, in article
<XnsA03CA31208...@216.196.97.131>, Ohmster wrote:

>Moe Trin <ibup...@painkiller.example.tld.invalid> wrote

>> Ah, you have to tell it what you're looking for:

>> [fermi ~]$ ipcalc -bmnp 192.168.15.0/24
>> NETMASK=255.255.255.0
>> PREFIX=24
>> BROADCAST=192.168.15.255
>> NETWORK=192.168.15.0
>> [fermi ~]$

>I can see how that would work, as to how to figure it out with ipcalc,
>that is something that even I must admit is not going to happen.

The "ipcalc" program goes back a bit - I think Eric Troan created it
for Red Hat 5.0 (hurricane) back in 1997, and it was used as part of
the installation program. It's really meant as a sanity checker to
verify you are plugging in the "right" values for network parameters.
Actually, this was an improvement on the earlier programs that assumed
you'd only have a Class C network. "Classless Inter-Domain Routing"
(CIDR) goes back to 1992 when the Internet Engineering Steering Group
(an advisory group) decided we needed more than three network sizes
(the old so-called classful A, B and C sizes of 16777216, 65536 or 256
addresses). There was a lot of hand waving, but CIDR more or less
defined 30 (actually 32) network sizes with masks of 255.255.255.254
(a "/31") to 1.0.0.0 (a "/1"). This was an extension of the concept of
dividing up your "big" network into functionally usable "subnets" (the
original RFC0894 Ethernet had a _practical_ limit of 1024 hosts on the
wire, but 150 of them trying to talk at the same time would cause
gridlock). In practice, a lot less of the 30 or 32 binary sizes have
been put to use - currently, the five Regional Internet Registries
(AfriNIC, APNIC, ARIN, LACNIC amd RIPE) are only using 22 sizes from
255.0.0.0 (/8) down to 255.255.255.248 (/29). They also use
_non_binary masks to allocate or assign netspace, but that's an extra
confusion computer operating systems don't deal with.

In practice, most computers are set to deal with a limited number of
networks or sub-nets - I'd bet that more than 3/4 of the computers are
set up on a /24 - and that simplifies a lot of things. It means that
the network mask is 255.255.255.0 (which are also known as /24s or
having a hexidecimal mask of 0xFFFFFF00 depending on the O/S), and
all hosts on this network will have the same first three numbers of
the IP address. The "network" address will have a zero as the last
digit, and the "broadcast" will have 255 as the last digit. That
makes things simple. The problem is where (for some reason) the
network is NOT a /24. In that case, you have to think harder, and
the RFC1878 shows these values. But again, in practice, the world
is on a /24 and the question becomes "which one".

>I know a lot about electronics and if someone wanted me to show them
>how to bridge a powerful audio amplifier, say a stereo amp that
>pushes 200 WRMS into 8 ohms, they had two of them (I did this when I
>was younger and it worked great.), they make a small bridge box to run
>both amps in each unit, on with an inverted signal and then use the
>two hot terminals for one speaker set. Hence, you get a single 400
>WRMS amplifier at 8 ohms.

Of course, that assumes you had speakers that could handle that much
power. No, the first amp I built, I only had two speakers - a 12 and
a 5 inch. So I built a hi-fi amp... a 12AU7 as input amp and split
load phase inverter, and a pair of 6L6GBs for the output - don't forget
the 5U4 rectifier. Didn't _everyone_ play with those old 5 tube AC/DC
radios (series filament string)? Either the older ones with an octal
tube base, or the _modern_ ones with 7 or 9 pin miniatures.

>Like in middle school, I *hated* multiplication tables. Because there
>was no way to "cheat", it was rote memorization, period. We got "times
>tables" cards of all numbers up to 12 and had to memorize ALL of them.

A lot of learning at that stage was all memory. It started out by
learning to spell - I remember catching hell in first grade because
I very carefully spelt my own name (fifty times I think) wrong. I'm
sure you remember the dread you had of spelling tests, and going
through the crap of learning to add and subtract. And geography! Oh,
please don't ask me what the capital of Nebraska is... and I can't
even _spell_ Tallahassee!

>1-5 was easy, anyone can do it, once I got to 6, 7, & 8, it got hard
>because these are "in between numbers" that do not round off to ten
>or anything easy to remember. 56, 64, & 49 just did not come easy for
>me.

About the first week of 8th grade, I first saw a test that had a
square root problem - hadn't been taught that. A more knowledgeable
kid explained that the square root symbol was asking "what times
itself makes this number"... light goes on - I knew 8x8 was 64 ;-)

Old guy
0 new messages