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

non lowercase names from goto, address, mailbox are causing some issues #51

Closed
reiffert2 opened this issue Jun 23, 2017 · 3 comments
Closed

Comments

@reiffert2
Copy link

14:13 hmm, uppercase vs. lowercase?
14:32 der Bug betrifft also "nur" den Altbestand
21:01 ich hab die accounts per insert into ... select ... from vexim.table angelegt

@DavidGoodwin
Copy link
Member

I think you're asking if case is a problem ... and it shouldn't be ... at least for MySQL users.

http://www.postfix.org/virtual.5.html

CASE FOLDING
       The search string is folded to lowercase before database lookup. As  of
       Postfix  2.3,  the search string is not case folded with database types
       such as regexp: or pcre: whose lookup fields can match both  upper  and
       lower case.

@cboltz
Copy link
Member

cboltz commented Apr 22, 2018

Looking up my IRC log (it was a private discussion) - the problem was something like Undefined index user@example.com in .../PFAHandler.php on line 708, and PHP array keys are case sensitive ;-)

@DavidGoodwin DavidGoodwin added this to the postfixadmin-3.2.3 milestone Sep 6, 2019
@DavidGoodwin
Copy link
Member

hmm, well, if the user or domain had been added with mixed case, then this - https://github.com/postfixadmin/postfixadmin/blob/master/model/PFAHandler.php#L767 would probably fail as it's trying to do :

$result = $this->read_from_db(array($this->id_field => $this->id));
if (count($result) == 1) {
        $this->result = $result[$this->id];
        return true;
}

Which ought to be equivalent to :

$this->result = reset($result)

DavidGoodwin added a commit that referenced this issue Sep 14, 2019
DavidGoodwin added a commit that referenced this issue Sep 26, 2019
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

3 participants