Re: [Dovecot] IMAP extensions & their meanings

2010-04-01 Thread Michael M. Slusarz

Quoting Brian Candler :


On Thu, Apr 01, 2010 at 04:15:35PM -0400, Jerry wrote:

I know that is is not really a Dovecot problem; however, I was
wondering where I could get a complete list of the terms used in the
'capability' line. I have not had any success in finding out what
things like "XLIST" refer to. I don't believe that is one that Dovecot
uses; however, I have seen it with other IMAP servers, plus lots of
other flags that I do not understand.

I tried Googling but only got a few sporadic and basically useless
answers.


Google "IANA registry IMAP capabilities" (without the quotes). First hit is
what you want; follow each RFC reference for more details.


http://www.iana.org/assignments/imap4-capabilities

michael



Re: [Dovecot] New install authentication probs (Solved)

2010-04-01 Thread Brian Candler
On Thu, Apr 01, 2010 at 09:03:46PM +0100, Brian Candler wrote:
> If you want it, set this in dovecot.conf:
> 
> disable_plaintext_auth = no

and you may also need:

auth default {
  ...
  mechanisms = plain login
  ...


Re: [Dovecot] IMAP extensions & their meanings

2010-04-01 Thread Brian Candler
On Thu, Apr 01, 2010 at 04:15:35PM -0400, Jerry wrote:
> I know that is is not really a Dovecot problem; however, I was
> wondering where I could get a complete list of the terms used in the
> 'capability' line. I have not had any success in finding out what
> things like "XLIST" refer to. I don't believe that is one that Dovecot
> uses; however, I have seen it with other IMAP servers, plus lots of
> other flags that I do not understand.
> 
> I tried Googling but only got a few sporadic and basically useless
> answers.

Google "IANA registry IMAP capabilities" (without the quotes). First hit is
what you want; follow each RFC reference for more details.

Capabilities which begin with "X" are non-standard, and you'll have to
search for them separately.

For a general description of the CAPABILITY syntax see RFC3501 (sec 6.1.1
and 7.2.1)

HTH,

Brian.


[Dovecot] IMAP extensions & their meanings

2010-04-01 Thread Jerry
I know that is is not really a Dovecot problem; however, I was
wondering where I could get a complete list of the terms used in the
'capability' line. I have not had any success in finding out what
things like "XLIST" refer to. I don't believe that is one that Dovecot
uses; however, I have seen it with other IMAP servers, plus lots of
other flags that I do not understand.

I tried Googling but only got a few sporadic and basically useless
answers.

Thanks!

-- 
Jerry
dovecot.u...@seibercom.net

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the Reply-To header.
__

The economy depends about as much on economists as the weather does on
weather forecasters.

Jean-Paul Kauffmann


Re: [Dovecot] New install authentication probs (Solved)

2010-04-01 Thread Brian Candler
On Thu, Apr 01, 2010 at 08:09:30PM +0100, a.sm...@ukgrid.net wrote:
>  yes sounds likely, I am attempting to authenticate using the text:
> LOGIN username password

(with a tag in front of the command)

> With zero logged to the debug log... With courier IMAP this works by
> default, I guess by default it doesnt work with dovecot...

If you want it, set this in dovecot.conf:

disable_plaintext_auth = no

Basically dovecot is taking the secure approach by default. If the client is
connected without encryption, then they should not be sending a plaintext
password, as it's easily sniffed.  The above config removes this policy.

Or: try making an encrypted (imaps) connection, like this:

openssl s_client -connect 127.0.0.1:993

HTH,

Brian.


Re: [Dovecot] New install authentication probs (Solved)

2010-04-01 Thread Pascal Volk
On 04/01/2010 09:09 PM a.sm...@ukgrid.net wrote:
> Hi Brian,
> 
>   yes sounds likely, I am attempting to authenticate using the text:
> LOGIN username password
> 
> and I always recieve the error:
> 
> LOGIN BAD Error in IMAP command received by server.
> 
> With zero logged to the debug log... With courier IMAP this works by  
> default, I guess by default it doesnt work with dovecot...

please stop top-posing.

The imap command you have used is syntactically wrong. Please have a
look at RFC 3501, section 6.2.3 (LOGIN Command)


When courier supports violation of protocols/RFCs/STDs, please file a
bug against courier.


Regards,
Pascal
-- 
The trapper recommends today: c01dcafe.1009...@localdomain.org


Re: [Dovecot] New install authentication probs (Solved)

2010-04-01 Thread a . smith

Hi Brian,

 yes sounds likely, I am attempting to authenticate using the text:
LOGIN username password

and I always recieve the error:

LOGIN BAD Error in IMAP command received by server.

With zero logged to the debug log... With courier IMAP this works by  
default, I guess by default it doesnt work with dovecot...


thanks Andy.

Brian Candler  escribió:


On Thu, Apr 01, 2010 at 06:50:28PM +0100, Brian Candler wrote:

On Thu, Apr 01, 2010 at 10:21:35AM +0100, Andy Smith wrote:
> Update on this problem,
> seems the only issue I had was that the telnet method of verifying
> IMAP authentication that works on Courier just doesnt work with
> Dovecot.

What did you use? What did you see in response? Correct syntax is simply

a login username password


... although now I come to think of it, you may need to enable this in
dovecot.conf first, since by default it won't allow a plaintext login over
an unsecured channel.









[Dovecot] doveadm {user,auth} {segfaults,hangs}

2010-04-01 Thread Pascal Volk
Since the last changes from yesterday, there are at least
two new problems in doveadm (4e527339da8b).

doveadm user aaa
doveadm(pvo): Error: userdb lookup: 
connect(/usr/local/dovecot20/var/run/dovecot/auth-userdb) failed: Permission 
denied (euid=1000(pvo) egid=1000(pvo) missing +r perm: 
/usr/local/dovecot20/var/run/dovecot/auth-userdb, euid is not dir owner)
Segmentation fault (core dumped)


doveadm auth 
Password: 
doveadm(pvo): Error: auth: 
connect(/usr/local/dovecot20/var/run/dovecot/auth-client) failed: Permission 
denied (euid=1000(pvo) egid=1000(pvo) missing +r perm: 
/usr/local/dovecot20/var/run/dovecot/auth-client, euid is not dir owner)
[hang until]^C

Backtraces are attached


Regards,
Pascal
-- 
The trapper recommends today: beeffeed.1009...@localdomain.org
(gdb) bt full:
#0  0x004063b7 in cmd_user_input (auth_socket_path=0x4117f8 
"/usr/local/dovecot20/var/run/dovecot/auth-userdb", input=0x7fff41c65320) at 
doveadm-auth.c:41
conn = 0x998f50
pool = 0x997ac0
username = 0x0
fields = 0x0
p = 0x0
ret = -1
#1  0x00406ab6 in auth_cmd_common (cmd=0x61a940, argc=2, argv=0x921048) 
at doveadm-auth.c:201
first = false
auth_socket_path = 0x0
input = {username = 0x92107b "aaa", password = 0x0, info = {service = 
0x4119da "doveadm", local_ip = {family = 0, u = {ip6 = {__in6_u = {__u6_addr8 = 
'\000' , __u6_addr16 = {0, 0, 0, 
  0, 0, 0, 0, 0}, __u6_addr32 = {0, 0, 0, 0}}}, ip4 = 
{s_addr = 0}}}, remote_ip = {family = 0, u = {ip6 = {__in6_u = {__u6_addr8 = 
'\000' , __u6_addr16 = {0, 0, 0, 0, 0, 0, 
  0, 0}, __u6_addr32 = {0, 0, 0, 0}}}, ip4 = {s_addr = 
0}}}, local_port = 0, remote_port = 0}}
c = -1
#2  0x00406b3e in cmd_user (argc=2, argv=0x921048) at doveadm-auth.c:214
No locals.
#3  0x0040602f in doveadm_try_run (cmd_name=0x921076 "user", argc=2, 
argv=0x921048) at doveadm.c:83
cmd__foreach_end = 0x986650
cmd = 0x986590
#4  0x004062da in main (argc=2, argv=0x921048) at doveadm.c:169
set_roots = {0x413860, 0x0}
service_flags = 10
cmd_name = 0x921076 "user"
error = 0x411685 "H\205\355t\034\061\333\017\037@"
c = -1
(gdb) bt full
#0  0x7f114d21cc93 in __epoll_wait_nocancel () from /lib/libc.so.6
fstab_state = {fs_fp = 0x0, fs_buffer = 0x0, fs_mntres = {mnt_fsname = 
0x0, mnt_dir = 0x0, mnt_type = 0x0, mnt_opts = 0x0, mnt_freq = 0, mnt_passno = 
0}, fs_ret = {fs_spec = 0x0, fs_file = 0x0, 
fs_vfstype = 0x0, fs_mntops = 0x0, fs_type = 0x0, fs_freq = 0, 
fs_passno = 0}}
__elf_set___libc_subfreeres_element_fstab_free__ = 0x7f114d254220
#1  0x7f114dd90674 in io_loop_handler_run (ioloop=0x17aaf60) at 
ioloop-epoll.c:175
ctx = 0x17cdfc0
events = 0x17ce800
event = 0x17aaf60
list = 0x21
io = 0x1
tv = {tv_sec = 2147483, tv_usec = 0}
events_count = 1
t_id = 4220376
msecs = 2147483647
ret = -1
i = 0
j = 1306179422
call = false
#2  0x7f114dd8f451 in io_loop_run (ioloop=0x17aaf60) at ioloop.c:350
No locals.
#3  0x004067c6 in cmd_auth_input (auth_socket_path=0x411950 
"/usr/local/dovecot20/var/run/dovecot/auth-client", input=0x7fff059a42c0) at 
doveadm-auth.c:136
client = 0x17d0fc0
#4  0x00406a79 in auth_cmd_common (cmd=0x61a920, argc=2, 
argv=0x175c048) at doveadm-auth.c:191
auth_socket_path = 0x0
input = {username = 0x175c07b "", password = 0x179d088 "sdfghjk", 
info = {service = 0x4119da "doveadm", local_ip = {family = 0, u = {ip6 = 
{__in6_u = {__u6_addr8 = '\000' , 
__u6_addr16 = {0, 0, 0, 0, 0, 0, 0, 0}, __u6_addr32 = {0, 
0, 0, 0}}}, ip4 = {s_addr = 0}}}, remote_ip = {family = 0, u = {ip6 = {__in6_u 
= {__u6_addr8 = '\000' , 
__u6_addr16 = {0, 0, 0, 0, 0, 0, 0, 0}, __u6_addr32 = {0, 
0, 0, 0}}}, ip4 = {s_addr = 0}}}, local_port = 0, remote_port = 0}}
c = -1
#5  0x00406b1a in cmd_auth (argc=2, argv=0x175c048) at 
doveadm-auth.c:209
No locals.
#6  0x0040602f in doveadm_try_run (cmd_name=0x175c076 "auth", argc=2, 
argv=0x175c048) at doveadm.c:83
cmd__foreach_end = 0x17c8650
cmd = 0x17c8570
#7  0x004062da in main (argc=2, argv=0x175c048) at doveadm.c:169
set_roots = {0x413860, 0x0}
service_flags = 10
cmd_name = 0x175c076 "auth"
error = 0x411685 "H\205\355t\034\061\333\017\037@"
c = -1
(gdb)


