LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-18-2009, 04:45 AM   #1
hshzh359
Member
 
Registered: Dec 2008
Posts: 37

Rep: Reputation: 15
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!!!!

Last edited by hshzh359; 04-18-2009 at 04:47 AM.
 
Old 04-20-2009, 06:51 AM   #2
datopdog
Member
 
Registered: Feb 2008
Location: JHB South Africa
Distribution: Centos, Kubuntu, Cross LFS, OpenSolaris
Posts: 806

Rep: Reputation: 41
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Dovecot pop3 authentication problem Coldmiser Linux - Software 4 09-09-2008 11:16 PM
Guide for postfix/dovecot/mysql authentication gnetcon Linux - Software 2 10-30-2006 08:11 AM
LXer: Sql - stored procedures, views, and dynamic sql generation LXer Syndicated Linux News 0 08-17-2006 06:33 AM
MySQL Authentication with Dovecot and Horde/IMP alvinlch Linux - General 0 11-07-2005 01:37 AM
dovecot authentication error snurckle Linux - Newbie 4 08-13-2004 05:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration