501 Syntax error: Empty email address.

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

501 Syntax error: Empty email address.

Rolando Guaracio
Hi,

I have the following situation.
When my internal postfix MTA send a NDN it send it with null from
(from<>). Next, this message is send to the external postfix MTA to send
it to the Internet. The problem is that this message is bounced with the
following line: said: 501 Syntax error: Empty email address. (in reply
to MAIL FROM command)).

What can I do?

Thanking in advance.
Best regards.

Rolando.
Reply | Threaded
Open this post in threaded view
|

Re: 501 Syntax error: Empty email address.

Viktor Dukhovni
On Wed, Oct 28, 2015 at 05:33:12PM -0300, Rolando Guaracio wrote:

> The problem is that this message is bounced with the following
> line: said: 501 Syntax error: Empty email address. (in reply to MAIL FROM
> command)).

The string "Empty email address" does not appear in the Postfix source code.

> What can I do?

You can report the complete log entry that contains that message
without removing any leading or trailing content.  And also say
which machine logged that message (the original client or the
relay).

In all probability the message was rejected by a misconfigured
external system, so the only thing you can do is try to talk some
sense into the operators of that system, or accept the fact that
bounces back to said system will be undeliverable.

--
        Viktor.
Reply | Threaded
Open this post in threaded view
|

Re: 501 Syntax error: Empty email address.

Rolando Guaracio
Fist of all, this is the arquitecture.

mta3: frontend MTA that relay incoming messages from Internet to my company.
mta1: internal MTA that is owner of my domain (domain.com). This MTA recives incoming message from Internet through mta3 and send messages to Internet
      through mta4
mta4: This MTA send messages to Internet.

Let's say that is an incoming message from [hidden email] to [hidden email]. The account [hidden email] is over quota and
bounce the message. Here are the logs of the three MTA's.
-----------------------------------------------------------------------

mta3 recives an incoming message from Internet and send it to mta1.

Oct 29 08:20:48 mta3 postfix/smtpd[21167]: 21AB2C0AD4: client=mail.example.com[x.x.x.x]
Oct 29 08:20:48 mta3 postfix/cleanup[21399]: 21AB2C0AD4: message-id=<1220089107.3611446117637574.JavaMail.root@mailhost>
Oct 29 08:20:48 mta3 postfix/qmgr[630]: 21AB2C0AD4: from=[hidden email], size=1450, nrcpt=1 (queue active)
Oct 29 08:20:48 mta3 postfix/smtp[21683]: 21AB2C0AD4: to=[hidden email], relay=mta1.domain.com[10.20.152.148]:25,
delay=0.57, delays=0.36/0/0/0.2, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 5FA5740201)
Oct 29 08:20:48 mta3 postfix/qmgr[630]: 21AB2C0AD4: removed

mta1 send the message to the mailbox and bounce it because the user account is over quota.

Oct 29 08:20:48 mta1 postfix/smtpd[28718]: 5FA5740201: client=mta3.domain.com[10.20.152.84]
Oct 29 08:20:48 mta1 postfix/cleanup[30289]: 5FA5740201: message-id=<1220089107.3611446117637574.JavaMail.root@mailhost>
Oct 29 08:20:48 mta1 postfix/qmgr[31491]: 5FA5740201: from=[hidden email], size=1659, nrcpt=1 (queue active)
Oct 29 08:20:53 mta1 postfix/lmtp[29801]: 5FA5740201: to=[hidden email], relay=mailbox4.domain.com[10.20.152.160]:7025,
delay=5.4, delays=0.2/0.37/0/4.8, dsn=5.2.2, status=bounced (host mailbox.domain.com[10.20.152.160] said: 552 5.2.2 Over quota
(in reply to end of DATA command))
Oct 29 08:20:56 mta1 postfix/bounce[29669]: 5FA5740201: sender non-delivery notification: 9234540212
Oct 29 08:20:56 mta1 postfix/qmgr[31491]: 5FA5740201: removed

