dovecot with sql authentication!!
I have build postfix with virtual doamin with mysql. and I use dovecot as mra. when I use sql authentication. only localhost can auth. other host can't within lan.
file: /etc/dovecot.conf protocols = imap imaps pop3 pop3s mail_location = maildir:/home/vmail/%d/%n/Maildir first_valid_uid = 5000 last_valid_uid = 5000 postmaster_address = root@servera.example.com sendmail_path = /usr/lib/sendmail auth_socket_path = /var/run/dovecot/auth-master } auth default { mechanisms = plain login passdb sql { args = /etc/dovecot-sql.conf } userdb static { args = uid=5000 gid=5000 home=/home/vmail/%d/%n } user = nobody socket listen { master { path = /var/run/dovecot/auth-master mode = 0660 user = vmail group = mail } client { path = /var/spool/postfix/private/auth mode = 0660 user = postfix group = postfix } } } On dovecot server(192.168.1.15) can authentication: [root@serverA etc]# telnet localhost pop3 Trying 127.0.0.1... Connected to localhost.localdomain (127.0.0.1). Escape character is '^]'. +OK Dovecot ready. user john@example.com +OK pass John +OK Logged in. list +OK 2 messages: 1 397 2 2391 On client (192.168.1.10) can't authentication: mutt -f pop://john@example.com dovecot server's log:tail -f /var/log/maillog 11179.036871 192.168.1.200 -> 192.168.1.15 TCP 43870 > 110 [SYN] Seq=0 Len=0 MSS=1460 TSV=11533402 TSER=0 WS=7 11179.037026 192.168.1.15 -> 192.168.1.200 TCP 110 > 43870 [SYN, ACK] Seq=0 Ack=1 Win=5792 Len=0 MSS=1460 TSV=60381391 TSER=11533402 WS=3 11179.037349 192.168.1.200 -> 192.168.1.15 TCP 43870 > 110 [ACK] Seq=1 Ack=1 Win=5888 Len=0 TSV=11533403 TSER=60381391 11179.037607 192.168.1.15 -> 192.168.1.200 POP Response: +OK Dovecot ready. 11179.038038 192.168.1.200 -> 192.168.1.15 TCP 43870 > 110 [ACK] Seq=1 Ack=21 Win=5888 Len=0 TSV=11533404 TSER=60381392 11179.038042 192.168.1.200 -> 192.168.1.15 POP Request: CAPA 11179.038099 192.168.1.15 -> 192.168.1.200 TCP 110 > 43870 [ACK] Seq=21 Ack=7 Win=5792 Len=0 TSV=60381392 TSER=11533404 11179.038841 192.168.1.15 -> 192.168.1.200 POP Response: +OK 11179.080824 192.168.1.200 -> 192.168.1.15 TCP 43870 > 110 [ACK] Seq=7 Ack=100 Win=5888 Len=0 TSV=11533445 TSER=60381393 11181.080850 192.168.1.200 -> 192.168.1.15 POP Request: USER john 11181.082293 192.168.1.15 -> 192.168.1.200 POP Response: +OK 11181.083216 192.168.1.200 -> 192.168.1.15 TCP 43870 > 110 [ACK] Seq=18 Ack=105 Win=5888 Len=0 TSV=11535448 TSER=60383435 11181.083219 192.168.1.200 -> 192.168.1.15 POP Request: PASS John 11181.124397 192.168.1.15 -> 192.168.1.200 TCP 110 > 43870 [ACK] Seq=105 Ack=29 Win=5792 Len=0 TSV=60383477 TSER=11535448 11182.289615 192.168.1.15 -> 192.168.1.200 POP Response: -ERR Authentication failed. 11182.327263 192.168.1.200 -> 192.168.1.15 TCP 43870 > 110 [ACK] Seq=29 Ack=134 Win=5888 Len=0 TSV=11536695 TSER=60384643 11184.291965 192.168.1.200 -> 192.168.1.15 POP Request: QUIT 11184.292049 192.168.1.15 -> 192.168.1.200 TCP 110 > 43870 [ACK] Seq=134 Ack=35 Win=5792 Len=0 TSV=60386640 TSER=11538657 11184.293162 192.168.1.15 -> 192.168.1.200 POP Response: +OK Logging out 11184.293399 192.168.1.200 -> 192.168.1.15 TCP 43870 > 110 [FIN, ACK] Seq=35 Ack=152 Win=5888 Len=0 TSV=11538659 TSER=60386641 11184.293665 192.168.1.15 -> 192.168.1.200 TCP 110 > 43870 [ACK] Seq=152 Ack=36 Win=5792 Len=0 TSV=60386642 TSER=11538659 Please help me?? Thanks!!!! |
I think that is because your setup uses the full email address as the login while mutt strips of the realm part and sends only the john part to the pop server.
May be you can set the username / pass in the .muttrc then just connect as pop://server_ip |
All times are GMT -5. The time now is 05:46 AM. |