Re: [Dovecot] New install authentication probs (Solved)

2010-04-01 Thread Brian Candler
On Thu, Apr 01, 2010 at 06:50:28PM +0100, Brian Candler wrote:
> On Thu, Apr 01, 2010 at 10:21:35AM +0100, Andy Smith wrote:
> > Update on this problem,
> > seems the only issue I had was that the telnet method of verifying
> > IMAP authentication that works on Courier just doesnt work with
> > Dovecot.
> 
> What did you use? What did you see in response? Correct syntax is simply
> 
> a login username password

... although now I come to think of it, you may need to enable this in
dovecot.conf first, since by default it won't allow a plaintext login over
an unsecured channel.


Re: [Dovecot] New install authentication probs (Solved)

2010-04-01 Thread Brian Candler
On Thu, Apr 01, 2010 at 10:21:35AM +0100, Andy Smith wrote:
> Update on this problem,
> seems the only issue I had was that the telnet method of verifying
> IMAP authentication that works on Courier just doesnt work with
> Dovecot.

What did you use? What did you see in response? Correct syntax is simply

a login username password


Re: [Dovecot] Sieve scripts

2010-04-01 Thread Jerry
On Thu, 1 Apr 2010 16:17:23 +0100, Nick Lunt
 articulated:

> Hi 
> 
> I have a simple sieve script to discard email with a certain string in
> the subject.
> I now need to beef this up a bit with the following:
> 
> if header :contains "subject" "A" and "B" and not "C"
>   discard
> if header :contains "subject" "A" and "D" and not "C"
>   discard
> else
>   pass
> 
> 
> Maybe my google skills are failing but I can't find much info on
> creating sieve scripts.
> Can anyone point me in the right direction to achieve this please ?

