Re: [Dovecot] smtp -auth with using clear text password

2012-05-04 Thread Agnello George
On Sat, May 5, 2012 at 11:44 AM, Agnello George wrote:

>
>
>> 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.
>>
>
>
> 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=,
> 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 1024
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


Re: [Dovecot] smtp -auth with using clear text password

2012-05-04 Thread Agnello George
>
> 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.
>


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=,
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


Re: [Dovecot] dovecot and systemd

2012-05-04 Thread Timo Sirainen
On 16.4.2012, at 12.55, Michal Hlavinka wrote:

> I wrote simple patch that close the extra sockets. It's tested and works 
> fine. You'll maybe want to move that function to different place and/or 
> change wording of error messages.

I committed it to v2.1 now with a couple of changes. One is that it doesn't 
actually close the fd, but instead puts /dev/null into it. I think otherwise 
Dovecot might use that fd to something else and the check would later fail 
again and close the wrong fd.

http://hg.dovecot.org/dovecot-2.1/rev/4a3bf567da54



Re: [Dovecot] Shared INBOX change in v2.1.6?

2012-05-04 Thread Timo Sirainen
On 1.5.2012, at 3.21, Timo Sirainen wrote:

> Previously Dovecot has shown shared INBOX like:
> 
> * LIST (\HasChildren) "/" "shared/tss2"
> * LIST (\HasNoChildren) "/" "shared/tss2/INBOX"
> * LIST (\HasNoChildren) "/" "shared/tss2/foo"
> 
> The last change in hg makes it return simply (same as with Cyrus):
> 
> * LIST (\HasChildren) "/" "shared/tss2"
> * LIST (\HasNoChildren) "/" "shared/tss2/foo"
> 
> This behavior could be made optional, but does anyone actually want it
> to work the old way (and why)? I'd rather not add an option that isn't
> useful to anyone.

Well, I guess it has to be optional then: 
http://hg.dovecot.org/dovecot-2.1/rev/40a544fc4778

I might change the default in v2.2 though.



Re: [Dovecot] dovecot sasl with postfix: SASL LOGIN authentication failed: Connection lost to authentication server

2012-05-04 Thread Timo Sirainen
On 1.5.2012, at 5.28, David Jonas wrote:

> When using dovecot (2.1.5) sasl with postfix (2.8.4) behind nginx smtp
> proxy I am seeing a ton of errors of the form:
..
> Nothing is printed by dovecot in the logs regarding the error. It seems
> that dovecot just hung up on postfix. (side note: no, can't use xclient
> in nginx/postfix. But perhaps soon.)

So nginx hides the client's IP.

> Finally I just disabled penalties with the info from
> 
> http://www.dovecot.org/list/dovecot/2011-December/062631.html
> 
> and that seemed to do it. Is there a better way?

Nope, other than enabling XCLIENT so Dovecot sees the clients' real IPs instead 
of nginx's.



Re: [Dovecot] Dovecot/doveadm crash

2012-05-04 Thread Timo Sirainen
On 30.4.2012, at 23.16, Daniel L. Miller wrote:

> Having a problem with a mailbox.  I've been trying to rebuild - but doveadm 
> force-resync crashes.  This is mdbox with sis.
> 
> doveadm purge -u dmil...@amfes.com
> doveadm(dmil...@amfes.com): Panic: file istream.c: line 466 
> (i_stream_grow_buffer): assertion failed: (stream->max_buffer_size > 0)

http://hg.dovecot.org/dovecot-2.1/rev/fa6662ab4df3 should fix this.




Re: [Dovecot] doveadm mailbox: rc=0 on error

2012-05-04 Thread Timo Sirainen
On 4.5.2012, at 12.43, Andreas Schulze wrote:

> I use "doveadm mailbox mutf7 -7 $folder" to convert imap foldernames to UTF-8.
> If $foldername is not mUTF-7 encoded, doveadm returns
>  "doveadm(root): Error: Mailbox name not valid mUTF-7: $folder"
> This errormessage is printed on stderr but the returncode of doveadm is zero.

Fixed: http://hg.dovecot.org/dovecot-2.1/rev/3689eced9381



Re: [Dovecot] Dovecot for POP3S proxying

2012-05-04 Thread Timo Sirainen
On 4.5.2012, at 9.33, Gilles Albusac wrote:

> Dovecot is installed but actually I just use auth module (for postfix 
> authentication).
> 
> In your dovecot.conf example, I don't see the "proxy" command ?

The proxying is enabled by having the passdb lookup return a "proxy" extra 
field. What passdb are you planning on using?



Re: [Dovecot] smtp -auth with using clear text password

2012-05-04 Thread Timo Sirainen
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



Re: [Dovecot] smtp -auth with using clear text password

2012-05-04 Thread e-frog

On 04.05.2012 16:51, wrote Agnello George:

thanks a ton






PasswdFile seems what you want:
http://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.


Re: [Dovecot] smtp -auth with using clear text password

2012-05-04 Thread Agnello George
thanks a ton

>
>>
> PasswdFile seems what you want:
> http://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


Re: [Dovecot] smtp -auth with using clear text password

2012-05-04 Thread e-frog

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



[Dovecot] smtp -auth with using clear text password

2012-05-04 Thread 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



-- 
Regards
Agnello D'souza


Re: [Dovecot] Strange behaviour for sieve_before

2012-05-04 Thread Simone Caruso
On 04/05/2012 11:42, Stephan Bosch wrote:
> On 5/4/2012 11:20 AM, Simone Caruso wrote:
>> Hi all,
>> i moved from dovecot 2.0.15 (lda) to 2.1.5 with lmtp transport, all works 
>> well
>> with the same configuration directives.
>>
>> But sieve_before stopped working with mail_debug=no.
>> The weird thing is that, with mail_debug=yes the sieve_before script starts
>> working.
>>
>> Any idea? Thanks
>
> This is an interesting bug that scores high on the stupidity scale.

We are humans :)

Thank you!

-- 
Simone Caruso
IT Consultant
+39 349 65 90 805



Re: [Dovecot] Strange behaviour for sieve_before

2012-05-04 Thread Stephan Bosch

On 5/4/2012 11:20 AM, Simone Caruso wrote:

Hi all,
i moved from dovecot 2.0.15 (lda) to 2.1.5 with lmtp transport, all works well
with the same configuration directives.

But sieve_before stopped working with mail_debug=no.
The weird thing is that, with mail_debug=yes the sieve_before script starts 
working.

Any idea? Thanks


This is an interesting bug that scores high on the stupidity scale. It 
was introduced by this change:


http://hg.rename-it.nl/dovecot-2.1-pigeonhole/rev/b2ff597c2279

I wonder why I only broke this for sieve_before.

Fixed:

http://hg.rename-it.nl/dovecot-2.1-pigeonhole/rev/aa611f912da6

Regards,

Stephan.



[Dovecot] doveadm mailbox: rc=0 on error

2012-05-04 Thread Andreas Schulze
Hi all,

I use "doveadm mailbox mutf7 -7 $folder" to convert imap foldernames to UTF-8.
If $foldername is not mUTF-7 encoded, doveadm returns
  "doveadm(root): Error: Mailbox name not valid mUTF-7: $folder"
This errormessage is printed on stderr but the returncode of doveadm is zero.
I tested with dovecot-2.0.* and dovecot-2.1.*

# all right:
$ doveadm mailbox mutf7 -7 'gr&APw-n'; echo $?
grün
0

# also all right, no mUTF-7 encoded folder:
$ doveadm mailbox mutf7 -7 'gruen'; echo $?
gruen
0

# wrong
$ doveadm mailbox mutf7 -7 'grün'; echo $?
doveadm(root): Error: Mailbox name not valid mUTF-7: grün

0

Would be nice if doveadm exit with an errorcode != 0 in that case.

Andreas

-- 
Andreas Schulze
Internetdienste | P252

DATEV eG
90329 Nürnberg | Telefon +49 911 319-0 | Telefax +49 911 319-3196
E-Mail info @datev.de | Internet www.datev.de
Sitz: 90429 Nürnberg, Paumgartnerstr. 6-14 | Registergericht Nürnberg, GenReg 
Nr.70
Vorstand
Prof. Dieter Kempf (Vorsitzender)
Dipl.-Kfm. Wolfgang Stegmann (stellvertretender Vorsitzender)
Dipl.-Kfm. Michael Leistenschneider
Dipl.-Kfm. Dr. Robert Mayr
Jörg Rabe v. Pappenheim
Dipl.-Vw. Eckhard Schwarzer
Vorsitzender des Aufsichtsrates: Reinhard Verholen


[Dovecot] Strange behaviour for sieve_before

2012-05-04 Thread Simone Caruso
Hi all,
i moved from dovecot 2.0.15 (lda) to 2.1.5 with lmtp transport, all works well
with the same configuration directives.

But sieve_before stopped working with mail_debug=no.
The weird thing is that, with mail_debug=yes the sieve_before script starts 
working.

Any idea? Thanks

