Page 1 of 3

501 5.5.4 Invalid arguments

Posted: Wed Jan 31, 2007 5:47 am
by bguerreiro
Hi all,
I sometimes get the following error:

<mail.removed@domain.com>: host server.domain.com[www.xxx.yyy.zzz]
said: 501 5.5.4 Invalid arguments (in reply to MAIL FROM command)

This happens only with users that have the following internet address format with omshowu:
Internet Address : "Username Removed" <username.removed@domain.pt>=username.removed@scalix.domain.pt

Any ideas?
Best Regards

Posted: Wed Jan 31, 2007 5:55 am
by florian
does the friendly name part contain any non-ascii characters in these cases?

thx,
f.

Posted: Wed Jan 31, 2007 6:12 am
by bguerreiro
Hi Florian.
florian wrote:does the friendly name part contain any non-ascii characters in these cases?

thx,
f.

No.
And it only happens with some recipients, not all.
I Also tested it by telnetting to the server
[root@mx ~]# telnet www.xxx.yyy.zzz 25
Trying www.xxx.yyy.zzz...
Connected to www.xxx.yyy.zzz (www.xxx.yyy.zzz).
Escape character is '^]'.
220 server.domain.com Microsoft ESMTP MAIL Service, Version: 6.0.3790.1830 ready at Wed, 31 Jan 2007 10:05:18 +0000
helo domain.pt
250 server.domain.com Hello [zzz.yyy.xxx.www]
MAIL FROM:"Username Removed" <username.removed@domain.pt>
501 5.5.4 Invalid arguments

I'm almost sure that the Exchange is to blame, but this didn't happen before Scalix was in place.

TIA.
Bruno

Posted: Wed Jan 31, 2007 7:44 am
by florian
You're completely right - MAIL FROM should not contain the display name (as per RFC2821). However, I just checked and found that Scalix does not generate it and conforms to the standard. This is one of my test users and the SMTP conversation that takes place here:

Code: Select all

[root@rhel4-01 tmp]# omshowu -n loser
Authentication ID: fvk
Globally Unique ID: 1c100000da716b54-01.55.112.01
User Name : Mr Loser /CN=Mr Loser
MailNode : rhel4-01
Internet Address : "Mr Loser" <Mr.Loser@scalix.demo>
System Login : 60537
Password : set
Admin Capabilities : NO
Mailbox Admin Capabilities : NO
Language : C
Mail Account: Unlocked
Last Signon : 01.30.07 18:50:11
Receipt of mail : ENABLED
Service level : 0
Excluded from Tidying : NO
Recovery Folder visible : NO
User Class : Full
SIS URL : sxidx://rhel4-01.scalix.demo/0c100000da716b54-01.55.112.01


[root@rhel4-01 tmp]# more smtp.out
EHLO rhel4-01.scalix.demo
MAIL FROM: <Mr.Loser@scalix.demo>
RCPT TO: <florian@scalix.demo>
DATA
Date: Tue, 30 Jan 2007 18:50:11 +0100
From: "Mr Loser" <Mr.Loser@scalix.demo>
To: florian@scalix.demo
Message-ID: <"H0000068000004b3.1170179411.rhel4-01.scalix.demo*"@MHS>
Subject: test1
x-scalix-Hops: 1
MIME-Version: 1.0
Content-Type: text/plain;
        charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline


.
QUIT


