My website e-mail is getting 'spoofed' and I would like to put things in place to avoid that happening. As some background, I have a shared hosting account with a dozed domains added to my hosting account. I do not receive many e-mails but recently (twice in the past 2 months) have had an e-mail address locked by my host due to this spoofing activity. I use a PHP form for the Contact Us page and it uses mail() and has an autoresponder. I have read that there are ways to mitigate spoofing with using DMARC in a DNS setting. Do you have any tips for preventing spoofing or links to good articles? Thank you in advance.
There is no way to prevent someone to spoof your address. The sender information shown in e-mails (the
From: field) can be spoofed easily. But usually, mail clients (like gmail) have logic to detect which email is spoofed or not.
Maybe your email account hosting been locked because you detected as a spoofer, to prevent this just use the email from field with your authenticated email address. Or you should not set the from field(just make it as default).
Another way just use different mail hosting than from your shared hosting. Shared hosting has very restricted and limited email. It's not recommended for sending emails except for testing or rarely usage.