(my conf attacched, for the new install i used prebuild packages)

-- 
Simone Caruso
IT Consultant
+39 349 65 90 805

# 2.1.5 (d5bbb1d203c5): /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-5-xen-amd64 x86_64 Debian 6.0.4 ext3
auth_cache_size = 5 M
auth_master_user_separator = *
auth_mechanisms = plain login
auth_worker_max_count = 15
base_dir = /var/run/dovecot/
dict {
  quota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
  quotadict = mysql:/etc/dovecot/dovecot-dict-sql.conf
}
disable_plaintext_auth = no
first_valid_gid = 8
first_valid_uid = 8
hostname = mail.ardeek.com
listen = *
mail_home = /var/dovecot-homes/%d/%n/home
mail_location = maildir:/var/mail/%d/%n:INDEX=/var/dovecot-index/%d/%n
mail_plugins = quota autocreate
mail_privileged_group = mail
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character 
vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy 
include variables body enotify environment mailbox date ihave
namespace {
  inbox = yes
  list = yes
  location = 
  prefix = INBOX.
  separator = .
  type = private
}
passdb {
  args = /etc/dovecot/conf.d/auth-master.conf.ext
  driver = sql
  master = yes
  pass = yes
}
passdb {
  args = /etc/dovecot/conf.d/auth-sql.conf.ext
  driver = sql
}
plugin {
  autocreate = INBOX.Trash
  autocreate2 = INBOX.Sent
  autocreate3 = INBOX.Drafts
  autocreate4 = INBOX.Spam
  autosubscribe = INBOX.Trash
  autosubscribe2 = INBOX.Sent
  autosubscribe3 = INBOX.Drafts
  autosubscribe4 = INBOX.Spam
  quota = dict:User quota::proxy::quotadict
  quota_rule2 = INBOX.Trash:storage=+55M
  quota_warning = storage=90%% /usr/sbin/quota-warning.sh 90 %u
  sieve = /var/mail/%d/%n/sieve/.default.sieve
  sieve_before = /etc/dovecot/sieve/dovecot.sieve
  sieve_dir = /var/mail/%d/%n/sieve
  sieve_storage = /var/mail/%d/%n/sieve
}
postmaster_address = postmas...@ardeek.com
protocols = " imap lmtp sieve pop3"
service auth {
  unix_listener auth-userdb {
mode = 0666
user = mail
  }
}
service dict {
  unix_listener dict {
mode = 0600
user = mail
  }
}
service imap-login {
  inet_listener imap {
port = 143
  }
  inet_listener imaps {
port = 993
ssl = yes
  }
  process_min_avail = 3
  service_count = 0
  vsz_limit = 128 M
}
service imap {
  client_limit = 25
  process_limit = 10
  process_min_avail = 2
  service_count = 0
}
service lmtp {
  inet_listener lmtp {
address = *
port = 24
  }
}
service managesieve-login {
  inet_listener sieve {
port = 4190
  }
  inet_listener sieve_deprecated {
port = 2000
  }
  process_min_avail = 1
  vsz_limit = 128 M
}
service pop3-login {
  client_limit = 5
  inet_listener pop3 {
port = 110
  }
  inet_listener pop3s {
port = 995
ssl = yes
  }
  process_limit = 6
  process_min_avail = 3
  service_count = 0
}
service pop3 {
  client_limit = 25
  process_limit = 10
  process_min_avail = 2
  service_count = 0
}
ssl_cert = 

Re: [Dovecot] per user sieve after filters

2012-05-04 Thread Stephan Bosch

On 4/9/2012 6:26 PM, Andre Rodier wrote:

Hello,

Thanks for dovecot, as it's still the best mail server.

I'd like to use per users sieve_after scripts.

Can I put in my dovecot config file, something like that:

   sieve_after = %h/Mails/Sieve/After/

It would be very useful for me, as I'd like to add vacation script to be
executed from this place.


I've tested this recently and it works for the above example.

Additionally, I've extended multiscript support with the possibility to 
specify multiple sieve_before and sieve_after scripts:


http://hg.rename-it.nl/dovecot-2.1-pigeonhole/rev/b2ff597c2279

So, you can now (once released) have a configuration like:

sieve_after =  %h/Mails/Sieve/After
sieve_after2 = /usr/lib/dovecot/sieve-after.d

And I changed the implementation to accept ~/ substitutions, so it is 
now also possible to do the following:


sieve_after =  ~/Mails/Sieve/After

Turns out more people need/use a solution similar to yours and that is 
the reason I made it more flexible.


Regards,

Stephan.