php - How to check if a received email is legit? -
i'm developing system gets emails pipe, verify if email address email sent in client database, , write database.
the problem don't want have security issues, , if sends email php system, log too. so, how can check if email sent mail server? thinking in getting ip of mail server of domain , verify in email headers if sent these server. so, if got email test@hotmail.com, ping mail.hotmail.com , check if email came these ip address.
anyway, if got custom domain yourdomain.com, running in shared cpanel server, other people in these server send emails php , ip verify passed. so, thinking in checking if email sent php or mail server, don't know how this.
what suggestion?
i thinking in checking if email sent php or mail server
you not able find out difference between these 2 normally. , email sent php can same email mail server , case email sent php is also email mail server.
you can try write detection on own (your own filter) based on monitoring , finding out wrong mails (or reported users if can not monitor emails because of law regulations).