Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Unable to send mail with postfix and dovecot. Log appears to have sent

    Hi I have attempted to setup my own mail server using centos, postfix and dovecot.

    (I have had to swap the 'at' symbol for the # so that I could get this post through the censoring)

    I first for mail working (sending and receiving) using system users for the mail accounts however after some careful thought I have decided that virtual mailboxes are the way to go.

    Since moving to the virtual mailbox setup I am unable to send outgoing mail. I can receive mail correctly but cannot send.

    I can also send between email addresses on my domain eg to

    I think switching to virtual mailboxes has broken something in the auth but I cant see anything in the logs and I have enabled verbose logging.

    Orginally i set in the value mydomain = however I read that this shouldn't be the setting virtual_mailbox_domains so I commented the mydomain line out. I think the issue stems from this but I am not sure :S

    Really tried my best on this one but would love it if anyone had any advice?

    Here is my configs and and error log postings sorry in advance for all the info.

    postconf -n output
    ================================================== =================
    alias_database = hash:/etc/aliases
    alias_maps = hash:/etc/aliases
    broken_sasl_auth_clients = yes
    command_directory = /usr/sbin
    config_directory = /etc/postfix
    daemon_directory = /usr/libexec/postfix
    debug_peer_level = 2
    home_mailbox = Maildir/
    html_directory = no
    inet_interfaces = all
    mailq_path = /usr/bin/mailq.postfix
    manpage_directory = /usr/share/man
    mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
    myhostname = localhost
    mynetworks =
    myorigin = $mydomain
    newaliases_path = /usr/bin/newaliases.postfix
    readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
    recipient_delimiter = +
    relay_domains =
    sample_directory = /usr/share/doc/postfix-2.3.3/samples
    sendmail_path = /usr/sbin/sendmail.postfix
    setgid_group = postdrop
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_path = private/auth
    smtpd_sasl_type = dovecot
    unknown_local_recipient_reject_code = 550
    virtual_gid_maps = static:505
    virtual_mailbox_base = /var/mail/vmail
    virtual_mailbox_domains =
    virtual_mailbox_maps = hash:/etc/postfix/vmailbox
    virtual_minimum_uid = 100
    virtual_uid_maps = static:506

    dovecot -n output
    ================================================== ===================
    # 1.0.7: /etc/dovecot.conf
    login_dir: /var/run/dovecot/login
    login_executable(default): /usr/libexec/dovecot/imap-login
    login_executable(imap): /usr/libexec/dovecot/imap-login
    login_executable(pop3): /usr/libexec/dovecot/pop3-login
    mail_location: maildir:/var/mail/vmail/%d/%n
    mail_executable(default): /usr/libexec/dovecot/imap
    mail_executable(imap): /usr/libexec/dovecot/imap
    mail_executable(pop3): /usr/libexec/dovecot/pop3
    mail_plugin_dir(default): /usr/lib/dovecot/imap
    mail_plugin_dir(imap): /usr/lib/dovecot/imap
    mail_plugin_dir(pop3): /usr/lib/dovecot/pop3
    auth default:
    mechanisms: plain cram-md5
    verbose: yes
    debug: yes
    debug_passwords: yes
    driver: passwd-file
    args: /etc/dovecot/passwd
    driver: pam
    driver: passwd-file
    args: /etc/dovecot/users
    type: listen
    path: /var/spool/postfix/private/auth
    mode: 432
    user: postfix
    group: postfix

    /etc/dovecot/passwd content
    ================================================== ===================={PLAIN}AG5ld3NAYW5nZWxlY29tbWVyY2 UuY28udWsARmxlZXQ3MA=={PLAIN}AG5ld3NAYW5nZWxlY29tbWVyY2 UuY28udWsARmxlZXQ3MA=={HMAC-MD5}b5a87b62680a48250e68c137060389a12176d5c21cd9d0 0f82fd2fcc1acce9f4

    /etc/dovecot/users content
    ================================================== ====================

    /etc/postfix/vmailbox content
    ================================================== ====================

    /var/log/maillog last 20 lines after trying to login
    ================================================== ====================
    May 10 13:49:44 ds-49372 postfix/smtpd[12472]: connect from[]
    May 10 13:49:44 ds-49372 dovecot: auth(default): client in: AUTH 3 PLAIN service=smtp resp=AG5ld3NAYW5nZWxlY29tbWVyY2UuY28udWsARmxlZXQ3M A==
    May 10 13:49:44 ds-49372 dovecot: auth(default): passwd-file( lookup: file=/etc/dovecot/passwd
    May 10 13:49:44 ds-49372 dovecot: auth(default): client out: OK 3
    May 10 13:49:44 ds-49372 postfix/smtpd[12472]: 239C6B3016F:[], sasl_method=PLAIN,
    May 10 13:49:44 ds-49372 postfix/cleanup[12489]: 239C6B3016F: message-id=<>
    May 10 13:49:44 ds-49372 postfix/qmgr[12101]: 239C6B3016F: from=<>, size=19672, nrcpt=1 (queue active)
    May 10 13:49:44 ds-49372 postfix/smtpd[12472]: disconnect from[]
    May 10 13:49:47 ds-49372 dovecot: IMAP( Connection closed
    May 10 13:49:48 ds-49372 postfix/smtp[12491]: 239C6B3016F: to=<>,[]:25, delay=3.9, delays=0.25/0/0.7/2.9, dsn=2.0.0, status=sent (250 OK id=1QJmOX-0004LR-Vx)
    May 10 13:49:48 ds-49372 postfix/qmgr[12101]: 239C6B3016F: removed

  2. #2
    I appear to have fixed it by going back to the and then removing the line myhostname = localhost as it appeared to be sending from localhost which broke it.

    Removing it left it set as my proper hostname which was configured in the i believe.

    Does this seem like the correct solution? I know it works but I would like to see if it is correct.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts