-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fix transport "destination" input validation to allow email addresses #2212
base: master
Are you sure you want to change the base?
Conversation
…resses Emails are allowed in [transport](http://www.postfix.org/transport.5.html) and listed as example in the input box but they fail input validation.
I think we need to make sure that all validations still work when we change that. I need to check that. :) Not sure right now. |
Ah ok. You believe there might be more validations in place for this string? |
More validations when editing existing and adding new items. The validation function is a mess. |
I saw some extensive regex here and there. Is there a minimum PHP version requirement in place? Starting at version 7 there is a |
Yes, but we need to remove some chars first, allow ".domain.tld" for example. But not always, it depends on other entries. Sometimes [domain.tld] is okay, sometimes domain.tld is not. That's part of the mess I wrote about. :-) The validation is tricky, the queries in Postfix follow a specific order, we need to check for some combinations. We cannot allow a specific entry when this or that already exists. It is difficult. We cannot just use checks like "does X already exist?" or "is X a domain?". |
Are you going to look into this? You are used to the mailcow SQL foo. 🙃 Or would you be willing to merge this to allow email addresses now and add another issue for complete validation with duplicates and everything? |
I will test this locally, ok? If it's fine (I think it will not break anything), I will merge it. |
Editing the transport does work. |
It is something Postfix-internal. The order of the queries is the problem. Your PR is fine, I just need to make sure everything Postfix does is still okay. :) |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
unstale :) |
Emails are allowed in transport and listed as example in the input box but they fail input validation.