Postfix – smtp.mailfrom domain of a php application

How to configure Postfix / PHP to have the smtp.mailfrom in the form of wordpress@wordpress-site-domain.tld?
I have multiple users on the server, and each of them owns one or more WordPress installations, but all the mails coming from WP have the hostname1234.hostingprovider.tld as smtp.mailfrom.
Is there a way to make sure that postfix detects the domain from which wp_mail sends (as do shared hosting solutions)?