Recently, a client encountered problems when trying to send out and receive emails from the default email account in CPanel. That is to say that they were trying to send out email from an email account that happened to match the username for that account. The only problem was that when the remote smtp server receiving the email did a "verify sender callout" the request would then fail. but why?
Well although this would make sense once you totally understand the way emails are setup by default in CPanel, it is an issue that I must admit left me more than a little perplexed for a few hours. Here is the low down on the topic and how you can avoid the same problems yourself in future:
When an account is setup in WHM by the server administrator, the account is setup with a default user for the account on that host. that is to say that if your account domain is "myowndomain.com" you might be set up with an equivalent username of "myowndom". Unless setup otherwise, this will become the default catch-all email for that account. In essence, if any email, spam or otherwise, is sent to the domain (myowndomain.com), it will end up in that email account.
The problem is that if you send out emails from a PHP script, for the purposes of a mailing list from myowndom@myowndomain.com your system is going to automatically fail just about every test in the anti-spam checking book. The reason for this is as follows:
When accessing the email for user "myowndom" you are actually accessing the email address "myowndom@serverhostname.com" and not "myowndom@myowndomain.com". The VERY simple way around this is to just create a pop account or forwarder even for the email "myowndom@myowndomain.com", this will then allow the smtp server to respond correctly when processing a sender callout verification request.
That being said and done, you should now be able to verify emaisl correctly, receive back any resulting responses from remote servers correctly and allow for spam and anything else received on a catch-all basis to a separate account.
And so there you have it. myowndom is actually myowndom@serverhostname.com and myowndom@yourdomain.com is something else!