简体   繁体   中英

PHP mail() and sendmail (Unknown User error)

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", eg 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM