ISPConfig3 on SuSE 12.1 / Dovecot Problem

Discussion in 'Installation/Configuration' started by macguru, Jul 24, 2012.

  1. macguru

    macguru Member

    Hi, folks !


    Just installed latest ISPConfig 3 on SuSE 12.1 x32 (following Perfect Setup guide of course), almost OK except mail - smtp is OK but POP is not working (mail are not delivered to mailboxes and vice versa).

    I found on this page:
    http://yohng.com/articles/tech/ispconfig-3-for-opensuse.html
    script for installing ISPConfig and fixing Dovecot. Since ISPConfig is already installed, here are the commands related to Dovecot.

    Can anyone confirm if this helps?
    Thanks in advance for any suggestion(s).

    Code:
    function fix_dovecot12() {
    
    sed -i 's/^#listen =.*/listen = \*/g' "$1"
    sed -i 's/^ssl = no/ssl = yes/g' "$1"
    sed -i 's,#ssl_cert_file = .*,ssl_cert_file = /etc/ssl/certs/dovecot.pem,g' "$1"
    sed -i 's,#ssl_key_file = .*,ssl_key_file = /etc/ssl/private/dovecot.pem,g' "$1"
    sed -i 's,#mail_max_userip_connections = .*,mail_max_userip_connections = 32,g' "$1"
    sed -i 's/#namespace private/namespace private {\n    separator = .\n    prefix =\n    inbox = yes\n}\n\nnamespace private {\n    separator = .\n    prefix = INBOX.\n    inbox = no\n    hidden = yes\n    list = no   # for v1.1+\n}\n\n# {changed} namespace private/g'  "$1"
    
    }
    
    
    
    function fix_dovecot20() {
    
    sed -i 's/^[#]\?disable_plaintext_auth[ ]\?=.*$/disable_plaintext_auth = no/g' /etc/dovecot/conf.d/10-auth.conf
    sed -i 's/^auth_mechanisms[ ]\?=.*$/auth_mechanisms = plain login/g' /etc/dovecot/conf.d/10-auth.conf
    sed -i 's/^#!include auth-sql\.conf\.ext.*$/!include auth-sql.conf.ext/g' /etc/dovecot/conf.d/10-auth.conf
    
    sed -i 's/^[#]\?log_timestamp[ ]\?=.*$/log_timestamp = "%Y-%m-%d %H:%M:%S "/g' /etc/dovecot/conf.d/10-logging.conf
    
    sed -i 's,^#mail_location[ ]\?=.*$,mail_location = maildir:/var/vmail/%d/%n/Maildir\n\nnamespace {\n    type = private\n    inbox = yes\n    location =\n    prefix =\n    separator = .\n}\n\nnamespace {\n    type = private\n    separator = .\n    prefix = INBOX.\n    inbox = no\n    hidden = yes\n    list = no\n}\n\n,g' /etc/dovecot/conf.d/10-mail.conf
    
    sed -i 's,^[#]\?first_valid_uid[ ]\?=.*$,first_valid_uid = 5000,g' /etc/dovecot/conf.d/10-mail.conf
    sed -i 's,^[#]\?last_valid_uid[ ]\?=.*$,last_valid_uid = 5000,g' /etc/dovecot/conf.d/10-mail.conf
    sed -i 's,^[#]\?first_valid_gid[ ]\?=.*$,first_valid_gid = 5000,g' /etc/dovecot/conf.d/10-mail.conf
    sed -i 's,^[#]\?last_valid_gid[ ]\?=.*$,last_valid_gid = 5000,g' /etc/dovecot/conf.d/10-mail.conf
    
    sed -i 's,^[#]\?mail_uid[ ]\?=.*$,mail_uid = 5000,g' /etc/dovecot/conf.d/10-mail.conf
    sed -i 's,^[#]\?mail_gid[ ]\?=.*$,mail_gid = 5000,g' /etc/dovecot/conf.d/10-mail.conf
    
    
    sed -i 's,^[#]\?auth_socket_path[ ]\?=.*$,auth_socket_path = /var/run/dovecot/auth-master,g' /etc/dovecot/conf.d/10-mail.conf
    
    sed -i 's,^[ ]*#user = \$default_internal_user$,  user = root,g' /etc/dovecot/conf.d/10-master.conf
    
    perl -i -p -e 's,\n,__NL__,g' /etc/dovecot/conf.d/10-master.conf
    sed -i 's,__NL__service imap [{]__NL__[ ]*#,\nservice imap {\n  executable = /usr/lib/dovecot/rawlog /usr/lib/dovecot/imap\n  #,g' /etc/dovecot/conf.d/10-master.conf 
    sed -i 's,__NL__service pop3 [{]__NL__[ ]*#,\nservice pop3 {\n  executable = /usr/lib/dovecot/rawlog /usr/lib/dovecot/pop3\n  #,g' /etc/dovecot/conf.d/10-master.conf
    sed -i 's,#unix_listener /var/spool/postfix.*#},unix_listener /var/spool/postfix/private/auth {\n    mode = 0660\n    user = postfix\n    group = postfix\n  }\n  unix_listener auth-master {\n    mode = 0600\n    user = vmail\n  }\n,g' /etc/dovecot/conf.d/10-master.conf
    sed -i 's,__NL__,\n,g' /etc/dovecot/conf.d/10-master.conf
    
    
    sed -i 's,^[#]\?ssl[ ]\?=.*$,ssl = yes,g' /etc/dovecot/conf.d/10-ssl.conf
    sed -i 's,^[#]\?ssl_cert[ ]\?=.*$,ssl_cert = </etc/ssl/certs/dovecot.pem,g' /etc/dovecot/conf.d/10-ssl.conf
    sed -i 's,^[#]\?ssl_key[ ]\?=.*$,ssl_key = </etc/ssl/private/dovecot.pem,g' /etc/dovecot/conf.d/10-ssl.conf
    
    sed -i 's,^[#]\?postmaster_address[ ]\?=.*$,postmaster_address = [email protected],g' /etc/dovecot/conf.d/15-lda.conf
    sed -i 's,^[ ]*[#]\?mail_plugins[ ]\?=.*$,  mail_plugins = sieve quota,g' /etc/dovecot/conf.d/15-lda.conf
    
    sed -i 's,^[ ]*[#]\?mail_max_userip_connections[ ]\?=.*$,  mail_max_userip_connections = 32,g' /etc/dovecot/conf.d/20-imap.conf
    sed -i 's,^[ ]*[#]\?mail_plugins[ ]\?=.*$,  mail_plugins = quota imap_quota,g' /etc/dovecot/conf.d/20-imap.conf
    
    sed -i 's,^[ ]*[#]\?mail_max_userip_connections[ ]\?=.*$,  mail_max_userip_connections = 32,g' /etc/dovecot/conf.d/20-pop3.conf
    sed -i 's,^[ ]*[#]\?mail_plugins[ ]\?=.*$,  mail_plugins = quota,g' /etc/dovecot/conf.d/20-pop3.conf
    sed -i 's,^[ ]*[#]\?pop3_uidl_format[ ]\?=.*$,  pop3_uidl_format = %08Xu%08Xv,g' /etc/dovecot/conf.d/20-pop3.conf
    
    sed -i 's,^[ ]*[#]\?quota[ ]\?=[ ]\?maildir:.*$,  quota = maildir:User quota,g' /etc/dovecot/conf.d/90-quota.conf
    
    sed -i 's,^[ ]*[#]\?args[ ]\?= /etc/dovecot/dovecot-sql\.conf\.ext.*$,  args = /etc/dovecot/dovecot-sql.conf,g' /etc/dovecot/conf.d/auth-sql.conf.ext
    
    sed -i 's,^[#]\?protocols[ ]\?=.*$,protocols = imap pop3,g' /etc/dovecot/dovecot.conf
    sed -i 's/^[#]\?listen[ ]\?=.*$/listen = *, ::/g' /etc/dovecot/dovecot.conf
    
    sed -i 's/^[#]\?shutdown_clients[ ]\?=.*$/shutdown_clients = yes/g' /etc/dovecot/dovecot.conf
    
    }
    
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    ISPConfig 3.0.4.6 works fine on opensuse 12.1 out of the box, otherwise there would be no perfect setup installation guide for that distribution. Please take a look at your mail log file and post the errors that you get there.
     
  3. macguru

    macguru Member

    I turned on option CUSTOM LOGIN NAME in order to maintain backward compatibility with old ISPConfig setup.

    I can check mail, send mail, but nothing being delivered to mailboxes.

    for example, mail have been sent from [email protected] to [email protected]

    login for [email protected] is "web3_myemail"

    Result:
    Final-Recipient: rfc822; [email protected]
    Original-Recipient: rfc822;[email protected]
    Action: failed
    Status: 5.1.1
    Diagnostic-Code: x-unix; user unknown

    Code:
    Jul 24 10:45:27 mydomain postfix/qmgr[16839]: BA6131340D7B: from=<[email protected]>, size=1784, nrcpt=1 (queue active)
    Jul 24 10:45:27 mydomain amavis[12981]: (12981-10) ESMTP< MAIL FROM:<[email protected]> SIZE=1784\r\n
    Jul 24 10:45:27 mydomain amavis[12981]: (12981-10) lookup [debug_sender] => undef, "[email protected]" does not match
    Jul 24 10:45:27 mydomain amavis[12981]: (12981-10) ESMTP> 250 2.1.0 Sender <[email protected]> OK
    Jul 24 10:45:27 mydomain amavis[12981]: (12981-10) ESMTP::10024 /var/spool/amavis/tmp/amavis-20120724T102828-12981-4sxw5Ijw: <[email protected]> -> <[email protected]> SIZE=1784 Received: from ns.mydomain.lv ([127.0.0.1]) by localhost (linux-jfp8.site [127.0.0.1]) (amavisd-new, port 10024) with ESMTP for <[email protected]>; Tue, 24 Jul 2012 10:45:27 +0300 (EEST)
    Jul 24 10:45:27 mydomain amavis[12981]: (12981-10) Checking: kbWJfZAv-RLs [74.125.82.181] <[email protected]> -> <[email protected]>
    Jul 24 10:45:27 mydomain amavis[12981]: (12981-10) 2822.From: <[email protected]>
    Jul 24 10:45:27 mydomain amavis[12981]: (12981-10) wbl: checking sender <[email protected]>
    Jul 24 10:45:27 mydomain amavis[12981]: (12981-10) lookup_acl([email protected]), no match
    Jul 24 10:45:27 mydomain amavis[12981]: (12981-10) lookup [local_domains] => undef, "[email protected]" does not match
    Jul 24 10:45:27 mydomain amavis[12981]: (12981-10) query_keys: [email protected], @gmail.com, @.gmail.com, @.com, @.
    Jul 24 10:45:27 mydomain amavis[12981]: (12981-10) lookup_sql sel_wblist "[email protected]", query args: "1", [[email protected],12], [@gmail.com,12], [@.gmail.com,12], [@.com,12], [@.,12]
    Jul 24 10:45:38 mydomain amavis[12981]: (12981-10) about to connect to smtp:[127.0.0.1]:10025, FWD from <[email protected]> -> <[email protected]>
    Jul 24 10:45:38 mydomain amavis[12981]: (12981-10) smtp cmd> MAIL FROM:<[email protected]> BODY=7BIT
    Jul 24 10:45:38 mydomain amavis[12981]: (12981-10) rw_loop sent 117> MAIL FROM:<[email protected]> BODY=7BIT\r\nRCPT TO:<[email protected]> ORCPT=rfc822;[email protected]\r\nDATA\r\n
    Jul 24 10:45:38 mydomain postfix/qmgr[16839]: 967A01340DAA: from=<[email protected]>, size=2205, nrcpt=1 (queue active)
    Jul 24 10:45:38 mydomain amavis[12981]: (12981-10) FWD from <[email protected]> -> <[email protected]>,BODY=7BIT 250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 967A01340DAA
    Jul 24 10:45:38 mydomain amavis[12981]: (12981-10) DSN: sender NOT credible, SA: 0.611, <[email protected]>
    Jul 24 10:45:38 mydomain amavis[12981]: (12981-10) lookup [spam_dsn_cutoff_level_bysender] => true,  "[email protected]" matches, result="10", matching_key="(constant:10)"
    Jul 24 10:45:38 mydomain amavis[12981]: (12981-10) dsn: from MTA 250 NonBlocking:Clean <[email protected]> -> <[email protected]>: on_succ=0, on_dly=1, on_fail=1, never=0, warn_sender=, DSN_passed_on=1, destiny=1, mta_resp: "250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 967A01340DAA"
    Jul 24 10:45:38 mydomain amavis[12981]: (12981-10) DSN: SUCC from MTA 250 NonBlocking:Clean, no DSN requested: <[email protected]> -> <[email protected]>
    Jul 24 10:45:38 mydomain amavis[12981]: (12981-10) one_response_for_all <[email protected]>: success, r=0,b=0,d=0, ndn_needed=0, '250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 967A01340DAA'
    Jul 24 10:45:38 mydomain amavis[12981]: (12981-10) Passed CLEAN {RelayedInbound}, [74.125.82.181]:37709 [74.125.82.181] <[email protected]> -> <[email protected]>, Queue-ID: BA6131340D7B, Message-ID: <[email protected]m>, mail_id: kbWJfZAv-RLs, Hits: 0.611, size: 1784, queued_as: 967A01340DAA, 10844 ms
    Jul 24 10:45:39 mydomain postfix/smtp[14440]: CBFED1340D7B: to=<[email protected]>, relay=none, delay=0.13, delays=0.07/0/0.06/0, dsn=4.4.1, status=deferred (connect to alt3.gmail-smtp-in.l.google.com[74.125.130.26]:25: No buffer space available)
    Jul 24 10:52:24 mydomain postfix/smtp[15736]: CBFED1340D7B: to=<[email protected]>, relay=gmail-smtp-in-v4v6.l.google.com[173.194.71.27]:25, delay=406, delays=405/0/0.27/0.54, dsn=2.0.0, status=sent (250 2.0.0 OK 1343116362 nn4si21682047lab.16)
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    What is the hostname and mailname of the server? It might be that you used a wrong hostanme as the hostname might not be the same then a domain that you use to send emails (see perfect server guide, hostname must be something like server1.example.com but not example.com if you want to use the domain example.com for emails or websites on this server).

    Please post the output of:

    grep mydomain.com /etc/postfix/main.cf

    and

    hostname -f
     
  5. macguru

    macguru Member

    grep mydomain.com /etc/postfix/main.cf
    mydestination = mail.mydomain.com, localhost, localhost.localdomain
    myhostname = ns.mydomain.com


    ***************

    hostname -f
    mydomain
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Pleasechange the hostname of the server in yast to either ns.mydomain.com or mail.mydomain.com and then restart postfix.
     
  7. macguru

    macguru Member

    OK, thanks, that' worked!

    Now still have issue with e-mail - can't connect with SSL. Just bought 3.0 manual, will try to figure out ....
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Take a look into the postfix master.cf file, if there is a # in front of the smtps line, then remove the # and restart postfix.
     

Share This Page