list maintenance

2019-08-12 Thread gilles
Hello,

I'm currently performing a maintenance on the infrastructure hosting the 
mailing list.

It may cause a bit of disruption for the next few hours but the goal is to 
allow me to
easily run different versions of OpenSMTPD on different systems in a real 
environment,
ultimately helping development :-)

Things should go smooth but if you see something very wrong and can't reach me 
by mail
I'm available on IRC / Twitter / ICB / ...

Gilles



list maintenance

2019-08-12 Thread gilles
Hello,

I'm currently performing a maintenance on the infrastructure hosting the 
mailing list.

It may cause a bit of disruption for the next few hours but the goal is to 
allow me to
easily run different versions of OpenSMTPD on different systems in a real 
environment,
ultimately helping development :-)

Things should go smooth but if you see something very wrong and can't reach me 
by mail
I'm available on IRC / Twitter / ICB / ...

Gilles



Re: Multiple query_mailaddr when using table_postgresql not possible

2019-08-12 Thread mabi
‐‐‐ Original Message ‐‐‐
On Monday, August 12, 2019 11:44 AM, Reio Remma  wrote:

> Whilst I have no experience with the new OpenSMTPD, I have my 6.0.3
> working with MySQL and 2 separate query_mailaddr (recipients and
> blacklist). I solved it by simply putting the blacklist query_mailaddr
> in a separate config file.
>
> table recipients  mysql:/etc/opensmtpd/mysql.conf
> table blacklist   mysql:/etc/opensmtpd/mysql-blacklist.conf

Nice workaround, thanks Reio, I will try it out!



Re: Multiple query_mailaddr when using table_postgresql not possible

2019-08-12 Thread Reio Remma

On 12/08/2019 12:32, mabi wrote:

Hello,

I would like to add an extra table in a PostgreSQL database to define domain 
names which I will reject mails from (mostly spam domains) on my OpenBSD 6.5 MX 
server.

For that I would need to add the following query_mailaddr to my 
/etc/mail/postgresql.conf file as documented here 
(https://github.com/OpenSMTPD/OpenSMTPD-extras/pull/54):

query_mailaddr SELECT address FROM rejects WHERE address=?

The problem is that I already have a query_mailaddr entry in that file which is 
the following:

query_mailaddr SELECT destination FROM vusers WHERE email = 
REGEXP_REPLACE($1,'(.*)\+[\w-]+@(.*)','\1@\2');

and which I need in order to define my valid recipients using the following 
table/match rule:

table recipients postgres:/etc/mail/postgresql.conf
match from any for domain  rcpt-to  action "relay_amavis"

so, when I start smtpd I get the following error:

domains[19067]: warn: duplicate key query_mailaddr
domains[19067]: fatal: error parsing config file

Does anyone know how I can still achieve that? Maybe with another type of 
"query_" but which one?

Best regards,
Mabi


Whilst I have no experience with the new OpenSMTPD, I have my 6.0.3 
working with MySQL and 2 separate query_mailaddr (recipients and 
blacklist). I solved it by simply putting the blacklist query_mailaddr 
in a separate config file.


table recipients  mysql:/etc/opensmtpd/mysql.conf
table blacklist   mysql:/etc/opensmtpd/mysql-blacklist.conf

Good luck,
Reio




Multiple query_mailaddr when using table_postgresql not possible

2019-08-12 Thread mabi
Hello,

I would like to add an extra table in a PostgreSQL database to define domain 
names which I will reject mails from (mostly spam domains) on my OpenBSD 6.5 MX 
server.

For that I would need to add the following query_mailaddr to my 
/etc/mail/postgresql.conf file as documented here 
(https://github.com/OpenSMTPD/OpenSMTPD-extras/pull/54):

query_mailaddr SELECT address FROM rejects WHERE address=?

The problem is that I already have a query_mailaddr entry in that file which is 
the following:

query_mailaddr SELECT destination FROM vusers WHERE email = 
REGEXP_REPLACE($1,'(.*)\+[\w-]+@(.*)','\1@\2');

and which I need in order to define my valid recipients using the following 
table/match rule:

table recipients postgres:/etc/mail/postgresql.conf
match from any for domain  rcpt-to  action "relay_amavis"

so, when I start smtpd I get the following error:

domains[19067]: warn: duplicate key query_mailaddr
domains[19067]: fatal: error parsing config file

Does anyone know how I can still achieve that? Maybe with another type of 
"query_" but which one?

Best regards,
Mabi