[Dovecot] Question about IMAP IDLE (and Palm Pre)

2009-10-19 Thread Ingo Thierack

Hello,

i try to understand, how it works (IDLE).
Try to get it successfully work with my new Palm Pre ;-)
which looks like to have a lot issues wir imap... so i'll blame not dovecot
for the issues.

Sent a mail, from googlemail.
processed by dovecot ad 12:11.

what me now confusing, is, that there in the out-log is nothing visible,
I expected, to see there was sent an notification, there was a new mail.
Do i miss something?

After arounde 15 minutes the Palm sent a "DONE" and reconnect.
then the messages was received.

Regards
Ingo

email come in
2009-10-19 12:11:27 | dovecot:|  deliver(...@ghostdive.org): 
sieve: 
msgid=: 
stored mail into mailbox 'INBOX'



outfile-log

* OK [RAWLOG TIMESTAMP] 2009-10-19 12:09:33
<<<~~A4 OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID 
ENABLE SORT THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT
IDLE CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE 
QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH] Logged in

>>>
<<<* CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE 
SORT THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT IDLE CH
ILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC 
ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH

~~A5 OK Capability completed.
>>>
<<<* FLAGS (\Answered \Flagged \Deleted \Seen \Draft NonJunk)
* OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft NonJunk 
\*)] Flags permitted.

* 42 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1252956599] UIDs valid
* OK [UIDNEXT 156] Predicted next UID
* OK [HIGHESTMODSEQ 132] Highest
~~A6 OK [READ-WRITE] Select completed.
>>>
<<<* SEARCH 124 125 126 127 128 129 130 131 132 133 134 136 137 138 139 
140 141 142 144 145 146 147 148 149 150 155

~~A7 OK Search completed (0.000 secs).
>>>
<<<* SEARCH
~~A8 OK Search completed (0.000 secs).
>>>
<<<* SEARCH
~~A9 OK Search completed (0.000 secs).
>>>
<<<* SEARCH
~~A10 OK Search completed (0.000 secs).
>>>
<<<* SEARCH 155
~~A11 OK Search completed (0.000 secs).
>>>
<<<+ idling
>>>
* OK [RAWLOG TIMESTAMP] 2009-10-19 12:14:36
<<<* OK Still here
>>>
* OK [RAWLOG TIMESTAMP] 2009-10-19 12:19:36
<<<* OK Still here
>>>

in-log

<<<~~A5 capability
>>>
<<<~~A6 select "Inbox"
>>>
<<<~~A7 UID SEARCH ALL UID 124:*
>>>
<<<~~A8 uid search unseen UID 124:*
>>>
<<<~~A9 uid search answered UID 124:*
>>>
<<<~~A10 uid search flagged UID 124:*
>>>
<<<~~A11 uid search deleted UID 124:*
>>>
<<<~~A12 IDLE
>>>
<<>>


[Dovecot] NFS random redirects

2009-10-19 Thread Thomas Hummel
Hello,

Dovecot documentation states that the "random redirects to multiple servers"
NFS solution is to be avoided and I'm investigation the actual risks of it and
a way to put it to test.

I'm running dovecot-1.2.6 with Maildir (indexes, mailboxes and control files
are all on NFS) and I'm using procmail instead of deliver as the LDA.

  1. Documentation says : "Dovecot locks the maildir while doing modifications
 to it or while looking for new messages in it" and then mention the
 "dovecot-uidlist.lock" dotlock file.

  a) if that file fcntl'ed in addition (i.e. dotlocked + fcntled or just 
dotlocked) ?

  b) is that file THE way to lock the Maildir mentionned above or is it
just something else used only for updating that particular file (i.e. is
Maildir locked in some way + dovecot-uidlist.lock created or just
dovecot-uidlist.lock created) ?

  2. Documentation says : "NFS caching is a big problem when multiple computers
 are accessing the same mailbox simultaneously"

 I guess it's because of the dotlocks files and not fcntl locking ? Is
 there anything else than dovecot-uidlist which is dotlocked ? If yes, is it
 dotlocked only or dotlocked and fcntled ?

  3. Documentation says : "Dovecot v1.1 flushes NFS caches when needed if you 
