Re: Spawn milter access to Verified Sender database

2021-11-28 Thread Phil Stracchino
On 11/28/21 22:04, raf wrote: One last bit of advice, add "use strict;" and "use warnings;" to the script and add "my" before the first use of each variable. You know you want to. :-) Better yet, separately declare your variables in their proper scope before you use them. -- Phil

Re: Spawn milter access to Verified Sender database

2021-11-28 Thread raf
On Mon, Nov 29, 2021 at 12:20:15AM +, M Champion wrote: > Hi raf, > > Replies in-line ; > > > > > Dear Postfix users, > > > > > > I'm really grateful to Wietse who thankfully raised concerns regarding > > > Perl > > > querying the verified senders database using postmap via the shell

Re: Spawn milter access to Verified Sender database

2021-11-28 Thread M Champion
Hi raf, Replies in-line ; Dear Postfix users, I'm really grateful to Wietse who thankfully raised concerns regarding Perl querying the verified senders database using postmap via the shell as there was a real chance the sender (easily faked) could carry out evil. My use of 'backticks' was a

Re: Spawn milter access to Verified Sender database

2021-11-28 Thread raf
On Sun, Nov 28, 2021 at 11:11:55PM +, M Champion wrote: > Dear Postfix users, > > I'm really grateful to Wietse who thankfully raised concerns regarding Perl > querying the verified senders database using postmap via the shell as there > was a real chance the sender (easily faked) could

Re: Spawn milter access to Verified Sender database

2021-11-28 Thread M Champion
Dear Postfix users, I'm really grateful to Wietse who thankfully raised concerns regarding Perl querying the verified senders database using postmap via the shell as there was a real chance the sender (easily faked) could carry out evil. My use of 'backticks' was a very bad idea as it turns

Re: Spawn milter access to Verified Sender database

2021-11-25 Thread M Champion
Hi Wietse, OK, the storage key is null-terminated. you may have to use a postmap option to add a null byte to the query. All the storage keys are null-terminated, but I tried adding the N option anyway though to no avail.  However the issue seems to be resolved.  I totally missed the fact

Re: Spawn milter access to Verified Sender database

2021-11-25 Thread Wietse Venema
M Champion: > Hi Wietse, > > >> The DB dump shows : > >> > >> londonstransport+bncbdzntlposqirbr426sgamgqeh7mv...@googlegroups.com??? > >> 0:0:1637682515:250 2.1.5 OK s8si901258edx.4 - gsmtp > > There are 0xc2 0xa0 bytes at the end of the storage key, but not > > in your query. > > Apologies,?

Re: Spawn milter access to Verified Sender database

2021-11-25 Thread M Champion
Hi Wietse, The DB dump shows : londonstransport+bncbdzntlposqirbr426sgamgqeh7mv...@googlegroups.com??? 0:0:1637682515:250 2.1.5 OK s8si901258edx.4 - gsmtp There are 0xc2 0xa0 bytes at the end of the storage key, but not in your query. Apologies,  I pasted the output generated by 'postmap

Re: Spawn milter access to Verified Sender database

2021-11-24 Thread Wietse Venema
M Champion: > The DB dump shows : > > londonstransport+bncbdzntlposqirbr426sgamgqeh7mv...@googlegroups.com??? > 0:0:1637682515:250 2.1.5 OK s8si901258edx.4 - gsmtp There are 0xc2 0xa0 bytes at the end of the storage key, but not in your query. Your postmap queries will have a shell command

Re: Spawn milter access to Verified Sender database

2021-11-24 Thread M Champion
Thanks (Wietse) for your suggestion to switch to a LM database. Since doing so, I have discovered that postmap -q will happily read from the live LM verified sender database. I'd previously ruled this option out as on my initial postmap trial using btree would hang if it was in use by Postfix.

Re: Spawn milter access to Verified Sender database

2021-11-19 Thread M Champion
Hi Wietse, On 19/11/2021 16:53, Wietse Venema wrote: With hash and btree there is no guaranteed way to read a table after it is updated, even when using locks. LMDB tables are better in this respect, as long as you use the right locking procedure (man 5 lmdb_table) but you'd need to make the

Re: Spawn milter access to Verified Sender database

2021-11-19 Thread Wietse Venema
With hash and btree there is no guaranteed way to read a table after it is updated, even when using locks. LMDB tables are better in this respect, as long as you use the right locking procedure (man 5 lmdb_table) but you'd need to make the table group readable so that your tool can lock and read