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

Infinite aliases configuration with postfix. #30

Open
prasad83 opened this issue Mar 26, 2015 · 1 comment
Open

Infinite aliases configuration with postfix. #30

prasad83 opened this issue Mar 26, 2015 · 1 comment

Comments

@prasad83
Copy link

Need of dynamic alias is very common and might get hard to predefine the aliases in the table.

Example:

A workaround I tried was by using recipient query rewrite.

Dependency: Need to install PCRE support for MySQL
https://github.com/mysqludf/lib_mysqludf_preg Issue #19 for Ubuntu

Then update: /etc/postfix/sql-recipients.cf

query = SELECT alias FROM dbmail_aliases WHERE alias=preg_replace('/([+][^@]+)/', '', '%s')

Restart postfix - ready to go!

@morbidick
Copy link

Hi @prasad83,
you could just define the + symbol as a delimiter in your postfix config . Postfix will query for the existence of [email protected] without the dynamic part.

mverbert pushed a commit to mverbert/dbmail that referenced this issue Apr 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants