How to change postmaster email?

lttabdul

Member
Jun 8, 2020
16
2
8
32
Hello all,

Firstly, this is the first time I use PMG I am not good with Postfix or the CLI. I would like to change the postmaster email from using the "postmaster@hostname.domain.com" to "postmaster@domain.com"

I tried to follow this guide but the commands did not work,

https://dhenandi.com/change-postmaster-address-to-domain-on-proxmox-mail-gateway/

When entering this command:

postconf | grep myorigin
append_at_myorigin = yes
myorigin = $myhostname

I get bash: append_at_myorigin = yes command not found


What is the method of doing it?

Thanks.
 
Follow as below.
Make sure your $mydomain is domain.com. To confirm double check your /etc/hosts.

How to change it? Proxmox Mail Gateway lock the configuration. You can’t edit directly your /etc/postfix/main.cf. It will be changed to default when you restart the services.


You need a template configuration for main.cf on /var/lib/pmg/templates/. Copy it to /etc/pmg/templates. But first, you need to create the directory.

mkdir -p /etc/pmg/templates
cp /var/lib/pmg/templates/main.cf.in /etc/pmg/templates/main.cf.in

And you can add this configuration to /etc/pmg/templates/main.cf.in. And restart the services

echo 'myorigin = $mydomain' >> /etc/pmg/templates/main.cf.in
pmgconfig sync


Well done, after this step. You did it. Try to trigger a mail to make notifications.
 
  • Like
Reactions: lttabdul
When entering this command:

append_at_myorigin = yes

I get bash: append_at_myorigin = yes command not found

There is your issue: It's no bash command, it must be changed within the relevant config file ;) Read the article with more care...
 
  • Like
Reactions: lttabdul
There is your issue: It's no bash command, it must be changed within the relevant config file ;) Read the article with more care...
Hello all,

Firstly, this is the first time I use PMG I am not good with Postfix or the CLI. I would like to change the postmaster email from using the "postmaster@hostname.domain.com" to "postmaster@domain.com"

I tried to follow this guide but the commands did not work,

https://dhenandi.com/change-postmaster-address-to-domain-on-proxmox-mail-gateway/

When entering this command:

postconf | grep myorigin
append_at_myorigin = yes
myorigin = $myhostname

I get bash: append_at_myorigin = yes command not found


What is the method of doing it?

Thanks.


Thank you! Working. Is there a way to verify emails? I am using www.mailtester.com to verify emails.
 

Attachments

  • 1.png
    1.png
    29.2 KB · Views: 135
Double check all valid email can come in as normal and non valid email is being blocked.

how do I do that?

Do you mean all valid email able to receive and block all non valid email after enable verify receivers?
 
Never mind I have found out the solution.

It was to point the PMG IP as the relay and set it in relay.