set mail_nfs_storage=yes"

 How can a program flush the NFS caches ? By which (system) call ?

  4. Documentation says : "Besides the NFS cache problems described above,
 mailbox contents can't be cached as well in the memory either."

Is it about in-memory indexes or part of indexes loaded into memory ?

  5. How can I torture-test concurrent access to the same mailbox through 2
 dovecot servers ? I don't see imaptest.c anymore on 
http://dovecot.org/tools
 but I see 2 nfs_test ? Is there some command line options I should use ?

  6. when and why can a random redirect to multiple server can cause mailbox
 corruption ? On flags only or on content as well ?

Thanks

-- 
Thomas Hummel   | Institut Pasteur
 | Pôle informatique - systèmes et réseau


[Dovecot] Can't use string ("0") as a HASH ref while "strict refs" in use at /usr/local/sbin/courier-dovecot-migrate.pl line 300.

2009-10-19 Thread Rodolfo González González
Hello,

I need to migrate from courier-imap to dovecot. I'm trying to use
courier-dovecot-migrate.pl to migrate the users' maildirs but I'm
getting these messages:

---
# courier-dovecot-migrate.pl --to-dovecot --recursive mydomain.com
Testing conversion to Dovecot format
Finding maildirs under mydomain.com
mydomain.com/contact/./Maildir: No imap/pop3 uidlist files
mydomain.com/someone/./Maildir/courierpop3dsizelist: Broken header: /1 9

Can't use string ("0") as a HASH ref while "strict refs" in use at
/usr/local/sbin/courier-dovecot-migrate.pl line 300.
---

The courierpop3dsizelist files have contents like this one:

---
/1 9
1181869523.M278844P24357V080CI006E803B_0.email,S=1216:2, 1241 8
---

and it seems that the script is failing with all the maildirs with
courierpop3dsizelist. I use courier-imap 4.6.0, access using pop3 causes
no problems.

Any hint on what's wrong is appreciated, thanks.

Salut,
Rodolfo.
<>

[Dovecot] simple steps with sieve

2009-10-19 Thread Gavin Hamill
Today is my first day with sieve, so be gentle :) I'm trying to set up a
pretty webmail interface to our Dovecot 1.2.4 server using roundcube.
The managesieve config + roundcube 'managesieve' plugin work fine, and
I'm able to use roundcube's UI to generate .dovecot.sieve files.

We use winbind + LDAP lookups to do some exotic mail rewriting...
ultimately user.n...@domain.com gets rewritten to 'ar-c...@localhost',
and in /home/AD/ar-cloh/.dovecot.sieve there is only this:

require ["vacation"];
# rule:[gdh_test]
if anyof (header :contains "Subject" "test")
{
vacation "test away";
}

When I send an email to the user, I see this in the mail.log

Oct 19 15:39:43 ar-smtp-1 dovecot: deliver(ar-cloh): sieve:
msgid=<1255963176.14420.31.ca...@gdh-work>: discarding vacation response
for message implicitly delivered to 

I don't understand; sending a vacation for implicitly-delivered messages
sounds exactly like what I want - is there any way to say 'do this
anyway' ?

gdh




Re: [Dovecot] Detect client application

2009-10-19 Thread Thu NGUYEN
Actually, there is an IMAP proxy (running dovecot) between the real
mailserver and mobile device.
-- 
Regards,
Thu NGUYEN

> I wonder if p0f would help at all, guess it depends what kind/if any
> proxy exists between the mobile device and the server
>
> Quoting Thu NGUYEN :
>
>> Yah, thanks!
>>
>> I see HTTP can detect the OS but seems IMAP is new. So there is no way
>> actually
>>
>> --
>> Regards,
>> Thu NGUYEN
>>
>>> On Fri, 2009-10-16 at 23:17 +0700, Thu NGUYEN wrote:
 Do you have any way to detect the client which is connecting to our
 IMAP
 server?
>>>
>>> Not in any reliable way.
>>>
>>
>>
>>
>
>
>
>




Re: [Dovecot] simple steps with sieve

