Question

How to setup custom MAIIL FROM Domain also known as envelope sender in postfix

Hi I have installed postfix and configured it using this tutorial: https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-postfix-as-a-send-only-smtp-server-on-ubuntu-20-04

The only problem is that I cant set a custom MAIL FROM or envelope sender.
Please help me.


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hello there,

May I ask if what you try to achieve is to send the emails from a custom mail address like address@yourdomain.com and not be marked as sent from the server’s hostname?

If that is the case you need to add the domain in the Postfix config file - /etc/postfix/main.cf and if you want to configure forwarding as well you can add the actual forwarding in this file - /etc/postfix/virtual

  1. sammy@yourdomain.com sammy@gmail.com

This will forward the emails from sammy@yourdomain.com to sammy@gmail.com

Hope that this helps! Regards, Alex