Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Hi I'm trying to setup webmin+postfix+dovecot+roundcube, for this moment I want things be as simple as possible so I'm using linux users as email accounts.

I can send/receive from the same domain, I mean can send/receive to/from I tested smtp/imap with outlook and says no problem. if I send a mail from gmail it reject with error of:

Technical details of temporary failure:
The recipient server did not accept our requests to connect.

when I login with roundcube the email address display in the right corner is something like user1@com and I get this error message from logs:

[11-Nov-2012 07:39:03 +0400]: IMAP Error: Login failed for user1 from 187.150.xx.xx. Could not connect to com:143: php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/webmail/program/include/rcube_imap.php on line 191 (POST /webmail/?_task=login&_action=login)

it says Could not connect to com:143

looks like it cannot read the domain name.

I used to check the mx record and it says it can find the server of I quit sure the problema is from postfix or my server configs, but I have been looking for every config file and cannot find the answer of this. any suggestion I will appreciate.

here are some of my configs (I don't want to make this question too long, I can provide any other information to solve this question):


#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# TLS parameters
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
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_sasl_security_options = noanonymous
smtpd_sasl_auth_enable = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

mydomain =
myhostname =
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = $mydomain, $myhostname
mynetworks = [::ffff:]/104 [::1]/128
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
virtual_alias_domains =
smtpd_recipient_restrictions = permit_mynetworks reject_unauth_destination permit_sasl_authenticated
myorigin = $mydomain

roundcube conf

// ---------------------------------- // IMAP // ----------------------------------

$rcmail_config['default_host'] = '%d';
$rcmail_config['default_port'] = 143;
$rcmail_config['imap_auth_type'] = null;
$rcmail_config['imap_delimiter'] = null;
$rcmail_config['imap_ns_personal'] = null;
$rcmail_config['imap_ns_other']    = null;
$rcmail_config['imap_ns_shared']   = null;
$rcmail_config['imap_force_caps'] = false;
$rcmail_config['imap_force_lsub'] = false;
$rcmail_config['imap_force_ns'] = false;
$rcmail_config['imap_timeout'] = 0;
$rcmail_config['imap_auth_cid'] = null;
$rcmail_config['imap_auth_pw'] = null;
$rcmail_config['imap_cache'] = null;
$rcmail_config['messages_cache'] = false;
share|improve this question
up vote 0 down vote accepted


Roundcube error is because of missing auth method

$rcmail_config['imap_auth_type'] = LOGIN;


In your, remove virtual_alias_domains = That is not needed for single domain config, and also in wrong format. That variable need a map file. Here is complete list of postfix config variable info.

The main problem is smtpd_recipient_restrictions missing permit at the end. Change as follow

smtpd_recipient_restrictions =

Restart postfix and re-test external mail. If error still exist, check following for any info related to gmail server connection


Then add related log lines in your question.

share|improve this answer
john siu guided me to found out the problem. I forgot to mention I'm trying to do multi domain setup, and my domian aliases format are in correct, after reading some manuals, and problem fixed. PS: love how serverfault people downvote without leaving a comment – Kossel Nov 21 '12 at 14:22

The problem can be the wrong installation of php (some libraries is missing). Try reinstal php and restart apache.

share|improve this answer
Just blindly reinstalling a component without understanding the problem is not a valid problem resolution method. Also, this question has an accepted answer that makes it clear that the problem was something else entirely. What is the point of this answer? – Sven Feb 11 '13 at 8:48

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.