Also, afaik, sendmail on Linux (through which this goes), does not put the display name into the MAIL FROM conversation. Could it be that at your site there is another relay in the outgoing path that constructs the MAIL FROM from the "From:" header attribute (which contains the friendly name - that's correct and in accordance with RFC2822) and does not strip it? What kind of box are you using on your outgoing path.

As the error is returned from the receiving system on the 'net, most likely the last relay in your outgoing path is at fault.

The reason why this might not have happened before Scalix is possibly that your old exchange system did not bother putting the display name in the From: header, so the relay would not convey it into the MAIL FROM.

Cheers,
Florian.

Posted: Wed Jan 31, 2007 8:31 am
by bguerreiro
HI again Florian,
Our DMZ relay is running postfix.
But here comes the really hairy part.
This is a telnet session to my home server (also running postfix):

[root@mx ~]# telnet home.domain.org 25
Trying www.xxx.yyy.zzz...
Connected to home.domain.org (www.xxx.yyy.zzz).
Escape character is '^]'.
220 home.domain.org ESMTP Postfix
helo domain.pt
250 home.domain.org
MAIL FROM:"Username Removed" <username.removed@domain.pt>
555 Unsupported option: <username.removed@domain.pt>

Yet, this machine get's every mail sent by users that have issues.

I'm lost.
Bruno

Posted: Wed Jan 31, 2007 8:43 am
by florian
Hi Bruno,

i guess that is not what i meant.

No machine MUST actually accept the syntax as it is incorrect.

However, what I am saying is is that as the errors your're getting in the NDN are external errors, it must be the Postfix box that is generating the wrongly-formatted mail-from commands.

this would be independent of scalix. scalix is NOT sending the MAIL FROM with the display name.

is this the latest version of postfix? can you capture outgoing SMTP conversation on the postfix box somehow?

Florain.

Posted: Wed Jan 31, 2007 9:18 am
by bguerreiro
HI Florian,
I do understand that no machine should accept, what confuses me is that only some receiving machines don't.
About the conversations here goes.
Scalix to our postfix:

> unknown[zzz.yyy.xxx.www]: 220 mx.domain.pt ESMTP Postfix
< unknown[ zzz.yyy.xxx.www]: EHLO scalix.domain.pt
> unknown[ zzz.yyy.xxx.www]: 250-mx.domain.pt
> unknown[ zzz.yyy.xxx.www]: 250-PIPELINING
> unknown[ zzz.yyy.xxx.www]: 250-SIZE 7000000
> unknown[ zzz.yyy.xxx.www]: 250-ETRN
> unknown[ zzz.yyy.xxx.www]: 250-ENHANCEDSTATUSCODES
> unknown[ zzz.yyy.xxx.www]: 250-8BITMIME
> unknown[ zzz.yyy.xxx.www]: 250 DSN
< unknown[ zzz.yyy.xxx.www]: MAIL From:<username.removed@domain.pt> SIZE=1336 ENVID=H0000089000be5fb.1170248569.scalix.lx.domain.pt RET=HDRS
extract_addr: input: <username.removed@domain.pt>

Our postfix talking to my home postfix:

> mx.domain.pt[www.xxx.yyy.zzz]: 220 domain.org ESMTP Postfix
< mx.domain.pt[www.xxx.yyy.zzz]: EHLO mx.domain.pt
> mx.domain.pt[www.xxx.yyy.zzz]: 250-domain.org
> mx.domain.pt[www.xxx.yyy.zzz]: 250-PIPELINING
> mx.domain.pt[www.xxx.yyy.zzz]: 250-SIZE 20480000
> mx.domain.pt[www.xxx.yyy.zzz]: 250-VRFY
> mx.domain.pt[www.xxx.yyy.zzz]: 250-ETRN
> mx.domain.pt[www.xxx.yyy.zzz]: 250 8BITMIME
< mx.domain.pt[www.xxx.yyy.zzz]: MAIL FROM:<username.removed@domain.pt> SIZE=1553

So, i don't think either Scalix or Postfix are using the friendly name in the MAIL FROM: header.

I can add an Exchange SMTP server in between Scalix and postfix just to do some testing, if you think that would help.

TIA.
Bruno

Posted: Wed Jan 31, 2007 10:09 am
by florian
well, but can you also get a log of the conversation where this is sent from one of the users where the problem happens?

on the receiving side, an MTA can chose to ignore additional elements and still accept the conversation........

-- f.

Posted: Thu Feb 01, 2007 6:04 am
by bguerreiro
Hi Florian,

As requested.
> unknown[www.xxx.yyy.zzz]: 220 mx.domain.pt ESMTP Postfix
< unknown[www.xxx.yyy.zzz]: EHLO scalix.domain.pt
> unknown[www.xxx.yyy.zzz]: 250-mx.domain.pt
> unknown[www.xxx.yyy.zzz]: 250-PIPELINING
> unknown[www.xxx.yyy.zzz]: 250-SIZE 7000000
> unknown[www.xxx.yyy.zzz]: 250-ETRN
> unknown[www.xxx.yyy.zzz]: 250-ENHANCEDSTATUSCODES
> unknown[www.xxx.yyy.zzz]: 250-8BITMIME
> unknown[www.xxx.yyy.zzz]: 250 DSN
< unknown[www.xxx.yyy.zzz]: MAIL From:<user.removed@domain.pt> SIZE=3250682 ENVID=!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABg
AAAAAAAAAzP3JzSU6T0q17kkTkrs8jsKAAAAQAA ... @domain.pt RET=FULL

From a quick analisys I can see that message ID has some diferences, as one indicates scalix.lx.domain.pt and the other just indicates domain.pt
Also the RET values are different.
Another thing. The message is refused only when the sender ISN'T using the Outlook connector, but IMAP/SMTP.

Best regards,
Bruno

Posted: Thu Feb 01, 2007 6:09 am
by florian
Hi Bruno,

now I am confused - is this your outgoing postfix relay talking to some external box or is this scalix talking to the postfix box?

Florian.

Posted: Thu Feb 01, 2007 6:37 am
by bguerreiro
Hi,
Sorry for the added noise.
This is Scalix talking to postfix.
The log is from the Postfix box.

BRGDS
Bruno

Posted: Thu Feb 01, 2007 7:00 am
by florian
Hi Bruno,

what we need is the log postfix talking to the outside world, because it seems that it is the recipients MTA that is actually rejecting the message, not your postfix.

if it is as you say, obviously the two dialogs coming from the user using swa and using outlook to compare would be useful.

Florian.

Posted: Thu Feb 01, 2007 9:13 am
by bguerreiro
HI again Florian,

florian wrote:Hi Bruno,

what we need is the log postfix talking to the outside world, because it seems that it is the recipients MTA that is actually rejecting the message, not your postfix.



Yes, Postfix never rejected the messages.
I've used ethereal. Hope this helps.

zzz.yyy.xxx.www is the receiving Exchange
www.xxx.yyy.zzz is the sending postfix

2007-02-01 12:59:47.776257 zzz.yyy.xxx.www -> www.xxx.yyy.zzz SMTP Response: 220 recipient.com Microsoft ESMTP MAIL Service, Version: 6.0.3790.1830 ready at Thu, 1 Feb 2007 13:01:10 +0000
2007-02-01 12:59:47.776325 www.xxx.yyy.zzz -> zzz.yyy.xxx.www SMTP Command: EHLO mx.domain.pt
2007-02-01 12:59:47.784377 zzz.yyy.xxx.www -> www.xxx.yyy.zzz SMTP Response: 250-recipient.com Hello [www.xxx.yyy.zzz]
2007-02-01 12:59:47.784509 www.xxx.yyy.zzz -> zzz.yyy.xxx.www SMTP Command: MAIL FROM:<removed.username@domain.pt> SIZE=2143 ENVID=!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAAn2j1hUBCB0KZ+2BzCSPgr/DsKAAAAQAAAAPNmlIJB0kke9ndtd+2BS0kowEAAAAA@domain.pt RET=FULL
2007-02-01 12:59:47.794246 zzz.yyy.xxx.www -> www.xxx.yyy.zzz SMTP Response: 501 5.5.4 Invalid arguments
2007-02-01 12:59:47.840593 zzz.yyy.xxx.www -> www.xxx.yyy.zzz SMTP Response: 503 5.5.2 Need Mail From: first
2007-02-01 12:59:47.840664 www.xxx.yyy.zzz -> zzz.yyy.xxx.www SMTP Command: RSET
2007-02-01 12:59:47.846214 zzz.yyy.xxx.www -> www.xxx.yyy.zzz SMTP Response: 250 2.0.0 Resetting
2007-02-01 12:59:47.847092 zzz.yyy.xxx.www -> www.xxx.yyy.zzz SMTP Response: 221 2.0.0 recipient.com Service closing transmission channel


if it is as you say, obviously the two dialogs coming from the user using swa and using outlook to compare would be useful.

Florian.


Is the same user connecting either with Outlook Connector or thru IMAP/SMTP.
I've asked the user to test with SWA, but haven't got any feedback yet.

BRGDS.
Bruno

Posted: Thu Feb 01, 2007 11:15 am
by bguerreiro
Hi Florian,
New info, the server in this case is Sendmail, so not Exchange specific.
The following capture is from a mail sent thru SWA.

2007-02-01 14:58:08.993497 zzz.yyy.xxx.www -> www.xxx.yyy.zzz SMTP Response: 220 mx.recipient.com SendMAil 2.5.8.nhaca Pestana's Scanning Server. Unauthorize
d usage can and will be prosecuted to the full extent of the law. Thu, 1 Feb 2007 15:02:37 +0000
2007-02-01 14:58:08.993573 www.xxx.yyy.zzz-> zzz.yyy.xxx.www SMTP Command: EHLO mx.domain.pt
2007-02-01 14:58:08.996871 zzz.yyy.xxx.www -> www.xxx.yyy.zzz SMTP Response: 250-mx.recipient.com Hello [www.xxx.yyy.zzz]
2007-02-01 14:58:08.996981 www.xxx.yyy.zzz-> zzz.yyy.xxx.www SMTP Command: MAIL FROM:<removed.username@domain.pt> SIZE=1655 ENVID=4044055.1170345062782.JavaMail.root@sc
alix.domain.pt RET=FULL
2007-02-01 14:58:09.001866 zzz.yyy.xxx.www -> www.xxx.yyy.zzz SMTP Response: 250 2.1.0 removed.username@domain.pt....Sender OK
2007-02-01 14:58:09.044216 zzz.yyy.xxx.www -> www.xxx.yyy.zzz SMTP Response: 250 2.1.5 removed.recipient@recipient.com
2007-02-01 14:58:09.101431 zzz.yyy.xxx.www -> www.xxx.yyy.zzz SMTP Response: 250 2.6.0 <4044055.1170345062782.JavaMail.root@scalix.domain.pt> Queued mail for del
ivery
2007-02-01 14:58:09.101446 zzz.yyy.xxx.www -> www.xxx.yyy.zzz SMTP Response: 221 2.0.0 mx.recipient.com Service closing transmission channel

The mail got delivered.

Then again with IMAP/SMTP


2007-02-01 15:11:03.884095 zzz.yyy.xxx.www -> www.xxx.yyy.zzz SMTP Response: 220 mx.recipient.com SendMAil 2.5.8.nhaca Pestana's Scanning Server. Unauthorized
usage can and will be prosecuted to the full extent of the law. Thu, 1 Feb 2007 15:15:32 +0000
2007-02-01 15:11:03.884189 www.xxx.yyy.zzz -> zzz.yyy.xxx.www SMTP Command: EHLO mx.domain.pt
2007-02-01 15:11:03.888466 zzz.yyy.xxx.www -> www.xxx.yyy.zzz SMTP Response: 250-mx.recipient.com Hello [www.xxx.yyy.zzz]
2007-02-01 15:11:03.888712 www.xxx.yyy.zzz -> zzz.yyy.xxx.www SMTP Command: MAIL FROM:<removed.username@domain.pt> SIZE=2176 ENVID=!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAA
AAAAAAAgistjL7ipUmtBa6DU9fTRcKAAAAQAAAA ... @domain.pt RET=FULL
2007-02-01 15:11:03.977914 zzz.yyy.xxx.www -> www.xxx.yyy.zzz SMTP Response: 501 5.5.4 Invalid arguments
2007-02-01 15:11:04.056991 zzz.yyy.xxx.www -> www.xxx.yyy.zzz SMTP Response: 503 5.5.2 Need Mail From: first
2007-02-01 15:11:04.057348 www.xxx.yyy.zzz -> zzz.yyy.xxx.www SMTP Command: RSET
2007-02-01 15:11:04.159430 zzz.yyy.xxx.www -> www.xxx.yyy.zzz SMTP Response: 250 2.0.0 Resetting
2007-02-01 15:11:04.159812 zzz.yyy.xxx.www -> www.xxx.yyy.zzz SMTP Response: 221 2.0.0 mx.recipient.com Service closing transmission channel

Error.

BRGDS
Bruno

Posted: Thu Feb 01, 2007 11:21 am
by florian
did you say this is SWA vs IMAP/SMTP? Didn't you mention Outlook earlier? Or is this Outlook without Scalix Connect and using IMAP/SMTP? If not, what IMAP/SMTP client was this sent from?

Cheers,
Florian.