((untested))

require ["fileinto", "reject"];

if allof (header :contains "Subject" ["A", "B"],
  not header :contains  "Subject" "C")
{discard; stop;}

elsif allof (header :contains "Subject" ["A", "D"],
 not header :contains "Subject" "C")
{discard; stop;}

else {keep;}

-- 
Jerry
dovecot.u...@seibercom.net

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the Reply-To header.
__

You know you're a little fat if you have stretch marks on your car.

Cyrus, Chicago Reader 1/22/82


[Dovecot] dovecot-1.2-sieve sending vacation replies regardless of recipient (patch)

2010-04-01 Thread Mark Washenberger
I want a way to send VAR messages without having to specify up front all of the 
addresses for which such VARs should be sent. 

I realize this goes against rfc 3834, but it seemed reasonable to add a tag to 
the vacation command to skip the [to, cc, bcc, ...] recipients check. The patch 
I made is attached. The new usage with this patch is:

vacation [":days" number] [":subject" string]
 [":x_any_address"]
 [":from" string] [":addresses" string-list]
 [":mime"] [":handle" string] 

What do you think of this patch? Is there a better way to accomplish the same 
thing without writing a patch? Is there a better way to write this patch to 
make it a cleaner feature or easier to maintain? Could this ever be part of the 
mainline?


