-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how can change smtp.mailfrom #354
Comments
@andris9 |
Your question is a little confusing to me. Smtp.mailfrom, envelope-from, and return-path are all the exact same thing, aren't they? They all refer to the value of |
For context, there's a total of 2 from addresses. The one on the message itself, and the one used during the SMTP transaction. |
Thank you for your response. I appreciate your attempt to clarify, and I'd like to provide more details to ensure we're on the same page. In the context of email authentication, specifically DKIM (DomainKeys Identified Mail) and DMARC (Domain-based Message Authentication, Reporting, and Conformance), there are distinctions between 'mailed-by' and 'signed-by' elements. The screenshot you attached indeed highlights the 'mailed-by' information, indicating the domain responsible for sending the email. However, the 'signed-by' information refers to the domain that has digitally signed the message using DKIM. In my initial question, I'm specifically interested in changing the 'mailed-by' information in the Return-Path, which is often associated with the 'smtp.mailfrom' or 'envelope-from' address. This can impact how email providers display the sender information to recipients. For instance, in the provided email header snippet: plaintext I've noticed that some email marketing platforms, like MailerLite, allow users to customize the 'mailed-by' domain. This customization can contribute to better email deliverability and brand consistency. If possible, could you guide me on how to achieve this within the Zone MTA code? I'm interested in changing the 'mailed-by' or 'envelope-from' domain without altering the 'From' address in the email body. I hope this clarifies my inquiry, and I appreciate your assistance in navigating this matter. Best regards, |
Sure, so you mean you want to set the envelope from? I think you can just write a plugin that sets envelope.from. The envelope object is available in multiple hooks. You still seem to be over complicating this. Spf and dkim are checked against the envelope from. So yes, the envelope from domain will be in mailed by and signed by. Otherwise they would not be valid. Do note that this setup will make your service incompatible with a strict dmarc policy. As with a strict dmarc policy requires the envelope from and the from header domain to be the same. If you use this setup and your customer co figured strict dmarc, all emails will bounce. Just as long as you're aware of that it should be fine. |
You should probably just make it the same as the from header though, and tell your customers how to set up dkim, spf, dmarc. A strict dkim policy leads to better security for your customers, as it prevents from spoofing of their domain. |
Hello everyone, I've been extensively exploring the code of the Zone MTA, but I'm having difficulty figuring out how to change the 'smtp.mailfrom' setting. In the provided code snippet, you can see that mlsend.com is sending marketing emails, and the 'smtp.mailfrom' setting is affecting the 'Return-Path.' However, I'd like to set 'smtp.mailfrom' differently while keeping the 'From' envelope as '[email protected].' It's important to note that when I create a user with the name '[email protected],' the sending email still uses '[email protected]' as the 'From' address. Could you please provide guidance on how to achieve this within the Zone MTA code?
The text was updated successfully, but these errors were encountered: