Setup Postfix to send with smtp.mailfrom as a wordpress@wordpress-site.tld

1 post / 0 new
#1 Mon, 02/11/2019 - 11:29
pingo

Setup Postfix to send with smtp.mailfrom as a wordpress@wordpress-site.tld

Currently, Postfix on my Virtualmin host sends mails with smtp.mailfrom: vmhost12345.hostingprovider.com (as set in /etc/hostname).
Is there a way for it to pick up the domain current PHP app is running?
I have multiple VirtualMin accounts running Wordpress apps, and I'd like to emulate the wp_mail behaviour under cpanel accounts these sites were migrated from.