Why addresses with "-@" (dash-at) are rejected?

I manage a 5000 mails list and there’s a lot of addresses with “-@” inside. For example:


I think this is common in teenagers… and they deserve receiving mails! :joy:

Why does phplist reject these addresses? Can’t I add them to my list?

@MarioMey There is actually an explicit test to reject email addresses formatted in this way. I guess that was added because they do look like typing errors. If you want to allow them then you will need to edit a phplist file lists/admin/inc/userlib.php

Look for function is_email(), it is at line 580 in release 3.2.5. Then at line 606 is a comment about rejecting such email addresses. You will need to either amend or delete the following block of code

## fail on emails starting or ending "-" or "." in the pre-at, seems to happen quite often, probably cut-n-paste errors
if (preg_match('/^-/', $email) ||
    preg_match('/-@/', $email) ||
    preg_match('/\.@/', $email) ||
    preg_match('/^\./', $email) ||
    preg_match('/^\-/', $email) ||
    strpos($email, '\\') === 0
) {
    return 0;

Thanks man, it resolved the issue.

El 06/11/16 a las 08:32, duncanc escribió: