Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support userdb for mail alias lookup #163

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions files/postfix/ldap-aliases.cf

This file was deleted.

2 changes: 1 addition & 1 deletion files/postfix/main.cf
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all

virtual_alias_maps = ldap:/etc/postfix/ldap-aliases.cf
virtual_alias_maps = pgsql:/etc/postfix/userdb-aliases.cf

message_size_limit = 52428800
6 changes: 6 additions & 0 deletions files/postfix/userdb-aliases.cf
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
hosts = postgresql://userdb-attempt-too-do-user-989073-0.db.ondigitalocean.com:25060/userdb?sslmode=require
RyanSquared marked this conversation as resolved.
Show resolved Hide resolved
user = mail
password = userdb-mail-lookup
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need magic?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it needs:

  • a user that can read name and host from passwd (already created)
  • the postfix-pgsql package installed (which should be handled in docker-postfix#14)

dbname = userdb
query = select host from passwd where user = '%u'
result_format = %d