[pfx] Re: Multiple cascaded lookup tables for check_recipient_access possible?

2023-11-05 Thread Wietse Venema via Postfix-users
r.barclay--- via Postfix-users: > Hello, > > Does Postfix support specifying multiple lookup tables for > check_recipient_access? > (If there's no match in the first table, look up in the next one.) > > smtpd_recipient_restrictions = >

[pfx] Multiple cascaded lookup tables for check_recipient_access possible?

2023-11-05 Thread r.barclay--- via Postfix-users
Hello, Does Postfix support specifying multiple lookup tables for check_recipient_access? (If there's no match in the first table, look up in the next one.) smtpd_recipient_restrictions = reject_unauth_pipelining, reject_invalid_helo_hos

Re: Can case-folding for lookup tables be disabled?

2021-11-21 Thread Viktor Dukhovni
On Sun, Nov 21, 2021 at 01:42:49PM -0800, Mel Pilgrim wrote: > > But at this point it is unclear who's relying on the current behaviour, > > so changing LDAP to not case by default does not seem like a safe > > choice. It would be easy to customise just the LDAP driver to > > take an extra named

Re: Can case-folding for lookup tables be disabled?

2021-11-21 Thread Mel Pilgrim
On 2021-11-20 22:03, Viktor Dukhovni wrote: On Sat, Nov 20, 2021 at 07:37:56PM -0800, Mel Pilgrim wrote: I need Postfix to be case-preserving. Postfix does not change the case of recipient addresses unless you rewrite them (virtual(5) or local aliases). Earlier you said you want case-sensiti

Re: Can case-folding for lookup tables be disabled?

2021-11-20 Thread Viktor Dukhovni
On Sat, Nov 20, 2021 at 07:37:56PM -0800, Mel Pilgrim wrote: > I need Postfix to be case-preserving. Postfix does not change the case of recipient addresses unless you rewrite them (virtual(5) or local aliases). Earlier you said you want case-sensitive map lookups (preserve case of table lookup

Re: Can case-folding for lookup tables be disabled?

2021-11-20 Thread Mel Pilgrim
On 2021-11-20 15:20, Wietse Venema wrote: Viktor Dukhovni: On Sat, Nov 20, 2021 at 11:05:25AM -0500, Wietse Venema wrote: - If you must use other tables, update src/util/dict.h #define DICT_FLAG_FOLD_FIX (0) /* case-fold key with fixed-case map */ #define DICT_FLAG_FOLD_MUL (0) /* ca

Re: Can case-folding for lookup tables be disabled?

2021-11-20 Thread Wietse Venema
Viktor Dukhovni: > On Sat, Nov 20, 2021 at 11:05:25AM -0500, Wietse Venema wrote: > > > - If you must use other tables, update src/util/dict.h > > > > #define DICT_FLAG_FOLD_FIX (0) /* case-fold key with fixed-case map */ > > #define DICT_FLAG_FOLD_MUL (0) /* case-fold key with fixed-ca

Re: Can case-folding for lookup tables be disabled?

2021-11-20 Thread Viktor Dukhovni
On Sat, Nov 20, 2021 at 11:05:25AM -0500, Wietse Venema wrote: > - If you must use other tables, update src/util/dict.h > > #define DICT_FLAG_FOLD_FIX (0) /* case-fold key with fixed-case map */ > #define DICT_FLAG_FOLD_MUL (0) /* case-fold key with fixed-case map */ > > This will nuke

Re: Can case-folding for lookup tables be disabled?

2021-11-20 Thread Wietse Venema
Viktor Dukhovni: > On Fri, Nov 19, 2021 at 05:07:21PM -0800, Mel Pilgrim wrote: > > > I read in transport(5), virtual(5), et al that Postfix will case-fold > > query strings, but for one specific project I need it to not do that. > > Are there any tunables for this? I didn't see anything in pos

Re: Can case-folding for lookup tables be disabled?

2021-11-19 Thread Viktor Dukhovni
On Fri, Nov 19, 2021 at 05:07:21PM -0800, Mel Pilgrim wrote: > I read in transport(5), virtual(5), et al that Postfix will case-fold > query strings, but for one specific project I need it to not do that. > Are there any tunables for this? I didn't see anything in postconf -d > output that loo

Can case-folding for lookup tables be disabled?

2021-11-19 Thread Mel Pilgrim
I read in transport(5), virtual(5), et al that Postfix will case-fold query strings, but for one specific project I need it to not do that. Are there any tunables for this? I didn't see anything in postconf -d output that looked related. The short explanation is that I need to be able to do l

Re: Postfix LDAP pipemap lookup tables and OctetStream

2020-02-07 Thread Luca Fornasari
On Thu, Feb 6, 2020 at 8:56 PM Viktor Dukhovni wrote: > > On Thu, Feb 06, 2020 at 08:44:36AM +0100, Luca Fornasari wrote: > > > The idea is to use a pipemap of LDAP queries; the first LDAP query > > [...] > > Since msExchMasterAccountSid is an OctetStream, I am wondering if this > > will work ...

Re: Postfix LDAP pipemap lookup tables and OctetStream

2020-02-06 Thread Viktor Dukhovni
On Thu, Feb 06, 2020 at 08:44:36AM +0100, Luca Fornasari wrote: > I am using reject_sender_login_mismatch and I need to find out the > owner of an email address using smtpd_sender_login_maps. > The email address is present on a first AD server while user/owner is > on a second AD server ... what l

Re: Postfix LDAP pipemap lookup tables and OctetStream

2020-02-06 Thread Fulvio Scapin
Hello Luca sadly I am stuck to a version of Postfix that not yet support "pipemap" lookup table, so I am forced to ask here instead of simply trying ... Well you can always compile the latest version of postfix on your machine and/or on the server in question, create the ldap files needed an

Postfix LDAP pipemap lookup tables and OctetStream

2020-02-05 Thread Luca Fornasari
Hello, sadly I am stuck to a version of Postfix that not yet support "pipemap" lookup table, so I am forced to ask here instead of simply trying ... I am using reject_sender_login_mismatch and I need to find out the owner of an email address using smtpd_sender_login_maps. The email address is pr

Re: POSTFIX - Lookup tables usage

2018-08-26 Thread Wietse Venema
jcdole: > After many tests I found that this is working : > > in main.cf : > --- > smtpd_sender_restrictions = > reject_non_fqdn_sender, > reject_unknown_sender_domain, > reject_sender_login_mismatch > > smtpd_sender_login_maps = pcre:/etc/postfix/sasl_default_sender.pcr

Re: POSTFIX - Lookup tables usage

2018-08-26 Thread jcdole
After many tests I found that this is working : in main.cf : --- smtpd_sender_restrictions = reject_non_fqdn_sender, reject_unknown_sender_domain, reject_sender_login_mismatch smtpd_sender_login_maps = pcre:/etc/postfix/sasl_default_sender.pcre in /etc/postfix/sas

POSTFIX - Lookup tables usage

2018-08-24 Thread jcdole
Hello. I have some difficulties to understand how lookup tables are used in postfix. >From my own usage, I know two usages A) Single column. You query with a parameter. If the parameter is found in the table you get a non null value ( index value for example ). Depending of your usage you dec

Re: Lookup tables

2018-05-14 Thread Noel Jones
On 5/14/2018 1:46 PM, jack wrote: > > On 14/05/2018 18:58, Viktor Dukhovni wrote: >> >> >> Look for "HOST NAME/ADDRESS PATTERNS" in >> http://www.postfix.org/access.5.html >> >> The http://www.postfix.org/postconf.5.html#check_client_access >> docs point >> you at access(5), so this is not exactly

Re: Lookup tables

2018-05-14 Thread Viktor Dukhovni
> On May 14, 2018, at 2:46 PM, jack wrote: > > The fact which I think may be undocumented is that postfix (but not > postmap) performs iterative prefix queries, when (and only when?) the > table-type is indexed. This is basic logic, support for multi-line header/body lookups notwithstanding, p

Re: Lookup tables

2018-05-14 Thread jack
On 14/05/2018 18:58, Viktor Dukhovni wrote: Look for "HOST NAME/ADDRESS PATTERNS" in http://www.postfix.org/access.5.html The http://www.postfix.org/postconf.5.html#check_client_access docs point you at access(5), so this is not exactly hiding... Thank you Viktor, I am familiar with those p

Re: Lookup tables

2018-05-14 Thread Viktor Dukhovni
> On May 14, 2018, at 1:54 PM, jack wrote: > >> Postfix will query hash (btreem, dbm, lmdb, ldap, etc.) table >> multiple times, first with the full IP address and then with prefixes >> of the IP address. With your example of 5.188.9.2 the queries would >> be: >> >>5.188.9.2 >>5.188.9

Re: Lookup tables

2018-05-14 Thread jack
On 14/05/2018 12:13, Wietse Venema wrote: > > Postfix will query hash (btreem, dbm, lmdb, ldap, etc.) table > multiple times, first with the full IP address and then with prefixes > of the IP address. With your example of 5.188.9.2 the queries would > be: > > 5.188.9.2 > 5.188.9 > > Ther

Re: Lookup tables

2018-05-14 Thread jack
Mike, I had: # postconf smtpd_client_restrictions smtpd_client_restrictions = reject_unknown_reverse_client_hostname, check_client_access hash:/etc/postfix/client_access, permit_sasl_authenticated On 14/05/2018 12:13, Wietse Venema wrote: > jack: >> Hi, >> >> In the online documentation for acces

Re: Lookup tables

2018-05-14 Thread jack
# postconf smtpd_client_restrictions smtpd_client_restrictions = reject_unknown_reverse_client_hostname, check_client_access hash:/etc/postfix/client_access, permit_sasl_authenticated On 14/05/2018 12:00, Mike Guelfi wrote: > postmap is a lookup management tool; doing a query on an IP in a subnet

Re: Lookup tables

2018-05-14 Thread Wietse Venema
jack: > Hi, > > In the online documentation for access tables > (http://www.postfix.org/access.5.html), it says: > > Subnetworks are matched by repeatedly truncating > the last ".octet" from the remote IPv4 host address > string until a match is fo

Re: Lookup tables

2018-05-14 Thread Mike Guelfi
postmap is a lookup management tool; doing a query on an IP in a subnet isn't going to succeed. You probably just forgot to enable client_access or reload postfix What does this return? # postconf smtpd_client_restrictions Default is: smtpd_client_restrictions = enabled would be: smtpd_clien

Re: Lookup tables

2018-05-14 Thread jack
Sorry - I should have said: Postfix 2.11.3, running on Debian Jessie. Also, I ran these tests using postmap when it became apparent to me that postfix itself was not matching address prefixes in hash tables. On 14/05/2018 11:18, jack wrote: > Hi, > > In the online documentation for access table

Lookup tables

2018-05-14 Thread jack
Hi, In the online documentation for access tables (http://www.postfix.org/access.5.html), it says: Subnetworks are matched by repeatedly truncating the last ".octet" from the remote IPv4 host address string until a match is found in the access tabl

Re: IPv6 address in regexp lookup tables

2011-06-07 Thread Wolfgang Zeikat
In an older episode, on 2011-06-08 01:21, Wietse Venema wrote: /^2001:638:700:1005:/, assuming a /64 or smaller subnet. Thank you, Wietse. I have realized that I actually need to match all IPv6 addresses starting with 2001:638:700:, but /^2001:638:700:/ works fine, too. Best regards, wolf

Re: IPv6 address in regexp lookup tables

2011-06-07 Thread Wietse Venema
Wolfgang Zeikat: > How would I specify all IPv6 addresses starting with 2001:638:700:1005 > in a regexp table? /^2001:638:700:1005:/, assuming a /64 or smaller subnet. But I wonder why CIDR tables would not be a better solution. Wietse

IPv6 address in regexp lookup tables

2011-06-07 Thread Wolfgang Zeikat
How would I specify all IPv6 addresses starting with 2001:638:700:1005 in a regexp table? Regards, wolfgang

Re: processing order lookup tables

2008-09-08 Thread mouss
gerrit wrote: check_sender_access hash:/etc/postfix/sender_whitelist check_recipient_access hash:/etc/postfix/recipient_whitelist reject_unauth_destination reject_unverified_sender sender verification callbacks are not very appreci

Re: processing order lookup tables

2008-09-08 Thread gerrit
mouss schreef: gerrit wrote: Hi All, Recently i implemented the sender check. First i made a split for the processing and put some restrictions under smtpd_sender_restrictions and some under stmpd_recipient_restrictions. This resulted in too many rejections, so i left the sender restrictio

Re: processing order lookup tables

2008-09-06 Thread mouss
gerrit wrote: Hi All, Recently i implemented the sender check. First i made a split for the processing and put some restrictions under smtpd_sender_restrictions and some under stmpd_recipient_restrictions. This resulted in too many rejections, so i left the sender restrictions emtpy and put

processing order lookup tables

2008-09-05 Thread gerrit
Hi All, Recently i implemented the sender check. First i made a split for the processing and put some restrictions under smtpd_sender_restrictions and some under stmpd_recipient_restrictions. This resulted in too many rejections, so i left the sender restrictions emtpy and put all under the