Multiserver setup - Mail server installation

Discussion in 'Installation/Configuration' started by blinden, Aug 15, 2012.

  1. blinden

    blinden Member

    I edited this post a few times, but would like a couple of eyes on it to make sure everything I did to fix it was the correct way to fix the problems and won't create any future issues when it comes upgrade time. The next posts I make will be about having trouble setting up TLS and also some outgoing issues I'm having. Outgoing works with webmail (I'm using roundcube) but not through email clients, but I hvaen't gathered enough information about this issues yet to make a post on it.

    Ubuntu 12.04

    Followed instructions from the ISPConfig manual for mulitserver setup. Some of the steps appear to be slightly outdated in the manual, but nothing major as far as I can tell, the biggest thing being the volatile repositories I think.

    Have my ISPConfig interface working well on the first server, and the install on the mailserver, mailserver is giving a bunch of various errors that I'm having trouble sorting out. I've searched a bit, but cannot find exact answers for what I'm running into

    I fixed a few of the problems myself, but I'm going to discuss those just to make sure I fixed them the correct way:

    firstly was the error "mailserver dovecot: auth: Fatal: Unknown database driver 'mysql'"

    I fixed this by installing the package "dovecot-mysql" I dont' know if this step is missing in the tutorial, or I missed it, or there is some other problem.

    Secondly, the error " fatal: pipe_command: execvp /usr/bin/maildrop: No such file or directory" the email gets to the server, but won't deliver to the mailbox

    I installed the maildrop package, not sure if I should have the relay setup differently or what I'm doing wrong here.

    Thirdly, I commented out the line "# -o smtpd_bind_address=" in postfix because of a warning at startup, not sure if that is a problem or not.

    # See /usr/share/postfix/ for a commented, more complete version
    # Debian specific:  Specifying a file name will cause the first
    # line of that file to be used as the name.  The Debian default
    # is /etc/mailname.
    #myorigin = /etc/mailname
    smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
    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 = /usr/share/doc/postfix
    # TLS parameters
    smtpd_tls_cert_file = /etc/postfix/smtpd.cert
    smtpd_tls_key_file = /etc/postfix/smtpd.key
    smtpd_use_tls = yes
    smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
    smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
    # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
    # information on enabling SSL in the smtp client.
    myhostname =
    alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
    alias_database = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
    myorigin = /etc/mailname
    mydestination =, localhost, localhost.localdomain
    relayhost =
    mynetworks = [::1]/128
    mailbox_size_limit = 0
    recipient_delimiter = +
    inet_interfaces = all
    html_directory = /usr/share/doc/postfix/html
    virtual_alias_domains =
    virtual_alias_maps = proxy:mysql:/etc/postfix/, proxy:mysql:/etc/postfix/, hash:/var/lib/mailman/data/virtual-mailman
    virtual_mailbox_domains = proxy:mysql:/etc/postfix/
    virtual_mailbox_maps = proxy:mysql:/etc/postfix/
    virtual_mailbox_base = /var/vmail
    virtual_uid_maps = static:5000
    virtual_gid_maps = static:5000
    smtpd_sasl_auth_enable = yes
    broken_sasl_auth_clients = yes
    smtpd_sasl_authenticated_header = yes
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, check_recipient_access mysql:/etc/postfix/, reject_unauth_destination
    smtpd_tls_security_level = may
    transport_maps = proxy:mysql:/etc/postfix/
    relay_domains = mysql:/etc/postfix/
    relay_recipient_maps = mysql:/etc/postfix/
    proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_ca$
    smtpd_sender_restrictions = check_sender_access mysql:/etc/postfix/
    proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_ca$
    smtpd_sender_restrictions = check_sender_access mysql:/etc/postfix/
    smtpd_client_restrictions = check_client_access mysql:/etc/postfix/
    smtpd_client_message_rate_limit = 100
    maildrop_destination_concurrency_limit = 1
    maildrop_destination_recipient_limit = 1
    virtual_transport = maildrop
    header_checks = regexp:/etc/postfix/header_checks
    mime_header_checks = regexp:/etc/postfix/mime_header_checks
    nested_header_checks = regexp:/etc/postfix/nested_header_checks
    body_checks = regexp:/etc/postfix/body_checks
    owner_request_special = no
    dovecot_destination_recipient_limit = 1
    smtpd_sasl_type = dovecot
    smtpd_sasl_path = private/auth
    content_filter = amavis:[]:10024
    receive_override_options = no_address_mappings
    message_size_limit = 0
    rotocols = imap pop3
    auth_mechanisms = plain login
    disable_plaintext_auth = no
    log_timestamp = "%Y-%m-%d %H:%M:%S "
    mail_privileged_group = vmail
    ssl_cert = </etc/postfix/smtpd.cert
    ssl_key = </etc/postfix/smtpd.key
    passdb {
      args = /etc/dovecot/dovecot-sql.conf
      driver = sql
    userdb {
      args = /etc/dovecot/dovecot-sql.conf
      driver = sql
    plugin {
      quota = dict:user::file:/var/vmail/%d/%n/.quotausage
    service auth {
      unix_listener /var/spool/postfix/private/auth {
        group = postfix
        mode = 0660
        user = postfix
      unix_listener auth-userdb {
        group = vmail
        mode = 0600
        user = vmail
      user = root
    protocol imap {
      mail_plugins = quota imap_quota
    protocol pop3 {
      pop3_uidl_format = %08Xu%08Xv
      mail_plugins = quota
    protocol lda {
      mail_plugins = sieve quota
    edit: (adding mail.log)
    Aug 15 12:24:31 mailserver dovecot: pop3-login: Login: user=<[email protected]>, method=PLAIN, rip=, lip=, mpid=13596, TLS
    Aug 15 12:24:31 mailserver dovecot: pop3([email protected]): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0
    Aug 15 12:25:02 mailserver dovecot: pop3-login: Disconnected (no auth attempts): rip=, lip=, secured
    Aug 15 12:25:02 mailserver dovecot: imap-login: Disconnected (no auth attempts): rip=, lip=, secured
    Aug 15 12:25:02 mailserver postfix/smtpd[13624]: connect from localhost[]
    Aug 15 12:25:02 mailserver postfix/smtpd[13624]: lost connection after CONNECT from localhost[]
    Aug 15 12:25:02 mailserver postfix/smtpd[13624]: disconnect from localhost[]
    Aug 15 12:28:32 mailserver postfix/qmgr[11408]: 7254234C006D: from=<[email protected]>, size=3406, nrcpt=1 (queue active)
    Aug 15 12:28:32 mailserver postfix/pipe[13682]: 7254234C006D: to=<[email protected]>, relay=maildrop, delay=9029, delays=9029/0.03/0/0.08, dsn=4.3.0, status=deferred (temporary failure. Command output: ERR authdaemon: s_connect() failed: No such file or directory /usr/bin/maildrop: Unable to open mailbox. )
    Aug 15 12:30:01 mailserver dovecot: imap-login: Disconnected (no auth attempts): rip=, lip=, secured
    Aug 15 12:30:01 mailserver postfix/smtpd[13725]: connect from localhost[]
    Aug 15 12:30:01 mailserver dovecot: pop3-login: Disconnected (no auth attempts): rip=, lip=, secured
    Aug 15 12:30:01 mailserver postfix/smtpd[13725]: lost connection after CONNECT from localhost[]
    Aug 15 12:30:01 mailserver postfix/smtpd[13725]: disconnect from localhost[]
    Found a problem in my postfix that was creating the delievery problem, got that fixed, the "Virtual transport" was set to 'maildrop' it is now 'dovecot'
    Last edited: Aug 15, 2012
  2. blinden

    blinden Member

    okay, so, the outgoing situation.

    Through webmail I can send and reply to emails without any problems, setting up an email client, in this case, thunderbird, I get the followign error message:

    An error occurred while sending mail. The mail server responded: 5.1.0 <[email protected]>: Sender address rejected: User unknown in virtual mailbox table. Please check the message recipient [email protected] and try again.

    It's almost like it's trying local delivery to the receiving email address, although I cannot be sure (the receiving address is definitely NOT local)

    Edit: not a local delivery issue, doesn't work for local delivery either, must be an auth problem?

    Switched to windows mail, same type of issue, but turning on smtp auth fixed it, however still hangs with thunderbird no matter what settings...
    Last edited: Aug 15, 2012
  3. Wsbs9GC

    Wsbs9GC New Member

    Mail accounts are virtual, i.e. they don't have an actual account on the machine. Thus your account name should be [email protected] and the mail server name should be So you would be actually logging into [email protected] in thunderbird. If after making the modification above you still see no auth attempts in the logs, try ensuring that you are connecting on port 25 in thunderbird's outgoing mail server settings.
    Last edited: Aug 16, 2012

Share This Page