2009-10-19 Thread Pascal Volk
On 10/19/2009 05:03 PM Gavin Hamill wrote:
> Today is my first day with sieve, so be gentle :) I'm trying to set up a
> pretty webmail interface to our Dovecot 1.2.4 server using roundcube.
> The managesieve config + roundcube 'managesieve' plugin work fine, and
> I'm able to use roundcube's UI to generate .dovecot.sieve files.
> 
> We use winbind + LDAP lookups to do some exotic mail rewriting...
> ultimately user.n...@domain.com gets rewritten to 'ar-c...@localhost',
> and in /home/AD/ar-cloh/.dovecot.sieve there is only this:
> 
> require ["vacation"];
> # rule:[gdh_test]
> if anyof (header :contains "Subject" "test")
> {
> vacation "test away";
> }
> 
> When I send an email to the user, I see this in the mail.log
> 
> Oct 19 15:39:43 ar-smtp-1 dovecot: deliver(ar-cloh): sieve:
> msgid=<1255963176.14420.31.ca...@gdh-work>: discarding vacation response
> for message implicitly delivered to 
> 
> I don't understand; sending a vacation for implicitly-delivered messages
> sounds exactly like what I want - is there any way to say 'do this
> anyway' ?
> 
> gdh
> 

You are missing the 'addresses:' list in your vacation script. See
http://wiki.dovecot.org/LDA/Sieve#Vacation_auto-reply-1 for more details.


Regards,
Pascal
-- 
The trapper recommends today: fabaceae.0929...@localdomain.org


Re: [Dovecot] simple steps with sieve

2009-10-19 Thread Gavin Hamill
On Mon, 2009-10-19 at 17:21 +0200, Pascal Volk wrote:

> You are missing the 'addresses:' list in your vacation script. See
> http://wiki.dovecot.org/LDA/Sieve#Vacation_auto-reply-1 for more details.

Interesting; thank you.

I can confirm that it works fine when I specify the exact address -
however is it possible to use a wildcard, and further, assume the
wildcard implicitly? 

I'm just trying to reduce the migration pain on behalf of the users
whose current experience with Outlook is Tools -> Out of Office ->
Enable.

Cheers,
Gavin.




Re: [Dovecot] simple steps with sieve

2009-10-19 Thread Pascal Volk
On 10/19/2009 05:32 PM Gavin Hamill wrote:
> I can confirm that it works fine when I specify the exact address -
> however is it possible to use a wildcard, and further, assume the
> wildcard implicitly? 

The :addresses argument accepts only additional mail addresses that a
user might have. (http://tools.ietf.org/html/rfc5230#section-4.5)
Which of your users has the address *...@*? ;-)
I believe there is no wildcard support. In my opinion wildcard addresses
would also make no sense.

> I'm just trying to reduce the migration pain on behalf of the users
> whose current experience with Outlook is Tools -> Out of Office ->
> Enable.

Hm, I can't find Outlook in the repos. :-D


Regards,
Pascal
-- 
The trapper recommends today: fabaceae.0929...@localdomain.org


Re: [Dovecot] simple steps with sieve

2009-10-19 Thread Seth Mattinen
Gavin Hamill wrote:
> On Mon, 2009-10-19 at 17:21 +0200, Pascal Volk wrote:
> 
>> You are missing the 'addresses:' list in your vacation script. See
>> http://wiki.dovecot.org/LDA/Sieve#Vacation_auto-reply-1 for more details.
> 
> Interesting; thank you.
> 
> I can confirm that it works fine when I specify the exact address -
> however is it possible to use a wildcard, and further, assume the
> wildcard implicitly? 


It's not supposed to blindly autorespond to everything that crosses its
path, i.e. mailing lists not directly addressed to you. Thus you have to
specify the list of addresses.

~Seth


Re: [Dovecot] NFS random redirects

2009-10-19 Thread Timo Sirainen

On Oct 19, 2009, at 9:35 AM, Thomas Hummel wrote:

Dovecot documentation states that the "random redirects to multiple  
servers"
NFS solution is to be avoided and I'm investigation the actual risks  
of it and

a way to put it to test.


If you do it, you'll most likely see some random index related errors.

 1. Documentation says : "Dovecot locks the maildir while doing  
