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

Posted November 27, 2021 118 views
EmailUbuntu 20.04

I have installed postfix and configured it using this tutorial:

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

Please help me.

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.

Submit an Answer
1 answer

Hello there,

May I ask if what you try to achieve is to send the emails from a custom mail address like 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/ and if you want to configure forwarding as well you can add the actual forwarding in this file - /etc/postfix/virtual


This will forward the emails from to

Hope that this helps!