6.4 ORF Online Help
Select your ORF version:

Table of Contents

SMTP Responses


This help section describes the SMTP responses, their role and usage in ORF.

General Information

SMTP transport protocol

Internet emails are transmitted using the Simple Mail Transfer Protocol (SMTP), which is a command-oriented text-based protocol over the TCP transport, where the sender server sends a command with optional parameters/data to the receiver server, which responds to the command using a response code and a short textual description of the result.

For example, when sender server issues a recipient specification command (e.g., RCPT TO: <[email protected]>), the receiver server must respond to the command with a response like 200 Recipient Accepted. or 550 Sorry, no such mailbox here. An SMTP response consists of a 3-digit numerical code and a text part.

The role of ORF during the transport

ORF filters email on SMTP transport level and can reject either recipients or the email itself during the transport by returning an SMTP response which indicates an error. ORF rejects recipients using customizable SMTP responses (see the Filtering Points Concept and the Actions sections).

SMTP response codes

The mail servers interpret the numerical code to learn the status of the issued command. There are five possible response code categories, indicated by the most significant digit (2 from 200 and 5 from 550). Categories between 1 and 3 mean temporary or permanent success, while 4 indicates a temporary error (400-499, the sender server should retry the delivery later, e.g., recipient mailbox store is temporarily disconnected) and 5 indicates a permanent error (500-599, the sender must not retry the delivery, e.g., no such recipient exists).

Bounce reports, NDRs & DSNs

When the sender server cannot deliver the email due to a transport error (e.g., negative command response), it should generate a Delivery Status Notification (DSN, a specific subtype is called Non-Delivery Report (NDR) or "bounce report") and return it to the message originator. This typically includes the SMTP response code and the response text.

Multi-line text responses may not be fully included in the DSNs however, so it is recommended to keep the SMTP response a single line when customizing the response.

Customizing the SMTP Responses

SMTP responses can be customized using the ORF Administration Tool. See the Actions and the Attachment Filtering configuration sections regarding the customization.

Response text fields

You can insert several response fields into the text part of the SMTP responses. These response fields are replaced by their actual value when the SMTP response is generated.

The following response text fields are available:

Field Description Available
{BLOCKYEAR} Current date: year (yyyy). The current year on four digit. All tests
{BLOCKMONTH} Current date: month (mm). The current month on two digit. All tests
{BLOCKDAY} Current date: day (dd). The current day on two digit. All tests
{BLOCKTIME} Current time (hh:nn:ss). The current time in 24-hour (military time) system with seconds. All tests
{ORFBANNER} ORF banner. Contains a short banner of ORF Fusion. All tests
{IP} Client IP address. Address of the remote server. All tests
{HELODOMAIN} HELO/EHLO Domain. The domain argument received with the HELO/EHLO command. All tests
{SMTPSENDER} SMTP sender address. The SMTP email address of the message sender. All tests
{SMTPRECIPIENT} SMTP recipient address. The SMTP email address of the message recipient. All tests
{BLACKLISTNAME} DNS blacklist short name. DNS blacklist
{BLACKLISTFULLNAME} DNS blacklist full name. DNS blacklist
{BLACKLISTWEB} DNS blacklist website URL. DNS blacklist
{WEBLOOKUP} DNS blacklist lookup URL. DNS blacklist
{TXTDATA} DNS blacklist TXT data. This field is only available when TXT lookup for the given DNS blacklist and globally enabled. DNS blacklist (only when TXT lookups are enabled)
{TXTDATAORWEBLOOKUP} DNS blacklist TXT data or lookup URL. Contains the TXT data or (when TXT lookup is disabled for the blacklist or globally) the lookup URL. It is recommended to use this instead of {TXTDATA}. DNS blacklist
{SPFDOMAIN} SPF subject domain. The RFC5321.MailFrom domain tested by the SPF test. SPF test
{DMARCDOMAIN} DMARC subject domain. The RFC5322.From domain tested by the DMARC test. DMARC test

Example

Incoming mail from IP address 24.213.59.4, sender: [email protected], recipient: [email protected], blocked on IP blacklist. The assigned SMTP response code is 550, the SMTP response format is "5.2.1 Mailbox unavailable. This server does not accept mails from your IP address ({IP}). Mail from {SMTPSENDER} to {SMTPRECIPIENT} blocked by {ORFBANNER}".

In the case above, the following SMTP response will be created by ORF: 550 5.2.1 Mailbox unavailable. This server does not accept mails from your IP address (24.213.59.4). Mail from [email protected] to [email protected] blocked by ORF Fusion 5.0.

Using the SMTP Response Properties Dialog

SMTP response code

Enter the SMTP response code here. The code may change from 400 to 599. Note that only 5xx category response codes indicate a permanent error. Choosing a 4xx response code may result in re-attempted delivery.

SMTP response text

Enter the SMTP response text here. It must not contain non-ASCII characters and should provide usable information to the remote system's administrator. Note that multi-line text responses may not be fully included in the DSNs, so it is recommended to keep the SMTP response a single line. The text should include an ESMTP response code.

Set default blocking

Click this button to reset the SMTP response to the ORF default assigned to the test.

Copyright © Vamsoft Ltd. 2024. All rights reserved. Document ID smtpresponses, version 2.