Mark Washenberger
Rackspace Hosting
Software Developer, Email & Apps
mark.washenber...@rackspace.comdiff -r 0e89d5a7e00b src/lib-sieve/plugins/vacation/cmd-vacation.c
--- a/src/lib-sieve/plugins/vacation/cmd-vacation.c	Sun Mar 28 18:16:21 2010 +0200
+++ b/src/lib-sieve/plugins/vacation/cmd-vacation.c	Wed Mar 31 21:04:20 2010 +
@@ -38,6 +38,7 @@
 static const struct sieve_argument_def vacation_subject_tag;
 static const struct sieve_argument_def vacation_from_tag;
 static const struct sieve_argument_def vacation_addresses_tag;
+static const struct sieve_argument_def vacation_x_any_address;
 static const struct sieve_argument_def vacation_mime_tag;
 static const struct sieve_argument_def vacation_handle_tag;
 
@@ -47,6 +48,7 @@
  * Syntax: 
  *vacation [":days" number] [":subject" string]
  * [":from" string] [":addresses" string-list]
+ * [":x_any_address"]
  * [":mime"] [":handle" string] 
  */
 
@@ -86,6 +88,9 @@
 static bool cmd_vacation_validate_stringlist_tag
 	(struct sieve_validator *valdtr, struct sieve_ast_argument **arg, 
 		struct sieve_command *cmd);
+static bool cmd_vacation_validate_x_any_address_tag
+	(struct sieve_validator *valdtr, struct sieve_ast_argument **arg, 
+		struct sieve_command *cmd);
 static bool cmd_vacation_validate_mime_tag
 	(struct sieve_validator *valdtr, struct sieve_ast_argument **arg, 
 		struct sieve_command *cmd);
@@ -120,6 +125,13 @@
 	NULL, NULL, NULL 
 };
 
+static const struct sieve_argument_def vacation_x_any_address_tag = { 
+	"x_any_address",	
+	NULL, 
+	cmd_vacation_validate_x_any_address_tag,
+	NULL, NULL, NULL
+};
+
 static const struct sieve_argument_def vacation_mime_tag = { 
 	"mime",	
 	NULL, 
@@ -142,6 +154,7 @@
 	OPT_SUBJECT,
 	OPT_FROM,
 	OPT_ADDRESSES,
+	OPT_X_ANY_ADDRESS,
 	OPT_MIME
 };
 
