The SMTP protocol does not include any controls over the From:
and To:
fields in an email. They can be whatever you like, provided you have authority to send emails using the SMTP server.
So the short answer is nothing prevents anyone using your domain in emails they send. Even normal users can put whatever email address they like in their email settings.
Spammers routinely use valid domain names as From addresses to avoid being blocked.
While you cannot stop someone sending emails with your domain name, you can help email servers around the world understand if emails sent from your domain name actually originated from you and are legitimate emails, so that any others can be discarded as spam.
SPF
One way is to use SPF. This is a record that goes into DNS and lets the internet know what servers are permitted to send emails on behalf of your domain. It looks like this:
ourdomain.com.au. IN TXT "v=spf1 mx ip4:123.123.123.123 -all"
This says that the only valid sources of email for the ourdomain.com.au
are the MX server - the server defined as the recipient of emails for the domain, and another server at 123.123.123.123. Email from any other server should be considered spam.
Most email servers will check for the presence of this DNS record and act accordingly.
DKIM
While SPF is easy to set up, DKIM takes a little more effort, and should be implemented by your email server administrator. If you send your email via an ISP email server, they will often have methods for quick setup of DKIM.
DKIM works similarly to SSL certificates. A public / private keypair is generated. The private key is known only to the email server, and it will sign any outgoing emails.
The public key is published using DNS. So any server receiving emails marked as coming from your domain can check that the email was signed by retrieving the public key and checking the signature in the emails. If no signature is present, or it is incorrect, the email can be considered spam.
What could allow a someone/bot to send an email under our domain name?
- Google SPF, then set it up. That is about all you can realistically do. – Zoredache – 2014-10-20T23:34:34.4201An e-mail can contain any Reply-to address you choose. Some e-mail servers will send undeliverable notifications back to the Reply-to address, rather than the originator. On-line mail handlers like Gmail require you to validate any Reply-to address you use when composing on-line, but there is no such restriction when using a remote client with POP3/IMAP. And if you run your own e-mail server you can probably also fake the From address. – AFH – 2014-10-21T00:09:08.287
1How Spammers Spoof Your Email Address (and How to Protect Yourself) – DavidPostill – 2014-10-21T05:42:28.413