Re: [Dovecot] Multiple private namespace question

2008-05-24 Thread Troy Engel

Timo Sirainen wrote:


But I don't think there are any problems if you make INBOX. namespace
the hidden one. Most clients don't care about namespaces.


Hi Timo, thanks for the reply - I understand what you're saying. Can you 
theorize what will happen to the already configured/subscribed users 
(Thunderbird) whose tree looks like:


  INBOX
|_ Sent
|_ Drafts

...when I would change the default namespace around and make the empty 
prefix inbox=yes? Would everything suddenly become flat on them and 
cause confusion? Ala:


  INBOX
  Sent
  Drafts

Most Thunderbird instances already configured say INBOX. under the 
setting of '(IMAP Account) - Server Settings - Advanced - Personal 
Namespace'; I think this value is filled in automatically by Thunderbird 
the first time you configure the account and it queries the server and 
received the namespace advertisement.


Would it be correct to assume that all these existing users would be 
fine (because of the hidden INBOX prefix namespace, compatibility mode), 
and only new users would see a flat hierarchy when setting up Thunderbird?


Many thanks,
-te

--
Troy Engel | Systems Engineer
Fluid Inc. | http://www.fluid.com


[Dovecot] Multiple private namespace question

2008-05-23 Thread Troy Engel

(apologies if this has been covered, can't find it on the Wiki/FAQ, etc.)

We have a stellar, fantastic, hard working Dovecot 1.0.5 (yes, I need to 
upgrade) installation running in Courier-IMAP compatibility mode:


  mail_location = maildir:~/Maildir:INDEX=/var/spool/dovecot/indexes/%1u/%u

  namespace private {
separator = .
prefix = INBOX.
inbox = yes
  }

A user purchased a Windows Mobile 6 device which is ignoring the 
namespace (it's the device's bug for sure, other people report it on 
forums around the 'net) and there's no way on this device to manually 
set the Prefix; so, his Sent mails are never making it back to the 
server when replying from the device because of the missing INBOX. issue.


Can I add a second hidden namespace with no prefix:

  namespace private {
separator = .
prefix =
hidden = yes
  }

...to fix his problem, but without adversely affecting anyone else? The 
issue that has given me pause is this comment in the config file:


  Default namespace is simply done by having a namespace with empty 
prefix.


..but then there's also:

  If namespace is hidden, it's not advertised to clients via NAMESPACE 
extension or shown in LIST replies.


I'm not sure what exactly will happen by adding a hidden namespace with 
no prefix after an advertised namespace with a prefix; this is a live 
server, so mucking up the works with a bad config is not an option. :)


Anyone have a clue if this is valid/good/correct and Dovecot will play 
nicely?


Many thanks,
-te

--
Troy Engel | Systems Engineer
Fluid, Inc | http://www.fluid.com


Re: [Dovecot] Multiple private namespace question

2008-05-23 Thread Troy Engel

Charles Marcus wrote:

On 5/23/2008, Troy Engel ([EMAIL PROTECTED]) wrote:
Can I add a second hidden namespace with no prefix: 


Certainly...

http://wiki.dovecot.org/Namespaces


See, the wiki page has it backwards though of the way I need to do it; 
the empty prefix namespace is the inbox = yes, not the hidden = yes. I'm 
giving pause because I can't find examples of anyone doing it the other 
way around; empty prefix, hidden = yes as NOT the default namespace 
(inbox = yes).


Have you run the reverse configuration like I need and can confirm it works?

thx,
-te

--
Troy Engel | Systems Engineer
Fluid, Inc | http://www.fluid.com


Re: [Dovecot] Multiple private namespace question

2008-05-23 Thread Troy Engel

Charles Marcus wrote:


No, but there's no reason it wouldn't... a namespace is a namespace.

Easiest is to just try it...


...I think you missed the whole part of my original email that stated 
this is a live, hard working server and just trying things is not an 
option. I'm normally a just-push-the-button type of guy, but in this 
case I need to get quantified evidence that it will actually do what I 
need without breaking other things.


-te

--
Troy Engel | Systems Engineer
Fluid, Inc | http://www.fluid.com


Re: [Dovecot] Squirrelmail + Dovecot + Maildir

2007-12-19 Thread Troy Engel

Vicki Stanfield wrote:


Here is what I see in /etc/squirrelmail/config.php

$optional_delimiter = '.';
[snip]
$default_folder_prefix  = '';
$trash_folder   = 'Trash';
$sent_folder= 'Sent';
$draft_folder   = 'Drafts';
$default_move_to_trash  = true;
$default_move_to_sent   = true;
$default_save_as_draft  = true;


This may or not be related, but I had a lot of trouble getting SM to 
work in it's dovecot mode, I'm not sure it's entirely up to snuff - I 
haven't spent the time to debug. Instead I switched it back to Courier 
mode (we migrated from Courier) and it works like a champ - you just 
need to adjust your $default_folder_prefix if you don't actually run 
Dovecot in Courier-like mode (namespace), I do believe.


Here are what I believe to be the bits out of my config.php that matter:

$imapServerAddress  = '127.0.0.1';
$imapPort   = 143;
$imap_server_type   = 'courier';
$invert_time= false;
$optional_delimiter = '.';

$default_folder_prefix  = 'INBOX.';
$trash_folder   = 'Trash';
$sent_folder= 'Sent';
$draft_folder   = 'Drafts';
$default_move_to_trash  = true;
$default_move_to_sent   = true;
$default_save_as_draft  = true;
$show_prefix_option = false;
$auto_expunge   = true;
$default_sub_of_inbox   = false;
$show_contain_subfolders_option = false;
$auto_create_special= true;
$delete_folder  = true;
$noselect_fix_enable= false;

$allow_thread_sort= true;
$allow_server_sort= true;
$allow_charset_search = true;
$uid_support  = true;

$no_list_for_subscribe = false;
$imap_auth_mech = 'login';
$use_imap_tls = false;

The matching namespace in dovecot.conf that goes along with this is:

# Courier-IMAP friendly
namespace private {
  separator = .
  prefix = INBOX.
  inbox = yes
}

Hope this helps some,
-te

--
Troy Engel | Systems Engineer
Fluid, Inc | http://www.fluid.com


Re: [Dovecot] umask not applied

2007-11-14 Thread Troy Engel

Thomas wrote:


I searched the wiki and googled but couldn't find anything helpful. Do 
you have any ideas?


I'll be the first to mention that 1.0rc15 is ancient by dovecot 
standards, upgrade to 1.0x first and see if it's still broken.


-te

--
Troy Engel | Systems Engineer
Fluid, Inc | http://www.fluid.com


Re: [Dovecot] Dovecot hanging up with many defunct processes

2007-10-09 Thread Troy Engel

Mayank Joshi wrote:


 passdb:
 driver: pam
 userdb:
 driver: passwd
4) Dovecot's PAM file (/etc/pam.d/dovecot)
 #%PAM-1.0
 authrequired pam_ldap.so
 account required pam_ldap.so
 session required pam_mkhomedir.so skel=/etc/skel umask=0077
 session required pam_ldap.so


Our situation is similar (but not exact) to yours - I'm authenticating 
against LDAP though and not AD2003. Perhaps one of these settings I use 
may help:


dovecot.conf:
  login_process_per_connection: no

  auth default:
cache_size: 4096
cache_ttl: 7200
passdb:
  driver: pam
  args: cache_key=%u dovecot
userdb:
  driver: passwd
  args: blocking=yes

The blocking=yes in the userdb might be the first thing you try, see 
these wiki pages for the reasons I have it like this:


  http://wiki.dovecot.org/UserDatabase/NSS
  http://wiki.dovecot.org/AuthDatabase/Passwd

Additionally my pam.d dovecot uses the system stack, which *then* uses 
nss_ldap on it's own; I don't specifically bind pam_ldap into the 
dovecot pam.d file:


  # cat /etc/pam.d/dovecot
  #%PAM-1.0
  auth   required pam_nologin.so
  auth   required pam_stack.so service=system-auth
  accountrequired pam_stack.so service=system-auth
  sessionrequired pam_stack.so service=system-auth

In this case the file /etc/nsswitch.conf is controlling my 
authentication mechanism (LDAP), and the pam_ldap.so stack entry is 
located in /etc/pam.d/system-auth (these are all Red Hat defaults out of 
the box).


Hope some of this helps,
-te

--
Troy Engel | Systems Engineer
Fluid, Inc | http://www.fluid.com


Re: [Dovecot] --enable-headers-install problem in 1.0.5

2007-10-02 Thread Troy Engel

Trever L. Adams wrote:
 I am trying to get a SPEC file for an RPM to build a devel package. I
 have it working, except for one thing. 1.0.5 doesn't actually install
 the headers with that option to configure found in the subject.

See Axel's SPEC file, he installs by hand:

  http://dl.atrpms.net/all/dovecot.spec

(look for # devel files for the specific section)

-te

--
Troy Engel | Systems Engineer
Fluid, Inc | http://www.fluid.com


Re: [Dovecot] filtering when mail is moved to IMAP Inbox

2007-09-26 Thread Troy Engel

Scott Silva wrote:
Might be easier to have fetchmail get the mails from gmail and then you 
can process them any way you want. You can write procmail rules, or 
sieve scripts, or whatever you want.


+1 - you're using a hammer when you need a screwdriver. Use something 
fetchmail-esque to POP out your email instead of TBird.


-te

--
Troy Engel | Systems Engineer
Fluid, Inc | http://www.fluid.com


Re: [Dovecot] Running a dovecot IMAPS server

2007-09-24 Thread Troy Engel

FiL @ Kpoxa wrote:



I know this is totally unrelated to this topic, but...
Is there any extension to create and use templates? I don't like full 
name wrote: in my reply messages and would prefer

some custom templates, that would be different for different accounts.


This might not be exactly what you need but then again it might be - I 
use an extension named Clippings:


  https://addons.mozilla.org/en-US/thunderbird/addon/1347

When you're in the compose window, rightclick on an empty space in the 
text editing area and choose Clippings. I have templates for all sorts 
of things (new hire welcome message with company info, for instance) 
that save me a lot of time.


-te

--
Troy Engel | Systems Engineer
Fluid, Inc | http://www.fluid.com


Re: [Dovecot] Running a dovecot IMAPS server

2007-09-21 Thread Troy Engel

Charles Marcus wrote:


Does KMail actually work this way? This would be enough to make me try 
it out... although my day to day WS is a windows box, so I'd most likely 
wait until KDE4 is available on Windows...


Offtopic to the left -- before I switched to using GMail for my personal 
mail, I used to use Sylpheed ( http://sylpheed.sraoss.jp/en/ ) and it 
stores messages in a MH format (a file-per-message design somewhat like 
Maildir) and it can import mbox files from Thunderbird. The client 
itself is very nice too, I remember really liking it a lot.


Bonus: Win32 binaries are also available.

hth,
-te

--
Troy Engel | Systems Engineer
Fluid Inc. | http://www.fluid.com


Re: [Dovecot] Running a dovecot IMAPS server

2007-09-16 Thread Troy Engel

Timothy Murphy wrote:


It could therefore be described as a normal maildir format;
and if dovecot does not like this format,
I think this should be explained clearly in the dovecot documentation.
[I didn't find the Maildir vs Maildir++ account very illuminating.]


I'm jumping in late to the game (sorry missed your original post 
somehow); my personal opinion here is that kmail is doing what I would 
call non-standard Maildir-ing, and it's causing you confusion with what 
most of us learn about Maildir in our travels.


From what I understand via the spec and all Timo's posts, the actual 
folder format is never laid down in stone and is open to each 
implementation. However the default/accepted Maildir format as used by 
all the big boys (courier, dovecot, exim, postfix, etc.) is:


  ~/Maildir/.Family/
  ~/Maildir/.Friends/

The Maildir hierarchy that kmail is giving you is not the ad-hoc 
accepted norm; they chose to do away with the leading '.' character it 
appears (I don't use kmail). The dot-prefix format is what I call 
normal, kmail seems abnormal (in the big picture, but kmail is doing 
nothing wrong per spec!) From your above statement you believe it to be 
the reverse and that dovecot doesn't like the format -- it's not that, 
it's that dovecot was built to work out of the box with the accepted 
global norm which is a dot-prefix Maildir hierarchy.



With v1.1 you can do this with:

mail_location = maildir:~/Maildir:LAYOUT=fs


I'm not clear what this means.


I believe Timo means that in the latest code (1.1 is alpha status) he 
has added new features, and one of those features is to use the 
filesystem separator for folders. Since '/' is the standard on *nix, 
then your kmail format would magically be recognized and used without 
it's dot-prefix.


  1.0 dot-prefix: ~/Maildir/.Family.Marge/
  1.1 LAYOUT=fs:  ~/Maildir/Family/Marge/


Why do you want it to work like that? Can't you just use the Maildir++
layout and use the email only via IMAP?


I would be quite happy to do this,
but when I tried briefly re-naming ~/Maildir/Family/ to ~/Maildir/.Family/
on my server and re-started dovecot it did not seem to work -
I did not see the Family folder on my client (using IMAPS).


You went a little too fast. :) After renaming the folder to .Family, use 
your email client to subscribe to the folder; I don't use kmail but in 
Thunderbird you rightmouse click on Inbox and choose Subscribe from the 
popup menu. Technically this places the name of the subscribed folder in 
a file named 'subscriptions' in the ~/Maildir/ directory on the server. 
Dovecot only presents the folders listed in this subscriptions file to 
the client when the client asks for a list of folders.


IMAP allows folders present on the server which are not presented to the 
client when it logs in, hence the idea of subscribing. Unsubscribed 
folders are great for archiving old stuff that you don't really need to 
see but need to keep around. By not subscribing after you renamed the 
folder to include a dot it remained invisible to your client.


hth,
-te

--
Troy Engel | Systems Engineer
Fluid Inc. | http://www.fluid.com


Re: [Dovecot] Proxy problems with 1.0.5 !

2007-09-12 Thread Troy Engel

Ed W wrote:


All I'm getting from Thunderbird is an Invalid Command response.  Is 
there an easy way to get a look inside the imap stream to try and see 
what's failing?


From the client end of things:
http://wiki.dovecot.org/Debugging/Thunderbird

-te

--
Troy Engel | Systems Engineer
Fluid Inc. | http://www.fluid.com


Re: [Dovecot] 1.0.1: corrupt index on fresh mailbox, ideas?

2007-07-10 Thread Troy Engel

Timo Sirainen wrote:


So the real reasons for these could include temporarily using different
index file paths, restoring indexes/uidlists from backups, temporarily
using index files for accessing other mailbox.


OK I understand your 3 points about how it actually could happen, and 
the ideas above as to possible causes; unfortunately we are in none of 
those situations. :( It was a mailbox simply created, accessed via 
Thunderbird and Squirrelmail all of... maybe 3 times. Nothing at all 
changed between the time it was working and the time it wasn't (no other 
mailboxes were affected).


I'll keep an eye out - I created another new mailbox yesterday which 
will get the exact same treatment for an employee starting next Monday. 
If it doesn't happen again I'll just resign to calling it a random 
happenstance.


-te

--
Troy Engel | Systems Engineer
Fluid, Inc | http://www.fluid.com


Re: [Dovecot] 1.0.1: corrupt index on fresh mailbox, ideas?

2007-07-10 Thread Troy Engel

Timo Sirainen wrote:

On Tue, 2007-07-10 at 13:28 -0400, Stewart Dean wrote:

when will there be a respin for a V1.0.2?


This week.


Thank you! I'm not sure how I would test this for you, prior to 1.0.2 - 
do you need it tested somehow?


regards,
-te

--
Troy Engel | Systems Engineer
Fluid, Inc | http://www.fluid.com


Re: [Dovecot] Virtual servers

2007-07-05 Thread Troy Engel

John Hedges wrote:


but I can't get ithis to work. Dovecot starts but authorisation
fails. Is this kind of setup possible - is it possible to configure
different passwd-files for connections on different IPs, or am I going
to have to run separate instances of Dovecot for each virtual host?


There have been several fixes since 1.0rc15 which deals with multiple 
dovecots, auth socket accidental stomping, auth caches and things like 
that. I would suggest you upgrade to the latest 1.0.1 first and see if 
that has any impact on your problem.


$0.02 USD,
-te

--
Troy Engel | Systems Engineer
Fluid, Inc | http://www.fluid.com


Re: [Dovecot] Monitoring Recomendations

2007-06-29 Thread Troy Engel

Dehnert James Sr wrote:


The performance issues are a) slow response on the lan, and b) unusable 
low response from remote users.  This is always with IMAP, of we switch 


As a possible aide, have your user(s) run TCPView 
(http://www.microsoft.com/technet/sysinternals/Networking/TcpView.mspx) 
in a corner of their screen before starting Outlook, then when Outlook 
is launched to watch the view for red bars (which indicate a client 
attempt to do something and getting blocked/denied).


I had a problem with setting up Outlook + Exchange + self-signed SSL + 
Remote awhile back; using TCPView helped show me that even though I was 
telling Outlook to use SSL/HTTP for the connection, the initial Outlook 
setup was still trying to use NetBIOS calls for the server, which showed 
up in TCPView very clearly.


Perhaps the util will help you identify something Outlook is doing that 
it's not supposed to, as was my case.


hth,
-te

--
Troy Engel | Systems Engineer
Fluid Inc. | http://www.fluid.com


Re: [Dovecot] LogicMail for Blackberry and Dovecot

2007-06-27 Thread Troy Engel

Rick Romero wrote:


Unfortunately I'm not a Blackberry user, but I know IMAP clients are
hard to find.  So I can't comment on it's usability or features, but I
thought I'd give it a little press for his quick response :)


I'm a LogicMail user and it's great, I second your interactions with 
Derek (ps: thanks for the Dovecot bug report :) ). Currently it's 
lacking a few abilities but it's got the basic reading/writing/replying 
down. Hopefully we'll bring it up to the level of ChatterMail and it's 
ilk and fill a huge gap in the BlackBerry world.


-te

PS: for the curious, Rick's thread:
http://sourceforge.net/forum/forum.php?thread_id=1755262forum_id=589235

--
Troy Engel | Systems Engineer
Fluid, Inc | http://www.fluid.com


Re: [Dovecot] testing needed: log file concurrency

2007-06-20 Thread Troy Engel

