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

UCE restrictions

2 views
Skip to first unread message

Dean Gibson (Mail Administrator)

unread,
Jun 12, 2003, 5:20:32 PM6/12/03
to
Does "smtpd_client_restrictions = check_client_access hash:/etc/postfix/hash/client.map" also check the result of the reverse IP lookup? I'd like to block all mail emanating from videotron.ca IP addresses.

-- Dean

Dean Gibson (Mail Administrator)

unread,
Jun 13, 2003, 6:59:28 PM6/13/03
to
--=====================_677005121==_.ALT
Content-Type: text/plain; charset="us-ascii"

That's what I thought the documentation said. However, here's my client access file (listed in main.cf: "smtpd_client_restrictions = check_client_access hash:/etc/postfix/hash/client.map"):

.videotron.ca 553 Blacklisted 2002-08-22 due to spam

(Someone suggested this should be ".mc.videotron.ca", which I will do soon, but see below.)

Here's a log entry:

Jun 13 08:20:24 fw1 postfix/smtpd[15999]: connect from relais.videotron.ca[24.201.245.36]
Jun 13 08:20:24 fw1 postfix/smtpd[15999]: B2160BBB91: client=relais.videotron.ca[24.201.245.36]
Jun 13 08:20:25 fw1 postfix/smtpd[15999]: reject: RCPT from relais.videotron.ca[24.201.245.36]: 450 <VL-MO-MR001.ip.videotron.ca>: Helo command rejected: Host not found; from=<> to=<postm...@ultimeth.net>
Jun 13 08:20:35 fw1 postfix/smtpd[15999]: disconnect from relais.videotron.ca[24.201.245.36]

My question is, since client restrictions in "smtpd_client_restrictions" are applied before "smtpd_helo_restrictions = reject_invalid_hostname", why is the above being rejected on helo hostname and not on the reverse IP lookup (which points to "videotron.ca") ??? The logs also verify I did a "postfix reload" after the "postmap" on the client access file.

I have not altered "smtpd_delay_reject".

-- Dean

Noel Jones wrote on 2003-06-12 14:30:


>At 02:20 PM 6/12/03 -0700, Dean Gibson (Mail Administrator) wrote:
>>Does "smtpd_client_restrictions = check_client_access hash:/etc/postfix/hash/client.map" also check the result of the reverse IP lookup? I'd like to block all mail emanating from videotron.ca IP addresses.
>>
>>-- Dean
>

>Yes, you may use client names in an access table. However if there is a DNS failure the client will be listed as "unknown" and the check won't work.
>Whenever possible, list clients by IP number.
>
>
>--
>Noel Jones

--=====================_677005121==_.ALT
Content-Type: text/html; charset="us-ascii"

<html>
That's what I thought the documentation said.&nbsp; However, here's my
client access file (listed in main.cf: &quot;smtpd_client_restrictions =
check_client_access hash:/etc/postfix/hash/client.map&quot;):<br><br>
<tt>.videotron.ca&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
553 Blacklisted 2002-08-22 due to spam<br><br>
</tt>(Someone suggested this should be &quot;.mc.videotron.ca&quot;,
which I will do soon, but see below.)<br><br>
Here's a log entry:<br><br>
<tt>Jun 13 08:20:24 fw1 postfix/smtpd[15999]: connect from
relais.videotron.ca[24.201.245.36]<br>
Jun 13 08:20:24 fw1 postfix/smtpd[15999]: B2160BBB91:
client=relais.videotron.ca[24.201.245.36]<br>
Jun 13 08:20:25 fw1 postfix/smtpd[15999]: reject: RCPT from
relais.videotron.ca[24.201.245.36]: 450
&lt;VL-MO-MR001.ip.videotron.ca&gt;: Helo command rejected: Host not
found; from=&lt;&gt; to=&lt;postm...@ultimeth.net&gt;<br>
Jun 13 08:20:35 fw1 postfix/smtpd[15999]: disconnect from
relais.videotron.ca[24.201.245.36]<br><br>
</tt>My question is, since client restrictions in
&quot;smtpd_client_restrictions&quot; are applied before
&quot;smtpd_helo_restrictions = reject_invalid_hostname&quot;, why is the
above being rejected on helo hostname and not on the reverse IP lookup
(which points to &quot;videotron.ca&quot;) ???&nbsp; The logs also verify
I did a &quot;postfix reload&quot; after the &quot;postmap&quot; on the
client access file.<br><br>
I have not altered &quot;smtpd_delay_reject&quot;.<br><br>
-- Dean<br><br>
Noel Jones wrote on 2003-06-12 14:30:<br>
<blockquote type=cite class=cite cite>At 02:20 PM 6/12/03 -0700, Dean
Gibson (Mail Administrator) wrote:<br>
<blockquote type=cite class=cite cite>Does
&quot;smtpd_client_restrictions = check_client_access
hash:/etc/postfix/hash/client.map&quot; also check the result of the
reverse IP lookup?&nbsp; I'd like to block all mail emanating from
videotron.ca IP addresses.<br><br>
-- Dean</blockquote><br>
Yes, you may use client names in an access table.&nbsp; However if there
is a DNS failure the client will be listed as &quot;unknown&quot; and the
check won't work.<br>
Whenever possible, list clients by IP number.<br><br>
<br>
-- <br>
Noel Jones </blockquote></html>

