Postfix SMTP NOQUEUE: reject

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 (, I find the followiin error in the mail.log:

Jul 9 15:46:16 pagliaccio postfix/smtpd[21380]: NOQUEUE: reject:
RCPT from localhost.localdomain[]: 550 5.1.1
Recipient address rejected: User unknown in virtual alias table;
proto=ESMTP helo=<[]>

The funny thing is that I even don’t use the localhost to recieve mail for this domain, as it has a MX record:

The address 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.

System: Ubuntu 9.04

cat /etc/postfix/virtual | grep “”: medicine

postconf -n:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
home_mailbox = Maildir/
mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
mailbox_size_limit = 0
mydestination = $myhostname, $mydomain, localhost.$mydomain, localhost, mail.$mydomain
mynetworks = [::ffff:]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
sender_bcc_maps = hash:/etc/postfix/bcc
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
virtual_alias_maps = hash:/etc/postfix/virtual


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:

  1. What does the command “hostname” output?

  2. What does “cat /etc/hosts” show?

  3. What does “cat /etc/mailname” show?

  4. 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.

  5. 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 :slight_smile:



1.hostname, hostname -f: /etc/hosts:

nameserver config

IPv4 localhost.localdomain localhost pagliaccio


::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts /etc/mailname:

  1. I didn’t fully understand the question, but there is no ‘info’ user in /etc/aliases and /etc/passwd.

  2. … 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 - (which was automatically created by Virtualmin and is listed in /etc/postfix/virtual) and it worked:

Jul 9 16:54:14 pagliaccio postfix/local[25429]: B843122500D1:,, relay=local, delay=2, delays=0.07/0.01/0/1.9, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME)

If I try to send a mail to not existing account -, it doesn’t work.

Actually, it should redirect the mail to google. My MX record for is 0 ASPMX.L.GOOGLE.COM. It shouldn’t try to send local email either to, nor to

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.

Ahh, yes, I get it now :slight_smile:

If Postfix is configured to receive email for a domain, the MX record doesn’t matter – it’ll try to deliver the message.

So, even though you want it to be a backup MX, you can’t select “Mail for Domain”.

There is a way to setup Virtualmin to act as an MX server. I’m not currently certain how to do that from the UI :slight_smile:

For example, while you don’t want to do this, if someone wanted their entire server to be a backup for another, you’d do this:,hold_and_forward_backup_mail_server_quickstart

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 :slight_smile: If you get stuck, just yell!