Re: [Dovecot] testing needed

2009-10-20 Thread Geert Hendrickx
On Mon, Oct 19, 2009 at 05:55:20PM -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.



Success on NetBSD 5.0_STABLE on amd64 (64-bit).


Geert



-- 
Geert Hendrickx  -=-  g...@telenet.be  -=-  PGP: 0xC4BB9E9F
This e-mail was composed using 100% recycled spam messages!


Re: [Dovecot] testing needed

2009-10-20 Thread LEVAI Daniel
On Monday 19 October 2009 23.55.20 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 OpenBSD 4.5 and 4.6 and -current.


Daniel

-- 
LÉVAI Dániel
PGP key ID = 0x4AC0A4B1
Key fingerprint = D037 03B9 C12D D338 4412  2D83 1373 917A 4AC0 A4B1


Re: [Dovecot] testing needed (Cygwin)

2009-10-20 Thread Ralf Becker
Success on

CYGWIN_NT-5.1 XX 1.5.25(0.156/4/2) 2008-06-12 19:34 i686 Cygwin


Timo Sirainen schrieb am 19.10.2009 23:55:
> 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.
> 

-- 
__

 Dipl.-Inform. (FH) Ralf Becker Rechenzentrum (r/ft) der FH Trier
 (Network|Mail|Web|Firewall)   University of applied sciences
 Administrator   Schneidershof, D-54293 Trier

   Mail: beck...@fh-trier.deFon: +49 651 8103 499
Web: http://www.fh-trier.de/~beckerrFax: +49 651 8103 214
 PubKey: http://www.fh-trier.de/~beckerr Crypto: GnuPG, S/MIME
__

 Wenn Gott gewollt haette, dass E-Mail in HTML geschrieben wuerden,
 endeten Gebete traditionell mit . (Tom Listen)



smime.p7s
Description: S/MIME Cryptographic Signature


Re: [Dovecot] testing needed (AIX) with "failed: 2. offset=2"

2009-10-20 Thread Ralf Becker
Success on

AIX 5300-08
AIX 5300-06
AIX 5200-06
AIX 5100-00
AIX 4330-11

Failed on

AIX 5300-03 failed: 2. offset=2
AIX 4330-10 failed: 2. offset=2


Timo Sirainen schrieb am 19.10.2009 23:55:
> 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.
> 

-- 
__

 Dipl.-Inform. (FH) Ralf Becker Rechenzentrum (r/ft) der FH Trier
 (Network|Mail|Web|Firewall)   University of applied sciences
 Administrator   Schneidershof, D-54293 Trier

   Mail: beck...@fh-trier.deFon: +49 651 8103 499
Web: http://www.fh-trier.de/~beckerrFax: +49 651 8103 214
 PubKey: http://www.fh-trier.de/~beckerr Crypto: GnuPG, S/MIME
__

 Wenn Gott gewollt haette, dass E-Mail in HTML geschrieben wuerden,
 endeten Gebete traditionell mit . (Tom Listen)



smime.p7s
Description: S/MIME Cryptographic Signature


Re: [Dovecot] testing needed (AIX) with "failed: 2. offset=2"

2009-10-20 Thread Timo Sirainen

That's weird.. Did you run it a couple of times on the failed ones?

On Oct 20, 2009, at 4:31 AM, Ralf Becker wrote:


Success on

AIX 5300-08
AIX 5300-06
AIX 5200-06
AIX 5100-00
AIX 4330-11

Failed on

AIX 5300-03 failed: 2. offset=2
AIX 4330-10 failed: 2. offset=2


Timo Sirainen schrieb am 19.10.2009 23:55:

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.



--
__

Dipl.-Inform. (FH) Ralf Becker Rechenzentrum (r/ft) der FH Trier
(Network|Mail|Web|Firewall)   University of applied sciences
Administrator   Schneidershof, D-54293 Trier

  Mail: beck...@fh-trier.deFon: +49 651 8103 499
   Web: http://www.fh-trier.de/~beckerrFax: +49 651 8103 214
PubKey: http://www.fh-trier.de/~beckerr Crypto: GnuPG, S/MIME
__

Wenn Gott gewollt haette, dass E-Mail in HTML geschrieben wuerden,
endeten Gebete traditionell mit . (Tom Listen)





Re: [Dovecot] NFS random redirects

2009-10-20 Thread Thomas Hummel
On Mon, Oct 19, 2009 at 12:42:08PM -0400, Timo Sirainen wrote:

Thanks for the answers Timo,

I understand random redirect is not a good idea but I'm trying to evaluate the
damage it can do.

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

But are index related errors recoverable (does dovecot notice and fix it
dynamically ?) or will they cause client-side corruption ? 

How bad would that corruption be ? (like fetching wrong message, since index
store nextuid as well ? setting wrong flag ? ...) and how could a client fix it 
?

> caches.. So I've added some highly OS-specific code that works most of  
> the time, but not perfectly. It works best with Linux.

Ouch! I run dovecot on FreeBSD ;-(

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

Thanks. Sorry I didn't find it. Do you have any suggestion to test specifically
nfs corruption chances ?

> 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.

If that happened, with Maildir, the actual content on disk on server wouldn't
be corrupted I guess, so I would that be recoverable on the client ?

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

Thanks.

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


Re: [Dovecot] testing needed

2009-10-20 Thread Markus Schönhaber
Timo Sirainen:

> 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.

On Cygwin 1.7 (the version currently under development) it works:

$ uname -a
CYGWIN_NT-5.1 sauron 1.7.0(0.214/5/3) 2009-10-03 14:33 i686 Cygwin

m...@sauron ~
$ gcc --version
gcc (GCC) 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)
[...]

m...@sauron ~
$ gcc test.c -o test -Wall

m...@sauron ~
$ ./test.exe
success

-- 
Regards
  mks


Re: [Dovecot] testing needed (AIX) with "failed: 2. offset=2"

2009-10-20 Thread Ralf Becker
Testing all again multiple times

System  | Kernel | x out of 100 failed with
| x Bit  | "failed: 2. offset=2"
++
AIX 5300-08 | 64 |   0 (!)
AIX 5300-08 | 32 |  69
AIX 5300-03 | 64 |  81
AIX 5200-06 | 64 |   9
AIX 5100-00 | 32 |   1
AIX 4330-10 | 32 |  59
AIX 4330-11 | 32 |  61

This looks a little bit random, doesn't it?


Ralf

Timo Sirainen schrieb am 20.10.2009 10:36:
> That's weird.. Did you run it a couple of times on the failed ones?
> 
> On Oct 20, 2009, at 4:31 AM, Ralf Becker wrote:
> 
>> Success on
>>
>> AIX 5300-08
>> AIX 5300-06
>> AIX 5200-06
>> AIX 5100-00
>> AIX 4330-11
>>
>> Failed on
>>
>> AIX 5300-03failed: 2. offset=2
>> AIX 4330-10failed: 2. offset=2
>>
>>
>> Timo Sirainen schrieb am 19.10.2009 23:55:
>>> 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.
>>>
>>
>> -- 
>> __
>>
>> Dipl.-Inform. (FH) Ralf Becker Rechenzentrum (r/ft) der FH Trier
>> (Network|Mail|Web|Firewall)   University of applied sciences
>> Administrator   Schneidershof, D-54293 Trier
>>
>>   Mail: beck...@fh-trier.deFon: +49 651 8103 499
>>Web: http://www.fh-trier.de/~beckerrFax: +49 651 8103 214
>> PubKey: http://www.fh-trier.de/~beckerr Crypto: GnuPG, S/MIME
>> __
>>
>> Wenn Gott gewollt haette, dass E-Mail in HTML geschrieben wuerden,
>> endeten Gebete traditionell mit . (Tom Listen)
>>
> 

-- 
__

 Dipl.-Inform. (FH) Ralf Becker Rechenzentrum (r/ft) der FH Trier
 (Network|Mail|Web|Firewall)   University of applied sciences
 Administrator   Schneidershof, D-54293 Trier

   Mail: beck...@fh-trier.deFon: +49 651 8103 499
Web: http://www.fh-trier.de/~beckerrFax: +49 651 8103 214
 PubKey: http://www.fh-trier.de/~beckerr Crypto: GnuPG, S/MIME
__

 Wenn Gott gewollt haette, dass E-Mail in HTML geschrieben wuerden,
 endeten Gebete traditionell mit . (Tom Listen)



smime.p7s
Description: S/MIME Cryptographic Signature


Re: [Dovecot] testing needed

2009-10-20 Thread Cristian Grigoriu

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.




uname -a
HP-UX delta B.11.11 U 9000/800 109434696 unlimited-user license


aCC -c -DHP_UX -v +O2  test.c
Warning 829: "test.c", line 41 # Implicit conversion of string literal 
to 'char *' is deprecated.

   char *args[] = { NULL, "1", NULL };
aCC -o test -I.  -DHP_UX -v +O2 test.o -Wl,+s

./test
success


--
Cristian GRIGORIU


Re: [Dovecot] testing needed

2009-10-20 Thread Alexey Gorbov
Hello

Debian:
$ uname  -a
Linux gaa 2.6.30-2-686 #1 SMP Sat Sep 26 01:16:22 UTC 2009 i686 GNU/Linux
$ gcc -o test -Wall test.c
$ ./test
failed: 2. offset=2


> 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.
> 

-- 
Best regards,
Alexey Gorbov
g...@udmvt.ru


Re: [Dovecot] simple steps with sieve

2009-10-20 Thread Peter Borg
Gavin wrote:
> 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 have exactly the same problem, though with a slightly different setup. 

Ubuntu 8.04 LTS
Dovecot 1.2.6
Sieve 0.1.12
Postfix 2.5.1
OpenExchange 6.12.0.0-5

I'm currently evaluating software for an upgrade to our hosting platform and
postfix/dovecot is the current solution in testing. As this is currently a
test system I'm in a position to seriously mess around with things to try
and find a solution. The solution is not necessarily in dovecot, but may
require changes in postfix config or perhaps use of procmail or some other
delivery mechanism in place of deliver. I can't rely on changes in the
client as we need to be open enough to permit the user to choose the mail
client.

We have multiple domains hosted on the same system. Users are stored in LDAP
to allow use of a single account for multiple access methods and software
solutions. Usernames are in the format u...@domain (effectively the email
address) to provide simplicity for the user and differentiation of different
users with the same names in different domains. 

So we have exactly the same issue - vacation responses appear from
user-dom...@hostservername.

If there's no way around this it's going to mean looking for another
solution, which is a real shame as postfix/dovecot does everything else I
need absolutely perfectly (including shared mailbox folders with
ACL/IMAP_ACL) quickly and cleanly with a minimum of configuration
nightmares, and it's a killer waste of time to have to start evaluation of
other solutions for such a minor flaw.

I've found two workarounds so far; it's possible to pass ORIGINAL_RECIPIENT
to deliver using postfix but this then causes problems with messages to
system aliases; if there's a group alias on the system the response will
apparently come from the group alias and not the individual, this is
regardless of any "address:" value in the sieve script.

Alternatively it's possible to specify "from:" in the sieve script but this
assumes you have a client that's configured to do this. To date, I haven't
found one that does.

So this means either living with the system group alias problem, manual
editing, or a hack involving a script that checks for changed sieve scripts
and updates them with the appropriate "from:" value in the vacation stanza.

I find it really hard to believe that Gavin and I are the only ones to hit
this issue. That said I've probably been hacking at this particular system
too long and am missing something very obvious!

Peter.

-Original Message-
From: dovecot-bounces+dovecot=peter-b@dovecot.org
[mailto:dovecot-bounces+dovecot=peter-b@dovecot.org] On Behalf Of Gavin
Hamill
Sent: 19 October 2009 19:13
To: Dovecot Mailing List
Subject: Re: [Dovecot] simple steps with sieve

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...


> > 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] testing needed

2009-10-20 Thread Axel Luttgens

Le 19 oct. 2009 à 22:55, Timo Sirainen a écrit :


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.




Succeeds here on Mac OS X 10.6.1, with gcc version 4.2.1 (Apple Inc.  
build 5646).






Re: [Dovecot] testing needed

2009-10-20 Thread Edgar Fuß
> Success on NetBSD 5.0_STABLE on amd64 (64-bit).
Also on 3.1.0_PATCH/i386, 3.0.1/sparc and 4.0.1/{amd64,i386}



Re: [Dovecot] deliver and stale NFS file handles

2009-10-20 Thread Edgar Fuß
> touch foo
> tail -f foo&
> rm -f foo
> fg
> 
> Does it complain about stale NFS handle?
On NetBSD, it doesn't complain.

I'm somewhat astonished that FreeBSD does complain. I thought those .nfsX 
entries (which cover exactly this situation) were an original 4.4BSD invention.



[Dovecot] second fs quota root crashes

2009-10-20 Thread Juergen Obermann
Hallo.

In our dovecot 1.2.6 server running under Solaris 9 I would like to set up a
second quota root because the mail folders are in the users home directories and
the inboxes of all users are in /var/mail. As soon as I add

  quota2 = fs:INBOX:noenforcing:mount=/var/mail

the imap client crashes repeatedly as soon as the user tries to open a mail
folder. 

Thanks for any help.

Dovecot Logfile:


Oct 20 14:12:49 horus dovecot: [ID 583609 local0.info] Dovecot v1.2.6 starting 
up
Oct 20 14:12:50 horus dovecot: [ID 583609 local0.info] auth(default): new auth 
connection: pid=8214
Oct 20 14:12:50 horus dovecot: [ID 583609 local0.info] auth(default): new auth 
connection: pid=8216
Oct 20 14:12:50 horus dovecot: [ID 583609 local0.info] auth(default): new auth 
connection: pid=8217
Oct 20 14:12:50 horus dovecot: [ID 583609 local0.info] auth(default): new auth 
connection: pid=8218
Oct 20 14:12:50 horus dovecot: [ID 583609 local0.info] auth(default): new auth 
connection: pid=8219
Oct 20 14:12:50 horus dovecot: [ID 583609 local0.info] auth(default): new auth 
connection: pid=8220
Oct 20 14:12:50 horus dovecot: [ID 583609 local0.info] auth(default): new auth 
connection: pid=8222
Oct 20 14:12:50 horus dovecot: [ID 583609 local0.info] auth(default): new auth 
connection: pid=8225
Oct 20 14:12:50 horus dovecot: [ID 583609 local0.info] auth(default): new auth 
connection: pid=8223
Oct 20 14:12:50 horus dovecot: [ID 583609 local0.info] auth(default): new auth 
connection: pid=8230
Oct 20 14:12:50 horus dovecot: [ID 583609 local0.info] auth(default): new auth 
connection: pid=8228
Oct 20 14:12:50 horus dovecot: [ID 583609 local0.info] auth(default): new auth 
connection: pid=8229
Oct 20 14:12:50 horus dovecot: [ID 583609 local0.info] auth(default): new auth 
connection: pid=8224
Oct 20 14:12:50 horus dovecot: [ID 583609 local0.info] auth(default): new auth 
connection: pid=8221
Oct 20 14:12:50 horus dovecot: [ID 583609 local0.info] auth(default): new auth 
connection: pid=8233
Oct 20 14:12:50 horus dovecot: [ID 583609 local0.info] auth(default): new auth 
connection: pid=8231
Oct 20 14:12:50 horus dovecot: [ID 583609 local0.info] auth(default): new auth 
connection: pid=8226
Oct 20 14:12:50 horus dovecot: [ID 583609 local0.info] auth(default): new auth 
connection: pid=8237
Oct 20 14:12:50 horus dovecot: [ID 583609 local0.info] auth(default): new auth 
connection: pid=8236
Oct 20 14:12:50 horus dovecot: [ID 583609 local0.info] auth(default): new auth 
connection: pid=8232
Oct 20 14:12:50 horus dovecot: [ID 583609 local0.info] auth(default): new auth 
connection: pid=8234
Oct 20 14:12:50 horus dovecot: [ID 583609 local0.info] auth(default): new auth 
connection: pid=8235
Oct 20 14:12:50 horus dovecot: [ID 583609 local0.info] auth(default): new auth 
connection: pid=8238
Oct 20 14:12:50 horus dovecot: [ID 583609 local0.info] auth(default): new auth 
connection: pid=8227
Oct 20 14:13:00 horus dovecot: [ID 583609 local0.info] auth(default): client 
in: AUTH   1   PLAIN   service=imapsecured lip=134.176.2.11
rip=134.176.150.104 lport=993   rport=1397
Oct 20 14:13:00 horus dovecot: [ID 583609 local0.info] auth(default): client 
out: CONT  1   
Oct 20 14:13:00 horus dovecot: [ID 583609 local0.info] auth(default): client 
in: CONT   1   AGcwMzMAcmVkIHNreQ==
Oct 20 14:13:00 horus dovecot: [ID 583609 local0.info] auth-worker(default): 
pam(g033,134.176.150.104): lookup service=dovecot
Oct 20 14:13:00 horus dovecot: [ID 583609 local0.info] auth-worker(default): 
pam(g033,134.176.150.104): #1/1 style=1 msg=Password: 
Oct 20 14:13:00 horus dovecot: [ID 583609 local0.info] auth(default): client 
out: OK1   user=g033
Oct 20 14:13:00 horus dovecot: [ID 583609 local0.info] auth(default): master 
in: REQUEST1   82361
Oct 20 14:13:00 horus dovecot: [ID 583609 local0.info] auth(default): 
passwd(g033,134.176.150.104): lookup
Oct 20 14:13:00 horus dovecot: [ID 583609 local0.info] auth(default): master 
out: USER  1   g033system_groups_user=g033 uid=10033   gid=10010
   home=/home/hrz/g033
Oct 20 14:13:00 horus dovecot: [ID 583609 local0.info] imap-login: Login: 
user=, method=PLAIN, rip=134.176.150.104, lip=134.176.2.11, TLS
Oct 20 14:13:00 horus dovecot: [ID 583609 local0.info] auth(default): new auth 
connection: pid=8236
Oct 20 14:13:00 horus dovecot: [ID 583609 local0.info] IMAP(g033): Loading 
modules from directory: /opt/local/lib/dovecot/imap
Oct 20 14:13:00 horus dovecot: [ID 583609 local0.info] IMAP(g033): Module 
loaded: /opt/local/lib/dovecot/imap/lib10_quota_plugin.so
Oct 20 14:13:00 horus dovecot: [ID 583609 local0.info] IMAP(g033): Module 
loaded: /opt/local/lib/dovecot/imap/lib11_imap_quota_plugin.so
Oct 20 14:13:00 horus dovecot: [ID 583609 local0.info] IMAP(g033): Effective 
uid=10033, gid=10010, home=/home/hrz/g033
Oct 20 14:13:00 horus dovecot: [ID 583609 local0.info] IMAP(g033): Quota root: 
name=Home-Verzeichnis backend=fs args=no

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

2009-10-20 Thread Robert Schetterer
Ingo Thierack schrieb:
> 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

As far i read about palm pre , its imap app is terrible
therfore , simple advise dont use it, or try to install working mail
client on palm pre like thunderbird etc ( dont know if this is possible )

in general
its a shame for this big companies , that there eye seems only to be on
how to make money with their apps, and their additional services, and
dont push good implementations of old and open standarts like imap
i am still searching for a linux smartphone which works i excpected
all smartphones i tried since yet were somehow incomplete in mail stuff

> 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

> <<>>>


-- 
Best Regards

MfG Robert Schetterer

Germany/Munich/Bavaria


Re: [Dovecot] Need a little shadow to MySQL conversion help

2009-10-20 Thread Andreas Ntaflos
On Monday 19 October 2009 19:13:36 Marc Perkel wrote:
> 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?

I'd say you need a static userdb. Something like this:

passdb sql {
 args = /etc/dovecot/dovecot-sql.conf
}

userdb static {
 args = uid=vmail gid=vmail home=/var/vmail/%Ld/%Ln allow_all_users=yes
}

Since you have a "users" table that does not contain the full e-mail 
address of a given user you should create a view that does so that the 
query in dovecot-sql.conf remains simple. You could also simplify the 
users table to contain the full email address. There are ways aplenty. 

