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

I have installed postfix and dovecot(1.2.12) with ubuntu.

This is my

alias_maps = 
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
inet_interfaces = all
mailbox_size_limit = 0
mydomain =
myhostname =
mynetworks = [::ffff:]/104 [::1]/128
readme_directory = no
recipient_delimiter = +
relayhost = 
smtp_use_tls = yes
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_recipient_restrictions = reject_unknown_sender_domain, reject_unknown_recipient_domain, reject_unauth_pipelining, permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_path = private/dovecot-auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /etc/ssl/certs/ssl-mail.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-mail.key
smtpd_tls_mandatory_ciphers = high
smtpd_tls_mandatory_protocols = SSLv3, TLSv1
smtpd_tls_received_header = yes
tls_random_source = dev:/dev/urandom
virtual_gid_maps = static:5001
virtual_mailbox_base = /home/postfix/vmail
virtual_mailbox_domains = /etc/postfix/virtual_domains
virtual_mailbox_maps = hash:/etc/postfix/virtual
virtual_uid_maps = static:5001

this is my dovecot.conf

protocols = imap imaps

log_timestamp = "%Y-%m-%d %H:%M:%S "

log_path = /var/log/dovecot.log

mail_privileged_group = vmail

protocol imap {
        mail_max_userip_connections = 10

auth default {
        mechanisms = plain login

        # imaps/ smtp user database
        passdb passwd-file {
                args = /home/postfix/vmail/passwd

        # all mail is mapped to this user.
        userdb static {
                args = uid=vmail gid=vmail home=/home/postfix/vmail/%d/%n

        user = root
        !include_try /etc/dovecot/auth.d/*.auth
dict {
plugin {
!include_try /etc/dovecot/conf.d/*.conf

(The conf.d/ and auth.d/ are empty)

I do not see errors on the log, but with this configuration I CAN receive email but I CAN'T send email... I always have this error:

Relay access denied

I'm trying to send email from my account to a account

Something wrong? Thank you!

share|improve this question
What mail client are you using to send the email, is it configured to use a username and password to send mail? – DerfK May 13 '11 at 23:06
yes, I'm using thunderbird – Dail May 13 '11 at 23:11
Is your thunderbird set up to use a username and password? – sysadmin1138 May 14 '11 at 3:19
@sysadmin1138 yes, i'm using and password – user81436 May 14 '11 at 7:14

Is postfix & dovecot and the email client itself on the same machine?

If not, you need to modify mynetworks to include your IP range.

EDIT: Sorry, didn't see you were using SASL. You should test if SASL is working when trying to send email via telnet. There are articles on how to do this..

share|improve this answer

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.