modifications
to it or while looking for new messages in it" and then mention  
the

"dovecot-uidlist.lock" dotlock file.

 a) if that file fcntl'ed in addition (i.e. dotlocked + fcntled  
or just dotlocked) ?


No fcntl.

 b) is that file THE way to lock the Maildir mentionned above or  
is it
   just something else used only for updating that particular  
file (i.e. is
   Maildir locked in some way + dovecot-uidlist.lock created or  
just

   dovecot-uidlist.lock created) ?


Maildir is then locked for Dovecot against doing any modifications.  
Procmail will ignore it, and that's fine.


 2. Documentation says : "NFS caching is a big problem when multiple  
computers

are accessing the same mailbox simultaneously"

I guess it's because of the dotlocks files and not fcntl locking ?


No, it's because of NFS caching.. Like if Dovecot writes to  
dovecot.index.log first and then dovecot.index, it expects that it's  
not possible that a later read sees the dovecot.index change, but not  
the dovecot.index.log change. But because of NFS caching this is  
possible, and "corrupted index files" errors will occur. There are  
many other similar issues.


 3. Documentation says : "Dovecot v1.1 flushes NFS caches when  
needed if you set mail_nfs_storage=yes"


How can a program flush the NFS caches ? By which (system) call ?


That's the main problem. There is no reliable way to flush NFS  
caches.. So I've added some highly OS-specific code that works most of  
the time, but not perfectly. It works best with Linux.


 4. Documentation says : "Besides the NFS cache problems described  
above,

mailbox contents can't be cached as well in the memory either."

   Is it about in-memory indexes or part of indexes loaded into  
memory ?


I was thinking about OS's filesystem caching in general, so all mail  
files and such.


 5. How can I torture-test concurrent access to the same mailbox  
through 2

dovecot servers ? I don't see imaptest.c anymore on http://dovecot.org/tools
but I see 2 nfs_test ? Is there some command line options I  
should use ?


imaptest exists now in http://imapwiki.org/ImapTest

 6. when and why can a random redirect to multiple server can cause  
mailbox

corruption ?


Pretty much randomly..


On flags only or on content as well ?


Actual mail content should be safe. Unless you just happen to get such  
a cache file corruption that Dovecot doesn't notice it and sends some  
broken headers to IMAP client.


The long term fix for this is 
http://www.dovecot.org/list/dovecot/2009-August/041983.html


Re: [Dovecot] Can't use string ("0") as a HASH ref while "strict refs" in use at /usr/local/sbin/courier-dovecot-migrate.pl line 300.

2009-10-19 Thread Timo Sirainen
On Mon, 2009-10-19 at 09:48 -0500, Rodolfo González González wrote:
> mydomain.com/someone/./Maildir/courierpop3dsizelist: Broken header: /1 9

I guess this is the "1" version that I hadn't seen before.

> Can't use string ("0") as a HASH ref while "strict refs" in use at
> /usr/local/sbin/courier-dovecot-migrate.pl line 300.

And error handling didn't work too well either.

Fixed both in newer version of
http://dovecot.org/tools/courier-dovecot-migrate.pl



signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] deliver and stale NFS file handles

2009-10-19 Thread Timo Sirainen
On Sat, 2009-10-17 at 10:52 +0200, Christoph Berkemeier wrote:
> > Does it complain about stale NFS handle?
> 
> Yes, it does complain: "tail: (null): Stale NFS file handle"
> I tried the same on /tmp, which is based on UFS, and it worked. Do you
> think this is a new FreeBSD bug? And if so, are you going to report it?

Well, I guess it's more like a missing feature that Solaris and Linux
has.. I guess I'll have to change Dovecot to delete the temp file only
after it's done with it. The problem with that is that if it crashes
before that it leaves those temp files lying around.



signature.asc
Description: This is a digitally signed message part


[Dovecot] Need a little shadow to MySQL conversion help

2009-10-19 Thread Marc Perkel

Excuse me for being stupid and confused.

I'm trying to convert my dovecot install from passwd-file to mysql. I 
have a single table called "users" that has 3 fields, user_name, 
domain_name and password. The data came from passwd/shadow files so it 
uses the same password encryption as the shadow files do. The directory 
where the email is stored is calculated elsewhere and not stored in the 
database. The UID and GID are both mail for all virtual users. The user 
logs in passing the full email address and the password.


So - what would be the config for using MySQL? Do I even need a userdb? 
If so - what would it be?


Thanks in advance.



Re: [Dovecot] Can't use string ("0") as a HASH ref while "strict refs" in use at /usr/local/sbin/courier-dovecot-migrate.pl line 300.

2009-10-19 Thread Rodolfo González González
Timo Sirainen escribió:
> On Mon, 2009-10-19 at 09:48 -0500, Rodolfo González González wrote:
>> mydomain.com/someone/./Maildir/courierpop3dsizelist: Broken header: /1 9
> 
> I guess this is the "1" version that I hadn't seen before.
> 
>> Can't use string ("0") as a HASH ref while "strict refs" in use at
>> /usr/local/sbin/courier-dovecot-migrate.pl line 300.
> 
> And error handling didn't work too well either.
> 
> Fixed both in newer version of
> http://dovecot.org/tools/courier-dovecot-migrate.pl


Thanks for the fast answer. I tried it and got:

---
Bareword "filename_map" not allowed while "strict subs" in use at
/usr/local/sbin/courier-dovecot-migrate.pl line 185.
Execution of /usr/local/sbin/courier-dovecot-migrate.pl aborted due to
compilation errors.
---

Using: This is perl, v5.10.0 built for i686-linux

Salut.



Re: [Dovecot] Can't use string ("0") as a HASH ref while "strict refs" in use at /usr/local/sbin/courier-dovecot-migrate.pl line 300.

2009-10-19 Thread Timo Sirainen
On Mon, 2009-10-19 at 12:32 -0500, Rodolfo González González wrote:
> > Fixed both in newer version of
> > http://dovecot.org/tools/courier-dovecot-migrate.pl
> 
> 
> Thanks for the fast answer. I tried it and got:
> 
> ---
> Bareword "filename_map" not allowed while "strict subs" in use at
> /usr/local/sbin/courier-dovecot-migrate.pl line 185.

Sorry, I was (and am) too lazy to actually test it :) How about now?


signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] simple steps with sieve

2009-10-19 Thread Gavin Hamill
On Mon, 2009-10-19 at 17:59 +0200, Pascal Volk wrote:

> The :addresses argument accepts only additional mail addresses that a
> user might have. (http://tools.ietf.org/html/rfc5230#section-4.5)
> Which of your users has the address *...@*? ;-)
> I believe there is no wildcard support. In my opinion wildcard addresses
> would also make no sense.

OK now I understand...

Postfix receives mails in firstname.lastn...@domain.com format, and does
an LDAP lookup to Active Directory to determine the 'flastname'
login-name format (for delivery to /home/AD/flastname/Maildir/).

It would then seem that we'd need a method to do a reverse lookup at
Dovecot's 'deliver' time and determine the valid To: addresses from
LDAP. Does this sound vaguely possible without major engineering work?

> > I'm just trying to reduce the migration pain on behalf of the users
> > whose current experience with Outlook is Tools -> Out of Office ->
> > Enable.
> 
> Hm, I can't find Outlook in the repos. :-D

Ha :) Work with me here; I'm trying to pull people /away/ from the beast
so the experience needs to be as drool-proof as possible as people leave
their comfort zone :)

gdh




Re: [Dovecot] Expire plugin in chkpw-wrapper.sh script

2009-10-19 Thread Jose Luis Marin Perez

Dear Timo 

 Finally and thanks to you, I could install Dovecot 1.2.6 with support for 
userdb checkpassword

How can I configure the script userdb.sh?

Thanks

Jose Luis

dovecot -n