@@ -205,6 +218,7 @@
 	sieve_number_t days;
 	const char *subject;
 	const char *handle;
+	bool x_any_address;
 	bool mime;
 	const char *from;
 	const char *from_normalized;	
@@ -219,6 +233,7 @@
 	string_t *from;
 	string_t *subject;
 	
+	bool x_any_address;
 	bool mime;
 	
 	string_t *handle;
@@ -341,6 +356,21 @@
 	return TRUE;
 }
 
+static bool cmd_vacation_validate_x_any_address_tag
+(struct sieve_validator *valdtr ATTR_UNUSED, struct sieve_ast_argument **arg, 
+	struct sieve_command *cmd)
+{
+	struct cmd_vacation_context_data *ctx_data = 
+		(struct cmd_vacation_context_data *) cmd->data; 
+
+	ctx_data->x_any_address = TRUE;
+
+	/* Skip tag */
+	*arg = sieve_ast_argument_next(*arg);
+	
+	return TRUE;
+}
+
 static bool cmd_vacation_validate_mime_tag
 (struct sieve_validator *valdtr ATTR_UNUSED, struct sieve_ast_argument **arg, 
 	struct sieve_command *cmd)
@@ -373,6 +403,8 @@
 	sieve_validator_register_tag
 		(valdtr, cmd_reg, ext, &vacation_addresses_tag, OPT_ADDRESSES); 	
 	sieve_validator_register_tag
+		(valdtr, cmd_reg, ext, &vacation_x_any_address_tag, OPT_X_ANY_ADDRESS); 
+	sieve_validator_register_tag
 		(valdtr, cmd_reg, ext, &vacation_mime_tag, OPT_MIME); 	
 	sieve_validator_register_tag
 		(valdtr, cmd_reg, ext, &vacation_handle_tag, 0); 	
@@ -520,6 +552,9 @@
 if ( !sieve_opr_stringlist_dump(denv, address, "addresses") )
 	return FALSE;
 break;
+			case OPT_X_ANY_ADDRESS:
+sieve_code_dumpf(denv, "x_any_address");	
+break;
 			case OPT_MIME:
 sieve_code_dumpf(denv, "mime");	
 break;
@@ -549,6 +584,7 @@
 	pool_t pool;
 	int opt_code = 1;
 	sieve_number_t days = 7;
+	bool x_any_address = FALSE;
 	bool mime = FALSE;
 	struct sieve_coded_stringlist *addresses = NULL;
 	string_t *reason, *subject = NULL, *from = NULL, *handle = NULL; 
@@ -609,6 +645,9 @@
 	return SIEVE_EXEC_BIN_CORRUPT;
 }
 break;
+			case OPT_X_ANY_ADDRESS:
+x_any_address = TRUE;
+break;
 			case OPT_MIME:
 mime = TRUE;
 break;
@@ -659,6 +698,7 @@
 	act->reason = p_strdup(pool, str_c(reason));
 	act->handle = p_strdup(pool, str_c(handle));
 	act->days = days;
+	act->x_any_address = x_any_address;
 	act->mime = mime;
 	if ( subject != NULL )
 		act->subject = p_strdup(pool, str_c(subject));
@@ -1114,7 +1154,7 @@
 		hdsp++;
 	}	
 