OS: CentOS 4.5 (Final) (RHEL4 clone)

$ /usr/bin/time -f total time: %E\ni/o waits: %w\n ./concurrency
writing, page size = 4096
Command terminated by signal 2
total time: 10:41.53
i/o waits: 312177

$ /usr/bin/time -f total time: %E\ni/o waits: %w\n ./concurrency 1
reading, page size = 4096
page size cut
Command terminated by signal 2
total time: 10:39.67
i/o waits: 314930


Machine:

$ uname -srvmpoi
Linux 2.6.9-42.0.10.ELsmp #1 SMP Tue Feb 27 10:11:19 EST 2007 i686 i686 
i386 GNU/Linux


$ cat /proc/cpuinfo | egrep (processor|model name)
processor   : 0
model name  : Intel(R) Xeon(R) CPU5120  @ 1.86GHz
processor   : 1
model name  : Intel(R) Xeon(R) CPU5120  @ 1.86GHz
processor   : 2
model name  : Intel(R) Xeon(R) CPU5120  @ 1.86GHz
processor   : 3
model name  : Intel(R) Xeon(R) CPU5120  @ 1.86GHz

Timo Sirainen wrote:

http://dovecot.org/tmp/concurrency.c

I'd want to know what results this program gives with different systems.
Please test and reply (but don't bother if someone already replied with
the same OS+result). I expect it to print:

 - SMP kernels: page size cut once in a while
 - UP (uniprocessor) kernels: Nothing
 - The most important thing is that it never prints broken data

It might take a while for it to print anything. With my computer it
takes anything from a few seconds to a minute or so. See the file itself
for compiling/running instructions.

So far I've tested only with Linux 2.6.21 x86-64/SMP and a slow
Solaris/Sparc/UP.

If you're interested in knowing what this is about:

Dovecot writes to dovecot.index.log files by first writing the
transaction with its size being 0. After that it writes the 4 size bytes
again (using a bit special format with all bytes ORed with 0x80).

I expected that when another process is read()ing the file and it
notices the size being valid (all bytes having 0x80) that the whole
transaction could always be read. But looks like if the size happens to
be just before a memory page boundary, it's possible that the updated
size is read, but the rest of the transaction isn't.



--
Troy Engel | Systems Engineer
Fluid, Inc | http://www.fluid.com


Re: [Dovecot] Courier migrating issues: indexes, maildirsize, update query

2007-05-23 Thread Troy Engel

Jan van den Berg wrote:


mail_location = maildir:/var/spool/mail/%1u/%2u/%u:INDEX=MEMORY


Of interest to you might be using a scratch disk space to store the 
indexes on a/the local mail server; I just did a bit of math for you 
(well ok, a 'bc' script did the math) and with 90.5gigs of email in 
Maildir folders via NFS, we have 372megs of indexes on the local disks 
for performance gains.


mail_location = maildir:~/Maildir:INDEX=/var/spool/dovecot/indexes/%1u/%u

I'm not sure the space your 100K+ mailboxes take, but maybe you can use 
the above numbers to do some math and see if you can do indexes like that.


-te

--
Troy Engel | Systems Engineer
Fluid, Inc | http://www.fluid.com


Re: [Dovecot] May 21 09:13:14 mail dovecot: imap-login: No authentication sockets found

2007-05-22 Thread Troy Engel

[EMAIL PROTECTED] wrote:
Yes I knew I was authenticating against pam.  Didnt do an ls -l of the 
/var/run/dovecot.  Wouldnt a restart of dovecot fix that though?


Correct, the concept was *before* you restarted the daemon, to try and 
capture as much info first. It's hard when you're under the gun and need 
to restore services, but if it happens again I'd suggest scraping the 
system for clues for a few minutes. (ls -laR important dirs like 
/var/run/dovecot, ps -ef, maybe some lsof and lslk action, etc.)


-te

--
Troy Engel | Systems Engineer
Fluid, Inc | http://www.fluid.com


Re: [Dovecot] May 21 09:13:14 mail dovecot: imap-login: No authentication sockets found

2007-05-21 Thread Troy Engel

[EMAIL PROTECTED] wrote:


Ive been runing dovecot on a fc6 dell poweredge 2950 for about 4 weeks 
now with no issues.  Im authenticating against openldap 2.3.27.  It 
appears ok.  I restarted ldap, and dovecot, and everything looked fine 


As Timo mentioned, it sounds like the auth socket is being deleted 
because it's in a place that the 'tmpwatch' tool will clean out; the 
default on FC6 is anything more than 720hrs old (30 days), which fits 
right in to your 4-week observation.


Compare the location of your sockets/cache (dovecot -n) with the list of 
directories cleaned by tmpwatch (look in /etc/cron.daily/tmpwatch) and 
make sure the two aren't stepping on each other's toes.


-te

--
Troy Engel | Systems Engineer
Fluid, Inc | http://www.fluid.com


Re: [Dovecot] May 21 09:13:14 mail dovecot: imap-login: No authentication sockets found

2007-05-21 Thread Troy Engel

Timo Sirainen wrote:
As Timo mentioned, it sounds like the auth socket is being deleted 
because it's in a place that the 'tmpwatch' tool will clean out; 


Does some system really do this? I'd think it would break other software
as well. I see at least that I have /var/run/mysqld/mysqld.sock which


Only *certain* directories (ddh pasted the output of a default file). By 
default the /var/run/dovecot should be left alone, but it never hurts to 
have people check their system...


-te

--
Troy Engel | Systems Engineer
Fluid, Inc | http://www.fluid.com


Re: [Dovecot] May 21 09:13:14 mail dovecot: imap-login: No authentication sockets found

2007-05-21 Thread Troy Engel

[EMAIL PROTECTED] wrote:


Ive been runing dovecot on a fc6 dell poweredge 2950 for about 4  
weeks now with no issues.  Im authenticating against openldap  
2.3.27.  It appears ok.  I restarted ldap, and dovecot, and  
everything looked fine



login_dir: /var/run/dovecot/login
auth default:
  passdb:
driver: pam
  userdb:
driver: passwd