mysql>
CREATE VIEW view_users AS
SELECT CONCAT(users.user_name, '@', users.domain_name) AS email,
users.password
FROM users

Then dovecot-sql.conf could look like this:

driver = mysql
connect = host=127.0.0.1 dbname=mailserver user=mailuser password=foo
default_pass_scheme = CRYPT
password_query = SELECT password FROM view_users WHERE email='%u';

This database setup, however, is not really normalised so if that is a 
concern (it probably will be when you start hosting more than one 
virtual domain) you should look to refine the it.

I can very much recommend the ISPmail tutorials of Christoph Haas, found 
at . It explains very well how to do 
virtual mail hosting with a MySQL database backend and other fun stuff. 
Much of what I have written in this message you can find there.

HTH Andreas
-- 
Andreas Ntaflos

GPG Fingerprint: 6234 2E8E 5C81 C6CB E5EC  7E65 397C E2A8 090C A9B4
-- 
Andreas Ntaflos
Vienna, Austria

GPG Fingerprint: 6234 2E8E 5C81 C6CB E5EC  7E65 397C E2A8 090C A9B4


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


[Dovecot] Courier to dovecot migration issue

2009-10-20 Thread Rami Rami
Hello,
I am trying to migrate users form courier to dovecot 1.2.6.
The main configuration parameters are as follows :
--
# 1.2.6: /usr/local/etc/dovecot.conf
Warning: fd limit 1024 is lower than what Dovecot can use under full load
(more than 2304). Either grow the limit or change login_max_processes_count
and max_mail_processes settings
# OS: Linux 2.6.16-1.2133_FC5 i686 Fedora Core release 5 (Bordeaux)
base_dir: /usr/local/var/run/
log_path: /var/log/dovecot.log
info_log_path: /var/log/maillog
protocols: imap imaps pop3 pop3s
ssl: no
disable_plaintext_auth: no
login_dir: /usr/local/var/run//login
login_executable(default): /usr/local/libexec/dovecot/imap-login
login_executable(imap): /usr/local/libexec/dovecot/imap-login
login_executable(pop3): /usr/local/libexec/dovecot/pop3-login
max_mail_processes: 2048
verbose_proctitle: yes
first_valid_uid: 100
last_valid_uid: 100
mail_location:
maildir:~/Maildir:INDEX=/tmp/QUOTA/index/%u:CONTROL=/tmp/QUOTA/control/%u
mail_debug: yes
mail_executable(default): /usr/local/libexec/dovecot/imap
mail_executable(imap): /usr/local/libexec/dovecot/imap
mail_executable(pop3): /usr/local/libexec/dovecot/pop3
mail_plugins(default): quota imap_quota
mail_plugins(imap): quota imap_quota
mail_plugins(pop3):
mail_plugin_dir(default): /usr/local/lib/dovecot/imap
mail_plugin_dir(imap): /usr/local/lib/dovecot/imap
mail_plugin_dir(pop3): /usr/local/lib/dovecot/pop3
namespace:
  type: private
  prefix: INBOX.
  inbox: yes
  list: yes
  subscriptions: yes
auth default:
  passdb:
driver: pam
args: *
  userdb:
driver: passwd
plugin:
  quota: fs:acad_proto


After using the "courier-dovecot-migrate.pl" script users using pop3 are
re-downloading their old emails as duplicates.
This issue is resolved by replacing :
maildir:~/Maildir:INDEX=/tmp/QUOTA/index/%u:CONTROL=/tmp/QUOTA/control/%u

with

maildir:~/Maildir


any idea on the reason of these duplicates or workarounds to prevent them
while keeping indexes in /tmp.

Thank you.


Re: [Dovecot] testing needed (AIX) with "failed: 2. offset=2"

2009-10-20 Thread Pascal Volk
On 10/20/2009 11:25 AM Ralf Becker wrote:
> Testing all again multiple times
> …

Hm, running multiple times shows some problems (on Linux).

Linux  | OpenBSD  | FreeBSD
2.6.30-2 amd64 | 4.2 GENERIC i386 | 7.2-RELEASE i386
-- +--+-
 9 failed: 2. offset=2 |∅ |∅
91 success |   100 success|100 success


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


Re: [Dovecot] testing needed

2009-10-20 Thread Michal Hlavinka
On Monday 19 October 2009 23:55:20 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.
> 
on Fedora 11 (Linux 2.6.30.9 64bit) it failed 3 times (of 200 runs)
on Fedora rawhide (Linux 2.6.31.4 64bit) it failed 5 times (of 200 runs)


Re: [Dovecot] testing needed

2009-10-20 Thread Timo Sirainen

On Oct 20, 2009, at 10:42 AM, Michal Hlavinka wrote:


On Monday 19 October 2009 23:55:20 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.


on Fedora 11 (Linux 2.6.30.9 64bit) it failed 3 times (of 200 runs)
on Fedora rawhide (Linux 2.6.31.4 64bit) it failed 5 times (of 200  
runs)


I think the reason why it's failing randomly sometimes is because the  
test relies on sleep/usleep to accurately sleep the wanted amount of  
time and everything else to take about zero time, and in those failure  
cases it probably just doesn't work like that. So I'm not really  
worried about those random failures. Increasing the sleep times by 10x  
probably would get rid of them in the test.




Re: [Dovecot] Courier to dovecot migration issue

2009-10-20 Thread David Warden


On Oct 20, 2009, at 10:04 AM, Rami Rami wrote:


Hello,
I am trying to migrate users form courier to dovecot 1.2.6.
The main configuration parameters are as follows :
--
# 1.2.6: /usr/local/etc/dovecot.conf
Warning: fd limit 1024 is lower than what Dovecot can use under full  
load
(more than 2304). Either grow the limit or change  
login_max_processes_count

and max_mail_processes settings
# OS: Linux 2.6.16-1.2133_FC5 i686 Fedora Core release 5 (Bordeaux)
base_dir: /usr/local/var/run/
log_path: /var/log/dovecot.log
info_log_path: /var/log/maillog
protocols: imap imaps pop3 pop3s
ssl: no
disable_plaintext_auth: no
login_dir: /usr/local/var/run//login
login_executable(default): /usr/local/libexec/dovecot/imap-login
login_executable(imap): /usr/local/libexec/dovecot/imap-login
login_executable(pop3): /usr/local/libexec/dovecot/pop3-login
max_mail_processes: 2048
verbose_proctitle: yes
first_valid_uid: 100
last_valid_uid: 100
mail_location:
maildir:~/Maildir:INDEX=/tmp/QUOTA/index/%u:CONTROL=/tmp/QUOTA/ 
control/%u

mail_debug: yes
mail_executable(default): /usr/local/libexec/dovecot/imap
mail_executable(imap): /usr/local/libexec/dovecot/imap
mail_executable(pop3): /usr/local/libexec/dovecot/pop3
mail_plugins(default): quota imap_quota
mail_plugins(imap): quota imap_quota
mail_plugins(pop3):
mail_plugin_dir(default): /usr/local/lib/dovecot/imap
mail_plugin_dir(imap): /usr/local/lib/dovecot/imap
mail_plugin_dir(pop3): /usr/local/lib/dovecot/pop3
namespace:
 type: private
 prefix: INBOX.
 inbox: yes
 list: yes
 subscriptions: yes
auth default:
 passdb:
   driver: pam
   args: *
 userdb:
   driver: passwd
plugin:
 quota: fs:acad_proto


After using the "courier-dovecot-migrate.pl" script users using pop3  
are

re-downloading their old emails as duplicates.
This issue is resolved by replacing :
maildir:~/Maildir:INDEX=/tmp/QUOTA/index/%u:CONTROL=/tmp/QUOTA/ 
control/%u


with

maildir:~/Maildir


any idea on the reason of these duplicates or workarounds to prevent  
them

while keeping indexes in /tmp.

Thank you.


When you ran courier-dovecot-migrate.pl, did you have it put the  
dovecot files in /tmp/QUOTA/index/%u and /tmp/QUOTA/control/%u? In my  
experience, the courier migration script wants to output the converted  
dovecot files in the same directories as it found the courier files.  
If you didn't copy the converted dovecot files to the proper directory  
in your /tmp structure, dovecot would have no knowledge of the old POP  
messages and would generate new POP UIDLs, causing double messages in  
users' clients.


-David Warden



[Dovecot] Expire plugin per domain

2009-10-20 Thread Jose Luis Marin Perez






Dear Timo thank you for the help your giving me these. 

 I want to set expire plugin only for some domains in the same way I set 
autocreate plugin. 

vchkpw-wrapper.sh

#!/bin/bash

DOMAIN=`echo $VPOPUSER|sed s/^.*@//`

echo $USER > /tmp/autocreate
echo $DOMAIN >> /tmp/autocreate

if [ "$DOMAIN" = "operaciones.qnet.com.pe" ]; then
  export USERDB_AUTOCREATE=INBOX.Spam
  export USERDB_AUTOSUBSCRIBE=INBOX.Spam
  export USERDB_EXPIRE="INBOX.Spam 1 INBOX.Spam.* 1"
  export USERDB_EXPIRE_DICT="proxy::expire"
  export EXTRA="USERDB_AUTOCREATE USERDB_AUTOSUBSCRIBE USERDB_EXPIRE 
USERDB_EXPIRE_DICT"
  set > /tmp/environment
fi

unset USER
exec $*

Record the right information in the database but when you run 
/usr/local/sbin/dovecot --exec-mail ext /usr/local/libexec/dovecot/expire-tool 
--test
 
Displays the following message
 
Fatal: expire and expire_altmove settings not set

 You told me it was to migrate to Dovecot 1.2.6 with support for userdb 
chkpassword to use the following configuration: 

 userdb:
  driver: prefetch
 userdb:
  driver: checkpassword
  args: /usr/local/bin/userdb.sh

 My problem is that I have no idea how to create the userdb.sh 

 Please could help in the creation of this script?

Thanks

Jose Luis
  
_
Explore the seven wonders of the world
http://search.msn.com/results.aspx?q=7+wonders+world&mkt=en-US&form=QBRE

Re: [Dovecot] Courier to dovecot migration issue

2009-10-20 Thread Timo Sirainen

On Oct 20, 2009, at 10:04 AM, Rami Rami wrote:

