LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   postfix+mysql+dovecot mail server thunderbird clinet configuration issue (https://www.linuxquestions.org/questions/linux-newbie-8/postfix-mysql-dovecot-mail-server-thunderbird-clinet-configuration-issue-4175443591/)

Vimuth 12-31-2012 10:08 AM

postfix+mysql+dovecot mail server thunderbird clinet configuration issue
 
[CODE]Hi ALL,
With much attempt I set up my very first mailserver postfix+mysql+dovecot mail server with virtual users/domains support. However when I tried to configure the thundirbird mail client for a valid user account it denies the password provided in the mysql database.

following is the setup.

mail server - box1.mydomain.rock(192.168.1.68)
client machine - vimut-lap.mydomain.rock(192.168.1.14)

following is my main.cf file
Code:

myhostname = box1.mydomain.rock
mynetworks = 192.168.1.0/24
message_size_limit = 30720000
virtual_alias_domains =
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_base = /home/vmail
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
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
smtpd_use_tls = yes
smtpd_tls_cert_file = /etc/pki/dovecot/certs/dovecot.pem
smtpd_tls_key_file = /etc/pki/dovecot/private/dovecot.pem
virtual_create_maildirsize = yes
virtual_maildir_extended = yes
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_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1

following is my dovecot.conf
Code:

protocols = imap imaps pop3 pop3s
log_timestamp = "%Y-%m-%d %H:%M:%S "
mail_location = maildir:/home/vmail/%d/%n/Maildir

ssl_cert_file = /etc/pki/dovecot/certs/dovecot.pem
ssl_key_file = /etc/pki/dovecot/private/dovecot.pem

namespace private {
    separator = .
    prefix = INBOX.
    inbox = yes
}

protocol lda {
    log_path = /home/vmail/dovecot-deliver.log
    auth_socket_path = /var/run/dovecot/auth-master
    postmaster_address = postmaster@mydomain.rock
}

protocol pop3 {
    pop3_uidl_format = %08Xu%08Xv
}

auth default {
    user = root

    passdb sql {
        args = /etc/dovecot-sql.conf
    }

    userdb static {
        args = uid=5000 gid=5000 home=/home/vmail/%d/%n allow_all_users=yes
    }

    socket listen {
        master {
            path = /var/run/dovecot/auth-master
            mode = 0600
            user = vmail
        }

        client {
            path = /var/spool/postfix/private/auth
            mode = 0660
            user = postfix
            group = postfix
        }
    }
}

following is my /etc/postfix/mysql-virtual_domains.cf
Code:

user = mail_admin
password = redhat
dbname = mail
query = SELECT domain AS virtual FROM domains WHERE domain='%s'
hosts = 127.0.0.1

following is my /etc/postfix/mysql-virtual_mailboxes.cf
Code:

user = mail_admin
password = redhat
dbname = mail
query = SELECT CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/') FROM users WHERE email='%s'
hosts = 127.0.0.1

following is the extract of my user table
Code:

mysql> use mail
Database changed
mysql> show tables;
+----------------+
| Tables_in_mail |
+----------------+
| domains        |
| forwardings    |
| transport      |
| users          |
+----------------+
4 rows in set (0.00 sec)

mysql> select * from users;
+-------------------+---------------+
| email            | password      |
+-------------------+---------------+
| dee@mydomain.rock | pfJ2wkhf0X8tM |
+-------------------+---------------+

Please can any one of you find something from the info provided above. Please note that I used mutt and read the mails sent by a different user and it worked. Following is the approch taken for that.
Code:

mutt -f /home/vmail/mydomain.rock/dee/Maildir/
PS:No IPTABLES and SeLINUX implementations are in place.

/V

Vimuth 12-31-2012 10:19 AM

Appologies. Following is the log extract that relates to this matter
Quote:

Dec 31 21:46:49 box1 dovecot: config: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:31: userdb static {} has been replaced by userdb { driver=static }
Dec 31 21:46:49 box1 dovecot: pop3-login: Aborted login (no auth attempts): rip=192.168.1.14, lip=192.168.1.68, mpid=0
Dec 31 21:46:49 box1 dovecot: imap-login: Aborted login (no auth attempts): rip=192.168.1.14, lip=192.168.1.68, mpid=0
Dec 31 21:46:49 box1 dovecot: imap-login: Disconnected (no auth attempts): rip=192.168.1.14, lip=192.168.1.68, mpid=0
Dec 31 21:46:49 box1 dovecot: pop3-login: Disconnected (no auth attempts): rip=192.168.1.14, lip=192.168.1.68, mpid=0
Dec 31 21:46:49 box1 postfix/smtpd[6005]: connect from unknown[192.168.1.14]
Dec 31 21:46:49 box1 postfix/smtpd[6005]: improper command pipelining after EHLO from unknown[192.168.1.14]
Dec 31 21:46:49 box1 postfix/smtpd[6005]: disconnect from unknown[192.168.1.14]
Dec 31 21:46:49 box1 postfix/smtpd[6005]: connect from unknown[192.168.1.14]
Dec 31 21:46:49 box1 postfix/smtpd[6005]: lost connection after CONNECT from unknown[192.168.1.14]
Dec 31 21:46:49 box1 postfix/smtpd[6005]: disconnect from unknown[192.168.1.14]
Dec 31 21:46:53 box1 dovecot: auth: Error: mysql: Connect failed to 192.168.1.68 (mail): Host 'box1' is not allowed to connect to this MySQL server - waiting for 1 seconds before retry
Dec 31 21:46:56 box1 postfix/proxymap[6010]: warning: connect to mysql server 192.168.1.68: Host 'box1' is not allowed to connect to this MySQL server
Dec 31 21:46:56 box1 postfix/trivial-rewrite[6018]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
Dec 31 21:46:57 box1 postfix/qmgr[5979]: warning: problem talking to service rewrite: Success
Dec 31 21:46:57 box1 postfix/master[5976]: warning: process /usr/libexec/postfix/trivial-rewrite pid 6018 exit status 1
Dec 31 21:46:57 box1 postfix/master[5976]: warning: /usr/libexec/postfix/trivial-rewrite: bad command startup -- throttling
^C

colucix 01-01-2013 04:17 AM

Erroneous duplicate of http://www.linuxquestions.org/questi...ue-4175443650/. Closed as per request.


All times are GMT -5. The time now is 01:20 PM.