I’m having an issue with PHP mail() and the standard sendmail MTA on debian. I want to be able to send mail through PHPs mail()-function from “users” not existing on the system. As it works now I can send mail just as long as the user (user@domain.tld) exists. I want to be able to send mail from any “user”, e.g from random@domain.tld where random may be a non existent “user”.
Now to the real question; Is there any setting in sendmail that will allow this?
No setting needed, typically. You can send e-mail from anyone in the world… it’s just a header.
However, you should know that spam filters are smart to this! There are numerous methods for checking that an e-mail was legitimate, such as SPF records and what not. It is poor practice to send from non-existent accounts, and your chances of ending up in a spam filter are quite high.