After using the "courier-dovecot-migrate.pl" script users using pop3  
are

re-downloading their old emails as duplicates.
This issue is resolved by replacing :
maildir:~/Maildir:INDEX=/tmp/QUOTA/index/%u:CONTROL=/tmp/QUOTA/ 
control/%u


Don't put control files to /tmp unless you want pop3 users to  
redownload mails every time you reboot.




Re: [Dovecot] Need a little shadow to MySQL conversion help

2009-10-20 Thread Timo Sirainen

On Oct 20, 2009, at 9:45 AM, Andreas Ntaflos wrote:


I'd say you need a static userdb. Something like this:


A couple of small things:


passdb sql {
args = /etc/dovecot/dovecot-sql.conf
}

userdb static {
args = uid=vmail gid=vmail home=/var/vmail/%Ld/%Ln allow_all_users=yes
}


%Ld/%Ln at this point works for now, but maybe not in future. I'd have  
passdb already change it lowercase. Also allow_all_users=yes isn't  
required (but maybe not harmful) since passdb sql is used.



password_query = SELECT password FROM view_users WHERE email='%u';


SELECT password, email AS user FROM ..

changes username to same case as it's in the database (so lowercase  
probably) and there's no need to use %L anymore.


Re: [Dovecot] Capability info in hello message not complete?

2009-10-20 Thread Michal Hlavinka
On Tuesday 13 October 2009 19:10:15 Timo Sirainen wrote:
> On Tue, 2009-10-13 at 17:26 +0200, Michal Hlavinka wrote:
> > would it be possible to:
> > a) send content of imap_capability in greeting message? It should be
> > user's responsibility if it's set to something "weird"
> 
> I guess I could do this.

"could" - does it mean you are waiting for my response? If yes this option is 
fine for me, since it should fix the issue.

/me not native english speaker :)
 
> > b) don't send capability in greeting message if imap_capability is set
> >
> > c) resurrect login_greeting_capability option
> 
> These have the problem of making Dovecot non-compliant with LEMONADE
> extensions.

these were just some ideas, it's not required to do all of them to fix iphone 
imap client.


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

2009-10-20 Thread Ingo Thierack


no chance to install at the moment another mailclient on the Pre, there 
is simple none available.
I read the some about it, but with also different opinions. Sometimes 
goes, somtimes no.

So i thought i give it a try.

So i'll see how far i come with it.
Maybe you can take a look the the Nokia N900 when it will be avail ;-)
I think, i'll get this device too.

But also,
can someone confirm, the processes are correct?
Thunderbird displays the messages arrived a little bit later then expected.
I see in the syslog, the message was deliverd to dovecot, but it takes a 
view more seconds

before it displays.





Robert Schetterer schrieb:

Ingo Thierack schrieb:
  

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



As far i read about palm pre , its imap app is terrible
therfore , simple advise dont use it, or try to install working mail
client on palm pre like thunderbird etc ( dont know if this is possible )

in general
its a shame for this big companies , that there eye seems only to be on
how to make money with their apps, and their additional services, and
dont push good implementations of old and open standarts like imap
i am still searching for a linux smartphone which works i excpected
all smartphones i tried since yet were somehow incomplete in mail stuff

  

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

<<



  




Re: [Dovecot] testing needed

2009-10-20 Thread Mark Sapiro
On Mon, Oct 19, 2009 at 11:46:22PM -0400, Timo Sirainen wrote:
> 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)..


WFM on HP_UX B.11.23 and Cygwin 1.5.25


fog:$ cc --version
cc: HP C/aC++ B3910B A.06.15 [May 16 2007]
fog:$ uname -a
HP-UX fog B.11.23 U ia64 1361301988 unlimited-user license
fog:$ cc test.c
fog:$ ./a.out
success
fog:$


[msap...@msapiro ~/Desktop]$ gcc --version
gcc (GCC) 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[msap...@msapiro ~/Desktop]$ uname -a
CYGWIN_NT-5.1 msapiro 1.5.25(0.156/4/2) 2008-06-12 19:34 i686 Cygwin
[msap...@msapiro ~/Desktop]$ gcc test.c
[msap...@msapiro ~/Desktop]$ ./a.exe
success
[msap...@msapiro ~/Desktop]$

-- 
Mark Sapiro mark at msapiro net   The highway is for gamblers,
San Francisco Bay Area, Californiabetter use your sense - B. Dylan


Re: [Dovecot] simple steps with sieve

2009-10-20 Thread Stephan Bosch

Peter Borg wrote:

I find it really hard to believe that Gavin and I are the only ones to hit
this issue. That said I've probably been hacking at this particular system
too long and am missing something very obvious!

You're definitely not the only one. Finding a good solution is difficult 
however. The intention of this check within the vacation action is to 
prevent spurious vacation responses to for example Bcc:'ed deliveries 
(and perhaps multi-drop aliases).


Thus far I have seen the following suggestions to solve this problem:

1) Do some sort of a dict lookup that yields all valid aliases for the 
user's account or alternatively a lookup that checks whether an address 
is a valid alias for an account (if many or wildcard aliases exist). A 
problem with this solution is that potentially many recipients exist and 
that each would need to be looked up (up to some limit preferably).


2) Ask the MTA somehow for the same result as in (1) to make sure alias 
resolution is identical (execute the real alias processing). I am not 
sure which MTA's even support something like that. Also has the lookup 
load of (1).


3) Allow configuring some sort of external binary that is run to get the 
same result as in (1). Has the lookup load of (1).


4) Store the list of possible recipient addresses alongside
the sieve script, no need to look them up that way.

5) Let the MTA provide deliver with the original recipient address as 
the -a parameter. This will cause multi-drop aliases to be reported as 
sender in messages produced by Deliver or Sieve.


6) Adjust Deliver/Sieve to accept the original recipient as a separate 
parameter.


7) Allow wildcards in the :addresses parameter of the vacation action. 
This is non-standard and then would only work for Dovecot. It gives the 
user full control, which is not always desirable (but hard to prevent 
anyway). It does not solve the problem properly for everyone. I'd rather 
not deviate from the standard.


Any other ideas? I don't really like any of the solutions above, perhaps 
 nr 6.


Regards,

Stephan.




Re: [Dovecot] Need a little shadow to MySQL conversion help

2009-10-20 Thread Andreas Ntaflos
On Tuesday 20 October 2009 17:07:49 Timo Sirainen wrote:
> On Oct 20, 2009, at 9:45 AM, Andreas Ntaflos wrote:
> > I'd say you need a static userdb. Something like this:
>
> A couple of small things:
> > passdb sql {
> > args = /etc/dovecot/dovecot-sql.conf
> > }
> >
> > userdb static {
> > args = uid=vmail gid=vmail home=/var/vmail/%Ld/%Ln
> > allow_all_users=yes }
>
> %Ld/%Ln at this point works for now, but maybe not in future. I'd
> have passdb already change it lowercase. Also allow_all_users=yes
> isn't required (but maybe not harmful) since passdb sql is used.

That's good to know, thanks. And you're right of course, the passdb 
should already return the correct information, Dovecot shouldn't be 
asked to change anything afterwards.

Fortunately I myself don't use MySQL anymore but have migrated 
everything to PostgreSQL. It does a much better job as a DBMS (remote, 
secured access to the DB, fine-grained permissions and rules) and also 
knows about case sensitivity. So foo...@example.com is not the same as 
foo...@example.com. Which eliminates this problem class altogether.

> > password_query = SELECT password FROM view_users WHERE email='%u';
>
> SELECT password, email AS user FROM ..
>
> changes username to same case as it's in the database (so lowercase
> probably) and there's no need to use %L anymore.

You mean something like 

SELECT password, LOWER(email) as user FROM view_users WHERE email='%u'

should do the trick? I shall test this on my test server, just for fun.

Andreas
-- 
Andreas Ntaflos
Vienna, Austria

GPG Fingerprint: 6234 2E8E 5C81 C6CB E5EC  7E65 397C E2A8 090C A9B4


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


[Dovecot] HA Dovecot Config?

2009-10-20 Thread dovecot




Hi!

I'm currently running Dovecot 1.1.8 on a HP server using CentOS 5.2 
as my IMAP server, receiving mail from postfix, and also using 
squirrelmail as the frontend.


As I look at upgrading the mail server, I'd like to change to a 
higher availability configuration (where the server can fail and I 
don't have to reconfig my imap users).


For the SMTP that's easy, because I can use multiple MX records, and 
I can redirect a port forward from one server to another. But IMAP 
doesn't have the same functionality, because it's the storage that matters.


What's the "best" way to do that?  Clustered servers using a SAN? 
NAS? some sort of appliance in front?  Suggestions?


Thanks!

Rick


Rick Steeves
http://www.sinister.net

In reality nothing is more damaging to the adventurous spirit within 
a man than a secure future -  Alexander Supertramp




[Dovecot] VZW Blackberry BIS problems?

2009-10-20 Thread B. Cook
Ever since Columbus day things have been strange with my two dovecot 
servers, according to my Blackberry users.


We do not have a BES just the standard BIS that comes with a personal 
account.


Several people have told me that since that Monday that they get 
occasional duplicate copies of messages which only appear singularly in 
their Maildir inboxes.


I myself even called VZW and got transferred to RIM themselves where 
they 'reset' my account; (same as me going into the BIS server and 
deleting and adding again) only to have the same thing happen; again 
occasionally..


Below is relevant dovecot info..

-r-xr-xr-x  1 root  wheel  164064 Oct  1 17:16 /usr/local/sbin/dovecot

(date it was built; prior to any problems.. *whew*) ;)

 1  # 1.2.4: /usr/local/etc/dovecot.conf
 2  # OS: FreeBSD 7.2-RELEASE-p3 i386
 3	ssl_cert_file: 
/usr/local/etc/lighttpd/ssl/mail.poughkeepsieschools.org.pem
 4	ssl_key_file: 
/usr/local/etc/lighttpd/ssl/mail.poughkeepsieschools.org.pem

 5  disable_plaintext_auth: no
 6  verbose_ssl: yes
 7  login_dir: /var/run/dovecot/login
 8  login_executable: /usr/local/libexec/dovecot/imap-login
 9  login_greeting: mail.poughkeepsieschools.org OK
