"Failed to query Postfix config command"

Hi all!

Well, it seems I’ve messed with Virtualmin in a wrong way. I am receiving the following message on the left hand column under the virtual server drop down list:

“Failed to query Postfix config command to get the current value of parameter recipient_bcc_maps:”

Everything was working okay until … I’m not sure exactly. Here are a few things I did that I recall:

  1. Deleted DNS records on the registrar side. For example, I removed CName “host” thinking it wasn’t used. It turns out host.server.com is the default for webmin, as in “https://host.server.com:10000/”. I don’t know if host is used internally by Postfix or somewhere else, where the query failure would be affected. I did add the CName record “host” back though. Did not help.

  2. I got this great idea of enabling “Sendmail Mail Server”. It was in the “Un-used Modules” list. I’m not sure how to disable the server – that is, move it back to the Un-used area – so I’m not able to test if this is something that contributed to the error.

  3. I added an FTP user to one of the domains served by Virtualmin the day before this occurred. I don’t think this is a contributing issue though.

I’ve googled and read through other entries on this issue, but nothing has surfaced as the likely culprit.

Any ideas? Right now, I am still serving web sites, so Apache seems to be working fine. I’m able to SSH in as well.


Hmm, can you describe the process you used to enable the Sendmail module?

I suspect that’s related to the issue you’re seeing.

Also, what distro/version are you using?


hi Eric, thank you for the query.

For the installation, I went in the “un-used modules” area, and clicked on sendmail. The system replied with something like, “It appears sendmail is not installed, click here to install the package”. That’s it. I didn’t do any additional configuration that I recall. I went to the module, but it was over my head and I figured I’d get to it later.

I am using:

  • Operating system Debian Linux 7
  • Webmin version 1.680
  • Virtualmin version 4.07.gpl GPL
  • Theme version 8.7
  • Kernel and CPU Linux 3.2.0-4-amd64 on x86_64

What would you suggest at this point?

I found documentation referencing postfix/main.cf. Here’s my data:

root@blackseam:~# cat /etc/postfix/main.cf | grep myhostname
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
myhostname = host.blackseam.com
root@blackseam:~# hostname

There is a difference between the hostname command and the myhostname assignment. More specifically, I removed host.blackseam.com from DNS. I’ve added it back, but the system still doesn’t work.


So, here’s the problem… installing Sendmail implies using Sendmail rather than Postfix. So Postfix is either disabled, or removed, I’m not sure which.

What is the output of this command:

dpkg -l 'postfix*'

Ahh, thank you Eric. I expected something like that. How can I remove sendmail or disable it?

Here’s the output you requested…

root@blackseam:~# dpkg -l ‘postfix*’


| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend

|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)

||/ Name Version Architecture Description


rc postfix 2.9.6-2 amd64 High-performance mail transport a

un postfix-cdb (no description available)

un postfix-doc (no description available)

un postfix-ldap (no description available)

un postfix-mysql (no description available)

un postfix-pcre (no description available)

un postfix-pgsql (no description available)


Ah, yeah, Postfix doesn’t appear to be installed.

Let’s start here – I’d make a backup of your /etc/postfix dir before going any further.

Then, try installing Postfix, which you can do with the following:

apt-get install postfix

Do things begin working for you at that point?


Thanks Eric, the error is gone. However, when looking at webmin, “Sendmail Mail Server” is still listed as active and running. Is there a way to remove it from webmin? Are there going to be issues since sendmail still seems to be active?


For other folks who may happen across this thread, here’s what you’ll see during the apt-get. Note that sendmail is removed…

I created a tarball as suggested, and then during the installation it suggests “to keep the current configuration, select no configuration” or something like that. Now it is time to figure out how to configure it to send mail! :slight_smile:

Command to create tarball: tar -cf postfix.tar postfix/

root@blackseam:/etc# apt-get install postfix
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following package was automatically installed and is no longer required:
Use ‘apt-get autoremove’ to remove it.
Suggested packages:
postfix-mysql postfix-pgsql postfix-ldap postfix-pcre resolvconf postfix-cdb
ufw postfix-doc
The following packages will be REMOVED:
sendmail sendmail-bin
The following NEW packages will be installed:
0 upgraded, 1 newly installed, 2 to remove and 0 not upgraded.
Need to get 0 B/1,591 kB of archives.
After this operation, 1,456 kB of additional disk space will be used.
Do you want to continue [Y/n]? y

one more note… I had to disable sendmail on the bootup and shutdown page. Postfix is already enabled, but would not start until sendmail was manually shut down.

But, we’ve got exim. We don’t want postfix!

Why does this come up when I uninstall postfix in favour of exim?

I have one question and sorry to interrupt the discussion.

I have always have a problem using Postfix, so I installed sSMTP as a mail relay, how do I get rid of that same error? Or Simply disable Postfix once and for all?

Error: (Failed to query Postfix config command to get the current value of parameter recipient_bcc_maps)

Thx in advance



Great… Now when ever I try to login to Virtualmin, it dont go pass the “Re-Check and Refresh Configuration” Page and I dont even get the left side menu. Is there a way to remove Postfix or to get rid of this error? Or would I have to re-install Postfix? I dont want to make the wrong move here, please advice… Thx


I am suddenly getting this error, (on a GPL) we do not have sendmail installed, we have not installed sSMTP and the whole thing is basically vanilla.

Webmin/virtualmin crashes as soon as we try to log in and just at the moment we have no sensible connectivity.

all the servers are ubuntu LTS with no special mods or installs, this one has 8vcpu and 8gig of memory, plenty of disk space and has been running OK until this started to happen recently.

so, after reading the error messages, i decided to create the two settings that the error messages referenced i added with empty files (though postmapped them), and then webmin/virtualmin started again, is there any reason why these would suddenly be requesting these config files?

recipient_bcc_maps = hash:/etc/postfix/recipient_bcc
sender_dependent_default_transport_maps = hash:/etc/postfix/sender_transport