[Dovecot] smtp -auth with using clear text password
Hi
I am setting up a mailserver .. where clients need to authenticate to the mail server . The mta i am using is postfix . It is possible to use a file like this :
cat /etc/postfix/dovecote_passwd agnello:123456
where user is agnello and password is 123456
If you can please send me some reference links
thanks a ton
-- Regards Agnello D'souza
On 04.05.2012 15:48, wrote Agnello George:
Hi
I am setting up a mailserver .. where clients need to authenticate to the mail server . The mta i am using is postfix . It is possible to use a file like this :
cat /etc/postfix/dovecote_passwd agnello:123456
where user is agnello and password is 123456
If you can please send me some reference links
thanks a ton
PasswdFile seems what you want: http://wiki2.dovecot.org/AuthDatabase/PasswdFile
thanks a ton
PasswdFile seems what you want: http://wiki2.dovecot.org/**AuthDatabase/PasswdFilehttp://wiki2.dovecot.org/AuthDatabase/PasswdFile
Actually i did try this , i created a file called
cat /etc/dovecot/passwd agnello:123456
i also added in dovecot
passdb { driver = passwd-file args = /etc/dovecot/passwd}
But still its gives me a relay access denied .
-- Regards Agnello D'souza
On 04.05.2012 16:51, wrote Agnello George:
thanks a ton
PasswdFile seems what you want: http://wiki2.dovecot.org/**AuthDatabase/PasswdFilehttp://wiki2.dovecot.org/AuthDatabase/PasswdFile
Actually i did try this , i created a file called
cat /etc/dovecot/passwd agnello:123456
i also added in dovecot
passdb { driver = passwd-file args = /etc/dovecot/passwd}
But still its gives me a relay access denied .
You need to configure Postfix to use dovecot as SASL provider. There are some Howto's in the wiki.
http://wiki2.dovecot.org/HowTo/PostfixAndDovecotSASL http://wiki2.dovecot.org/HowTo/VirtualUserFlatFilesPostfix
If you cannot solve it with this please provide dovecot -n, postfix -n and logs with auth_debug=yes.
You need to configure Postfix to use dovecot as SASL provider. There are some Howto's in the wiki.
http://wiki2.dovecot.org/**HowTo/PostfixAndDovecotSASLhttp://wiki2.dovecot.org/HowTo/PostfixAndDovecotSASL http://wiki2.dovecot.org/**HowTo/**VirtualUserFlatFilesPostfixhttp://wiki2.dovecot.org/HowTo/VirtualUserFlatFilesPostfix
If you cannot solve it with this please provide dovecot -n, postfix -n and logs with auth_debug=yes.
I had followed the documentation as per . however in the i get the following error .
[root@test /]# telnet 192.168.77.36 110 Trying 192.168.77.36... Connected to mail.server.co.in (192.168.77.36). Escape character is '^]'. +OK Dovecot ready. user agnello +OK pass 123456 Connection closed by foreign host.
in the maillog i get the following error :
May 5 11:30:43 mail dovecot: imap-login: Disconnected (no auth attempts): rip=192.168.70.12, lip=192.168.77.36 May 5 11:30:55 mail dovecot: pop3-login: Login: user=<agnello>, method=PLAIN, rip=192.168.70.12, lip=192.168.77.36, mpid=30400 May 5 11:30:55 mail dovecot: pop3(agnello): Error: user agnello: Couldn't drop privileges: User is missing UID (see mail_uid setting) May 5 11:30:55 mail dovecot: pop3(agnello): Error: Internal error occurred. Refer to server log for more information.
my confi file details is as follows :
cat /etc/dovecot/passwd agnello:{plain}123456
[root@mail ~]# cat /etc/dovecot/dovecot.conf # 2.0.9: /etc/dovecot/dovecot.conf # OS: Linux 2.6.32-71.el6.x86_64 x86_64 CentOS Linux release 6.0 (Final) auth_verbose = yes disable_plaintext_auth = no passdb { args = scheme=plain /etc/dovecot/passwd driver = passwd-file } protocols = imap pop3 service auth { unix_listener /var/spool/postfix/private/auth { group = postfix mode = 0660 user = postfix } } ssl = no userdb { driver = static }
[root@mail ~]# cat /etc/postfix/main.cf alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases broken_sasl_auth_clients = yes command_directory = /usr/sbin config_directory = /etc/postfix daemon_directory = /usr/libexec/postfix data_directory = /var/lib/postfix debug_peer_level = 2 html_directory = no inet_interfaces = all inet_protocols = all mail_owner = postfix mailq_path = /usr/bin/mailq.postfix manpage_directory = /usr/share/man mydestination = $myhostname, localhost.$mydomain, localhost newaliases_path = /usr/bin/newaliases.postfix queue_directory = /var/spool/postfix readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES sample_directory = /usr/share/doc/postfix-2.6.6/samples sendmail_path = /usr/sbin/sendmail.postfix setgid_group = postdrop
smtpd_sasl_type = dovecot smtpd_sasl_path = private/auth smtpd_sasl_auth_enable = yes smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
these are my configuration files ..
Can someone help me here
thanks :)
-- Regards Agnello D'souza
On Sat, May 5, 2012 at 11:44 AM, Agnello George agnello.dsouza@gmail.comwrote:
You need to configure Postfix to use dovecot as SASL provider. There are some Howto's in the wiki.
http://wiki2.dovecot.org/**HowTo/PostfixAndDovecotSASLhttp://wiki2.dovecot.org/HowTo/PostfixAndDovecotSASL http://wiki2.dovecot.org/**HowTo/**VirtualUserFlatFilesPostfixhttp://wiki2.dovecot.org/HowTo/VirtualUserFlatFilesPostfix
If you cannot solve it with this please provide dovecot -n, postfix -n and logs with auth_debug=yes.
I had followed the documentation as per . however in the i get the following error .
[root@test /]# telnet 192.168.77.36 110 Trying 192.168.77.36... Connected to mail.server.co.in (192.168.77.36). Escape character is '^]'. +OK Dovecot ready. user agnello +OK pass 123456 Connection closed by foreign host.
in the maillog i get the following error :
May 5 11:30:43 mail dovecot: imap-login: Disconnected (no auth attempts): rip=192.168.70.12, lip=192.168.77.36 May 5 11:30:55 mail dovecot: pop3-login: Login: user=<agnello>, method=PLAIN, rip=192.168.70.12, lip=192.168.77.36, mpid=30400 May 5 11:30:55 mail dovecot: pop3(agnello): Error: user agnello: Couldn't drop privileges: User is missing UID (see mail_uid setting) May 5 11:30:55 mail dovecot: pop3(agnello): Error: Internal error occurred. Refer to server log for more information.
my confi file details is as follows :
cat /etc/dovecot/passwd agnello:{plain}123456
[root@mail ~]# cat /etc/dovecot/dovecot.conf # 2.0.9: /etc/dovecot/dovecot.conf # OS: Linux 2.6.32-71.el6.x86_64 x86_64 CentOS Linux release 6.0 (Final) auth_verbose = yes disable_plaintext_auth = no passdb { args = scheme=plain /etc/dovecot/passwd driver = passwd-file } protocols = imap pop3 service auth { unix_listener /var/spool/postfix/private/auth { group = postfix mode = 0660 user = postfix } } ssl = no userdb { driver = static }
[root@mail ~]# cat /etc/postfix/main.cf alias_database = hash:/etc/aliases
these are my configuration files ..
Can someone help me here
thanks :)
-- Regards Agnello D'souza
Ok am sorry was not testing it correctly .
Form a remote server i tested the same smtp-auth test
[root@test /]# perl -MMIME::Base64 -e 'print encode_base64("\000agnello\000123456")' AGFnbmVsbG8AMTIzNDU2 [root@test /]# telnet 192.168.77.36 25 Trying 192.168.77.36... Connected to mail.ddde.co.in (192.168.77.36). Escape character is '^]'.
220 mail.ddde.co.in ESMTP Postfix 500 5.5.2 Error: bad syntax ehlo testing 250-mail.ddde.co.in 250-PIPELINING 250-SIZE 10240000 250-VRFY 250-ETRN 250-AUTH PLAIN 250-AUTH=PLAIN 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN AUTH PLAIN AGFnbmVsbG8AMTIzNDU2 235 2.7.0 Authentication successful 421 4.4.2 mail.ddde.co.in Error: timeout exceeded Connection closed by foreign host.
-- Regards Agnello D'souza
On Sat, 5 May 2012 11:44:02 +0530 Agnello George articulated:
You need to configure Postfix to use dovecot as SASL provider. There are some Howto's in the wiki.
http://wiki2.dovecot.org/**HowTo/PostfixAndDovecotSASLhttp://wiki2.dovecot.org/HowTo/PostfixAndDovecotSASL http://wiki2.dovecot.org/**HowTo/**VirtualUserFlatFilesPostfixhttp://wiki2.dovecot.org/HowTo/VirtualUserFlatFilesPostfix
If you cannot solve it with this please provide dovecot -n, postfix -n and logs with auth_debug=yes.
I had followed the documentation as per . however in the i get the following error .
[root@test /]# telnet 192.168.77.36 110 Trying 192.168.77.36... Connected to mail.server.co.in (192.168.77.36). Escape character is '^]'. +OK Dovecot ready. user agnello +OK pass 123456 Connection closed by foreign host.
in the maillog i get the following error :
May 5 11:30:43 mail dovecot: imap-login: Disconnected (no auth attempts): rip=192.168.70.12, lip=192.168.77.36 May 5 11:30:55 mail dovecot: pop3-login: Login: user=<agnello>, method=PLAIN, rip=192.168.70.12, lip=192.168.77.36, mpid=30400 May 5 11:30:55 mail dovecot: pop3(agnello): Error: user agnello: Couldn't drop privileges: User is missing UID (see mail_uid setting) May 5 11:30:55 mail dovecot: pop3(agnello): Error: Internal error occurred. Refer to server log for more information.
my confi file details is as follows :
cat /etc/dovecot/passwd agnello:{plain}123456
[root@mail ~]# cat /etc/dovecot/dovecot.conf
use: "dovecot -n" and post output
[root@mail ~]# cat /etc/postfix/main.cf
use: "postconf -n" and post output
For Postfix, you could read the documentation at:
http://www.postfix.com/DEBUG_README.html#mail
Pay attention to these entries:
Output from "postconf -n". Please do not send your main.cf file, or 500+ lines of postconf output.
Better, provide output from the postfinger tool. This can be found at http://ftp.wl0.org/SOURCES/postfinger.
If the problem is SASL related, consider including the output from the saslfinger tool. This can be found at http://postfix.state-of-mind.de/patrick.koetter/saslfinger/.
-- Jerry ♔
Disclaimer: off-list followups get on-list replies or get ignored. Please do not ignore the Reply-To header.
On 4.5.2012, at 17.51, Agnello George wrote:
cat /etc/dovecot/passwd agnello:123456
i also added in dovecot
passdb { driver = passwd-file args = /etc/dovecot/passwd}
But still its gives me a relay access denied .
The default password scheme is CRYPT, but you apparently want plaintext passwords. So either prefix the password with {plain} or add:
args = scheme=plain /etc/dovecot/passwd
participants (5)
-
Agnello George
-
Benny Pedersen
-
e-frog
-
Jerry
-
Timo Sirainen