-	if ( *hdsp == NULL ) {
+	if ( *hdsp == NULL && !ctx->x_any_address ) {
 		/* No, bail out */
 		sieve_re

[Dovecot] Sieve scripts

2010-04-01 Thread Nick Lunt
Hi 

I have a simple sieve script to discard email with a certain string in
the subject.
I now need to beef this up a bit with the following:

if header :contains "subject" "A" and "B" and not "C"
discard
if header :contains "subject" "A" and "D" and not "C"
discard
else
pass


Maybe my google skills are failing but I can't find much info on
creating sieve scripts.
Can anyone point me in the right direction to achieve this please ?

Cheers
Nick .

 

______ Information from ESET NOD32 Antivirus, version of virus
signature database 4992 (20100401) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 


Re: [Dovecot] Dovecot+LDAP issues

2010-04-01 Thread Brian Candler
On Wed, Mar 31, 2010 at 02:59:28PM +0100, Daniel Gomes wrote:
> Unfortunately, I seemed to have run into a big problem on an occasion
> when dovecot was unable to connect my first server (gold) and hence went
> to the second one (extra).

I set up a simple test by configuring

hosts = 10.1.1.1 x.x.x.x

where x.x.x.x is the real ldap server, and 10.1.1.1 is a non-existent host,
and then restarted dovecot.

It took dovecot a minute or two to timeout connecting to the first one
(during which time an incoming POP3 connection just waited), and then it
connected to the second one and from then on authenticated happily.

This is dovecot-1.2.11 under FreeBSD 7.2

So I would suspect that your second LDAP server really is behaving
differently.

Actually I forgot the obvious test: just put a single entry in your
dovecot-ldap.conf, firstly hosts = gold and secondly hosts = extra,
restarting dovecot after each change of course. Then see how the
authentication goes. If it works consistently with one and fails
consistently with the other, then clearly it's not an issue with failover.

Regards,

Brian.


Re: [Dovecot] Mbox limit the size

2010-04-01 Thread Jakob Curdes

Karthick G schrieb:

Hi,
I want to set size limit for the inbox of all users in my mail server. 
Please send me the steps to be followed or how to configure dovecot to 
enable limiting the inbox size. Thanks in advance.

see http://wiki.dovecot.org/Quota 

HTH,
Jakob Curdes



Re: [Dovecot] 2.0.beta3 imapd running hot

2010-04-01 Thread Renaud Allard
On 29/03/2010 23:44, Scott Ellis wrote:
> 
> Your backtrace looks exactly like what I see on 2.0Beta4 on NetBSD, and I
> observed the same thing with respect to imap_zlib.  I just can't find the
> smoking gun that links the process behavior with the use of imap_zlib. :-/
> 
> At least I'm not the only one seeing the issue though!
> 

I see exactly the same issue with imap_zlib on OpenBSD 4.6 with dovecot
2.0 aefa279e2c70. It stops as soon as imap_zlib is deactivated.



smime.p7s
Description: S/MIME Cryptographic Signature


[Dovecot] Mbox limit the size

2010-04-01 Thread Karthick G

Hi,
I want to set size limit for the inbox of all users in my mail server. 
Please send me the steps to be followed or how to configure dovecot to 
enable limiting the inbox size. Thanks in advance.

--
*Regards,
Karthick.G
*


Re: [Dovecot] New install authentication probs (Solved)

2010-04-01 Thread Andy Smith

Update on this problem,
seems the only issue I had was that the telnet method of verifying  
IMAP authentication that works on Courier just doesnt work with  
Dovecot. I tried connected to Dovecot with an IMAP client (IMP  
webmail) and I get a load of info logged about authenitaction. Duno  
why I cant test via telnet but anyway, now I have fixed my config  
probs and have a working Dovecot server,


thanks Andy.


Re: [Dovecot] Dovecot+LDAP issues

2010-04-01 Thread Brian Candler
On Wed, Mar 31, 2010 at 02:59:28PM +0100, Daniel Gomes wrote:
> I am having some problems with a LDAP passdb authentication on Dovecot.
> Before I forget, the specs: it's a Ubuntu 7.10 server running Dovecot
> 1.0.5 connecting to 2 different machines running LDAP servers: gold with
> OpenLDAP 2.4.19 and extra with OpenLDAP 2.4.9 (extra is a replication
> slave of gold).

If you can replicate this problem on a test IMAP box pointing to the same
two LDAP servers, it might be worth checking whether dovecot-1.2.11 has the
same problem.  At least, there are more people on this list who would be
able to replicate it using current code.

Also, you could try swapping master and slave around in the
dovecot-ldap.conf (i.e.  try extra first, then gold). You state that the two
LDAP databases are clones, but they are running different versions of
openldap, so may behave differently.

Regards,

Brian.

P.S. Unrelated, but I hope you're aware that Ubuntu 7.10 went out of support
on Apr 18th last year?  https://wiki.ubuntu.com/Releases