Just FYI, you are not authenticating [dovecot] against OpenLDAP; you're 
authenticating using PAM, and it's PAM who is doing the LDAP lookups via 
nss_ldap. (http://wiki.dovecot.org/AuthDatabase/Passwd)


Did you have all the other 'old' (30d+) files in /var/run/dovecot/ 
before having restarted the daemon(s)? Any chance you saved a ls -l of 
that dir somehow? One thing to check is if the socket alone disappeared, 
or if others (the PID file, for example) were also gone. Since they'd 
typically have the same datetime stamp, it would provide a clue...


-te

--
Troy Engel | Systems Engineer
Fluid, Inc | http://www.fluid.com


Re: [Dovecot] Question: contention with blackberry

2007-05-14 Thread Troy Engel

Stewart Dean wrote:
a) a VIP has multiple secretaries accessing a single mailbox (actually, 
they are professional enough to have figured the realities of 
conflicting access and rarely have a problem),
b) somebody leaving their machine on at home and coming in and firing up 
their work computer
c) important people with Blackberriesand the BB service polls the 
mailbox  every so often and breaks the lock. In any case, the maillog  


Honestly, moving to Maildir will solve all your problems with (a) and 
(b), and most likely (c) as well. Especially with (a), you would be 
doing your VIP's people a huge favor by converting to Maildir during 
your IMAP daemon move...


$0.02.
-te

--
Troy Engel | Systems Engineer
Fluid, Inc | http://www.fluid.com


Re: [Dovecot] Thunderbird or Dovecot bug? (multiple keywords)

2007-05-11 Thread Troy Engel

Timo Sirainen wrote:


A lot easier way is to look at the IMAP traffic and see what's different
in there. Then you can see if Dovecot is giving wrong replies somewhere
or if it's Thunderbird that gets confused from something.


I just used the TB debugging to trap all the IMAP traffic capturing a 
good session (my account) and the troubled session (his account) using 
the same WindowsXP 2.0.0 client.


Session:
a) add $Label1
b) add $Label2
c) select INBOX.Drafts
d) select INBOX
e) remove $Label2
f) remove $Label1

Alas, I can't spot where the problem is in the conversation; can I zip 
up both logs and send to you? (they're pretty large and contain some 
private info)


-te

--
Troy Engel | Systems Engineer
Fluid, Inc | http://www.fluid.com


[Dovecot] Thunderbird or Dovecot bug? (multiple keywords)

