admin Site Admin
Joined: 21 Jun 2005 Posts: 209
|
Posted: Tue Jul 18, 2006 5:52 pm Post subject: Want to restrict domain literals in recipient address |
|
|
>>> I would like to selectively restrict mail for 'domain literal'
>>> recipient addresses. E.g. allow mail to user@[10.x.y.z] while
>>> rejecting messages for all other user@[ip.ad.dr.ess].
Hi,
FYI, the solution I came up with (thanks Wietse for the pointer to
regexp_table):
in main.cf:
transport_maps =
dbm:/etc/postfix/transport,regexp:/etc/postfix/transport.regexp
and in /etc/postfix/transport.regexp:
/\[10\..*\..*\..*\]/ :
/\[.*\..*\..*\..*\]/ error:domain literals not allowed
I must admit that I heavily rely on the address syntax checking of
Postfix (e.g. illegal addresses like user@[314.270.1.2] and
user@[a.b.c.d] are rejected by the Postfix address verification
machinery) so I could stick with the rude form shown above.
/rolf |
|