Hi,
I am evaluating Virtualmin GPL.
I’m experiencing the following problem, wich I wasn’t able to solve for 2 days. I read nearly all the posts here related to postfix, but wasn’t able to apply a working solution.
I have a PHP script, which sends emails through local SMTP. I have no problems with sending mails
to domains, that are not hosted on my server. So, the smtp basically works Althouh, if I try to send an email
to the one of my virtual domains (medicine.bg), I find the followiin error in the mail.log:
Jul 9 15:46:16 pagliaccio postfix/smtpd[21380]: NOQUEUE: reject:
RCPT from localhost.localdomain[127.0.0.1]: 550 5.1.1 info@medicine.bg:
Recipient address rejected: User unknown in virtual alias table;
from=dir@abv.bg to=info@medicine.bg
proto=ESMTP helo=<[188.40.50.246]>
The funny thing is that I even don’t use the localhost to recieve mail for this domain, as it has a MX record:
0 ASPMX.L.GOOGLE.COM.
The address info@medicine.bg does recieve mail from sources, different than localhost, so the MX record works. I don’t understand why postfix tries to deliever local mail.
I use the default installation with the GPL install script on fresh installed system (Ubuntu 9.04 min).
I didn’t expirience this problem with the default installation on Debian Etch.
Firstly, the install script technically only supports Ubuntu 8.04 (which it mentions when it first runs ;-), though as you saw it does continue and tries to do it’s best.
But I don’t think that’s the issue here –
A few additional questions for you:
What does the command “hostname” output?
What does “cat /etc/hosts” show?
What does “cat /etc/mailname” show?
Do you have an “info” user or alias setup? It didn’t look like one was in the virtual file, but an alias could also be in /etc/aliases, and a user would be in /etc/passwd.
If you go into Virtualmin, and run System Settings -> Re-Check Config, does that run cleanly?
I’m suspicious that something may be awry with your hostname, which the above would help diagnose, but it could be a handful of things, so we’ll see
I didn’t fully understand the question, but there is no ‘info’ user in /etc/aliases and /etc/passwd.
… your system is ready for use by Virtualmin.
I am not sure if I did explain the problem correctly. It seems to me that postfix just doesn’t respect the MX record. I have tried to send an email to an existing local account - medicine@medicine.bg (which was automatically created by Virtualmin and is listed in /etc/postfix/virtual) and it worked:
If I try to send a mail to not existing account - info@medicine.bg, it doesn’t work.
Actually, it should redirect the mail to google. My MX record for medicine.bg is 0 ASPMX.L.GOOGLE.COM. It shouldn’t try to send local email either to medicine@medicine.bg, nor to info@medicine.bg.
You could ask: “Are you jackass, just disable the ‘Mail for domain enabled?’ feature and it should work”. But I need it because, I am planning to add backup MX records, which should point to the local domain. Also, it worked once in Debian Etch, why shouldn’t it work now ?
Sorry for my bad English and thanks for trying to help me.
But again, that’s not what you want – you want just one Virtual Server to be a backup.
I believe that to do this, you’d need to tweak some things in Webmin -> Servers -> Postfix, or just manually configure Postfix to be an MX server for that one domain.
I don’t know what those would be off the top of my head (or after poking around a bit), but hopefully that helps you get started If you get stuck, just yell!