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

network_table format

833 views
Skip to first unread message

CT

unread,
May 6, 2011, 6:53:13 PM5/6/11
to
Question on main.cf

mynetworks = hash:/etc/postfix/network_table

After much looking and I surmise the format should be
192.168.1.2 OK (a space between IP and "OK")
"should work"..

and that CIDR
192.168.1.0/24 OK (a space between IP and "OK")
does not work.

In my test the "single IP" did not work either..

May 6 17:30:03 mailhost postfix/smtpd[30135]: NOQUEUE: reject: RCPT
from host.example.com [162.198.1.2]: 554 5.7.1 <us...@example.com>: Relay
access denied;

thx
Charles

Sahil Tandon

unread,
May 6, 2011, 6:59:49 PM5/6/11
to
On Fri, 2011-05-06 at 17:53:13 -0500, CT wrote:

> Question on main.cf
>
> mynetworks = hash:/etc/postfix/network_table
>
> After much looking and I surmise the format should be
> 192.168.1.2 OK (a space between IP and "OK")
> "should work"..

In this context, Postfix only cares if the lookup succeeds; the result
(whether it's OK, or anything else) is ignored.

> and that CIDR
> 192.168.1.0/24 OK (a space between IP and "OK")
> does not work.

If you wish to use CIDR, then use cidr: instead of hash:.

> In my test the "single IP" did not work either..
>
> May 6 17:30:03 mailhost postfix/smtpd[30135]: NOQUEUE: reject: RCPT
> from host.example.com [162.198.1.2]: 554 5.7.1 <us...@example.com>:
> Relay access denied;

192.168.1.2 != 162.198.1.2. For more help, please consult the
DEBUG_README before your next post to this mailing list.

--
Sahil Tandon <sa...@FreeBSD.org>

/dev/rob0

unread,
May 6, 2011, 7:11:15 PM5/6/11
to
On Fri, May 06, 2011 at 05:53:13PM -0500, CT wrote:
> mynetworks = hash:/etc/postfix/network_table
>
> After much looking and I surmise the format should be
> 192.168.1.2 OK (a space between IP and "OK")
> "should work"..

For hash: or cidr: (see cidr_table(5)), yes.

> and that CIDR
> 192.168.1.0/24 OK (a space between IP and "OK")
> does not work.

For hash:, no, won't work; for cidr:, yes, it will.

http://www.postfix.org/DATABASE_README.html

> In my test the "single IP" did not work either..
>
> May 6 17:30:03 mailhost postfix/smtpd[30135]: NOQUEUE: reject: RCPT
> from host.example.com [162.198.1.2]: 554 5.7.1 <us...@example.com>:
> Relay access denied;

Not enough information to answer, but there is a strong hint that
munging took place: 162.198.1.2 != 192.168.1.2. (Why would you mung
RFC1918 addresses?)

http://www.postfix.org/DEBUG_README.html#mail
--
Offlist mail to this address is discarded unless
"/dev/rob0" or "not-spam" is in Subject: header

CT

unread,
May 6, 2011, 7:47:59 PM5/6/11
to

>> mynetworks = hash:/etc/postfix/network_table
>>
>> After much looking and I surmise the format should be
>> 192.168.1.2 OK (a space between IP and "OK")
>> "should work"..
> For hash: or cidr: (see cidr_table(5)), yes.
>
>> and that CIDR
>> 192.168.1.0/24 OK (a space between IP and "OK")
>> does not work.
> For hash:, no, won't work; for cidr:, yes, it will.
>
> http://www.postfix.org/DATABASE_README.html
>
>> In my test the "single IP" did not work either..
>>
>> May 6 17:30:03 mailhost postfix/smtpd[30135]: NOQUEUE: reject: RCPT
>> from host.example.com [162.198.1.2]: 554 5.7.1<us...@example.com>:
>> Relay access denied;
> Not enough information to answer, but there is a strong hint that
> munging took place: 162.198.1.2 != 192.168.1.2. (Why would you mung
> RFC1918 addresses?)
>
> http://www.postfix.org/DEBUG_README.html#mail
162 was a typo...
Thank you for the response..and the cidr link..

Charles

0 new messages