Postfix configuration

Started by fox983, March 27, 2020, 02:26:48 AM

Previous topic - Next topic
Hello,
some months ago I set up in OPNsense a mail alert system with ntopng and Postfix.
The emails had my public IP in the subject line and all was working fine.
After setting up a secondary internet connection, now the subject reports the secondary IP (DHCP) instead of the primary one (PPPOE connection - public IP).
How can I set back external IP of my primary internet connection in the subject line?
I've tried with option smtp_bind_address but no luck.
And another problem is if I set something in Services/Postfix/General - System Hostname or System Domain,
I continue to receive emails with hostname-domain set in System/Settings/General Hostname and Domain, not the ones I set.
Changes made in gui are written correctly in /usr/local/etc/postfix/main.cf but seems that are ignored.
Now emails arrive with secondary IP and hostname.domain in subject line
[opnsense.domain@192.168.15.1] instead of [firewall.test@external-IP]

Thanks in advance for those who want to help me

Wasnt there a masquerade Domain parameter for this?
WWW: www.routerperformance.net
Support plans: https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German): https://opnsense.max-it.de/

Yes but trying to set something.external.com in field Masquerade Domains, mails arrive with [opnsense.domain@192.168.15.1] in subject line.
All parameters seem to be ignored.

I have no idea why you are talking about subject lines? Is this some scripted stuff on your side?
WWW: www.routerperformance.net
Support plans: https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German): https://opnsense.max-it.de/

No script. I'm talking about subject line because here are the data I'd like to change.
Now subject of emails is "ntopng [opnsense.domain@192.168.15.1]" but it should be "ntopng [firewall.test@external-IP]"
Maybe is the ntopng's alert system that set these variables?
And if so how can I change them?

No idea, should be related to ntop
WWW: www.routerperformance.net
Support plans: https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German): https://opnsense.max-it.de/