mta1 generates a NDN a send it to mta4.

Oct 29 08:20:56 mta1 postfix/cleanup[30161]: 9234540212: message-id=[hidden email]
Oct 29 08:20:56 mta1 postfix/qmgr[31491]: 9234540212: from=<>, size=7386, nrcpt=1 (queue active)
Oct 29 08:20:56 mta1 postfix/smtp[28468]: 9234540212: to=[hidden email], relay=mta4.domain.com[10.20.152.149]:25,
delay=0.05, delays=0.03/0/0/0.02, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 980A1A0A49)
Oct 29 08:20:56 mta1 postfix/qmgr[31491]: 9234540212: removed

mta4 relay the NDN to Internet but is bounced with the error "501 Syntax error: Empty email address"

Oct 29 08:20:56 mta4 postfix/smtpd[19077]: 980A1A0A49: client=mta1[10.20.152.148]
Oct 29 08:20:56 mta4 postfix/cleanup[19079]: 980A1A0A49: message-id=[hidden email]
Oct 29 08:20:56 mta4 postfix/qmgr[30576]: 980A1A0A49: from=<>, size=7585, nrcpt=1 (queue active)
Oct 29 08:20:56 mta4 postfix/smtp[18973]: 980A1A0A49: to=[hidden email], relay=mx1.example.com[x.x.x.x]:25,
delay=0.04, delays=0.02/0/0.01/0, dsn=5.0.0, status=bounced (host mx1.example.com[x.x.x.x] said: 501 Syntax error: Empty email address.
(in reply to MAIL FROM command))

Oct 29 08:20:56 mta4 postfix/qmgr[30576]: 980A1A0A49: removed

So, the sender never have a notification that his mail was bounced because the account is over quota.
Can I resolve this with some configuration with the NDN messages? For example send it without null from.
how can I do that?

Thank you :)




On 10/29/2015 12:05 AM, Viktor Dukhovni wrote:
On Wed, Oct 28, 2015 at 05:33:12PM -0300, Rolando Guaracio wrote:

The problem is that this message is bounced with the following
line: said: 501 Syntax error: Empty email address. (in reply to MAIL FROM
command)).
The string "Empty email address" does not appear in the Postfix source code.

What can I do?
You can report the complete log entry that contains that message
without removing any leading or trailing content.  And also say
which machine logged that message (the original client or the
relay).

In all probability the message was rejected by a misconfigured
external system, so the only thing you can do is try to talk some
sense into the operators of that system, or accept the fact that
bounces back to said system will be undeliverable.


Reply | Threaded
Open this post in threaded view
|

Re: 501 Syntax error: Empty email address.

Viktor Dukhovni
On Thu, Oct 29, 2015 at 12:05:55PM -0300, Rolando Guaracio wrote:

>    mta4: This MTA send messages to Internet.

>    mta4 relay the NDN to Internet ...
>
>    Oct 29 08:20:56 mta4 postfix/smtpd[19077]: 980A1A0A49:
>       client=mta1[10.20.152.148]
>    Oct 29 08:20:56 mta4 postfix/cleanup[19079]: 980A1A0A49:
>       message-id=[10]<[hidden email]>
>    Oct 29 08:20:56 mta4 postfix/qmgr[30576]: 980A1A0A49: from=<>,
>       size=7585, nrcpt=1 (queue active)
>    Oct 29 08:20:56 mta4 postfix/smtp[18973]: 980A1A0A49:
>       to=<[hidden email]>, relay=mx1.example.com[x.x.x.x]:25,
>       delay=0.04, delays=0.02/0/0.01/0, dsn=5.0.0, status=bounced (host
>       mx1.example.com[x.x.x.x] said: 501 Syntax error: Empty email address.
>       (in reply to MAIL FROM command))
>    Oct 29 08:20:56 mta4 postfix/qmgr[30576]: 980A1A0A49: removed

