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 catchall aliases #4

Closed
fd0 opened this issue Feb 24, 2019 · 4 comments
Closed

Support catchall aliases #4

fd0 opened this issue Feb 24, 2019 · 4 comments

Comments

@fd0
Copy link

fd0 commented Feb 24, 2019

Thank you very much for your work! I'd love to be able to add (and remove) catchall aliases, where the source_username column is NULL. What's needed to add this? :)

Thanks!

@awidegreen
Copy link
Owner

I guess you are referring to this note?

What about % to be a catch-all wildcard - in favor of '*' as this might interfere with shell globing if the quotes are omitted?!

# explicit catch-all
$ vmail-cli alias add % foo.com me bar.com

Remove would work the same way.

$ vmail-cli alias remove % foo.com me bar.com

@fd0
Copy link
Author

fd0 commented Feb 25, 2019

Exactly, that's what I configured. I also wrote back to Thomas (to thank him, mainly), adding a note that if users were to send email addresses not matching a specific alias or mailbox, the query in the sender-login-maps.cf needs to be changed as follows:

query = select concat(username, '@', domain) as 'owns' from accounts where username = '%u' AND domain = '%d' and en
abled = true union select concat(destination_username, '@', destination_domain) AS 'owns' from aliases where           
source_username = '%u' and source_domain = '%d' and enabled = true union select concat(destination_username, '@',      
destination_domain) AS 'owns' from aliases where source_username is null and source_domain = '%d' and enabled;         

I'm fine with using % or *, also the empty string (which would loosely resemble what's in the database) would work.

Thank you!

@awidegreen
Copy link
Owner

I added the feature in #5 - let me know if it's working for you.

@fd0
Copy link
Author

fd0 commented Mar 12, 2019

Cool, thank you very much!

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