Multiple Smarthosts based on sender E-Mail address

thomas-hn

New Member
Oct 26, 2021
10
0
1
41
Hi,

is it possible to have multiple smarthosts (outgoing SMTP servers), based on the E-Mail address of the sender?
For example:
Mails from the address foo@myinternalmaildomain.com shall be forwarded to a SMTP server of GMX mail.
Mails from the address bar@myinternalmaildomain.com shall be forwarded to a SMTP server of Yahoo mail.

Thanks in advance,

Thomas
 
Last edited:

Stoiko Ivanov

Proxmox Staff Member
Staff member
May 2, 2018
6,862
1,039
164

baradhili

New Member
May 4, 2022
2
0
1
I've tried it - not quite per email - its painful - but mostly due to the templating system (I think) - but that is probably me not quite working out how everything runs properly

setting main.cf.in in /etc/pmg/templates to smtp_sender_dependent_authentication = yes , running pmgconfig sync --restart 1, and systemctl restart postfix

and yet I get
postconf -df | grep smtp_sender_dependent_authentication
smtp_sender_dependent_authentication = no

Its doing my head :(
 

Stoiko Ivanov

Proxmox Staff Member
Staff member
May 2, 2018
6,862
1,039
164
and yet I get
postconf -df | grep smtp_sender_dependent_authentication
smtp_sender_dependent_authentication = no

from the postconf manpage:
-d Print main.cf default parameter settings instead of actual settings.

so check with `postconf |grep smtp_sender_dependent_authentication`


However I'm not sure this is the only key you need to add (you proabably also need the sender_dependent_relay_host_maps as I linked above)
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get your own in 60 seconds.

Buy now!