2007-05-09 Thread Troy Engel
Here's a strange one. I have a user who's using Thunderbird 2.0.0 and 
assigning multiple tags (keywords) to emails, which are getting lost 
(I'll explain) when he leaves the folder and comes back. I can reproduce 
this on *his* account myself, but cannot reproduce it on *my* account 
(separate new TBird 2.0.0 profiles on Windows XP).


Use the two TBird default tags 'Important' and 'Work' for all these 
tests, which it refers to as $Label1 and $Label2 in IMAP-keywords land. 
If I go into my account, label an email with both tags, it sticks -- I 
can click on Drafts then back to Inbox, and both tags/keywords still 
show in the client.


If I go into his account, add the two tags, then click on Drafts and 
back on Inbox, only the *second* tag (Work, $Label2) shows. If I remove 
that tag, then the first tag (Important, $Label1) immediately pops up!


On the backend the actual Maildir files match the dovecot-keywords and 
have the correct letter appended in both cases - so, in his account when 
the email only shows one tag, the physical mail file has the letters for 
two tags. So Thunderbird should be showing both tags, like it does in my 
account where everything is working correctly.


This leads me to believe that the problem has something to do with the 
difference of dovecot-keywords content, and the interaction TBird has 
with Dovecot. My account, working correctly, looks like:


dovecot-keywords:
  0 $Forwarded
  1 $MDNSent
  2 $Label2
  3 $Label1

file:
  Maildir/cur/1178712608.H529732P11686.yak.fluid.com:2,RSdc

...which matches, d=$Label1 (Important), c=$Label2 (Work) and TBird is 
displaying the email as having both tags - all is well and good. Now, 
his account looks like:


dovecot-keywords:
  0 Junk
  1 NonJunk
  2 $Label4
  3 $Label1
  4 $Label2
  5 $Label3
  6 $Label5

file:
  Maildir/cur/1178728930.P28392Q0M960111.yak.fluid.com:2,RSbde

...again, everything matches on the server; yet, it Thunderbird is only 
displaying $Label2 (d,3). I also noticed something interesting, even if 
I have the TB 'Junk Controls' completely disabled on his account, and 
remove all tags using the menu option, that file still retains the 'b' 
(NonJunk) tag in the filename:


  Maildir/cur/1178728930.P28392Q0M960111.yak.fluid.com:2,RSb

All this long-winded explanation leads me to believe that somehow the 
difference in dovecot-keywords is causing this problem, but what I can't 
tell is who's problem it is -- Dovecot, or Thunderbird?


Thoughts welcome,
-te

PS: all the normal things tried like deleting the dovecot index files, 
Thunderbird cache files and profiles, etc.


--
Troy Engel | Systems Engineer
Fluid, Inc | http://www.fluid.com


Re: [Dovecot] Dovecot Startup error

2007-05-08 Thread Troy Engel

kamran arshad wrote:
  
/var/log/maillog:May  8 09:33:13 lhr dovecot: auth-worker(default): mysql: Connected to 127.0.0.1 (exim)


This looks a little strange - why would there be an (exim) in parens, 
are you running dovecot as your exim userid?


Regardless, my first guess is that your MySQL instance has not finished 
starting and is not accepting connections before Dovecot is initiated, 
so the auth worker has no socket to connect to; what's the timing and 
order of your /etc/rc* tree look like?


If you have the services starting in parallel, then you might have to 
move Dovecot further down the startup tree, or add a little shell voodoo 
to check for the MySQL socket before starting it...


-te

--
Troy Engel | Systems Engineer
Fluid, Inc | http://www.fluid.com


Re: [Dovecot] .imap files

2007-05-08 Thread Troy Engel

L. Scott Loftin wrote:

Dovecot version: 1.0.rc7

I have recently upgraded from Fedora Core 4 to Fedora Core 6 (the FC6 was a
...
Is there a way to either convert the .imap* files into the new dovecot.*
files or any way to recover the email that anyone knows about?


FC4 used the older 0.99 dovecot installs (0.99.14 it looks like), you 
will need to read the Wiki and docs, and migrate your Dovecot config to 
the newer style -- once you do that, I bet everything will start working 
as intended.


  http://wiki.dovecot.org/UpgradingDovecot

Before even starting, the first thing I'd do is upgrade to the actual 
1.0.0 release, there were... 25(?) further release candidates beyond 
rc7. Axel has an RPM ready for you:


  http://atrpms.net/dist/fc6/dovecot/

hth,
-te

--
Troy Engel | Systems Engineer
Fluid, Inc | http://www.fluid.com


Re: [Dovecot] Testing IMAP clients with Dovecot, problems with MacMail

2007-05-03 Thread Troy Engel

Stewart Dean wrote:

It looks like Mail.app treats non-standard ports differently.  On the
standard port (993), the SSL option seems to do pure SSL; but with 
another
port specified, it does clean-plus-starttls (and hence fails horribly, 
because

it's talking to a pure SSl service)
Is there anything I can do to get MacMail to behave correctly?  Or will 
it clear up when I shut down UWIMAP and give Dovecot the default ports.  
A Bronx cheer for Mac Mail


It's possible it *might* clear up when you move to the standard ports; 
the server advertises STARTTLS capability (well, at least my Dovecot 
build does :) ). so it's possible that the Mail app is sniffing the 
server CAPABILITY flags, seeing a non-default port and trying to do 
something smart. I found this blurb:


Apple’s Mail application has checkboxes to enable TLS for incoming 
Internet Message Access Protocol (IMAP) or outgoing SMTP connections. 
STARTTLS or direct TLS is used automatically, depending on the target 
port. (http://sial.org/howto/openssl/tls-name/)


If you have tcpdump (or similar) on one of your OS X boxen, fire it up 
and trap the packets between the two servers and check out the net 
traffic and what ports it's trying to use. That'd be where I start...


Also, check out this blog post:
http://blog.scottlowe.org/2005/07/02/starttls-and-imap-in-mailapp/

So, it appears that Mail.app does indeed support STARTTLS for IMAP, but 
only if you set the port number back to 143 after checking the “Use SSL” 
checkbox.


-te

--
Troy Engel | Systems Engineer
Fluid, Inc | http://www.fluid.com


Re: [Dovecot] read only maildir

2007-05-02 Thread Troy Engel

Nagyon Almos wrote:


Is it subscriptions or .subscriptions or in the singular 
(without the ending s)? Where should it be exactly?


If you run dovecot 0.99, it's .subscriptions; if you run dovecot 1.0, 
it's subscriptions - so adjust as necessary. It is always located in the 
Maildir/ directory itself - take a look at your own personal maildir 
folder and it should be pretty obvious.


The contents should be the name of the subfolder itself. Again, looking 
at your personal folder and just copying the idea to the shared one 
should be all you need to do.


-te

--
Troy Engel | Systems Engineer
Fluid, Inc | http://www.fluid.com


Re: [Dovecot] Courier-imap + dovecot simultaneously?

2007-05-01 Thread Troy Engel

Gunter Ohrner wrote:

Am Sonntag, 29. April 2007 schrieb Charles Marcus:

outlook express), one accessing his account through courier, and one
through dovecot, so he can compare the speed...


Doing a whole batch of operations with each server before trying the same 
with the other server for comparison purposes will probably reflect 
reality much closer.


I posted some ad hoc numbers to the list back in February, one machine 
Courier and the other Dovecot using Squirrelmail as the frontend.


http://dovecot.org/list/dovecot/2007-February/019560.html

Now that the server (Server B) is in production with 1.0.0, the users 
are seeing fantastic speed gains. Even just emptying the trash feels a 
whole lot snappier than ever...


-te

--
Troy Engel | Systems Engineer
Fluid, Inc | http://www.fluid.com


Re: [Dovecot] [courier-dovecot-migrate.pl] - No such file or directory at courier-dovecot-migrate.pl line 230

2007-04-30 Thread Troy Engel

Luca Corti wrote:


I was just testing the migration script, encountered the same issue and
just added a print before the open || die at line 230. It tries to open
the file Maildir/courierimapkeywords/:list which seems to be missing and
probably not mandatory.


Aha, thanks -- I too encountered the problem this weekend (deployed 
Dovecot server to production, migrated all our users) and noticed it was 
with the accounts that were either very new or never used; I suspect the 
assumption that this file is there is based on the account being in 
active use with Courier.


-te

--
Troy Engel | Systems Engineer
Fluid Inc. | http://www.fluid.com


Re: [Dovecot] [courier-dovecot-migrate.pl] - No such file or directory at courier-dovecot-migrate.pl line 230

2007-04-23 Thread Troy Engel

Wilkinson, Alex wrote:


#/usr/bin/perl courier-dovecot-migrate.pl --recursive
 Finding maildirs under .
 ./courierimapuiddb: OK
 No such file or directory at courier-dovecot-migrate.pl line 230.


Try running the script under strace (i.e. 'strace -e trace=file perl 
/script.pl') or truss to watch the perl script and see what file or 
directory it's trying to open. That should provide a quick clue.


-te

--
Troy Engel | Systems Engineer
Fluid, Inc | http://www.fluid.com


Re: [Dovecot] dovecot.spec

2007-04-20 Thread Troy Engel

J.Palacios wrote:


Plis, where can i find an updated version (for recently dovecot v1.0.0) of
dovecot.spec, needed to build an rpm for RH 4?


Axel has a fully ready spec/RPM on ATrpms.net ready to go for RHEL4; you 
should be able to just install and go.


  http://atrpms.net/dist/el4/dovecot/

-te

--
Troy Engel | Systems Engineer
Fluid, Inc | http://www.fluid.com


[Dovecot] FYI: TB 2.0.0 + DC 1.0.0 = OK so far

2007-04-19 Thread Troy Engel
Just a status note - my beta group is upgrading/upgraded to the new 
Thunderbird 2.0.0 (OS X  Win32 so far, Linux to come) and beating it up 
against Dovecot 1.0.0 and all is A-OK, nary a problem in sight.


Obviously just an initial status report, but good mojo so far for those 
curious about trying it.


-te

--
Troy Engel | Systems Engineer
Fluid, Inc | http://www.fluid.com


Re: [Dovecot] Maillog rotates, but dovecot still writes logs into old logfile?

2007-04-19 Thread Troy Engel

Mart Pirita wrote:


The only solution I did found, is adding into /etc/logrotate.d/syslog 
command to restart dovecot:


   /etc/rc.d/init.d/dovecot restart /dev/null 
21 


As per the wiki, dovecot listens to SIGUSR1 to reopen a log. You want to 
simply use a command like:


  /bin/kill -USR1 `cat /var/run/dovecot/master.pid 2/dev/null` 2 
/dev/null || true


See here:
http://wiki.dovecot.org/Logging#head-8886f6e09e2f691a4c45448f18f914c124dead50

-te

--
Troy Engel | Systems Engineer
Fluid, Inc | http://www.fluid.com


Re: [Dovecot] Maillog rotates, but dovecot still writes logs into old logfile?

2007-04-19 Thread Troy Engel

Mart Pirita wrote:


syslog_facility = mail  


should do the trick and log all via syslog to /var/log/maillog?


That's all you need on a modern Linux system, as the syslog facility 
'mail' usually is sent to /var/log/maillog; this is the default for all 
SMTP/IMAP/POP3/etc. on any Red Hat -esque system (RHEL, Fedora, CentOS). 
Check your /etc/syslog.conf file.


Personally I prefer my logs discrete, and use the settings right out of 
the Wiki page to /var/log/dovecot.log and the included logrotate.d/ 
script. Works 100%.


-te

--
Troy Engel | Systems Engineer
Fluid, Inc | http://www.fluid.com


Re: [Dovecot] v1.0.0 released

2007-04-13 Thread Troy Engel

Tomas Janousek wrote:


The Fedora folks are listening and will issue an update soon. They put it into
rawhide in today's morning and I suppose they could put it into FC6 within a
few days. ;)


Hi Tomas, if you want to feed this back upstream based on the work I've 
done with Axel:


dovecot-1.0.beta2-pam-tty.patch: no longer needed, applied upstream in 
rc22 (slightly different but same result)


dovecot-1.0.rc15-default-settings.patch: needs reworked, these files 
it's patching have changed a lot. The latest rework I did was for rc29, 
which applies cleanly to 1.0.0 as well (just verified today). 
Additionally we added a default (commented out) /var/log/dovecot.log 
setting for the logfile in the default conf file.


There's also an added dovecot logrotate.d script (using SIGUSR1) to 
support the above log; alas, right now I can't connect to the atrpms.net 
servers to post a link. Feel free to ping me off list and I'll 
file-attach the patches to save the Fedora folk some work. :)


-te

--
Troy Engel | Systems Engineer
Fluid, Inc | http://www.fluid.com


Re: [Dovecot] Shared mailbox plans

2007-04-11 Thread Troy Engel

Timo Sirainen wrote:


I think I'll also add a check to compare Maildir, new, cur and tmp
directories' permissions and log a warning if they're not the same.


Just as a sanity check, mine differ (for whatever reason - I probably 
used 'maildirmake' from Courier) like so:


$ ls -gGld SpamTraining/
drwxrwxr-x  7 117 Feb  2 10:21 SpamTraining/

$ ls -gGld SpamTraining/[new,cur,tmp]*
drwxrwx---  2 6 Sep  9  2004 SpamTraining/cur
drwxrwx---  2 6 Sep  9  2004 SpamTraining/new
drwxrwx---  2 6 Sep  9  2004 SpamTraining/tmp

$ ls -gGld SpamTraining/.MissedSpam/
drwxrwxr-t  5 36 Apr  7 09:17 SpamTraining/.MissedSpam/

$ ls -gGld SpamTraining/.MissedSpam/[new,cur,tmp]*
drwxrwxrwt  2 6 Feb  3 02:06 SpamTraining/.MissedSpam/cur
drwxrwxrwt  2 6 Feb  2 10:26 SpamTraining/.MissedSpam/new
drwxrwxrwt  2 6 Feb  2 10:28 SpamTraining/.MissedSpam/tmp

So whether or not *my* permissions are correct (they actually look 
pretty screwed up), implementing that check would start blowing out 
warnings in the logfile; yet these folders work perfectly fine I suppose.


FYI only. :)
-te