--=====================_677005121==_.ALT--

Wietse Venema

unread,
Jun 13, 2003, 8:49:59 PM6/13/03
to
Dean Gibson (Mail Administrator):

> That's what I thought the documentation said. However, here's my client access file (listed in main.cf: "smtpd_client_restrictions = check_client_access hash:/etc/postfix/hash/client.map"):
>
> .videotron.ca 553 Blacklisted 2002-08-22 due to spam

Where does the fine manual say that domains start with . in
Postfix access tables?

Wietse

Dean Gibson (Mail Administrator)

unread,
Jun 13, 2003, 10:43:03 PM6/13/03
to
--=====================_690414854==_.ALT
Content-Type: text/plain; charset="us-ascii"

In the fine MAN page for access (excerpts):

man 5 access

ACCESS(5) ACCESS(5)

NAME
access - format of Postfix access table

...

EMAIL ADDRESS PATTERNS
With lookups from indexed files such as DB or DBM, or from networked
tables such as NIS, LDAP or SQL, the following lookup patterns are
examined in the order as listed:

user@domain
Matches the specified mail address.

domain.tld
Matches domain.tld as the domain part of an email address.

The pattern domain.tld also matches subdomains, but only when
the string smtpd_access_maps is listed in the Postfix par-
ent_domain_matches_subdomains configuration setting. Otherwise,
specify .domain.tld (note the initial dot) in order to match
subdomains.

...

HOST NAME/ADDRESS PATTERNS
With lookups from indexed files such as DB or DBM, or from networked
tables such as NIS, LDAP or SQL, the following lookup patterns are
examined in the order as listed:

domain.tld
Matches domain.tld.

The pattern domain.tld also matches subdomains, but only when
the string smtpd_access_maps is listed in the Postfix par-
ent_domain_matches_subdomains configuration setting. Otherwise,
specify .domain.tld (note the initial dot) in order to match
subdomains.

This text is also at http://www.postfix.org/access.5.html

Should I leave off the dot, and specify "parent_domain_matches_subdomains = yes" instead ??

-- Dean

--=====================_690414854==_.ALT
Content-Type: text/html; charset="us-ascii"

<html>
In the fine MAN page for access (excerpts):<br><br>
<tt>man 5 access<br><br>
ACCESS(5)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
ACCESS(5)<br><br>
NAME<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; access - format of Postfix access
table<br><br>
...<br><br>
EMAIL ADDRESS PATTERNS<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; With lookups from indexed files such
as DB or DBM,&nbsp; or&nbsp; from&nbsp; networked<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tables&nbsp; such&nbsp; as&nbsp;
NIS,&nbsp; LDAP&nbsp; or SQL, the following lookup patterns are<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; examined in the order as
listed:<br><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; user@domain<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Matches the specified mail address.<br><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; domain.tld<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Matches domain.tld as the domain part of an email address.<br><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
The pattern domain.tld also matches subdomains,&nbsp; but&nbsp;
only&nbsp; when<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
the&nbsp; string&nbsp; smtpd_access_maps&nbsp; is&nbsp; listed&nbsp;
in&nbsp; the Postfix par-<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
ent_domain_matches_subdomains configuration setting.&nbsp;
Otherwise,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
specify&nbsp; .domain.tld&nbsp; (note&nbsp; the&nbsp; initial dot) in
order to match<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
subdomains.<br><br>
...<br><br>
HOST NAME/ADDRESS PATTERNS<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; With&nbsp; lookups&nbsp; from&nbsp;
indexed files such as DB or DBM, or from networked<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tables such as NIS, LDAP or
SQL,&nbsp; the&nbsp; following&nbsp; lookup&nbsp; patterns&nbsp;
are<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; examined in the order as
listed:<br><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; domain.tld<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Matches domain.tld.<br><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
The&nbsp; pattern&nbsp; domain.tld&nbsp; also matches subdomains, but
only when<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
the string smtpd_access_maps&nbsp; is&nbsp; listed&nbsp; in&nbsp;
the&nbsp; Postfix&nbsp; par-<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
ent_domain_matches_subdomains configuration setting.&nbsp;
Otherwise,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
specify .domain.tld (note the initial dot)&nbsp; in&nbsp; order&nbsp;
to&nbsp; match<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
subdomains.<br><br>
</b></tt>This text is also at
<a href="http://www.postfix.org/access.5.html" eudora="autourl">http://www.postfix.org/access.5.html</a><br><br>
Should I leave off the dot, and specify
&quot;parent_domain_matches_subdomains = yes&quot; instead ??<br><br>
-- Dean<br><br>
Wietse Venema wrote on 2003-06-13 17:49:<br>
<blockquote type=cite class=cite cite>Dean Gibson (Mail
Administrator):<br>
<blockquote type=cite class=cite cite>That's what I thought the
documentation said.&nbsp; However, here's my client access file (listed