As expected, the erroneous "Syntax error:" message is generated by
the MX host of the original sender's domain.  That domain refuses
bounce messages.  Bounce messages MUST be sent with an empty sender
address to avoid mail loops.  There is no other way to send bounces.

>    So, the sender never have a notification that his mail was bounced
>    because the account is over quota.

The sender's domain has decided they don't want your bounces.

>    Can I resolve this with some configuration with the NDN messages? For
>    example send it without null from.

The best thing to do is to configure your inbond MX host to reject
mail for users who are over quota, by periodically updating a suitable
table that lists overquote addresses.

    main.cf:
        indexed = ${default_database_type}:${config_directory}
        transport_maps = ${indexed}transport

    transport:
        [hidden email]   error:5.2.2 Mailbox full

or

    main.cf:
        indexed = ${default_database_type}:${config_directory}
        smtpd_recipient_restrictions =
            permit_mynetworks,
            reject_unauth_destination,
            check_recipient_access ${indexed}rcpt-access

    rcpt-access:
        [hidden email]   552 5.2.2 Mailbox full

That way, you won't be sending nearly as much backscatter.  Also
give users larger disk quotas.  Running out of space should be
rare.

--
        Viktor.
Reply | Threaded
Open this post in threaded view
|

Re: 501 Syntax error: Empty email address.

Rolando Guaracio
Thank you Viktor!


On 10/29/2015 12:17 PM, Viktor Dukhovni wrote:

> On Thu, Oct 29, 2015 at 12:05:55PM -0300, Rolando Guaracio wrote:
>
>>     mta4: This MTA send messages to Internet.
>>     mta4 relay the NDN to Internet ...
>>
>>     Oct 29 08:20:56 mta4 postfix/smtpd[19077]: 980A1A0A49:
>>        client=mta1[10.20.152.148]
>>     Oct 29 08:20:56 mta4 postfix/cleanup[19079]: 980A1A0A49:
>>        message-id=[10]<[hidden email]>
>>     Oct 29 08:20:56 mta4 postfix/qmgr[30576]: 980A1A0A49: from=<>,
>>        size=7585, nrcpt=1 (queue active)
>>     Oct 29 08:20:56 mta4 postfix/smtp[18973]: 980A1A0A49:
>>        to=<[hidden email]>, relay=mx1.example.com[x.x.x.x]:25,
>>        delay=0.04, delays=0.02/0/0.01/0, dsn=5.0.0, status=bounced (host
>>        mx1.example.com[x.x.x.x] said: 501 Syntax error: Empty email address.
>>        (in reply to MAIL FROM command))
>>     Oct 29 08:20:56 mta4 postfix/qmgr[30576]: 980A1A0A49: removed
> As expected, the erroneous "Syntax error:" message is generated by
> the MX host of the original sender's domain.  That domain refuses
> bounce messages.  Bounce messages MUST be sent with an empty sender
> address to avoid mail loops.  There is no other way to send bounces.
>
>>     So, the sender never have a notification that his mail was bounced
>>     because the account is over quota.
> The sender's domain has decided they don't want your bounces.
>
>>     Can I resolve this with some configuration with the NDN messages? For
>>     example send it without null from.
> The best thing to do is to configure your inbond MX host to reject
> mail for users who are over quota, by periodically updating a suitable
> table that lists overquote addresses.
>
>      main.cf:
> indexed = ${default_database_type}:${config_directory}
> transport_maps = ${indexed}transport
>
>      transport:
> [hidden email]   error:5.2.2 Mailbox full
>
> or
>
>      main.cf:
> indexed = ${default_database_type}:${config_directory}
> smtpd_recipient_restrictions =
>    permit_mynetworks,
>    reject_unauth_destination,
>    check_recipient_access ${indexed}rcpt-access
>
>      rcpt-access:
> [hidden email]   552 5.2.2 Mailbox full
>
> That way, you won't be sending nearly as much backscatter.  Also
> give users larger disk quotas.  Running out of space should be
> rare.
>