10  first_valid_uid: 89
11  last_valid_uid: 89
12  first_valid_gid: 89
13  last_valid_gid: 89
14  maildir_copy_preserve_filename: yes
15  mail_plugins: quota imap_quota
16	imap_client_workarounds: delay-newmail outlook-idle 
tb-extra-mailbox-sep

17  auth default:
18mechanisms: plain login
19user: vpopmail
20passdb:
21  driver: vpopmail
22userdb:
23  driver: vpopmail
24socket:
25  type: listen
26  client:
27path: /var/run/dovecot/auth-client
28mode: 438
29  plugin:
30quota: maildir:User quota
31expire: Trash 7 Spam 30

Now what does not show here is something that I put in that it looked 
like it was supposed to help but didn't..


mailbox_idle_check_interval = 30

after looking around at other people complaining about BIS and possible 
dovecot issues it seemed that that entry was the 'magic' the BIS was 
missing; except I never had it and never had troubles.


I'm assuming this is a BIS issue of some sort, but I can't tell.

After looking on the wiki I didn't see anything that says "BIS users 
look here for tips.. "


So I'm assuming there aren't any; I think it should just work with the 
IMAP server..


Any help would be appreciated as everyone thinks this is 'our problem' 
and "if we had an exchange server we wouldn't be having these problems.."


Thanks in advance..




Re: [Dovecot] testing needed

2009-10-20 Thread Preston Kutzner
On 10/19/09 4: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.
> 
 Success on OS X 10.6.1 (Darwin kernel 10.0)


Re: [Dovecot] simple steps with sieve

2009-10-20 Thread Timo Sirainen
On Tue, 2009-10-20 at 17:34 +0200, Stephan Bosch wrote:
> 6) Adjust Deliver/Sieve to accept the original recipient as a separate 
> parameter.

I think more like "alias-normalized recipient" or something like that,
since "original recipient" would be what -a parameter does and that
doesn't really help.

That would solve it from Dovecot's side, but does it actually help,
meaning can any MTA give such a parameter? :)



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


Re: [Dovecot] Need a little shadow to MySQL conversion help

2009-10-20 Thread Timo Sirainen
On Tue, 2009-10-20 at 17:57 +0200, Andreas Ntaflos wrote:
> > > password_query = SELECT password FROM view_users WHERE email='%u';
> >
> > SELECT password, email AS user FROM ..
> >
> > changes username to same case as it's in the database (so lowercase
> > probably) and there's no need to use %L anymore.
> 
> You mean something like 
> 
> SELECT password, LOWER(email) as user FROM view_users WHERE email='%u'
> 
> should do the trick? I shall test this on my test server, just for fun.

Well, yes, but "email" field would most likely already be lowercased in
the database, so the LOWER() wouldn't be all that useful.


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


Re: [Dovecot] Need a little shadow to MySQL conversion help

2009-10-20 Thread Andreas Ntaflos
On Tuesday 20 October 2009 17:57:35 Andreas Ntaflos wrote:
> On Tuesday 20 October 2009 17:07:49 Timo Sirainen wrote:
> > On Oct 20, 2009, at 9:45 AM, Andreas Ntaflos wrote:
> > > I'd say you need a static userdb. Something like this:
> >
> > A couple of small things:
> > > passdb sql {
> > > args = /etc/dovecot/dovecot-sql.conf
> > > }
> > >
> > > userdb static {
> > > args = uid=vmail gid=vmail home=/var/vmail/%Ld/%Ln
> > > allow_all_users=yes }
> >
> > %Ld/%Ln at this point works for now, but maybe not in future. I'd
> > have passdb already change it lowercase. Also allow_all_users=yes
> > isn't required (but maybe not harmful) since passdb sql is used.
>
> That's good to know, thanks. And you're right of course, the passdb
> should already return the correct information, Dovecot shouldn't be
> asked to change anything afterwards.
>
> Fortunately I myself don't use MySQL anymore but have migrated
> everything to PostgreSQL. It does a much better job as a DBMS
> (remote, secured access to the DB, fine-grained permissions and
> rules) and also knows about case sensitivity. So foo...@example.com
> is not the same as foo...@example.com. Which eliminates this problem
> class altogether.
>
> > > password_query = SELECT password FROM view_users WHERE
> > > email='%u';
> >
> > SELECT password, email AS user FROM ..
> >
> > changes username to same case as it's in the database (so lowercase
> > probably) and there's no need to use %L anymore.

> You mean something like
>
> SELECT password, LOWER(email) as user FROM view_users WHERE
> email='%u'

I probably misunderstood that. 

SELECT password, email AS user FROM ...

is indeed enough to return the correct case, no need to use the LOWER 
function.

This whole case sensitivity thing is only a problem if the passdb query 
returns just the password and no username. Returning the username as 
well is the way to go.

Andreas
-- 
Andreas Ntaflos
Vienna, Austria

GPG Fingerprint: 6234 2E8E 5C81 C6CB E5EC  7E65 397C E2A8 090C A9B4


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


Re: [Dovecot] Need a little shadow to MySQL conversion help

2009-10-20 Thread Jerry
On Tue, 20 Oct 2009 17:57:35 +0200
Andreas Ntaflos  wrote:

> On Tuesday 20 October 2009 17:07:49 Timo Sirainen wrote:
> > On Oct 20, 2009, at 9:45 AM, Andreas Ntaflos wrote:
> > > I'd say you need a static userdb. Something like this:
> >
> > A couple of small things:
> > > passdb sql {
> > > args = /etc/dovecot/dovecot-sql.conf
> > > }
> > >
> > > userdb static {
> > > args = uid=vmail gid=vmail home=/var/vmail/%Ld/%Ln
> > > allow_all_users=yes }
> >
> > %Ld/%Ln at this point works for now, but maybe not in future. I'd
> > have passdb already change it lowercase. Also allow_all_users=yes
> > isn't required (but maybe not harmful) since passdb sql is used.
> 
> That's good to know, thanks. And you're right of course, the passdb 
> should already return the correct information, Dovecot shouldn't be 
> asked to change anything afterwards.
> 
> Fortunately I myself don't use MySQL anymore but have migrated 
> everything to PostgreSQL. It does a much better job as a DBMS
> (remote, secured access to the DB, fine-grained permissions and
> rules) and also knows about case sensitivity. So foo...@example.com
> is not the same as foo...@example.com. Which eliminates this problem
> class altogether.

MySQL, since at least 5.x knows about case. You can Google for the
information if you want.

> > > password_query = SELECT password FROM view_users WHERE email='%u';
> >
> > SELECT password, email AS user FROM ..
> >
> > changes username to same case as it's in the database (so lowercase
> > probably) and there's no need to use %L anymore.
> 
> You mean something like 
> 
> SELECT password, LOWER(email) as user FROM view_users WHERE email='%u'
> 
> should do the trick? I shall test this on my test server, just for
> fun.
> 
> Andreas
-- 
Jerry   |===
ges...@yahoo.com|===
|===
|===
|

Woolsey-Swanson Rule:

People would rather live with a problem they cannot solve rather than
accept a solution they cannot understand.


Re: [Dovecot] Need a little shadow to MySQL conversion help

2009-10-20 Thread Marc Perkel
Thank you all for your help on this. I'll probably try it tonight when 
most people will be off line and hopefully it won't be down long. 
Everything already is lower case so that shouldn't be an issue.




Re: [Dovecot] Need a little shadow to MySQL conversion help

2009-10-20 Thread Andreas Ntaflos
On Tuesday 20 October 2009 18:49:16 Jerry wrote:
> On Tue, 20 Oct 2009 17:57:35 +0200
>
> Andreas Ntaflos  wrote:
> > On Tuesday 20 October 2009 17:07:49 Timo Sirainen wrote:
> > > On Oct 20, 2009, at 9:45 AM, Andreas Ntaflos wrote:
> > > > I'd say you need a static userdb. Something like this:
> > >
> > > A couple of small things:
> > > > passdb sql {
> > > > args = /etc/dovecot/dovecot-sql.conf
> > > > }
> > > >
> > > > userdb static {
> > > > args = uid=vmail gid=vmail home=/var/vmail/%Ld/%Ln
> > > > allow_all_users=yes }
> > >
> > > %Ld/%Ln at this point works for now, but maybe not in future. I'd
> > > have passdb already change it lowercase. Also allow_all_users=yes
> > > isn't required (but maybe not harmful) since passdb sql is used.
> >
> > That's good to know, thanks. And you're right of course, the passdb
> > should already return the correct information, Dovecot shouldn't be
> > asked to change anything afterwards.
> >
> > Fortunately I myself don't use MySQL anymore but have migrated
> > everything to PostgreSQL. It does a much better job as a DBMS
> > (remote, secured access to the DB, fine-grained permissions and
> > rules) and also knows about case sensitivity. So foo...@example.com
> > is not the same as foo...@example.com. Which eliminates this
> > problem class altogether.
>
> MySQL, since at least 5.x knows about case. You can Google for the
> information if you want.

Good to know, thanks. Creating tables with a *_cs collation seems to be 
the trick.

Andreas
-- 
Andreas Ntaflos
Vienna, Austria

GPG Fingerprint: 6234 2E8E 5C81 C6CB E5EC  7E65 397C E2A8 090C A9B4


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


Re: [Dovecot] Need a little shadow to MySQL conversion help

2009-10-20 Thread Andreas Ntaflos
On Tuesday 20 October 2009 18:57:48 Marc Perkel wrote:
> Thank you all for your help on this. I'll probably try it tonight
> when most people will be off line and hopefully it won't be down
> long. Everything already is lower case so that shouldn't be an issue.

Another suggestion, a little off-topic and probably not quite original: 
you should really try to use a test server for experimenting, at least 
if you do any non-trivial hosting or can tell your users to go to hell 
when they complain :) Nothing makes your life more miserable than a 
screwed up mail system you cannot easily recover. 

The test server can even be a small virtual machine as long as it sports 
the same software infrastructure (Dovecot, Postfix, MySQL, Apache and 
whatever else) as the production system. Using a test system goes a 
long way in ensuring that you don't run into nasty surprises and only 
changes you tested and of which you know the consequences are applied 
to the production instance.

