1 (edited by xdeveloper 2016-01-23 02:03:09)

Topic: Bad sender address syntax (Code: 501)

==== Required information ====
- iRedMail version (check /etc/iredmail-release): - iRedMail version 0.9.0
- Linux/BSD distribution name and version: Ubuntu Server 14.04.1
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- Related log if you're reporting an issue:

Jan 22 08:44:36 mail postfix/submission/smtpd[8924]: warning: Illegal address syntax from mail.strelka55.su[127.0.0.1] in MAIL command: <999@127.0.0.1>
Jan 22 08:44:36 mail roundcube: <bfpa03t7> SMTP Error: Failed to set sender '999@127.0.0.1'. 5.1.7 Bad sender address syntax (Code: 501) in /opt/www/roundcubemail-1.1.3/program/lib/Roundcube/rcube.php on line 1708 (POST /mail/?_task=mail&_unlock=loading1453452272157&_lang=ru&_framed=1?_task=mail&_action=send)
Jan 22 08:44:56 mail postfix/submission/smtpd[8924]: warning: Illegal address syntax from mail.strelka55.su[127.0.0.1] in MAIL command: <999@127.0.0.1>
Jan 22 08:44:56 mail roundcube: <bfpa03t7> SMTP Error: Failed to set sender '999@127.0.0.1'. 5.1.7 Bad sender address syntax (Code: 501) in /opt/www/roundcubemail-1.1.3/program/lib/Roundcube/rcube.php on line 1708 (POST /mail/?_task=mail&_unlock=loading1453452292617&_lang=ru&_framed=1?_task=mail&_action=send)
====

Hi Team,

could you please shed any lignt on the issue below. A user reported me that he couldn't send mail to gmail.com domain, and he gets the issue (via webmail roundcube)

SMTP error (501):  "999@127.0.0.1"
(5.1.7 Bad sender address syntax)

I have tried to send a mail from my maibox in the same domain where user mailbox located, and sending was fine and successfull, then I've reset user's password and send the same mail to the same address in gmail.com domain from user's mailbox, and it was successfull, (but I was trying it from differents machines phisically) User is located at one city, I am on another..

It's really very strange issue, I can't detect this issue, but user still have the issue.

I checked the logs, and when user was trying to send mail, I found the next in in /var/logs/mail.log

Jan 22 08:44:36 mail postfix/submission/smtpd[8924]: warning: Illegal address syntax from mail.strelka55.su[127.0.0.1] in MAIL command: <999@127.0.0.1>
Jan 22 08:44:36 mail roundcube: <bfpa03t7> SMTP Error: Failed to set sender '999@127.0.0.1'. 5.1.7 Bad sender address syntax (Code: 501) in /opt/www/roundcubemail-1.1.3/program/lib/Roundcube/rcube.php on line 1708 (POST /mail/?_task=mail&_unlock=loading1453452272157&_lang=ru&_framed=1?_task=mail&_action=send)
Jan 22 08:44:56 mail postfix/submission/smtpd[8924]: warning: Illegal address syntax from mail.strelka55.su[127.0.0.1] in MAIL command: <999@127.0.0.1>
Jan 22 08:44:56 mail roundcube: <bfpa03t7> SMTP Error: Failed to set sender '999@127.0.0.1'. 5.1.7 Bad sender address syntax (Code: 501) in /opt/www/roundcubemail-1.1.3/program/lib/Roundcube/rcube.php on line 1708 (POST /mail/?_task=mail&_unlock=loading1453452292617&_lang=ru&_framed=1?_task=mail&_action=send)

I see that errors in the log, but I still can't reproduce this issue, only user is facing it.

Could you please advise?

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Bad sender address syntax (Code: 501)

xdeveloper wrote:

warning: Illegal address syntax from mail.strelka55.su[127.0.0.1] in MAIL command: <999@127.0.0.1>

It's very clear in error log. "999@127.0.0.1" is not a legal email address. If you really want to use IP address in email address, try this: "999@[127.0.0.1]".

3 (edited by xdeveloper 2016-01-23 20:04:57)

Re: Bad sender address syntax (Code: 501)

ZhangHuangbin wrote:
xdeveloper wrote:

warning: Illegal address syntax from mail.strelka55.su[127.0.0.1] in MAIL command: <999@127.0.0.1>

It's very clear in error log. "999@127.0.0.1" is not a legal email address. If you really want to use IP address in email address, try this: "999@[127.0.0.1]".


Hi, basically yes, but in fact I don't need to use ip address instead domain name, it's weird.
I've attached screenshot how user do it.
There you can see from field: testuser@strelka.su

What I need to do to block ability use ip address in email address?
Thanks.

Post's attachments

screen.jpg
screen.jpg 32.22 kb, 1 downloads since 2016-01-23 

You don't have the permssions to download the attachments of this post.

4

Re: Bad sender address syntax (Code: 501)

Postfix rejects it, so you have nothing to do.

5

Re: Bad sender address syntax (Code: 501)

ZhangHuangbin wrote:

Postfix rejects it, so you have nothing to do.

Ok, got it. Will check with user what his actions leads to that result.

Thank you for your explanation.