--
Troy Engel | Systems Engineer
Fluid, Inc | http://www.fluid.com


Re: [Dovecot] rc31 - deferring operation: binding

2007-04-10 Thread Troy Engel

Ben Beuchler wrote:


I installed a virgin install of OpenLDAP 2.3.32 directly on the mail
server, copied over my LDAP database, pointed Dovecot at it, and
started it up.  I immediately started getting the same log entries:


Some ideas from the peanut gallery here -- if you run 'ldd 
dovecot-auth', what openldap library is it linked into? Have you tried 
compiling dovecot against this new 2.3.32 openldap install?



cliff:~ root# egrep -v '(^$|^#)' /opt/dovecot/etc/dovecot-ldap.conf
ldap_version = 3


Have you tried binding as version 2, just to see what happens?

-te

--
Troy Engel | Systems Engineer
Fluid Inc. | http://www.fluid.com


Re: [Dovecot] Mailbox isn't a valid mbox file

2007-03-28 Thread Troy Engel

Jay Chandler wrote:
Keep getting this error within Squirrelmail (and other clients) on one 
particular user's mailbox file:

...
Anyone have any ideas?  Only one user out of many is having this issue, 
but he's whiny...


Try taking the physical mbox file, putting it on a client machine with 
Thunderbird in the profileMail/Local Folders/ directory, then allow 
Thunderbird to open/rewrite/save it back out. Then stick it back on your 
server and see if that fixes it...


Or, maybe even do the above, create a *new* folder and dragdrop all the 
messages from folder A into folder B (so a fresh-write would have to 
happen), then put folder B back onto the server named as the original. 
TBird reads/writes regular old normal mbox files.


Just some ideas, hth.
-te

--
Troy Engel | Systems Engineer
Fluid, Inc | http://www.fluid.com


Re: [Dovecot] 1.0.rc28 released / suse rpmbuild fails what has changed ?

2007-03-23 Thread Troy Engel

Timo Sirainen wrote:

RPM build errors:
Installed (but unpackaged) file(s) found:
   /usr/lib/dovecot/idxview
   /usr/lib/dovecot/logview