# 1.2.6: /usr/local/etc/dovecot.conf
# OS: Linux 2.6.9-67.0.15.plus.c4smp i686 CentOS release 4.6 (Final)
log_path: /var/log/dovecot.log
listen: *:10143
ssl_listen: *:10943
disable_plaintext_auth: no
login_dir: /usr/local/var/run/dovecot/login
login_executable: /usr/local/libexec/dovecot/imap-login
first_valid_uid: 89
last_valid_uid: 89
first_valid_gid: 89
last_valid_gid: 89
mail_uid: 89
mail_gid: 89
mail_location: maildir:~/Maildir
mail_debug: yes
mail_plugins: quota imap_quota expire mail_log autocreate
namespace:
  type: private
  separator: .
  prefix: INBOX.
  inbox: yes
  list: yes
  subscriptions: yes
lda:
  postmaster_address: postmas...@example.com
auth default:
  debug: yes
  passdb:
driver: checkpassword
args: /usr/vpopmail/bin/vchkpw /usr/local/bin/vchkpw-wrapper.sh
  userdb:
driver: prefetch
  userdb:
driver: checkpassword
args: /usr/local/bin/userdb.sh
  socket:
type: listen
master:
  path: /usr/local/var/run/dovecot/auth-master
  mode: 384
  user: vpopmail
  group: vchkpw
plugin:
  quota: maildir
  quota_rule: ?:storage=0
  quota_rule2: Trash:ignore
  mail_log_events: delete undelete expunge copy mailbox_delete
  mail_log_group_events:
  mail_log_fields: uid box msgid size
dict:
  expire: mysql:/usr/local/etc/dovecot-dict-expire.conf

> Subject: Re: [Dovecot] Expire plugin in chkpw-wrapper.sh script
> From: t...@iki.fi
> To: jolumape...@hotmail.com
> CC: dovecot@dovecot.org
> Date: Thu, 15 Oct 2009 21:21:02 -0400
> 
> On Thu, 2009-10-15 at 14:32 -0500, Jose Luis Marin Perez wrote:
> > I'm trying to extend the configuration of vchkpw-wrapper.sh script by 
> > adding the expire plugin as follows:
> .. 
> > /usr/local/sbin/dovecot --exec-mail ext 
> > /usr/local/libexec/dovecot/expire-tool --test
> 
> The problem is that vchkpw-wrapper.sh is now run only when user is
> authenticating. expire-tool doesn't authenticate, it only does userdb
> lookup. So you'll need to have the script run for userdb lookups too:
> 
> passdb checkpassword {
>   ..
> }
> userdb prefetch {
> }
> userdb checkpassword {
>   args = /usr/local/bin/userdb.sh
> }
> 
> Then create /usr/local/bin/userdb.sh which does more or less what the
> vchkpw-wrapper.sh does, except since it doesn't call vchkpw itself,
> it'll need to get the username from $USER instead of $VPOPUSER.
> 
> http://wiki.dovecot.org/AuthDatabase/CheckPassword#Checkpassword_as_userdb 
> explains this extension.
  
_
Invite your mail contacts to join your friends list with Windows Live Spaces. 
It's easy!
http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us

[Dovecot] Unknown setting: driver

2009-10-19 Thread Rodolfo González González
Hi,

the conversion from courier was done without problems, but now I have a
problem with my auth config. I followed the sql example included in the
latest dovecot source, and put

driver=mysql

in dovecot.conf (outside any section), and now I get:

---
Error: Error in configuration file /usr/local/etc/dovecot.conf line 50:
Unknown setting: driver
Fatal: Invalid configuration in /usr/local/etc/dovecot.conf
Starting DovecotError: Error in configuration file
/usr/local/etc/dovecot.conf line 50: Unknown setting: driver
Fatal: Invalid configuration in /usr/local/etc/dovecot.conf
---

So I'm lost... what's wrong? if I followed the example :o

Then, another question: I had to go back to courier so my users still
can work, but I already created the files using the migration script: do
I need to rerun the migration script? or what do I need to do when I
manage to fix the error above and run dovecot?

Thanks.


Re: [Dovecot] Unknown setting: driver

2009-10-19 Thread Anton Dollmaier

Hi,

> I followed the sql example included in the

latest dovecot source, and put

driver=mysql

in dovecot.conf (outside any section)


copy the sql-settings to an extra file (e.g. "dovecot-sql.conf") and 
reference this file as passdb and/or userdb:


http://wiki.dovecot.org/Authentication/MultipleDatabases
http://wiki.dovecot.org/UserDatabase/Prefetch