Andreas
-- 
Andreas Ntaflos
Vienna, Austria

GPG Fingerprint: 6234 2E8E 5C81 C6CB E5EC  7E65 397C E2A8 090C A9B4


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


[Dovecot] IMAP goes down from time to time

2009-10-20 Thread Juan Felipe Estrada

Good Afternoon

I´m really new at this and i don´t know if i´m posting at the right place.

My problem is that our Dovecot IMAP is stopping from time to time with 
no info in the log, i just realize about this when our support person 
call me saying that the whatsup monitor is showing the IMAP4 process 
down. I can figure about this too by trying to get in our webmail Horde 
and i cannot login.


Here i post my Dovecot -n command i´ll appreciate any help.

/# 1.0.7: /etc/dovecot.conf
protocols: imap pop3 imaps pop3s
ssl_cert_file: /etc/httpd/conf/ssl.crt/unimail.uninorte.edu.co.crt
ssl_key_file: /etc/httpd/conf/ssl.key/unimail.uninorte.edu.co.key
ssl_cipher_list: ALL:!LOW:!SSLv2
login_dir: /var/run/dovecot/login
login_executable(default): /usr/libexec/dovecot/imap-login
login_executable(imap): /usr/libexec/dovecot/imap-login
login_executable(pop3): /usr/libexec/dovecot/pop3-login
mail_location: maildir:/home/vmail/%u/Maildir
mail_executable(default): /usr/libexec/dovecot/imap
mail_executable(imap): /usr/libexec/dovecot/imap
mail_executable(pop3): /usr/libexec/dovecot/pop3
mail_plugin_dir(default): /usr/lib64/dovecot/imap
mail_plugin_dir(imap): /usr/lib64/dovecot/imap
mail_plugin_dir(pop3): /usr/lib64/dovecot/pop3
auth default:
 mechanisms: plain login
 cache_size: 300
 cache_ttl: 600
 worker_max_count: 200
 passdb:
   driver: ldap
   args: /etc/dovecot-ldap.conf
 passdb:
   driver: pam
 userdb:
   driver: static
   args: uid=500 gid=500 home=/home/vmail/%u
 userdb:
   driver: passwd
 socket:
   type: listen
   client:
 path: /var/spool/postfix/private/auth
 mode: 432
 user: postfix
 group: postfix
/

Thanks so much

Juan Felipe Estrada
Universidad del Norte
Barranquilla Colombia


Re: [Dovecot] VZW Blackberry BIS problems?

2009-10-20 Thread Patrick Domack
Hmm, I haven't had any issues with BIS or BES users. But I checked my  
config and I have:

mailbox_idle_check_interval = 120

I did that for other purposes, guess that just fixed it for me, before  
bis ever started using the idle command.



Quoting "B. Cook" :

Ever since Columbus day things have been strange with my two dovecot  
servers, according to my Blackberry users.


We do not have a BES just the standard BIS that comes with a  
personal account.


Several people have told me that since that Monday that they get  
occasional duplicate copies of messages which only appear singularly  
in their Maildir inboxes.


I myself even called VZW and got transferred to RIM themselves where  
they 'reset' my account; (same as me going into the BIS server and  
deleting and adding again) only to have the same thing happen; again  
occasionally..


Below is relevant dovecot info..

-r-xr-xr-x  1 root  wheel  164064 Oct  1 17:16 /usr/local/sbin/dovecot

(date it was built; prior to any problems.. *whew*) ;)

 1  # 1.2.4: /usr/local/etc/dovecot.conf
 2  # OS: FreeBSD 7.2-RELEASE-p3 i386
 3	ssl_cert_file:  
/usr/local/etc/lighttpd/ssl/mail.poughkeepsieschools.org.pem
 4	ssl_key_file:  
/usr/local/etc/lighttpd/ssl/mail.poughkeepsieschools.org.pem

 5  disable_plaintext_auth: no
 6  verbose_ssl: yes
 7  login_dir: /var/run/dovecot/login
 8  login_executable: /usr/local/libexec/dovecot/imap-login
 9  login_greeting: mail.poughkeepsieschools.org OK
10  first_valid_uid: 89
11  last_valid_uid: 89
12  first_valid_gid: 89
13  last_valid_gid: 89
14  maildir_copy_preserve_filename: yes
15  mail_plugins: quota imap_quota
16	imap_client_workarounds: delay-newmail outlook-idle  
tb-extra-mailbox-sep

17  auth default:
18mechanisms: plain login
19user: vpopmail
20passdb:
21  driver: vpopmail
22userdb:
23  driver: vpopmail
24socket:
25  type: listen
26  client:
27path: /var/run/dovecot/auth-client
28mode: 438
29  plugin:
30quota: maildir:User quota
31expire: Trash 7 Spam 30

Now what does not show here is something that I put in that it  
looked like it was supposed to help but didn't..


mailbox_idle_check_interval = 30

after looking around at other people complaining about BIS and  
possible dovecot issues it seemed that that entry was the 'magic'  
the BIS was missing; except I never had it and never had troubles.


I'm assuming this is a BIS issue of some sort, but I can't tell.

After looking on the wiki I didn't see anything that says "BIS users  
look here for tips.. "


So I'm assuming there aren't any; I think it should just work with  
the IMAP server..


Any help would be appreciated as everyone thinks this is 'our  
problem' and "if we had an exchange server we wouldn't be having  
these problems.."


Thanks in advance..









Re: [Dovecot] IMAP goes down from time to time

2009-10-20 Thread Andreas Ntaflos
On Tuesday 20 October 2009 19:15:35 Juan Felipe Estrada wrote:
> Good Afternoon
>
> I´m really new at this and i don´t know if i´m posting at the right
> place.
>
> My problem is that our Dovecot IMAP is stopping from time to time
> with no info in the log, i just realize about this when our support
> person call me saying that the whatsup monitor is showing the IMAP4
> process down. I can figure about this too by trying to get in our
> webmail Horde and i cannot login.
>
> Here i post my Dovecot -n command i´ll appreciate any help.
>
> /# 1.0.7: /etc/dovecot.conf

Preliminary idea: this is a very old version of Dovecot. Before diving 
into debugging sessions maybe you could do yourself a favour and update 
to a more recent version, such as 1.2.6? 

Now, when you realise that some process (is it imap-login or imap?) is 
down can you log into the server and confirm that, using ps or another 
tool? You say the log files don't tell you anything. Can you set 
auth_debug = yes and/or mail_debug = yes? Maybe that can give you a 
clou.

And how about the LDAP server? Being unable to log in could have 
something to do with the authentication backend. How does your 
dovecot-ldap.conf look like? Could it be that the LDAP lookup somehow 
crashes an IMAP-related process?

A newer, better Dovecot version will probably help you a lot with the 
debugging. It may even make the error go away. You should seriously 
consider upgrading.

HTH 

Andreas
-- 
Andreas Ntaflos
Vienna, Austria

GPG Fingerprint: 6234 2E8E 5C81 C6CB E5EC  7E65 397C E2A8 090C A9B4


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


Re: [Dovecot] IMAP goes down from time to time

2009-10-20 Thread Timo Sirainen
On Tue, 2009-10-20 at 12:15 -0500, Juan Felipe Estrada wrote:
> /# 1.0.7: /etc/dovecot.conf

Like Andreas said, this is an old version. There have been a lot of LDAP
fixes in v1.1, so upgrading is likely to help.

>   passdb:
> driver: ldap
> args: /etc/dovecot-ldap.conf
>   passdb:
> driver: pam

Also do you really want to have system users also be able to log in? If
not, remove passdb pam.



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


Re: [Dovecot] VZW Blackberry BIS problems?

2009-10-20 Thread Timo Sirainen
On Tue, 2009-10-20 at 08:03 -0400, B. Cook wrote:
> Now what does not show here is something that I put in that it looked 
> like it was supposed to help but didn't..
> 
> mailbox_idle_check_interval = 30

This is the default already. And changing it has almost zero effect if
you built Dovecot with inotify/dnotify/kqueue support. If the problem is
related to IDLE connections giving answers too fast, I guess you could
just disable the inotify/dnotify/kqueue (by recompiling).



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


Re: [Dovecot] simple steps with sieve

2009-10-20 Thread Gavin Hamill
On Tue, 2009-10-20 at 12:28 -0400, Timo Sirainen wrote:
> On Tue, 2009-10-20 at 17:34 +0200, Stephan Bosch wrote:
> > 6) Adjust Deliver/Sieve to accept the original recipient as a separate 
> > parameter.
> 
> I think more like "alias-normalized recipient" or something like that,
> since "original recipient" would be what -a parameter does and that
> doesn't really help.
> 
> That would solve it from Dovecot's side, but does it actually help,
> meaning can any MTA give such a parameter? :)

If we go down that road, we'll probably need at least two seperate
inputs, one for the alias-normalised, and one for the publicly
advertised email address.

Hence, when the autoreply is generated, it comes from
 rather than
 or whatever it's become normalised to.

That said, it's at least one step further down the road to a working
solution.

At the moment I'm hacking at roundcube's sieverules plugin to try and
draw up the functionality without requiring any changes in the MTA/LDA,
but a more generic solution would be very welcome since it'd provide
protection from the next inevitable roundcube security hole. 

.. alternatively a plaintext dict of "fromaddress alias1 aliasN" would
be clumsy but easily scriptable to update from any LDAP/MySQL/sqlite
database...

Cheers,
Gavin.




Re: [Dovecot] simple steps with sieve

2009-10-20 Thread Timo Sirainen
On Tue, 2009-10-20 at 18:48 +0100, Gavin Hamill wrote:
> If we go down that road, we'll probably need at least two seperate
> inputs, one for the alias-normalised, and one for the publicly
> advertised email address.
> 
> Hence, when the autoreply is generated, it comes from
>  rather than
>  or whatever it's become normalised to.

That's something I had just today decided to do anyway.



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


Re: [Dovecot] HA Dovecot Config?

2009-10-20 Thread Eric Rostetter

Quoting dove...@corwyn.net:

