Mail and DNS troubles with ISPconfig 3 in Ubuntu 10.04

Discussion in 'HOWTO-Related Questions' started by hakimus, Jun 12, 2010.

  1. hakimus

    hakimus New Member

    Hi All,

    Sorry by opening this thread, but I have been looking for related questions in the las few days without success (and thats why I´m opening this post :p)

    I have a server with DNS, Web and mail services.
    The goal with ISPconfig was to facilitate my work, specially creating e-mail accounts in virtual domains.

    Ok, I followed the the "how to". "Perfect Server: Ubuntu 10.04".
    After that, the ISPCofig page is running ok, it says that ALL the services are running ok.

    But, is not so true.
    Problems:
    1. MAIL:
    I can log in in the squireel webmail, using a system account, but not with the new ones that I´ve created.
    Even so, when I try to access some mailbox via POP3/IMAP, or I try to send a e-mail from squirell, I see the following error in the system log:

    --------------
    Code:
    Jun 12 15:17:03 wig postfix/smtpd[9391]: warning: SASL: Connect to private/auth failed: No such file or directory
    Jun 12 15:17:03 wig postfix/smtpd[9391]: fatal: no SASL authentication mechanisms
    2. DNS :

    Ok, trying to figure out what that h. is going on, what I did worng, i try to send a e-mail to one of the virtuak mailbox. I got this answer:

    Code:
    Delivery to the following recipient failed permanently:
    
        mailname@virtual_domain
    
    Technical details of permanent failure:
    DNS Error: DNS server returned answer with no data

    So, I take a look to the /etc/bin/named.conf and the virtual domain zone conf file.
    I saw that ISPConfig did it own configurations, but after that, when I run a
    dig virtualdomain, it doesnt get a correct answer.

    Thinking on a solution, I go to the DNS page on ISPConfig and add a MX DNS record. When I restart the bind daemon, I got the error:

    Code:
    Jun 12 15:27:48 server named[9703]: zone virtualdomain/IN: has no NS records
    Jun 12 15:27:48 server named[9703]: zone virtualdomain/IN: not loaded due to errors.
    Could please somebody help me? I´m starting to become crazy...... :confused::mad:
     
  2. falko

    falko Super Moderator Howtoforge Staff

    Did you use the "Perfect Server" tutorial for ISPConfig 3 or ISPConfig 2?
     
  3. hakimus

    hakimus New Member

    ISPConfig 3 "Perfect Server" tutorial for Ubuntu 10.0.4 :)
     
  4. falko

    falko Super Moderator Howtoforge Staff

    What's in /etc/postfix/sasl/smtpd.conf?
     
  5. hakimus

    hakimus New Member

    Code:
     more /etc/postfix/sasl/smtpd.conf
    pwcheck_method: saslauthd
    mech_list: plain login
    allow_plaintext: true
    auxprop_plugin: mysql
    sql_hostnames: 127.0.0.1
    sql_user: ispconfig
    sql_passwd: 833cab2b5ab1dc8016cf76d25dda20df
    sql_database: dbispconfig
    sql_select: select password from mail_user where email = '%u'
    The mail_user tables exists in the dbispconfig database, and effectively, it has the user info.
     
  6. hakimus

    hakimus New Member

    Dovecot or Courier?

    Well, I understand that i nthe Perfect serve ;how To we have been using Postfix and Courier.
    But I found some references to dovecot, I´m not sure if this is correct, and dint understand why or how this references from where this references came from.

    In the /etc/postfix/main.cf I got:
    Code:
    #---------------------------------
    # Virtual Mailbox Domain Settings
    
    virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, 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_limit = 51200000
    virtual_minimum_uid = 5000
    virtual_uid_maps = static:5000
    virtual_gid_maps = static:5000
    virtual_mailbox_base = /var/vmail
    virtual_transport = dovecot
    
    Some idea?
     
  7. hakimus

    hakimus New Member

    Hello again.

    I´m trying to debug the process and guessing where the problem is.
    I tryed a telnet to POP and Imap ports without sucess.
    I got a message on the /var/log telling thta the user was not found on the password file.

    Ok, I check the postfix files and found that something that seems strange.
    The virtual_domain and virtaul_mailoxes points to the ISPconfig database.
    But the mysql_virtual_mailbox_maps.cf point to a postfix database.

    Is this correct????



    hakimus@wig:~$ sudo more /etc/postfix/mysql-virtual_domains.cf
    Code:
    user = ispconfig
    password = 833cab2b5ab1a2drfg16cf76d25dda20df
    [B]dbname = dbispconfig
    table = mail_domain[/B]
    select_field = domain
    where_field = domain
    additional_conditions = and active = 'y' and server_id = 1
    hosts = 127.0.0.1
    
    hakimus@wig:~$ sudo more /etc/postfix/mysql-virtual_mailboxes.cf
    Code:
    user = ispconfig
    password = 833cab2b5ab1a2drfg16cf76d25dda20df
    dbname = dbispconfig
    table = mail_user
    select_field = CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1
    ),'/')
    where_field = email
    additional_conditions = and postfix = 'y' and server_id = 1
    hosts = 127.0.0.1
    hakimus@wig:~$ sudo more /etc/postfix/mysql_virtual_mailbox_maps.cf
    Code:
    [COLOR="Red"]user = postfix
    password = pass_no_encrypted
    hosts = 127.0.0.1
    dbname = postfix[/COLOR]
    table = mailbox
    select_field = maildir
    where_field = username
    #additional_conditions = and active = '1'
    
     
  8. falko

    falko Super Moderator Howtoforge Staff

    Can you post the output of
    Code:
    netstat -tap
    ?
     
  9. hakimus

    hakimus New Member

    Thanks in advance Falko!!
    I have been cheking configuration for Postfix, PAM, Courier Authdaemon, and so on, but I kind of a newbie in this subject, I dont know what I did wrong ... when ..... and where .... :-(

    Follows the netstat -tap output:
    Code:
    Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
    tcp        0      0 localhost:10024         *:*                     LISTEN      970/amavisd (master
    tcp        0      0 localhost:10025         *:*                     LISTEN      1692/master
    tcp        0      0 localhost:mysql         *:*                     LISTEN      671/mysqld
    tcp        0      0 localhost:spamd         *:*                     LISTEN      977/spamd.pid
    tcp        0      0 *:www                   *:*                     LISTEN      1786/apache2
    tcp        0      0 *:tproxy                *:*                     LISTEN      1786/apache2
    tcp        0      0 *:ftp                   *:*                     LISTEN      1708/pure-ftpd (SER
    tcp        0      0 172.32.3.2:domain       *:*                     LISTEN      811/named
    tcp        0      0 wig.domain.com:domain *:*                     LISTEN      811/named
    tcp        0      0 localhost:domain        *:*                     LISTEN      811/named
    tcp        0      0 *:ssh                   *:*                     LISTEN      655/sshd
    tcp        0      0 *:smtp                  *:*                     LISTEN      1692/master
    tcp        0      0 localhost:953           *:*                     LISTEN      811/named
    tcp        0      0 *:https                 *:*                     LISTEN      1786/apache2
    tcp        0      0 *:9090                  *:*                     LISTEN      1786/apache2
    tcp        0      0 localhost:39156         localhost:mysql         TIME_WAIT   -
    tcp        0      0 localhost:mysql         localhost:56885         ESTABLISHED 671/mysqld
    tcp        0      0 localhost:47317         localhost:mysql         ESTABLISHED 18901/amavisd (ch8-
    tcp        0      0 localhost:mysql         localhost:56886         ESTABLISHED 671/mysqld
    tcp        0      0 localhost:56885         localhost:mysql         ESTABLISHED 18886/proxymap
    tcp        0      0 localhost:39158         localhost:mysql         TIME_WAIT   -
    tcp        0      0 localhost:mysql         localhost:56884         ESTABLISHED 671/mysqld
    tcp        0      0 localhost:40040         localhost:13002         ESTABLISHED 1585/wapbox
    tcp        0      0 localhost:mysql         localhost:60048         ESTABLISHED 671/mysqld
    tcp        0      0 localhost:56886         localhost:mysql         ESTABLISHED 18886/proxymap
    tcp        0      0 localhost:mysql         localhost:47317         ESTABLISHED 671/mysqldtcp        0      0 localhost:39155         localhost:mysql         TIME_WAIT   -
    tcp        0      0 localhost:10025         localhost:37432         TIME_WAIT   -
    tcp        0      0 localhost:39157         localhost:mysql         TIME_WAIT   -
    tcp        0      0 localhost:mysql         localhost:56883         ESTABLISHED 671/mysqld
    tcp        0      0 localhost:60048         localhost:mysql         ESTABLISHED 18814/amavisd (ch11
    tcp        0      0 localhost:56883         localhost:mysql         ESTABLISHED 18886/proxymap
    tcp        0      0 localhost:56884         localhost:mysql         ESTABLISHED 17965/cleanup
    tcp6       0      0 [::]:pop3               [::]:*                  LISTEN      1479/couriertcpd
    tcp6       0      0 [::]:imap2              [::]:*                  LISTEN      1445/couriertcpd
    tcp6       0      0 [::]:ftp                [::]:*                  LISTEN      1708/pure-ftpd (SER
    tcp6       0      0 [::]:domain             [::]:*                  LISTEN      811/named
    tcp6       0      0 [::]:ssh                [::]:*                  LISTEN      655/sshd
    tcp6       0      0 [::]:smtp               [::]:*                  LISTEN      1692/master
    tcp6       0      0 ip6-localhost:953       [::]:*                  LISTEN      811/named
    tcp6       0      0 [::]:imaps              [::]:*                  LISTEN      1465/couriertcpd
    tcp6       0      0 [::]:pop3s              [::]:*                  LISTEN      1499/couriertcpd
    
     
  10. falko

    falko Super Moderator Howtoforge Staff

    Ok, Courier is running. But is it possible that Dovecot is installed at the same time? What's the output of
    Code:
    ls -l /etc/init.d/
    ?
     
  11. hakimus

    hakimus New Member

    Thanks again mestre Falko!

    Yeah, It was installed on the past, but I saw the references to Dovecot, I decided to remove it and uses "courier" instead (The ISPconfig config should have done that!!) .

    I also unistalled Apparmor as the tutorial said.

    Now, taking a look to the intid.d I see that both, apparmor and dovecot are int there .... what did I wrong?? Agrrr ....:confused::mad:


    Code:
    drwxr-xr-x 120 root root 12288 2010-06-14 18:58 ..
    -rwxr-xr-x   1 root root  3533 2008-03-11 00:21 amavis
    -rwxr-xr-x   1 root root  6157 2010-04-13 14:27 apache2
    -rwxr-xr-x   1 root root  3541 2010-03-30 14:58 apparmor
    lrwxrwxrwx   1 root root    21 2010-06-07 19:25 atd -> /lib/init/upstart-job
    -rwx------   1 root root  3495 2010-06-14 11:15 bastille-firewall
    -rwx------   1 root root  3495 2010-06-10 16:45 bastille-firewall.backup
    -rwxr-xr-x   1 root root  3215 2010-03-22 14:53 bind9
    -rwxr-xr-x   1 root root  2341 2009-09-07 13:58 bootlogd
    -rwxr-xr-x   1 root root  8790 2010-05-26 14:48 clamav-daemon
    -rwxr-xr-x   1 root root  8044 2010-05-26 14:48 clamav-freshclam
    -rwxr-xr-x   1 root root  6355 2007-05-30 07:29 console-screen.sh
    lrwxrwxrwx   1 root root    21 2010-06-07 19:16 console-setup -> /lib/init/upsta            rt-job
    -rwxr-xr-x   1 root root   996 2009-12-05 16:18 courier-authdaemon
    -rwxr-xr-x   1 root root  2528 2010-04-04 21:53 courier-imap
    -rwxr-xr-x   1 root root  2763 2010-04-04 21:53 courier-imap-ssl
    -rwxr-xr-x   1 root root  2304 2010-04-04 21:53 courier-pop
    -rwxr-xr-x   1 root root  2785 2010-04-04 21:53 courier-pop-ssl
    lrwxrwxrwx   1 root root    21 2010-06-07 19:25 cron -> /lib/init/upstart-job
    -rwxr-xr-x   1 root root  6324 2010-05-05 03:57 dkimproxy
    lrwxrwxrwx   1 root root    21 2010-06-07 19:14 dmesg -> /lib/init/upstart-job
    -rwxr-xr-x   1 root root  1235 2009-02-20 11:56 dns-clean
    -rwxr-xr-x   1 root root  5696 2010-04-19 12:18 dovecot
    -rwxr-xr-x   1 root root  4976 2010-06-03 08:48 dtc-dos-firewall
    -rwxr-xr-x   1 root root  5671 2009-11-30 23:53 fail2ban
    lrwxrwxrwx   1 root root    21 2010-06-07 19:24 failsafe-x -> /lib/init/upstart-            job
    -rwxr-xr-x   1 root root  7401 2010-03-04 21:56 fetchmail
    -rwxr-xr-x   1 root root  1105 2010-04-29 01:45 grub-common
    -rwxr-xr-x   1 root root  1329 2009-09-07 13:58 halt
    lrwxrwxrwx   1 root root    21 2010-06-07 19:17 hostname -> /lib/init/upstart-jo            b
    lrwxrwxrwx   1 root root    21 2010-06-07 19:14 hwclock -> /lib/init/upstart-job
    lrwxrwxrwx   1 root root    21 2010-06-07 19:14 hwclock-save -> /lib/init/upstar            t-job
    -rwxr-xr-x   1 root root  4521 2008-04-29 06:57 hwclock.sh.dpkg-obsolete
    lrwxrwxrwx   1 root root    21 2010-06-07 19:25 irqbalance -> /lib/init/upstart-            job
    -rwxr-xr-x   1 root root  1293 2009-09-07 13:58 killprocs
    -rwxr-xr-x   1 root root  1729 2007-11-23 03:06 klogd
    -rw-r--r--   1 root root     0 2010-06-07 19:17 .legacy-bootordering
    -rwxr-xr-x   1 root root  1219 2007-10-28 02:14 mailgraph
    lrwxrwxrwx   1 root root    21 2010-06-07 19:15 module-init-tools -> /lib/init/u            pstart-job
    -rwxr-xr-x   1 root root  5755 2008-05-09 10:52 mysql.dpkg-bak
    -rwxr-xr-x   1 root root  2515 2008-05-09 10:52 mysql-ndb
    -rwxr-xr-x   1 root root  1905 2008-05-09 10:52 mysql-ndb-mgm
    -rwxr-xr-x   1 root root  2256 2009-12-03 10:04 networking
    lrwxrwxrwx   1 root root    21 2010-06-07 19:14 network-interface -> /lib/init/u            pstart-job
    lrwxrwxrwx   1 root root    21 2010-06-07 19:14 network-interface-security -> /l            ib/init/upstart-job
    -rwxr-xr-x   1 root root   882 2009-09-07 13:58 ondemand
    -rwxr-xr-x   1 root root  2434 2010-03-19 14:50 openbsd-inetd
    -rwxr-xr-x   1 root root  8322 2010-01-26 03:47 openvpn
    -rwxr-xr-x   1 root root  2398 2010-03-06 21:49 pcmciautils
    lrwxrwxrwx   1 root root    21 2010-06-07 19:14 plymouth -> /lib/init/upstart-jo            b
    lrwxrwxrwx   1 root root    21 2010-06-07 19:14 plymouth-log -> /lib/init/upstar            t-job
    lrwxrwxrwx   1 root root    21 2010-06-07 19:14 plymouth-splash -> /lib/init/ups            tart-job
    lrwxrwxrwx   1 root root    21 2010-06-07 19:14 plymouth-stop -> /lib/init/upsta            rt-job
    -rwxr-xr-x   1 root root  4695 2010-02-18 00:38 postfix
    -rwxr-xr-x   1 root root   420 2010-03-06 21:59 pppd-dns
    lrwxrwxrwx   1 root root    21 2010-06-07 19:15 procps -> /lib/init/upstart-job
    -rwxr-xr-x   1 root root  2977 2009-11-07 12:56 pure-ftpd-mysql
    -rwxr-xr-x   1 root root  3093 2010-01-18 02:13 quota
    -rwxr-xr-x   1 root root  1823 2010-01-18 02:13 quotarpc
    -rwxr-xr-x   1 root root  8863 2009-09-07 13:58 rc
    -rwxr-xr-x   1 root root   801 2009-09-07 13:58 rc.local
    -rwxr-xr-x   1 root root   117 2009-09-07 13:58 rcS
    -rw-r--r--   1 root root  1510 2009-09-07 13:58 README
    -rwxr-xr-x   1 root root   639 2009-09-07 13:58 reboot
    -rwxr-xr-x   1 root root  4400 2010-03-30 04:01 rsync
    lrwxrwxrwx   1 root root    21 2010-06-07 19:14 rsyslog -> /lib/init/upstart-job
    -rwxr-xr-x   1 root root  8149 2010-06-14 11:15 saslauthd
    -rwxr-xr-x   1 root root  3200 2010-03-29 19:20 sendsigs
    -rwxr-xr-x   1 root root   590 2009-09-07 13:58 single
    -rw-r--r--   1 root root  4271 2009-09-07 13:58 skeleton
    -rwxr-xr-x   1 root root  1891 2009-08-09 10:40 spamassassin
    -rwxr-xr-x   1 root root  3899 2010-03-08 09:35 ssh
    -rwxr-xr-x   1 root root   519 2009-09-07 13:58 stop-bootlogd
    -rwxr-xr-x   1 root root  1095 2009-09-07 13:58 stop-bootlogd-single
    -rwxr-xr-x   1 root root  3343 2007-11-23 03:06 sysklogd
    lrwxrwxrwx   1 root root    21 2010-06-07 19:14 udev -> /lib/init/upstart-job
    lrwxrwxrwx   1 root root    21 2010-06-07 19:14 udev-finish -> /lib/init/upstart            -job
    lrwxrwxrwx   1 root root    21 2010-06-07 19:14 udevmonitor -> /lib/init/upstart            -job
    lrwxrwxrwx   1 root root    21 2010-06-07 19:14 udevtrigger -> /lib/init/upstart            -job
    lrwxrwxrwx   1 root root    21 2010-06-07 19:16 ufw -> /lib/init/upstart-job
    -rwxr-xr-x   1 root root  2787 2009-11-05 07:03 umountfs
    -rwxr-xr-x   1 root root  2075 2009-10-13 23:16 umountnfs.sh
    -rwxr-xr-x   1 root root  1683 2009-10-13 23:20 umountroot
    -rwxr-xr-x   1 root root  1997 2009-09-07 13:58 urandom
    -rwxr-xr-x   1 root root  2327 2010-03-07 00:22 wpa-ifupdown
    -rwxr-xr-x   1 root root  1777 2008-07-01 12:41 x11-common
    
     
  12. hakimus

    hakimus New Member

    UPDATE:

    I had made a dpkg --purge apparmor and dovecot-common, because there were remaining files, and then I rebooted my server.

    After that, the ISPconfig webpanel saids that everithings it´s ok, (I do not trust it so much ehehehe) but when I try to test the POP connection, runing a telent in port 110,
    I get the follwoing message in the system log:

    Code:
    Jun 16 07:49:42 wig authdaemond: authpam: username '[email protected]' not found in password file
    
    I hope that "passord file" is a manner of speech, because courier-authdaemon is supposed to uses PAM to read the encrypted password on the dbispconfig database .... Am I right? ;)
     
    Last edited: Jun 16, 2010

Share This Page