When you try to add the email address (email@example.com) and you are getting an error message saying: "Notice: Failed to import the following address because it is banned: firstname.lastname@example.org (This username is not allowed)", even when the user is not in the banned email address list.
The above issue happens due to the use of ListManager's reserved keyword as a user name because whenever the reserved keyword will be used in the username, mailing will fail. Examples of reserved keywords include "mailman" and "server", and a full list can be found in the article Keywords that can Interfere with a Mailing.
To fix this issue, the LM's reserved keyword that is used in the username should be excluded from the list:
- Open the "InitRegex.txt" file from the same folder where the LM binary is (see the screenshot below from a Windows instance.)
- Remove the keyword that is used in the email from the list. (for example "mailman" keyword from the "From" section if the email is "email@example.com"). Example is below.
Replace the following line:
From \|POST.*MASTER\|WPUSER\|$EMD\|VMMAIL\|MAIL .*SYSTEM\|MAISER\|MAIL.+AGENT\|MAIL.+DAEMON\|TCPMAIL\|BITMAIL\|MAILMAN\|^LISTMAN\|^LISTSERV\|^MAJORDOMO\|^LISTPROC\|^SERVER\|^LYRIS$\|^CRENLISTWith this one in InitRegex.txt placed in the LMFOLDER/bin/ folder. This would make the mailman.* an option with the server.
From \|POST.*MASTER\|WPUSER\|$EMD\|VMMAIL\|MAIL .*SYSTEM\|MAISER\|MAIL.+AGENT\|MAIL.+DAEMON\|TCPMAIL\|BITMAIL\|^LISTMAN\|^LISTSERV\|^MAJORDOMO\|^LISTPROC\|^SERVER\|^LYRIS$\|^CRENLIST
- Save the changes.
- In Linux, the InitRegex.txt file may be located in the /bin folder (e.g., /usr/local/lm/bin)
- When modifying this file, make sure you do not allow mail through that should be caught as error mail.
Validating the change:
- Send to a list from an email containing the words that were previously filtered.
Note: Before these commands are run, please ensure that the InitRegex.txt file is placed in the same directory as the LM binary (LMFOLDER/bin/). If the file is removed, it will use the hardcoded defaults which are the same as the default InitRegex.txt file; you will then get an Invalid command name error.
After doing all the processes, the email should be added without any error.