IBM Support

SMTP receives 552 return code indicating Message size exceeds fixed maximum message size when sending to a Microsoft Mail Server

Troubleshooting


Problem

While in the process of sending mail to a Microsoft Mail Server, the following message is received: 552 4.3.1 Message size exceeds fixed maximum message size. The session between z/OS SMTP and the remote Mail Server is reset, inhibiting SMTP from sending the rest of the mail. SMTP then attempts to resend the mail, receives the 552 message again, the connection is reset, and the cycle is repeated.

Cause

When the Microsoft Mail Server detects that its maximum file size has been reached, it terminates the session before all the data is received and sends the 552 return code with text indicating message is too large.

Because the session has been terminated, SMTP treats the sending of the mail as a temporary error condition, effectively disregarding the 552 return code. This is because z/OS SMTP acts like a state machine according to the original design and RFC 821. It must finish sending the mail before accepting valid SMTP server replies. Replies received before mail has been sent will not be processed.

Because the receiving mail server is not processing large mail files properly (it is terminating when the mail size limit is reached), it causes the z/OS SMTP server to resend the mail. This triggers a loop condition.

What it should do is receive all the mail and discard the mail that exceeds its limit.

When the ending sequence of the message <CRLF>.<CRLF> is received, the receiving mail server should send the 552 return code to the sending site.

The sending site then will interpret the 552 correctly and process the mail as being undeliverable.

An SMTP trace will confirm this condition. Following is a sample which shows the condition.

Note the EZA5212 message prior to the 552. This indicates that SMTP was still in the process of sending the mail to the remote site when this message was received. The EZA5200I indicates the Foreign host (remote mail server) closed the connection. This will cause SMTP to retry sending the mail and this sequence will be repeated.


EZA5198I 2< 354 Start mail input; end with <CRLF>.<CRLF>
EZA5198I 1< 354 Start mail input; end with <CRLF>.<CRLF>
EZA5212I 2< Data arrived while Sending Mail Body:
EZA5214I 552 4.3.1 Message size exceeds fixed maximum message size
EZA5215I
EZA5200I 2> Connection closed at IP: 10.1.60.15 reason Foreign host
aborted the connection (8556)
EZA5212I 1< Data arrived while Sending Mail Body:
EZA5214I 552 4.3.1 Message size exceeds fixed maximum message size
EZA5215I
EZA5200I 1> Connection closed at IP: 10.1.60.49 reason Foreign host
aborted the connection (8556)

Resolving The Problem

  1. Implement a fix to the remote site to insure large mail files are properly handled.
  2. Raise the limit at the remote site for the size of mail file that it can receive.
  3. The following can be done though the local SMTP to limit the size of outbound mail but doing this would affect all outbound messages. Utilizing the following statements in the SMTP configuration file, some control can be achieved over the size of mail files that will be processed:
    • MAILFILEVOLUME specifies the volume on which temporary note files will be created. Based on the type of DASD device on which the volume resided, MAILFILEVOLUME will determine the number of bytes a block can contain.
    • CHECKSPOOLSIZE requests that if mail to be saved in the TEMP.NOTE file exceeds the primary allocation, it is to be truncated at that point. A shortened mail file WILL BE sent and a message will be appended to the end indicating that the data has been truncated.
    • Without this keyword, mail will continue to be written to the TEMP.NOTE file, secondary extents will be obtained until the secondary extent limit is reached or no space remains on the volume.

      CHECKSPOOLSIZE uses another statement, MAXMAILBYTES in the algorithm to determine space allocation.

      In general, the allocation used for the NOTE data sets is equivalent to specifying SPACE=(6144,(aaaaa,bbbb)),

      where aaaa=round((MAXMAILBYTES/4000)+1) and bbbb=round(aaaa/2).

      NOTE: The TEMP.NOTE file contains both the content of the note and commands needed to process it. A MAXMAILBYTES 1500000 will result in a SPACE=(6144,(377,188)) being used to allocate the file. Actual message data may exceed MAXMAILBYTES for outbound mail. However, this is not the case for inbound mail where MAXMAILBYTES is strictly adhered to.

      If you continue to receive the 552 message with the maximum message size being exceeded, lower the MAXMAILBYTES value until a value is reached where this message is no longer received.

[{"Product":{"code":"SSSN3L","label":"z\/OS Communications Server"},"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Component":"All","Platform":[{"code":"PF035","label":"z\/OS"}],"Version":"1.8;1.9;1.10;1.11;1.12;1.13;2.1;2.2","Edition":"All Editions","Line of Business":{"code":"LOB35","label":"Mainframe SW"}}]

Document Information

Modified date:
15 June 2018

UID

swg21255392