Multiserver setup - Mail server installation

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

  1. blinden

    blinden New 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
    ISPConfig 3.0.4.6

    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=127.0.0.1" in postfix master.cf because of a warning at startup, not sure if that is a problem or not.

    postfix main.cf:
    Code:
    # See /usr/share/postfix/main.cf.dist 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 = mailserver.wpa.net
    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 = mailserver.wpa.net, localhost, localhost.localdomain
    relayhost =
    mynetworks = 127.0.0.0/8 [::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/mysql-virtual_forwardings.cf, proxy:mysql:/etc/postfix/mysql-virtual_email2email.cf, hash:/var/lib/mailman/data/virtual-mailman
    virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
    virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
    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/mysql-virtual_recipient.cf, reject_unauth_destination
    smtpd_tls_security_level = may
    transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
    relay_domains = mysql:/etc/postfix/mysql-virtual_relaydomains.cf
    relay_recipient_maps = mysql:/etc/postfix/mysql-virtual_relayrecipientmaps.cf
    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/mysql-virtual_sender.cf
    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/mysql-virtual_sender.cf
    smtpd_client_restrictions = check_client_access mysql:/etc/postfix/mysql-virtual_client.cf
    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:[127.0.0.1]:10024
    receive_override_options = no_address_mappings
    message_size_limit = 0
    
    
    dovecot.conf
    Code:
    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
      sieve=/var/vmail/%d/%n/.sieve
    }
    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)
    Code:
    
    
    Aug 15 12:24:31 mailserver dovecot: pop3-login: Login: user=<[email protected]>, method=PLAIN, rip=67.43.103.242, lip=10.0.0.22, 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=127.0.0.1, lip=127.0.0.1, secured
    Aug 15 12:25:02 mailserver dovecot: imap-login: Disconnected (no auth attempts): rip=127.0.0.1, lip=127.0.0.1, secured
    Aug 15 12:25:02 mailserver postfix/smtpd[13624]: connect from localhost[127.0.0.1]
    Aug 15 12:25:02 mailserver postfix/smtpd[13624]: lost connection after CONNECT from localhost[127.0.0.1]
    Aug 15 12:25:02 mailserver postfix/smtpd[13624]: disconnect from localhost[127.0.0.1]
    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=127.0.0.1, lip=127.0.0.1, secured
    Aug 15 12:30:01 mailserver postfix/smtpd[13725]: connect from localhost[127.0.0.1]
    Aug 15 12:30:01 mailserver dovecot: pop3-login: Disconnected (no auth attempts): rip=127.0.0.1, lip=127.0.0.1, secured
    Aug 15 12:30:01 mailserver postfix/smtpd[13725]: lost connection after CONNECT from localhost[127.0.0.1]
    Aug 15 12:30:01 mailserver postfix/smtpd[13725]: disconnect from localhost[127.0.0.1]
    
    Found a problem in my postfix main.cf 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 New 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 <sending@emailaddress>: Sender address rejected: User unknown in virtual mailbox table. Please check the message recipient receiving@emailaddress 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 HowtoForge Supporter

    Last edited: Aug 16, 2012

Share This Page