[Dovecot] testing needed

2009-10-19 Thread Timo Sirainen
Can someone find an OS where the attached program doesn't work? It
should print "success". So far tested for success: Linux 2.6, Solaris
10, FreeBSD 7.2, OpenBSD 4.2.

/*
   gcc test.c -o test -Wall
*/
#include 
#include 
#include 
#include 
#include 
#include 

#define TEMP_PATH "/tmp/ipctest.1234"

int main(int argc, char *argv[])
{
	int fd, ret;

	if (argv[1] != NULL && strcmp(argv[1], "1") == 0) {
		int fd = 3;

		usleep(50);
		if ((ret = lseek(fd, 0, SEEK_CUR)) != 2) {
			printf("failed: 1. offset=%d\n", ret);
			return 1;
		}
		usleep(50);
		if ((ret = lseek(fd, 0, SEEK_CUR)) != 3) {
			printf("failed: 2. offset=%d\n", ret);
			return 1;
		}
		printf("success\n");
		return 0;
	}

	fd = creat(TEMP_PATH, 0600);
	if (fd != 3) {
		if (fd == -1) perror("open()");
		if (dup2(fd, 3) < 0) perror("dup");
	}
	if (unlink(TEMP_PATH) < 0) perror("unlink()");

	if (write(fd, "foo", 3) < 0) perror("write()");
	lseek(fd, 1, SEEK_SET);
	if (fork() == 0) {
		char *args[] = { NULL, "1", NULL };

		args[0] = argv[0];
		execv(args[0], args);
	} else {
		lseek(fd, 2, SEEK_SET);
		sleep(1);
		lseek(fd, 3, SEEK_SET);
		sleep(1);
	}
	return 0;
}


signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] testing needed

2009-10-19 Thread Anton Dollmaier

Hi,


Can someone find an OS where the attached program doesn't work? It
should print "success". So far tested for success: Linux 2.6, Solaris
10, FreeBSD 7.2, OpenBSD 4.2.


Mac OS X Server 10.4 works (prints "success").


Darwin X91-186.local.lan 8.10.0 Darwin Kernel Version 8.10.0: Wed May 23 
16:50:59 PDT 2007; root:xnu-792.21.3~1/RELEASE_PPC Power Macintosh powerpc





Re: [Dovecot] Unknown setting: driver

2009-10-19 Thread Timo Sirainen
On Mon, 2009-10-19 at 16:37 -0500, Rodolfo González González wrote:
> the conversion from courier was done without problems, but now I have a
> problem with my auth config. I followed the sql example included in the
> latest dovecot source, and put
> 
> driver=mysql
> 
> in dovecot.conf (outside any section), and now I get:

Why did you think about putting the driver to dovecot.conf? Someone else
recently just did the same thing. Is some documentation related to this
written badly?

> Then, another question: I had to go back to courier so my users still
> can work, but I already created the files using the migration script: do
> I need to rerun the migration script? or what do I need to do when I
> manage to fix the error above and run dovecot?

Run the migration script again with --overwrite parameter.


signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] testing needed

2009-10-19 Thread Timo Sirainen
On Mon, 2009-10-19 at 17:55 -0400, Timo Sirainen wrote:
> Can someone find an OS where the attached program doesn't work? It
> should print "success". So far tested for success: Linux 2.6, Solaris
> 10, FreeBSD 7.2, OpenBSD 4.2.

And also: I think (guess) that behavior is required by POSIX, but it
would be nice if someone could verify that. :) The behavior being:
seeking in a fd is affects all processes that have the same fd open.
(Simple IPC, yay.)



signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] testing needed

2009-10-19 Thread Jose Celestino
On Seg, 2009-10-19 at 23:59 +0200, Anton Dollmaier wrote:
> Hi,
> 
> > Can someone find an OS where the attached program doesn't work? It
> > should print "success". So far tested for success: Linux 2.6, Solaris
> > 10, FreeBSD 7.2, OpenBSD 4.2.
> 
> Mac OS X Server 10.4 works (prints "success").
> 
> > Darwin X91-186.local.lan 8.10.0 Darwin Kernel Version 8.10.0: Wed May 23 
> > 16:50:59 PDT 2007; root:xnu-792.21.3~1/RELEASE_PPC Power Macintosh powerpc

