
Hello, OTRS does not want to send email to address where local part starts with underscore, i.e. '_cronfy@mail.ru' - there is invalid syntax it says. The address is valid. Is this a bug or a feature? How can I make OTRS pass such email addresses? Thanks in advance. -- Cronfy.

Cronfy wrote:
OTRS does not want to send email to address where local part starts with underscore, i.e. '_cronfy@mail.ru' - there is invalid syntax it says. The address is valid. Is this a bug or a feature? How can I make OTRS pass such email addresses? Thanks in advance.
The regex that checks e-mail addresses is probably not entirely correct. Some mail regexes only check for @ and whether the part after the @ has a dot. A completely RFC-compliant regex is pretty large. See http://www.ex-parrot.com/~pdw/Mail-RFC822-Address.html for instance. Maybe OTRS could use the Email::Address perl module: http://search.cpan.org/perldoc?Email::Address I don't know if this check can be turned off in OTRS. Otherwise the regex needs to be changed. You can file a bug report at http://bugs.otrs.org/ Nils Breunese.

Think it's a bug. otrs/Kernel/System/CheckItem.pm: --- CheckItem.pm.orig 2008-01-18 13:21:40.897753856 +0300 +++ CheckItem.pm 2008-01-18 13:21:48.478601392 +0300 @@ -61,7 +61,7 @@ } my $Error = ''; # email address syntax check - if ($Param{Address} !~ /^(()|([a-zA-Z0-9]+([a-zA-Z0-9_+\.&%-]*[a-zA-Z0-9_'\.-]+)?@([a-zA-Z0-9]+([a-zA-Z0-9\.-]*[a-zA-Z0-9]+)?\.+[a-zA-Z]{2,8}|\[\d+\.\d+\.\d+\.\d+])))$/) { + if ($Param{Address} !~ /^(()|([a-zA-Z0-9_]+([a-zA-Z0-9_+\.&%-]*[a-zA-Z0-9_'\.-]+)?@([a-zA-Z0-9]+([a-zA-Z0-9\.-]*[a-zA-Z0-9]+)?\.+[a-zA-Z]{2,8}|\[\d+\.\d+\.\d+\.\d+])))$/) { $Error = "Invalid syntax"; } -- Best regards , Andrey Feldman Nils Breunese (Lemonbit) ?????:
Cronfy wrote:
OTRS does not want to send email to address where local part starts with underscore, i.e. '_cronfy@mail.ru' - there is invalid syntax it says. The address is valid. Is this a bug or a feature? How can I make OTRS pass such email addresses? Thanks in advance.
The regex that checks e-mail addresses is probably not entirely correct. Some mail regexes only check for @ and whether the part after the @ has a dot. A completely RFC-compliant regex is pretty large. See http://www.ex-parrot.com/~pdw/Mail-RFC822-Address.html for instance. Maybe OTRS could use the Email::Address perl module: http://search.cpan.org/perldoc?Email::Address
I don't know if this check can be turned off in OTRS. Otherwise the regex needs to be changed. You can file a bug report at http://bugs.otrs.org/
Nils Breunese. _______________________________________________ OTRS mailing list: otrs - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/otrs To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs Support or consulting for your OTRS system? => http://www.otrs.com/

Andrey Feldman wrote:
Think it's a bug. otrs/Kernel/System/CheckItem.pm: --- CheckItem.pm.orig 2008-01-18 13:21:40.897753856 +0300 +++ CheckItem.pm 2008-01-18 13:21:48.478601392 +0300 @@ -61,7 +61,7 @@ } my $Error = ''; # email address syntax check - if ($Param{Address} !~ /^(()|([a-zA-Z0-9]+([a-zA-Z0-9_+\.&%-]*[a- zA-Z0-9_'\.-]+)?@([a-zA-Z0-9]+([a-zA-Z0-9\.-]*[a-zA-Z0-9]+)?\.+[a-zA- Z]{2,8}|\[\d+\.\d+\.\d+\.\d+])))$/) { + if ($Param{Address} !~ /^(()|([a-zA-Z0-9_]+([a-zA-Z0-9_+\.&%-]*[a- zA-Z0-9_'\.-]+)?@([a-zA-Z0-9]+([a-zA-Z0-9\.-]*[a-zA-Z0-9]+)?\.+[a-zA- Z]{2,8}|\[\d+\.\d+\.\d+\.\d+])))$/) { $Error = "Invalid syntax"; }
Looking at http://www.ex-parrot.com/~pdw/Mail-RFC822-Address.html the above regex probably still isn't 100% RFC 822 compliant. :o) But it just might fix the error on the leading underscore. Nils Breunese.

В сообщении от Thursday 17 January 2008 19:56:40 Nils Breunese (Lemonbit) написал(а):
The regex that checks e-mail addresses is probably not entirely correct. Some mail regexes only check for @ and whether the part after the @ has a dot. A completely RFC-compliant regex is pretty large.
no need to use handmade regex or that large regex. all work can be done via module Email::Valid. this module answer yes or no for given email. it's simple. http://search.cpan.org/~rjbs/Email-Valid-0.179/lib/Email/Valid.pm
regex needs to be changed. You can file a bug report at http://bugs.otrs.org/
and post it's number here ;) Mike

Hello,
The regex that checks e-mail addresses is probably not entirely correct. Some mail regexes only check for @ and whether the part after the @ has a dot. A completely RFC-compliant regex is pretty large. regex needs to be changed. You can file a bug report at http://bugs.otrs.org/
and post it's number here ;)
http://bugs.otrs.org/show_bug.cgi?id=2638 -- Cronfy.
participants (4)
-
Andrey Feldman
-
Cronfy
-
Mike Lykov
-
Nils Breunese (Lemonbit)