in main.cf: &quot;smtpd_client_restrictions = check_client_access
hash:/etc/postfix/hash/client.map&quot;):<br><br>

.videotron.ca&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

553 Blacklisted 2002-08-22 due to spam</blockquote><br>


Where does the fine manual say that domains start with . in Postfix

access tables?<br><br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>Wietse</blockquote></html>

--=====================_690414854==_.ALT--

Nicolas Riendeau

unread,
Jun 13, 2003, 11:05:24 PM6/13/03
to
Dean Gibson (Mail Administrator) wrote:

> The pattern domain.tld also matches subdomains, but only when
> the string smtpd_access_maps is listed in the Postfix

> parent_domain_matches_subdomains configuration setting.

>
> Otherwise, specify .domain.tld (note the initial dot) in order to
> match subdomains.
>
> This text is also at http://www.postfix.org/access.5.html
>
> Should I leave off the dot, and specify
> "parent_domain_matches_subdomains = yes" instead ??

Hi!

parent_domain_matches_subdomains is a list which, by default, contains

parent_domain_matches_subdomains = debug_peer_list,fast_flush_domains,
mynetworks,permit_mx_backup_networks,qmqpd_authorized_clients,relay_domains,smtpd_access_maps

I believe that when smtpd_access_maps is listed in parent_domain_matches_subdomains
the dot (".") *has to* be removed...

Have a nice day!

Nick


Nicolas Riendeau

unread,
Jun 13, 2003, 11:13:07 PM6/13/03
to
Hi!

Dean Gibson (Mail Administrator) wrote:

> That's what I thought the documentation said. However, here's my client
> access file (listed in main.cf: "smtpd_client_restrictions =
> check_client_access hash:/etc/postfix/hash/client.map"):
>
> .videotron.ca 553 Blacklisted 2002-08-22 due to spam
>

> (Someone suggested this should be ".mc.videotron.ca", which I will do
> soon, but see below.)

I have a feeling mc stands for "modem cable" (cable modem in French...).

> Here's a log entry:
>
> Jun 13 08:20:24 fw1 postfix/smtpd[15999]: connect from
> relais.videotron.ca[24.201.245.36]
> Jun 13 08:20:24 fw1 postfix/smtpd[15999]: B2160BBB91:
> client=relais.videotron.ca[24.201.245.36]
> Jun 13 08:20:25 fw1 postfix/smtpd[15999]: reject: RCPT from
> relais.videotron.ca[24.201.245.36]: 450 <VL-MO-MR001.ip.videotron.ca>:
> Helo command rejected: Host not found; from=<> to=<postm...@ultimeth.net>

If you use reject_unknown_hostname you will never be able to receive mail from that
ISP's mail servers (there appears to be many servers "sitting" behind the relais.videotron.ca IP)
even if you block only mc.videotron.ca as as they are somewhat misconfigured...

[I believe each of these servers used to have their own IP but for some reason they decided
to put them all behind the same IP (using NAT...).]

Dean Gibson (Mail Administrator)

unread,
Jun 13, 2003, 11:53:36 PM6/13/03
to
AAHHH! Since I never read about "parent_domain_matches_subdomains" (let alone changed it), I didn't realise that the DEFAULT included smtpd_access_maps, which is why the leading dot in the access map is not working !!!

Thanks!

-- Dean

Nicolas Riendeau wrote on 2003-06-13 20:05:
>Dean Gibson (Mail Administrator) wrote:
>

0 new messages