As I look at upgrading the mail server, I'd like to change to a  
higher availability configuration (where the server can fail and I  
don't have to reconfig my imap users).


Sounds like a great plan!

For the SMTP that's easy, because I can use multiple MX records, and  
I can redirect a port forward from one server to another. But IMAP  
doesn't have the same functionality, because it's the storage that  
matters.


True for SMTP as long as you handle the SSL certificate issue, or don't
use encryption.

For IMAP to be truely HA, you will need shared storage of some sort.

What's the "best" way to do that?  Clustered servers using a SAN?  
NAS? some sort of appliance in front?  Suggestions?


There is no single "best way" since it will depend on your budget, skills,
etc.

Certainly a SAN is one way to go, and allows for possibly active-active
setups (depending on file system) and great flexibility.

You could also try that with NAS if you are careful enough.  SAN
is more complex to setup than a NAS, but NAS is harder to setup correctly
for dovecot than a SAN would be, so flip a coin there.

You can "emulate" a SAN with something like DRBD if budget doesn't allow a
real SAN (that is what I do).

Or you could do multi-attached active-passive disk systems (external disk
tray is physically connected to 2 machines in active-passive setup).

Which to use depends on knowledge/skill, costs/budget, type of
cluster/failover needed, vendor support if that matters to you, etc.

I setup mine as a pair of redundant front-end firewalls (linux heartbeat)
which connect to a trio of Red Hat Cluster Suite machines using DRBD+GFS
(two nodes do DRBD+GFS and handle SMTP+POP3+IMAP4, while the third node
does _NOT_ do DRBD+GFS, and simply does the webmail interface).


Thanks!

Rick


--
Eric Rostetter
The Department of Physics
The University of Texas at Austin

Go Longhorns!


Re: [Dovecot] testing needed

2009-10-20 Thread Bill Cole

Timo Sirainen wrote, On 10/19/09 6:11 PM:

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.)


As I read them, the various man pages for dup() confirm that. In addition to 
those man pages' statements about standards compliance, the fact that dup() 
is in 4BSD's unistd.h is also a strong clue. When looking for this sort of 
info, an invaluable resource is the man page archive at 
http://www.freebsd.org/cgi/man.cgi which has man collections from many 
different branches of the Unix family tree going back to Unix 7th edition 
and BSD 2.8.


It is useful for people who don't routinely work with file access code to 
note that "same fd" means significantly more than "same file" so it isn't as 
simple as having processes open() the same file. One man page for dup() says 
this:


   The object referenced by the descriptor does not distinguish between
   fildes and fildes2 in any way.  Thus if fildes2 and fildes are
   duplicate references to an open file, read(2), write(2) and lseek(2)
   calls all move a single pointer into the file, and append mode,
   non-blocking I/O and asynchronous I/O options are shared between the
   references.  If a separate pointer into the file is desired, a
   different object reference to the file must be obtained by issuing an
   additional open(2) call.  The close-on-exec flag on the new file
   descriptor is unset.



Re: [Dovecot] testing needed

2009-10-20 Thread Timo Sirainen
On Tue, 2009-10-20 at 14:52 -0400, Bill Cole wrote:
> > 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.)
> 
> As I read them, the various man pages for dup() confirm that. In addition to 
> those man pages' statements about standards compliance, the fact that dup() 
> is in 4BSD's unistd.h is also a strong clue. When looking for this sort of 
> info, an invaluable resource is the man page archive at 
> http://www.freebsd.org/cgi/man.cgi which has man collections from many 
> different branches of the Unix family tree going back to Unix 7th edition 
> and BSD 2.8.

Thanks. I've been using man.freebsd.org to look up FreeBSD's man pages,
but I hadn't noticed it has a lot more.


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


[Dovecot] deliver+sieve: Destination address (-a) parsing changes

2009-10-20 Thread Frank Behrens
When I upgraded my old, long running dovecot 1.1 to newer dovecot-1.2.4 + 
doevecot-sieve-
0.1.12 I observed a change in destination address (-a) parsing.

Old behaviour:
When Timo introduced this feature
(http://www.dovecot.org/list/dovecot/2007-September/025813.html)
it was possible to hand over only the detail part. In my sendmail configuration 
I used "-a +$h", 
where $h contains the detail part and may be empty. By default sendmail can 
call the delivery 
agent with the following information:
$u: The recipient user (always set)
$h: Detail part, may be empty
$g: The sender address (relative to the recipient).

New behaviour:
The current sieve version needs a complete address with local- and domain-part. 
Otherwise 
we get a warning like
deliver(user): sieve: envelope recipient address 'user' is unparseable.

The problem is, that the domain part is not always available, e.g. for local 
delivered emails. 
This is the main problem, although the setup could be simplified if deliver 
would accept the 
old syntax. I'm going to make modifications to sendmail to be able to have all 
address 
information available, but this will not solve the problem with missing domain.


Now comes my question:
Is it better to enhance the address parsing in sieve plugin or should I use a 
wrapper around 
deliver? The latter is not very difficult, but introduces an additional process 
(that may fail).

Regards,
   Frank

-- 
Frank Behrens, Osterwieck, Germany
PGP-key 0x5B7C47ED on public servers available.



Re: [Dovecot] Panic when using QRESYNC

2009-10-20 Thread Michael M. Slusarz

Quoting Timo Sirainen :


On Fri, 2009-10-09 at 12:56 -0600, Michael M. Slusarz wrote:


Oct  9 12:49:30 bigworm EXT(slusarz): : Panic: file imap-fetch.c: line
227 (get_expunges_fallback): assertion failed: (mail->uid > next_uid)


But the crash is anyway now fixed:
http://hg.dovecot.org/dovecot-1.2/rev/73c4a7d325fe


Hmmm... Rebuilt with the latest 1.2.7-pre code yesterday, and I am  
still seeing this (on at least 2 different mailboxes in the last day):


Oct 20 13:23:32 bigworm dovecot: IMAP(slusarz): Panic: file  
imap-fetch.c: line 2

27 (get_expunges_fallback): assertion failed: (mail->uid > next_uid)
Oct 20 13:23:32 bigworm dovecot: IMAP(slusarz): Raw backtrace: imap  
[0x4a199b] -

imap [0x4a1a13] -> imap [0x4a10f6] -> imap(imap_fetch_begin+0x6bb) [0x42415b]
-> imap(cmd_select_full+0x54a) [0x41e5ba] -> imap [0x420b4d] -> imap  
[0x420c2d]
-> imap(client_handle_input+0x135) [0x420e55] ->  
imap(client_input+0x5c) [0x4219
2c] -> imap(io_loop_handler_run+0xbd) [0x4a988d] ->  
imap(io_loop_run+0x18) [0x4a
8d08] -> imap(main+0x531) [0x429441] ->  
/lib/libc.so.6(__libc_start_main+0xfd) [

0x7f6c456599ed] -> imap [0x4199f9]

Is this an issue with needing to delete cache files from before the  
fix?  Or is this still an issue?


michael



Re: [Dovecot] Panic when using QRESYNC

2009-10-20 Thread Timo Sirainen
On Tue, 2009-10-20 at 13:34 -0600, Michael M. Slusarz wrote:
> Hmmm... Rebuilt with the latest 1.2.7-pre code yesterday, and I am  
> still seeing this (on at least 2 different mailboxes in the last day):
> 
> Oct 20 13:23:32 bigworm dovecot: IMAP(slusarz): Panic: file  
> imap-fetch.c: line 2
> 27 (get_expunges_fallback): assertion failed: (mail->uid > next_uid)

Is it logging any other errors anymore? I can't really see how the code
is broken to cause this. Can you again reproduce it and send me that
mailbox's dovecot.index and dovecot.index.log files and the command that
crashed it?

Or getting a core dump and gdbing it and printing mail->uid and next_uid
values could also show something useful.

> Is this an issue with needing to delete cache files from before the  
> fix?  Or is this still an issue?

No need to delete anything.


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


Re: [Dovecot] testing needed

2009-10-20 Thread Jim Reid
Timo, you test program runs fine on MacOSX 10.5.8 (Darwin Kernel  
Version 9.8.0)


Re: [Dovecot] Panic when using QRESYNC

2009-10-20 Thread Timo Sirainen
On Tue, 2009-10-20 at 15:38 -0400, Timo Sirainen wrote:
> On Tue, 2009-10-20 at 13:34 -0600, Michael M. Slusarz wrote:
> > Hmmm... Rebuilt with the latest 1.2.7-pre code yesterday, and I am  
> > still seeing this (on at least 2 different mailboxes in the last day):
> > 
> > Oct 20 13:23:32 bigworm dovecot: IMAP(slusarz): Panic: file  
> > imap-fetch.c: line 2
> > 27 (get_expunges_fallback): assertion failed: (mail->uid > next_uid)
> 
> Is it logging any other errors anymore? I can't really see how the code
> is broken to cause this.

Oh, this actually should fix it:
http://hg.dovecot.org/dovecot-1.2/rev/36b8d97d0f58


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


Re: [Dovecot] Panic when using QRESYNC

2009-10-20 Thread Michael M. Slusarz

Quoting Timo Sirainen :


On Tue, 2009-10-20 at 15:38 -0400, Timo Sirainen wrote:

On Tue, 2009-10-20 at 13:34 -0600, Michael M. Slusarz wrote:
> Hmmm... Rebuilt with the latest 1.2.7-pre code yesterday, and I am
> still seeing this (on at least 2 different mailboxes in the last day):
>
> Oct 20 13:23:32 bigworm dovecot: IMAP(slusarz): Panic: file
> imap-fetch.c: line 2
> 27 (get_expunges_fallback): assertion failed: (mail->uid > next_uid)

Is it logging any other errors anymore? I can't really see how the code
is broken to cause this.


Oh, this actually should fix it:
http://hg.dovecot.org/dovecot-1.2/rev/36b8d97d0f58


OK - I'm building with the latest source and will keep my eye out for  
any issues.


michael



Re: [Dovecot] Capability info in hello message not complete?

2009-10-20 Thread Timo Sirainen
On Tue, 2009-10-20 at 17:10 +0200, Michal Hlavinka wrote:
> On Tuesday 13 October 2009 19:10:15 Timo Sirainen wrote:
> > On Tue, 2009-10-13 at 17:26 +0200, Michal Hlavinka wrote:
> > > would it be possible to:
> > > a) send content of imap_capability in greeting message? It should be
> > > user's responsibility if it's set to something "weird"
> > 
> > I guess I could do this.
> 
> "could" - does it mean you are waiting for my response? If yes this option is 
> fine for me, since it should fix the issue.