Success on Linux 2.4 and Darwin Kernel Version
8.11.0/xnu-792.24.17~1/RELEASE_PPC also.


-- Jose Celestino SAPO.pt::Systems http://www.sapo.pt
- *
Progress (n.): The process through which Usenet has evolved from smart
people in front of dumb terminals to dumb people in front of smart
terminals.


signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] testing needed

2009-10-19 Thread Heiko Schlichting
> Can someone find an OS where the attached program doesn't work? It
> should print "success". So far tested for success: Linux 2.6, Solaris
> 10, FreeBSD 7.2, OpenBSD 4.2.

"success" on IRIX 6.5.30

Heiko

Heiko Schlichting  Freie Universität Berlin
he...@cis.fu-berlin.de Zentraleinrichtung für Datenverarbeitung (ZEDAT)
Telefon +49 30 838-54327   Fabeckstraße 32
Telefax +49 30 838454327   14195 Berlin


pgpfIYQyUoubq.pgp
Description: PGP signature


Re: [Dovecot] testing needed

2009-10-19 Thread Chris Wakelin


Timo Sirainen wrote:
> Can someone find an OS where the attached program doesn't work? It
> should print "success". So far tested for success: Linux 2.6, Solaris
> 10, FreeBSD 7.2, OpenBSD 4.2.
> 
> 

Fine in Solaris 2.8 (32-bit and 64-bit binaries, Sparc).

Chris

-- 
--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+-
Christopher Wakelin,   c.d.wake...@reading.ac.uk
IT Services Centre, The University of Reading,  Tel: +44 (0)118 378 8439
Whiteknights, Reading, RG6 2AF, UK  Fax: +44 (0)118 975 3094


Re: [Dovecot] testing needed

2009-10-19 Thread Bernd Schmelter
Timo Sirainen wrote:
> Can someone find an OS where the attached program doesn't work? It
> should print "success". So far tested for success: Linux 2.6, Solaris
> 10, FreeBSD 7.2, OpenBSD 4.2.

success

on Debian Testing

Linux serv 2.6.30-2-486 #1 Sat Sep 26 00:03:46 UTC 2009 i686 GNU/Linux

Benn



Re: [Dovecot] testing needed

2009-10-19 Thread Patrick Domack

Sucess on freebsd-6.2
Sucess on Linux 2.4.20 sparc64

The most out of date, oddball systems I have logins too.

Quoting Timo Sirainen :


Can someone find an OS where the attached program doesn't work? It
should print "success". So far tested for success: Linux 2.6, Solaris
10, FreeBSD 7.2, OpenBSD 4.2.








Re: [Dovecot] testing needed

2009-10-19 Thread Timo Sirainen

On Oct 19, 2009, at 5:55 PM, Timo Sirainen wrote:


Can someone find an OS where the attached program doesn't work? It
should print "success". So far tested for success: Linux 2.6, Solaris
10, FreeBSD 7.2, OpenBSD 4.2.


I'm still interested in HP-UX, AIX and Cygwin results. Maybe in Cygwin  
it could be broken, but then again I don't really care about Cygwin. I  
anyway already added the code that uses this to v2.0 tree. If for some  
reason it doesn't work somewhere, I could always make it use  
mmap(MAP_SHARED)..




Re: [Dovecot] testing needed

2009-10-19 Thread Jim

On Oct 19, 2009, at 4:55 PM, Timo Sirainen wrote:


Can someone find an OS where the attached program doesn't work?


Mac OS X 10.5.8(Client) - Success




Re: [Dovecot] testing needed

2009-10-19 Thread Proskurin Kirill

Timo Sirainen wrote:

Can someone find an OS where the attached program doesn't work? It
should print "success". So far tested for success: Linux 2.6, Solaris
10, FreeBSD 7.2, OpenBSD 4.2.


FreeBSD-6.3-x86
FreeBSD-7.1-x86
FreeBSD-7.2-amd64
FreeBSD-8.0-RC1-x86

All success

--
Best regards,
Proskurin Kirill