1 (edited by Bronko 2023-10-24 04:40:13)

Topic: Mails from 'root@myhostname' after changing postfix 'myhostname'

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.6.5
- Deployed with iRedMail downloadable installer
- Linux/BSD distribution name and version: ubuntu 22.04.1
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Hi,

after changing

myhostname

in postfix

main.conf

(to solve SMTP Banner Check, installation at privat server network behind NAT and portforwarding)

daily status and backup mails into admins mailbox (postmaster@mydomain.com) from root@myhostname stoped given by these fact.

Where to adjust mail from root?

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Mails from 'root@myhostname' after changing postfix 'myhostname'

Any hints for me...?

3

Re: Mails from 'root@myhostname' after changing postfix 'myhostname'

should be in /etc/postfix/aliases

4

Re: Mails from 'root@myhostname' after changing postfix 'myhostname'

Don't forget to run command "postalias /etc/postfix/aliases" after updated this file.

5

Re: Mails from 'root@myhostname' after changing postfix 'myhostname'

dave.opc wrote:

should be in /etc/postfix/aliases

ZhangHuangbin wrote:

Don't forget to run command "postalias /etc/postfix/aliases" after updated this file.

Thanks again, but the issue here is the sender From field at daily mail reporting, because it is still the hostname of the server, that doesn't changed by re-configuring postfix of course.

Is it possible to adjust the sender address: 'root@server_hostname' without changing the server hostname?

6

Re: Mails from 'root@myhostname' after changing postfix 'myhostname'

/etc/postfix/sender_canonical_maps

#Rewrite ALL senders from local users
/postmaster@mail.coolhost.at/    postmaster@mail.coolhost.at
/amavis@mail.coolhost.at/        security@coolhost.at
/root@mail.coolhost.at/            security@coolhost.at
/.+@mail.coolhost.at/            no-reply@coolhost.at


That is my working setup, adjust domain to your needs

7 (edited by Bronko 2024-01-14 04:49:59)

Re: Mails from 'root@myhostname' after changing postfix 'myhostname'

@Cthulhu

Thanks a lot, this should work...

But for now it works as in post #1 expected, without any further changes.