It meant I added it to my TODO list, but hadn't yet got around to doing
it. Anyway, done now: http://hg.dovecot.org/dovecot-1.2/rev/ab32d7e2c0d6



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


Re: [Dovecot] Expire plugin per domain

2009-10-20 Thread Timo Sirainen
On Tue, 2009-10-20 at 10:00 -0500, Jose Luis Marin Perez wrote:
>  My problem is that I have no idea how to create the userdb.sh 

From my previous mail:

> 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.

So start with copy&pasting your vchkpw-wrapper.sh.



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


Re: [Dovecot] Expire plugin per domain

2009-10-20 Thread Jose Luis Marin Perez

Hi Timo,

I copied vchkpw-wrapper.sh as userdb.sh, being as follows:

userdb.sh

#!/bin/bash

DOMAIN=`echo $VPOPUSER|sed s/^.*@//`

if [ "$DOMAIN" = "operaciones.qnet.com.pe" ]; then
  export USERDB_AUTOCREATE=INBOX.Spam
  export USERDB_AUTOSUBSCRIBE=INBOX.Spam
  export USERDB_EXPIRE="INBOX.Spam 1 INBOX.Spam.* 1"
  export USERDB_EXPIRE_DICT="proxy::expire"
  export EXTRA="USERDB_AUTOCREATE USERDB_AUTOSUBSCRIBE USERDB_EXPIRE 
USERDB_EXPIRE_DICT"
fi

unset USER
exec $*

When I run the command /usr/local/sbin/dovecot --exec-mail ext 
/usr/local/bin/expire-tool.sh --test

 I get the same error message

Fatal: expire and expire_altmove settings not set

expire-tool.sh

#!/bin/bash
MAIL_PLUGINS=${MAIL_PLUGINS//imap_quota/}
MAIL_PLUGINS=${MAIL_PLUGINS//mail_log/}
/usr/local/libexec/dovecot/expire-tool $1

dovecot --build-options
Build options: ioloop=epoll notify=dnotify ipv6 openssl
Mail storages: cydir dbox maildir mbox raw shared
SQL drivers: mysql
Passdb: checkpassword pam passwd passwd-file shadow sql
Userdb: nss passwd passwd-file prefetch sql static

What's wrong?

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 per domain
> From: t...@iki.fi
> To: jolumape...@hotmail.com
> CC: dovecot@dovecot.org
> Date: Tue, 20 Oct 2009 16:25:29 -0400
> 
> On Tue, 2009-10-20 at 10:00 -0500, Jose Luis Marin Perez wrote:
> >  My problem is that I have no idea how to create the userdb.sh 
> 
> From my previous mail:
> 
> > 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.
> 
> So start with copy&pasting your vchkpw-wrapper.sh.
> 
  
_
Connect to the next generation of MSN Messenger 
http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline

Re: [Dovecot] Expire plugin per domain

2009-10-20 Thread Timo Sirainen
On Tue, 2009-10-20 at 15:43 -0500, Jose Luis Marin Perez wrote:
> DOMAIN=`echo $VPOPUSER|sed s/^.*@//`
..
> > > vchkpw-wrapper.sh does, except since it doesn't call vchkpw
> itself,
> > > it'll need to get the username from $USER instead of $VPOPUSER.
> > > 

The above explains the first problem...

Sorry, but I've spent already way too much time answering your
questions. My previous email+wiki contains all the information necessary
to write the script. If you can't do it yourself, find/pay someone else
who isn't as busy as me.



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


Re: [Dovecot] Expire plugin per domain

2009-10-20 Thread Jose Luis Marin Perez

Thanks Timo

> From: t...@iki.fi
> To: jolumape...@hotmail.com
> Date: Tue, 20 Oct 2009 16:46:52 -0400
> CC: dovecot@dovecot.org
> Subject: Re: [Dovecot] Expire plugin per domain
> 
> On Tue, 2009-10-20 at 15:43 -0500, Jose Luis Marin Perez wrote:
> > DOMAIN=`echo $VPOPUSER|sed s/^.*@//`
> ..
> > > > vchkpw-wrapper.sh does, except since it doesn't call vchkpw
> > itself,
> > > > it'll need to get the username from $USER instead of $VPOPUSER.
> > > > 
> 
> The above explains the first problem...
> 
> Sorry, but I've spent already way too much time answering your
> questions. My previous email+wiki contains all the information necessary
> to write the script. If you can't do it yourself, find/pay someone else
> who isn't as busy as me.
> 
  
_
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

Re: [Dovecot] IMAP goes down from time to time

2009-10-20 Thread Juan Felipe Estrada

Good afternoon again

I was thinking about the Dovecot upgrading so i´m doing this in the next 
hours. in the other hand here i show you the dovecot-ldap.conf file I 
think it has just the necessary options to bind the LDAP server.


/hosts = *
base = ou=People,o=*,o=**
ldap_version = 3
auth_bind = yes
auth_bind_userdn = uid=%u,ou=People,o=**,o=**

/About the dovecot.conf should I use some login options as 
/login_process_per_connection = yes  /or  /login_processes_count = 1/?


For now thanks so much for the help i´ll inform about the new version 
installation


Juan Felipe Estrada

dovecot-requ...@dovecot.org escribió:

Send dovecot mailing list submissions to
dovecot@dovecot.org

To subscribe or unsubscribe via the World Wide Web, visit
http://dovecot.org/cgi-bin/mailman/listinfo/dovecot
or, via email, send a message with subject or body 'help' to
dovecot-requ...@dovecot.org

You can reach the person managing the list at
dovecot-ow...@dovecot.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of dovecot digest..."


Today's Topics:

   1. Re: Need a little shadow to MySQL conversion help (Jerry)
   2. Re: Need a little shadow to MySQL conversion help (Marc Perkel)
   3. Re: Need a little shadow to MySQL conversion help
  (Andreas Ntaflos)
   4. Re: Need a little shadow to MySQL conversion help
  (Andreas Ntaflos)
   5. IMAP goes down from time to time (Juan Felipe Estrada)
   6. Re: VZW Blackberry BIS problems? (Patrick Domack)
   7. Re: IMAP goes down from time to time (Andreas Ntaflos)
   8. Re: IMAP goes down from time to time (Timo Sirainen)
   9. Re: VZW Blackberry BIS problems? (Timo Sirainen)


--

Message: 1
Date: Tue, 20 Oct 2009 12:49:16 -0400
From: Jerry 
Subject: Re: [Dovecot] Need a little shadow to MySQL conversion help
To: dovecot@dovecot.org
Message-ID: <20091020124916.114b8...@scorpio.seibercom.net>
Content-Type: text/plain; charset=US-ASCII

On Tue, 20 Oct 2009 17:57:35 +0200
Andreas Ntaflos  wrote:

  

On Tuesday 20 October 2009 17:07:49 Timo Sirainen wrote:


On Oct 20, 2009, at 9:45 AM, Andreas Ntaflos wrote:
  

I'd say you need a static userdb. Something like this:


A couple of small things:
  

passdb sql {
args = /etc/dovecot/dovecot-sql.conf
}

userdb static {
args = uid=vmail gid=vmail home=/var/vmail/%Ld/%Ln
allow_all_users=yes }


%Ld/%Ln at this point works for now, but maybe not in future. I'd
have passdb already change it lowercase. Also allow_all_users=yes
isn't required (but maybe not harmful) since passdb sql is used.
  
That's good to know, thanks. And you're right of course, the passdb 
should already return the correct information, Dovecot shouldn't be 
asked to change anything afterwards.


Fortunately I myself don't use MySQL anymore but have migrated 
everything to PostgreSQL. It does a much better job as a DBMS

(remote, secured access to the DB, fine-grained permissions and
rules) and also knows about case sensitivity. So foo...@example.com
is not the same as foo...@example.com. Which eliminates this problem
class altogether.



MySQL, since at least 5.x knows about case. You can Google for the
information if you want.

  

password_query = SELECT password FROM view_users WHERE email='%u';


SELECT password, email AS user FROM ..

changes username to same case as it's in the database (so lowercase
probably) and there's no need to use %L anymore.
  
You mean something like 


SELECT password, LOWER(email) as user FROM view_users WHERE email='%u'

should do the trick? I shall test this on my test server, just for
fun.

Andreas



Re: [Dovecot] deliver+sieve: Destination address (-a) parsing changes

2009-10-20 Thread Timo Sirainen
On Tue, 2009-10-20 at 21:13 +0200, Frank Behrens wrote:
> When Timo introduced this feature
> (http://www.dovecot.org/list/dovecot/2007-September/025813.html)
> it was possible to hand over only the detail part. In my sendmail 
> configuration I used "-a +$h", 
> where $h contains the detail part and may be empty. 

Well, I can say I never intended for it to work that way..



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


Re: [Dovecot] deliver+sieve: Destination address (-a) parsing changes

2009-10-20 Thread Frank Behrens
Timo Sirainen  wrote on 20 Oct 2009 18:53:
> On Tue, 2009-10-20 at 21:13 +0200, Frank Behrens wrote:
> > When Timo introduced this feature
> > (http://www.dovecot.org/list/dovecot/2007-September/025813.html)
> > it was possible to hand over only the detail part. In my sendmail 
> > configuration I used "-a +$h", 
> > where $h contains the detail part and may be empty. 
> 
> Well, I can say I never intended for it to work that way..
 
Yes, I believe that, it looks ugly. But that way it was easily to setup with 
sendmail. 

It seems that sendmail's LDA interface does not exactly match deliver's 
expectations. Hm, do 
we must support sendmail? No, but it is one of the most used mailservers. So 
what?
1. modify sendmail
2. modify deliver
3. insert a wrapper
4. ???

Now I tend to 3, but 2. would have the advantage to make dovecot more robust, 
also in 
collaboration with other MTAs.

-- 
Frank Behrens, Osterwieck, Germany
PGP-key 0x5B7C47ED on public servers available.