My solution:
Aleksander Kamenik schrieb:
Michael Mayer wrote:
mail:/etc/postfix # grep local_recipient_maps main.cf
local_recipient_maps = mysql:/etc/postfix/sql-recipients.cf
mail:/etc/postfix # cat sql-recipients.cf
user = dbmail
password = ubersecretpassword
hosts = 127.0.0.1
dbname = dbmail
table = dbmail_aliases
select_field = alias
where_field = alias
# The user name and password to log into the mysql server.
user = dbmail
password = XXXXXXX
socket = /var/lib/mysql/mysql.sock
# The database name on the servers.
dbname = dbmail
# For Postfix 2.2 and later The SQL query template.
# See mysql_table(5) for details.
#query = SELECT forw_addr FROM mxaliases WHERE alias='%s' AND status='paid'
query = select alias from dbmail_aliases where alias = '%s' union select
userid from dbmail_users where userid = '%s'
I need to use this SQL query, because in my environment there are
userids the same as the main email addresses.
Thx,
Uwe
_______________________________________________
DBmail mailing list
[email protected]
https://mailman.fastxs.nl/mailman/listinfo/dbmail