- Posts: 18
- Thank you received: 3
Ask the community, share ideas, and connect with other LimeSurvey users!
It is possible for the mailbox in the return path to be different from the actual sender's mailbox, for example, if error responses are to be delivered to a special error handling mailbox rather than to the message sender. When mailing lists are involved, this arrangement is common and useful as a means of directing errors to the list maintainer rather than the message originator.
Don't look at SMTP log please …ViliusS wrote: I have investigated SMTP logs and it seems that the issue is that LimeSurvey doesn't set Return-Path: header at all. During the transmission it only sets MAIL FROM: and From: headers. More over LimeSurvey sets the MAIL FROM: with the value set in "Bounce email address" which is incorrect.
About the Return-Path header
The most common error senders make is adding a Return-Path header to their mail. Even some well known mail software does this. Probably written by programmers who copy from others rather than reading RFCs (the internet standards that specify SMTP and MIME).
Update: As of PHPMailer version 5.2.8 the Return-Path header is no longer set in created messages.
and laterWhen the delivery SMTP server makes the “final delivery” of a message, it inserts a return-path line at the beginning of the mail data. This use of return-path is required; mail systems MUST support it. The return-path line preserves the information in the from the MAIL command. Here, final delivery means the message has left the SMTP environment. Normally, this would mean it had been delivered to the destination user or an associated mail drop, but in some cases it may be further processed and transmitted by another mail system.
Later RFC even talks about the case where Return-Path is added by the originating client, but again it doesn't forbid it.It is sometimes difficult for an SMTP server to determine whether or
not it is making final delivery since forwarding or other operations
may occur after the message is accepted for delivery. Consequently,
any further (forwarding, gateway, or relay) systems MAY remove the
return path and rebuild the MAIL command as needed to ensure that
exactly one such line appears in a delivered message.
Note "SHOULD NOT" here. As explained in RFC2119:A message-originating SMTP system SHOULD NOT send a message that
already contains a Return-path header field. SMTP servers performing
a relay function MUST NOT inspect the message data, and especially
not to the extent needed to determine if Return-path header fields
are present. SMTP servers making final delivery MAY remove Return-
path header fields before adding their own.
SHOULD NOT This phrase, or the phrase "NOT RECOMMENDED" mean that
there may exist valid reasons in particular circumstances when the
particular behavior is acceptable or even useful, but the full
implications should be understood and the case carefully weighed
before implementing any behavior described with this label.
Section 4.1.1.2.The <reverse-path> portion of the first or
only argument contains the source mailbox (between "<" and ">"
brackets), which can be used to report errors (see Section 4.2 for a
discussion of error reporting).
Note that here it states that the same sender mailbox can be used for error reporting, but this doesn't mean that, in case of a mailing list or other specialized bounce mailbox present, error reporting must always go to the MAIL FROM: address.The reverse-path consists of the sender mailbox. Historically, that
mailbox might optionally have been preceded by a list of hosts, but
that behavior is now deprecated (see Appendix C). In some types of
reporting messages for which a reply is likely to cause a mail loop
(for example, mail delivery and non-delivery notifications), the
reverse-path may be null (see Section 3.6).
and Section 7.2.It is possible for the mailbox in the return path to be different
from the actual sender's mailbox, for example, if error responses are
to be delivered to a special error handling mailbox rather than to
the message sender. When mailing lists are involved, this
arrangement is common and useful as a means of directing errors to
the list maintainer rather than the message originator.
The text above implies that the final mail data will begin with a
return path line, followed by one or more time stamp lines. These
lines will be followed by the rest of the mail data: first the
balance of the mail header section and then the body (RFC 5322 [4]).
There is no inherent relationship between either "reverse" (from
MAIL, SAML, etc., commands) or "forward" (RCPT) addresses in the SMTP
transaction ("envelope") and the addresses in the header section.
Receiving systems SHOULD NOT attempt to deduce such relationships and
use them to alter the header section of the message for delivery.