You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was interested how to create "all" alias to send emails to all mailboxes (which are stored in postgres) at once.
I found this way, not sure if that correct (please correct me if I'm wrong), but it works as expected:
# assuming we have mail addresses in `domain.com` zone, change to your own domain
table.chain local_rewrites {
# ... just default local_rewrites configuration ...
# rewriting [email protected]
optional_step sql_query {
driver postgres
dsn postgres://user:pass@host/db?params # change to your own DSN
lookup "select username from users where $1 = '[email protected]' and username like '%@domain.com'"
}
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello.
I was interested how to create "all" alias to send emails to all mailboxes (which are stored in postgres) at once.
I found this way, not sure if that correct (please correct me if I'm wrong), but it works as expected:
Hope this helps.
Beta Was this translation helpful? Give feedback.
All reactions