[SOLVED] Problem IMAP email syncronization problem

Discussion in 'ISPConfig 3 Priority Support' started by Tomislav Aurednik, Aug 31, 2016.

  1. Tomislav Aurednik

    Tomislav Aurednik Member HowtoForge Supporter

    running ubuntu 14.04 LTS server with postfix, dovecot. pop3 email works fine. Now i want to change pop3 to imap. in outlook when i remove pop3 account and create new imap account and import the backup_pop3.pst file it copies the email to server but it does not want to sync so outlook does not work. There are any errory in mail.log or mail.err!
    Are there any options to set in the config settings specific for outlook to set for imap to work in outlook?

    my postfix main.cf:
    # 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_tls_cert_file = /etc/postfix/ispserver.pem
    smtpd_tls_key_file = /etc/postfix/ispserver.pem
    smtpd_tls_CAfile = /etc/postfix/ispserver.pem

    #smtpd_tls_cert_file = /etc/postfix/public.pem
    #smtpd_tls_key_file = /etc/postfix/private.pem
    #smtpd_tls_CAfile = /etc/postfix/ca.pem

    #smtpd_tls_loglevel = 1

    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.

    smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
    myhostname = mail.123gostovanje.si
    alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
    alias_database = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
    myorigin = $myhostname
    #mydomain = 123gostovanje.si
    mydestination = mail.123gostovanje.si, localhost, localhost.localdomain
    relayhost =
    mynetworks = 127.0.0.0/8 [::1]/128
    mailbox_size_limit = 0
    recipient_delimiter = +
    inet_interfaces = all
    inet_protocols = all
    html_directory = /usr/share/doc/postfix/html
    virtual_alias_domains =
    virtual_alias_maps = hash:/var/lib/mailman/data/virtual-mailman, proxy:mysql:/etc/postfix/mysql-virtual_fo
    rwardings.cf, proxy:mysql:/etc/postfix/mysql-virtual_email2email.cf
    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, reject_unauth_destination, ch
    eck_recipient_access mysql:/etc/postfix/mysql-virtual_recipient.cf
    smtpd_tls_security_level = may
    transport_maps = hash:/var/lib/mailman/data/transport-mailman, proxy:mysql:/etc/postfix/mysql-virtual_tran
    sports.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_canoni
    cal_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks
    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 = dovecot
    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
    smtp_tls_security_level = may
    #smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3
    #smtpd_tls_protocols = !SSLv2,!SSLv3
    smtp_tls_protocols = !SSLv2,!SSLv3
    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 = 26214400

    # za A + to zakomentiraj
    smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3
    smtpd_tls_protocols = !SSLv2,!SSLv3
    # konec A + to zakometiraj

    # A+

    smtpd_tls_security_level = may
    smtpd_tls_auth_only = yes
    #za A +
    #smtpd_tls_mandatory_protocols = !SSLv2,!SSLv3,!TLSv1,!TLSv1.1
    #smtpd_tls_protocols=!SSLv2,!SSLv3,!TLSv1,!TLSv1.1
    smtpd_tls_mandatory_ciphers = medium
    tls_medium_cipherlist = AES128+EECDH:AES128+EDH

    ***********************************************************************************
    my dovecot.conf

    listen = *,[::]
    protocols = imap pop3
    auth_mechanisms = plain login

    disable_plaintext_auth = yes
    log_timestamp = "%Y-%m-%d %H:%M:%S "
    mail_privileged_group = vmail
    #postmaster_address = [email protected]
    postmaster_address = [email protected]

    #auth_debug = yes
    #auth_verbose = yes

    #auth_username_format = %n

    # A +

    #ssl = yes
    ssl=required

    ssl_require_crl = yes

    #ssl_cert = </etc/postfix/ispserver.pem
    #ssl_ca = </etc/postfix/ispserver.pem
    #ssl_key = </etc/postfix/ispserver.pem


    ssl_cert = </etc/postfix/public.pem
    ssl_ca = </etc/postfix/ca.pem
    ssl_key = </etc/postfix/private.pem


    ssl_verify_client_cert = yes

    #sp vrstica ne sme biti vkljuńćena, ker potem ne dela
    #auth_ssl_require_client_cert = yes

    ssl_protocols = !SSLv2 !SSLv3
    ssl_cipher_list = AES128+EECDH:AES128+EDH
    ssl_prefer_server_ciphers = yes # >Dovecot 2.2.6
    #ssl_dh_parameters_length = 4096 # >Dovecot 2.2
    #ssl_dh_parameters_length = 2048 # >Dovecot 2.2
    #regenerates every week
    ssl_dh_parameters_length = 2048

    # konec A + nastavitev za cert

    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
    }
    service imap-login {
    client_limit = 1000
    process_limit = 500
    }
    protocol imap {
    mail_plugins = quota imap_quota
    }
    protocol pop3 {
    pop3_uidl_format = %08Xu%08Xv
    mail_plugins = quota
    }
    protocol lda {
    mail_plugins = sieve quota
    }
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    I'm not aware of such a setting, the system setup is standard IMAP. Do the messages show up correctly in webmail? Webmail (squirrelmail or roundcube) are both normal IMAP clients. My guess is that it's a outllok problem, maybe it reimports not just the emails but also some internal or hidden flas which block the sync later.
     
  3. Tomislav Aurednik

    Tomislav Aurednik Member HowtoForge Supporter

    On RoundCube it works fine. When I import in outlook a small backup.pst file (200-300MB) it also works fine and there is no problem with syncing. But everything above 300MB just syncs slow even after the first sync when it copies all the email to server.

    after increasing this setting in dovecot.conf itworks a bit faster, but i'm not shure what this setting are exactly or what they do!?
    service imap-login {
    client_limit = 10000
    process_limit = 5000
    }
     
  4. Tomislav Aurednik

    Tomislav Aurednik Member HowtoForge Supporter

    Is there a way or a command to see what users are connecting/logged to the server with pop3 and what with IMAP or where one can see this?
    How to view the mail-server load and resurce usage without munin(is a multiserver setup with 1 publc IP and traffic redirectet with ports so got munin only showing for webserver in ISPConfig)?
    How to see who is in fail2ban and how to get him out?
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    client_limit and process_limit are explained here: http://wiki.dovecot.org/Services
     
    Tomislav Aurednik likes this.
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    The command is doveadm who:
    http://wiki2.dovecot.org/Tools/Doveadm/Who

    You can check the load of a server on the command line, e.g. with top or uptime command.

    You can see that in the fail2ban log in /var/log/ folder.

    Fail2ban unban:

    https://www.howtoforge.com/communit...ban-ip-blocked-by-fail2ban.51366/#post-307954
     
    Tomislav Aurednik likes this.
  7. Tomislav Aurednik

    Tomislav Aurednik Member HowtoForge Supporter

    Thanks for all the help and info Till! Is there a command to delete duplicate emails out off the /var/vmail/domain/mailbox/Maildir/cur/ folder or at least a way to find duplicates that are made after importing the outlook.pst file?
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    There might be tools but I don't know any. If you search for "delete duplicate email" at google, you can find several solutions for outlook, maybe one of them works for you.
     
    Tomislav Aurednik likes this.
  9. Tomislav Aurednik

    Tomislav Aurednik Member HowtoForge Supporter

    So no way for deleting them directly from the server? Thanks once more.
     
  10. Tomislav Aurednik

    Tomislav Aurednik Member HowtoForge Supporter

    There was really no other problem than outlook. Roundcube webmail, mail on android phones, thunderbird, iPad mail, itd... works fine.
     

Share This Page