Double return-path

Tallboy

New Member
I see other threads mentioning this and the answer is always the SMTP server is adding it.

Im currently only using mailwizz, and in the config page I have SymphonyMailer selected.
 
Last edited:
This is driving me crazy, postfix is disabled on both servers. I have been looking at this for like 8 hours now.

MailWizz->SymfonyMailer->PMTA... seems straightforward

PMTA is doing the DKIM signing if that matters
 
MailWizz only adds a single return path.
You can try with SwiftMailer as well and see if any difference, but I doubt it.
 
@Tallboy - Just to be sure we're on the same path, do you see two return path header lines? Or do you see the return path header having two email addresses in it?
 
@Tallboy - Just to be sure we're on the same path, do you see two return path header lines? Or do you see the return path header having two email addresses in it?

I see two return path header lines:

Code:
Return-Path: <bounce@domain.com>
Return-Path: <bounce@domain.com>

In the MW PMTA delivery server I have:Pasted_Image_5_23_22__5_31_AM.png
 
Last edited:
FWIW PMTA support mentioned they do in fact add it.

PMTA will add a return-path header using the SMTP MAIL FROM address, if you see two in your inbox, it could be added by other mailers.

According to RFC2821, a message-originating SMTP system SHOULD NOT send a message that already contains a Return-path header. When 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.

I still don't fully get what the answer to the problem is though. It sounds like MW should just not add it?

I'm more confused if that's the case, how has no one here encountered this problem before, with PMTA and other SMTP integrations.
 
It sounds like MW should just not add it?
If we don't add it, then there's no way for us to be able to process bounces for smtp servers, which is a big no no.
However, if you want to tell MailWizz to not add the Return-Path header, you can certainly do this on your own.
See https://www.mailwizz.com/kb/adding-custom-configuration-params/ to understand how to add custom configuration params.
The configuration param you need to add is: 'email.custom.returnPath.enabled' and must be set to false, so:
PHP:
    // app params
    'params' => array(
        'email.custom.returnPath.enabled' => false,
    ),
This way MailWizz won't add any return path header.
 
Awesome, thanks! Glad to see that exists. And yes you're right about not adding it would be crazy. I meant to say if the SMTP server it's sending it to is the one actually handling the sending and adds it. As a sidenote I'd be curious to see how many actually do vs dont vs overwrite.

Thanks again
 
When I change "From" on the delivery server it changes MAIL FROM correctly, but then the letter From gets changed to that as well.

If I disable force From, then if the campaign is changed to info@ then MAIL FROM gets changed to info@ ... I need to set them independently. I would have just assumed MAILFROM reads from the bounce address if a bounce server is assigned to a delivery server?

I want to enforce MAIL FROM to always be bounce@ (so the return-path gets set correctly) and I want From to be info@
 
Last edited:
My goal is:

Code:
Return-path (set by PMTA based on MAIL FROM): bounce@
From: info@
Reply-To: info@
List-Unsubscribe: info@

I also want to continue to use MailWizz bounce processing like normal.
 
how do I change what email goes in MAIL FROM
The email address that is used in Mail From command is the email address that you add in the delivery server. This is not a header, this is a smtp command. It is the same address used for authentication, if any. This cannot be changed from within the application. When we connect to the smtp server with any library, we provide the user/pass and the library does the rest, including issuing the mail from command with the right params. If you need to change how this works, you need to change the underlying libraries.

When I change "From" on the delivery server it changes MAIL FROM correctly, but then the letter From gets changed to that as well.
That's in line with what I explained above.

I would have just assumed MAILFROM reads from the bounce address if a bounce server is assigned to a delivery server?
This is a bad assumption. The bounce server only sets the Return-Path header. Has nothing to do with the mail commands.

Return-path (set by PMTA based on MAIL FROM): bounce@
You can create a bounce server with that email address and assign it to the smtp server, this way you will get the return path from the bounce server. That's how this is designed to work.
I also think PMTA can be set to remove any given return path and replace it with one it generates, you should ask their support.

From: info@ Reply-To: info@ List-Unsubscribe: info@
Set the info@ in the delivery server and do not allow it to be changed in campaigns, for both, FROM and Reply To.
 
It is the same address used for authentication, if any.
Ah, that makes sense. I have a generic named SMTP server user so it must just be taking it from the FROM instead. Thanks! I knew it was a part of the envelope commands, but I was definitely trying to figure out how it was set.
 
Back
Top