Linux
--
Questions
--
Followers
Top Experts
Force Postfix From Address
I have Postfix set up on a Linux box. Its only job is to send emails that are automatically generated through cron jobs (Perl scripts) and PHP web pages to various domain email address. I'm not sure I'm explaining this correctly, but the Linux box sits on my intranet and sends emails out to the internet. However - because my domain hosting company uses sender authentication, the emails are being bounced because, even though I set a valid FROM address in my scripts, Postfix is sending them from root@domain.com or apache2@domain.com, etc. I have figured out how to set the domain name correctly in main.cf (mydomain=domain.com), but I can't figure out how to force it to send from a specific user and not the user that's running the script. I'd like to set Postfix to send all emails from validuser@domain.com regardless of which cron job runs the script. I hope I explained this correctly.
ANY HELP WOULD BE GREATLY APPRECIATED.
ANY HELP WOULD BE GREATLY APPRECIATED.
Zero AI Policy
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
I'm not completely sure, but this doesn't seem like a Postfix error, but a script error. Are you sure you are correctly setting the from in the script? If you could paste here the bit of code that sends the email it would be very helpful :)
ASKER CERTIFIED SOLUTION
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
AWESOME shakoush2001!! Thank you!!
Glad I could help :)






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
Linux
--
Questions
--
Followers
Top Experts
Linux is a UNIX-like open source operating system with hundreds of distinct distributions, including: Fedora, openSUSE, Ubuntu, Debian, Slackware, Gentoo, CentOS, and Arch Linux. Linux is generally associated with web and database servers, but has become popular in many niche industries and applications.