Error sending message! 501 5.5.4 Invalid or missing command argument(s) | MDaemon Technologies, Ltd.

Error sending message! 501 5.5.4 Invalid or missing command argument(s)


  • I always encounter the following error when sending email via webmail in mdaemon:

    Error sending message!  501 5.5.4 Invalid or missing command argument(s)

    Log:

    Sun 2025-03-16 02:47:42.135: Accepting SMTP connection from 127.0.0.1:47497 to 127.0.0.1:587
    Sun 2025-03-16 02:47:42.148: --> 220 ********* ESMTP MSA Sun, 16 Mar 2025 02:47:42 -0700
    Sun 2025-03-16 02:47:42.151: <-- EHLO 
    Sun 2025-03-16 02:47:42.151: --> 501 5.5.4 Invalid or missing command argument(s)
    Sun 2025-03-16 02:47:42.153: Connection closed
    Sun 2025-03-16 02:47:42.153: SMTP session terminated (Bytes in/out: 7/116)

    But when I send email from Outlook, I don't encounter this error.



  • What version of MDaemon are you using? Did this work in the past or is this the first attempt you've made to send mail in Webmail?

    When sending mail from Webmail, the beginning of the SMTP session should look something like this:

    Mon 2025-03-17 07:57:12.177: Session 00010002; child 0001
    Mon 2025-03-17 07:57:12.177: Accepting SMTP connection from 127.0.0.1:64619 to 127.0.0.1:587
    Mon 2025-03-17 07:57:12.198: --> 220 [my test server] ESMTP MSA Mon, 17 Mar 2025 07:57:12 -0500
    Mon 2025-03-17 07:57:12.198: <-- EHLO WorldClient

    where [my test server] is something like mail.mydomain.com

    Did you edit the server name in the 220 to contain ********* before posting or was it like that in the logs? 

    Also, the EHLO in your snippet does not show EHLO WorldClient like mine does, and yours should.

    Do you have firewall software running on the same machine as where MDaemon is installed? If so, it's possible it is blocking the connection, and needs to have an exception set up.

     


  • Hi
    EHLO is completely empty, I replaced my domain name with *********.

    I am using version 25.

    https://limewire.com/d/1086de1b-eee9-4813-b065-a4a53f1d9679#zGsT7-cGqQxgiCnysOaZ_Q1YcJOafVXuVqbhXXmI_Vg

    https://limewire.com/d/f19fcbc2-3eb8-4a72-87ef-56a368de2ac7#YbJvwdpBSo5eQEE1Jdd8OujXvZGlc4DJAou2aFKu6Lk


  • I replaced my domain with ****.
    The same error occurs whether the firewall is on or off.
    EHLO is empty.

    Mdaemon Version 25


  • If the EHLO is empty, that makes me suspicious that the server that is answering is not actually MDaemon. Do you have any other services listening on port 587?

    Are you seeing the session in the Webmail log as well as the SMPT in log? 

    It should show in there as well, like this:

    Mon 2025-03-17 15:08:00.942: [A46DSTJZ0ZVMD] {8931683d72} BeginRequest WCAPI POST /WorldClientAPI/compose/1/send
    Mon 2025-03-17 15:08:00.946: [A46DSTJZ0ZVMD] {8931683d72} Creating RFC822 e-mail file.
    Mon 2025-03-17 15:08:00.956: [A46DSTJZ0ZVMD] {8931683d72} SMTP Sending message from "User" <user@company.test>.
    Mon 2025-03-17 15:08:00.964: [A46DSTJZ0ZVMD] {8931683d72} SMTP Connecting to 127.0.0.1:587...
    Mon 2025-03-17 15:08:00.986: [A46DSTJZ0ZVMD] {8931683d72} SMTP >>> 220 [my test server] ESMTP MSA Mon, 17 Mar 2025 15:08:00 -0500
    Mon 2025-03-17 15:08:00.986: [A46DSTJZ0ZVMD] {8931683d72} SMTP <<< EHLO WorldClient
    Mon 2025-03-17 15:08:00.986: [A46DSTJZ0ZVMD] {8931683d72} SMTP >>> 250-[my test server] Hello WorldClient [127.0.0.1], pleased to meet you

     


  • No, there is only mdaemon installed with an antivirus.

    I see the same message I sent.
    My webmail is running on IIS with the worldclient template.


  • In IIS is the SMTP relay enabled? If you disable it, are you able to send via Webmail?


  • I can connect to the mail server and send emails from outside the server and without IP 127.0.0.1 through outlook and intermediary software. But I can't through webmail.
    In addition, I didn't install another smtp.


  • The SMTP relay installs with IIS by default, but on reflection I don't think it is causing this issue, though I would definitely recommend making sure it is disabled.

    Is this something that you are attempting to set up for the first time or was it working in the past and stopped working recently?

    If you are setting it up for the first time, I would recommend going back through the article and making sure everything matches up with the steps in there:

    https://knowledge.mdaemon.com/setup-mdaemon-iis

     


  • One more thing that I would recommend you check is to open the MDaemon\WorldClient\Domains.ini file in a text editor and make sure the entry SmtpHeloDomain is not blank. It should be:

    SmtpHeloDomain=WorldClient

    That will be in the [Default:Settings] section


Please login to reply this topic!