So I am hosting a domain’s website only. We have the site setup and all that good stuff. We will call this domain, mydomain.com.
All of his email and other needs are hosted through a shared hosting service he pays for. I will only be hosting the web files, mysqldb, and thats about it.
We are running into an issue where we are using Joomla as a CMS, and we have built a little form that people can fill out, then once they hit send it emails to admin@mydomain.com. The problem we are running into is if you check the virtualmin mailbox it has a bunch of mail delivery failures saying that admin@mydomain.com does not exist. I believe the problem is, it thinks it is hosting the mail so its just sending it locally. Its not actually reaching out to the net and sending to his actual mail server.
To fix this I disabled mail completely for all of virtualmin. Yet it still will not send. Any ideas?
The second line there should say “mail is handled by XXX” – is the “XXX” correct?
Also, are you sure the bounce messages you’re seeing aren’t from the remote server? That is, if the admin@ email address doesn’t exist on the shared server, that could certainly cause the trouble you’re seeing.
also about the bounce msg. I’m positive because I’m logged into the account we’re trying to send to waiting to see if it receives the msgs. So I know it exists.
The account does NOT exist on my Virtualmin server, which I’m hosting the web stuff on.
First, backup your /etc/postfix/virtual file. I’m still trying to catch up on my sleep from the conference, and I’m not entirely sure I’m thinking straight yet
Second, I don’t think there should be any reference to a domain in the virtual file (on the left-hand side anyhow), if your system isn’t accepting email for it. I’m not sure how those above lines snuck in there, but they should probably not exist in that file.
I would do this to correct it:
You already backed up the “virtual” file, right?
Remove the above 4 lines from your virtual file
Regenerate the virtual file by running: postmap /etc/postfix/virtual
Try sending an email again and see if it does the trick
Does not seem to have worked. It still will not mail to the address @mydomain.com. I have the form sending to gmail as well as another hosted site, @physikal.com and they all receive it no problems except for the one @mydomain.com
Although the script in question was setting the From address correctly, Google was seeing the “Return-Path” header with a hostname that wasn’t resolving correctly.
Making sure the hostname was set as desired, as well as resolvable, took care of the problem he was running into.