No, new stuff was added. Don't know why rpm build has to fail if that 
happens though..


This is normal -- the packager (Robert) needs to update his spec file to 
include these two new programs to the binary output RPM. This 'error' is 
on purpose, it's rpmbuild trying to help you notice changes that have 
been made.


-te

--
Troy Engel | Systems Engineer
Fluid, Inc | http://www.fluid.com


Re: [Dovecot] 1.0.rc28 released

2007-03-23 Thread Troy Engel

Timo Sirainen wrote:


+ When copying/syncing a lot of mails, send * OK Hang in there
  replies to client every 15 seconds so it doesn't just timeout the
  connection.


This is probably the best news ever. I just had one of my testers beat 
on this with ~4000 emails-at-once operations which have always timed out 
and caused us grief. While it still takes forever and a day to 
accomplish (I blame Thunderbird), it now at least chugs along and 
completes the ops with no user errors.


Thanks. :)
-te

--
Troy Engel | Systems Engineer
Fluid, Inc | http://www.fluid.com


[Dovecot] idxview: Fatal: file hdr read() 41984 != 1170103198

2007-03-23 Thread Troy Engel
Playing with the new idxview I got this error running against my INBOX 
dovecot.index.cache file. What exactly does it mean?


Full output:

# /usr/libexec/dovecot/idxview dovecot.index.cache
-- INDEX: dovecot.index.cache
version = 1.8
base header size = 0
header size = 1170103198
record size = 1170103283
compat flags = 7
index id = 0
flags = 26512
uid validity = 0
next uid = 2460778624
messages count = 0
recent messages count = 632
seen messages count = 1
deleted messages count = 1140057508
first recent uid lowwater = 4294966816
first unseen uid lowwater = 3
first deleted uid lowwater = 1836
log file seq = 0
log file int offset = 2
log file ext offset = 1140057513
sync size = 266287972361
sync stamp = 21
day stamp = 0
day first uid[0] = 1378709065
day first uid[1] = 2037149797
day first uid[2] = 980374573
day first uid[3] = 826620960
day first uid[4] = 2019113286
day first uid[5] = 808463731
day first uid[6] = 1279801136
day first uid[7] = 1078085165
Fatal: file hdr read() 41984 != 1170103198

('idxview dovecot.index' and 'logview dovecot.index.log' come back 
without any Fatal type errors, just gobs of information)


-te

--
Troy Engel | Systems Engineer
Fluid, Inc | http://www.fluid.com


Re: [Dovecot] idxview: Fatal: file hdr read() 41984 != 1170103198

2007-03-23 Thread Troy Engel

Timo Sirainen wrote:


Use idxview dovecot.index dovecot.index.cache


Oooh, gotcha -- now it makes a lot more sense. Thanks. :)

-te

--
Troy Engel | Systems Engineer
Fluid, Inc | http://www.fluid.com


Re: [Dovecot] a blush build/install question

2007-03-20 Thread Troy Engel

Stewart Dean wrote:


Alas, when I actually tried to run dovecot, it was asking for its 
resource /in the original build tree/ location, which wasn't there.  Is 
there some way I can do what I want?


While I haven't done this specifically with Dovecot, you should be able 
to manage everything in a simple manner like you want; I currently do 
this with Exim and Courier-IMAP on the old production server solely with 
switches to ./configure. Here's how it basically works, maybe it'll help 
you get dovecot working:


Source:
/opt/build/courer-imap-1.2.3

$ ./configure --prefix=/opt/courier-imap-1.2.3 
--with-authchangepwdir=${exec_prefix}/libexec/authlib 
--with-makedatprog=${exec_prefix}/libexec/makedatprog (more and more 
switches that don't matter for this)


After building, a simple make install places everything in 
/opt/courier-1.2.3. Then there's a symlink like so:


/opt/courier-imap - /opt/courier-1.2.3

...and finally the /etc/init.d/ script loads the actual courier 
processes using /opt/courier-imap, not the standard /usr based things 
(so you'll need to customize to fit the default dovecot init.d script).


When I upgrade (or downgrade) it's as simple as running the same 
scenario on the new code (which means a new make install does not 
overwrite the old), migrate the config files as needed, stop the old 
daemon, switch the symlink, then start the new daemon up. Users don't 
see interruption in their email experience and I'm confident of a backup 
plan in an emergency.


This has been working great for many years upgrading Courier and Exim on 
the same machine; rarely do I have to fall back but when it does happen 
it's been as simple as pie.


-te

--
Troy Engel | Systems Engineer
Fluid, Inc | http://www.fluid.com


Re: [Dovecot] a blush build/install question

2007-03-20 Thread Troy Engel

Stewart Dean wrote:
 Thanks Timo, that should do it.  As always, (as us boorish Americans
 might say), you da man!  Your patience and help are always the best.

BTW: my instructions work just the same -- compile on a dev machine, tar 
and untar on a production machine. It doesn't matter where you compile 
as long as the OSes are compatible (glibc, etc.). What matters is 
developing a logical symlink infrastructure to accomplish your needs.


I kind of thought that would have been obvious, sorry.

-te

--
Troy Engel | Systems Engineer
Fluid, Inc | http://www.fluid.com


Re: [Dovecot] The perfect Courier - Dovecot conversion tool

2007-03-20 Thread Troy Engel

Timo Sirainen wrote:

I've tested this only with a test user.

http://dovecot.org/tools/courier-dovecot-migrate.pl


Thanks! The initial runs are looking good; could you beef up the 
convert_subscriptions() function to spit out debugging info when run in 
test mode? I have people with really gnarly folder names that I want to 
be sure look like they'll be converted correctly.


So instead of returning, maybe something like:

  my ($fin, $fout);
  open ($fin, $in_fname) || die $!;

  if ($do_conversion)
open($fout, $out_fname) || die $!;
  else
$fout = STDOUT;

  while ($fin) {
chomp $_;

(warning, I'm not a perl hacker - it looks good on paper to me. :)) This 
way it'll spit out to screen what would be going into subscriptions. Or 
maybe some better variation of my idea...


thx,
-te

--
Troy Engel | Systems Engineer
Fluid, Inc | http://www.fluid.com