Re: [Dovecot] Dovecot Startup error on FreeBSD

2008-03-28 Thread Johan Hendriks

Dien Phan schreef:

Hi,

I have installed latest Dovecot 1.0.13 on a FreeBSD 6.2 with XMail 
(www.xmailserver.org). It works OK except one thing: error on startup.

After each reboot there are lots of such error:

dovecot: Mar 28 08:54:38 Error: child 916 (login) returned error 89
dovecot: Mar 28 08:54:54 Error: imap-login: No authentication sockets 
found


When I restart dovecot by running startup script 
/usr/local/etc/rc.d/dovecot.sh restart the problem disappears. I have 
to manually restart dovecot after each reboot. Below is used conf file


$ dovecot -n
# 1.0.13: /usr/local/etc/dovecot.conf
log_path: /var/log/dovecot.log
info_log_path: /var/log/dovecot-info.log
protocols: imap
ssl_disable: yes
disable_plaintext_auth: no
login_dir: /var/run/dovecot/login
login_executable: /usr/local/libexec/dovecot/imap-login
mail_location: maildir:~/Maildir
dotlock_use_excl: yes
maildir_copy_with_hardlinks: yes
mail_plugins: antispam
imap_client_workarounds: delay-newmail outlook-idle netscape-eoh 
tb-extra-mailbox-sep

auth default:
  verbose: yes
  passdb:
driver: checkpassword
args: /var/MailRoot/bin/dovecot_xmail
  userdb:
driver: static
args: uid=vxmail gid=vxmail home=/var/MailRoot/domains/%d/%n 
allow_all_users=yes

  socket:
type: listen
master:
  path: /var/run/dovecot/auth-master
  mode: 384
  user: vxmail
plugin:
  antispam_signature: X-DSPAM-Signature
  antispam_trash: Trash
  antispam_spam: SPAM
  antispam_dspam_binary: /usr/local/bin/dspam
  antispam_dspam_args: --user;%u

I googled and found similar post at 
http://www.mail-archive.com/dovecot@dovecot.org/msg01793.html, 
http://www.mail-archive.com/dovecot@dovecot.org/msg01798.html and 
http://www.mail-archive.com/dovecot@dovecot.org/msg01831.html


but answers there don't meet my case. I don't use sql backend. And 
startup script doesn't delete /var/run/dovecot/ directory after 
Dovecot is started. After booting when error still there I have in 
this directory:


$ ls /var/run/dovecot
auth-master dict-server login   master.pid

If restart dovecot (working OK):
$ ls /var/run/dovecot
auth-master auth-worker.960 dict-server login   
master.pid


As we see dovecot works when there appears a file named 
auth-worker.960 (the number 960 changes each time it restarted).


Please help me to fix this. Thanks in advance.

Dien Phan

What is happening i think is that dovecot is trying to start before 
Xmail, and then there is no autentication backend yet.


look in the dovecot startup file /usr/loval/etc/rc.d/dovecot  and add 
xmail (or however it is named in the startup sequense) to the REQUIRE 
option


# PROVIDE: dovecot
# REQUIRE: LOGIN ntpdate xmail
# KEYWORD: shutdown




[Dovecot] Mailbox to maildir conversion

2008-03-28 Thread Aaron Gallagher
I just today wrote Yet Another Conversion Script. This one differs  
from the rest that I've seen in that it will generate a dovecot- 
uidlist index. I've done some testing, but not any absolutely  
extensive testing. It works well from what I've tried.


Invocation is simple. You pass the script the maildir and the mailbox  
file and it parses the mailbox file. The index file is generated if  
there is at least one e-mail with an X-IMAP header which contains the  
last ID used and the IMAP UIDVALIDITY. My old mail setup was ipop3d +  
sendmail (now dovecot + postfix) and it had a DON'T DELETE THIS  
MESSAGE e-mail with the aforementioned X-IMAP header. This e-mail  
will not be saved in the maildir. All e-mails with an X-UID header  
will get an entry in the uidlist file.


The script works with python 2.3 or later. I haven't tested it on  
pre-2.3 python versions as I don't have any installed.


http://habnabit.org/mb2md.py.gz

I can answer questions about it if needed. I'm also willing to try to  
add any suggested features.


Re: [Dovecot] outlook2007 shows frequent imap disconnect no matter what outlook-idle setting in dovecot.conf

2008-03-28 Thread Samuel HAMEAU

Scott Silva a écrit :

on 3-26-2008 1:33 AM Kielbasiewicz, Peter spake the following:

Hello,
I saw the problem quite often in various posts but could not find a 
real solution .
Problem is that I frequently get annoying popups from outlook 2007 
about imap idle timeouts which block working with outlook until the 
popup is acknowledged.


The popup says:
 Your IMAP server closed the connection. This can occur if you leave 
the connection idle for too long.

 Protocol: IMAP
 Server: testhost
 Port: 143
 Error Code: 0x800CCCDD

I tried to run dovecot with or without  imap_client_workarounds = 
outlook-idle but do not see any difference.
I am running dovecot on Red Hat Enterprise Linux Client release 5.1 
(Tikanga).

Below is the output of some commands to get a clue about my config.

Background info:
Our primary mailboxes are on exchange servers.
As there is a size limit on the server mailboxes I am evaluating a 
local storage solution for our users.

Thus  I set up an additional mailbox in outlook using IMAP.
Local .pst files can not be backuped easily (especially when outlook 
is running) and I am investigating a local IMAP server where users can 
move their mails to. This server can easily be backuped (even 
incrementally when using Maildir) and users do  always have access to 
their mails.
The drawbacks are that users must have an extra login to the imap 
server because I have no ldap access to the company AD server from our 
local site domain.
The solution will not be accepted though if I can not prevent the 
frequent disconnect popups.


Peter


#dovecot --version
1.0.rc15
First try upgrading to a more current version. 1.0.rc15 has got to be a 
year old by now. You can get a newer rpm at atrpms.net.




I do have the same problem with dovecot 1.0.10 : disconnection popups 
with Outlook 2003/2007 with this kind of line in the logs:
dovecot: 2008-03-26 15:16:01 Info: IMAP(user): Connection closed: 
Connection reset by peer


sam


Re: [Dovecot] outlook2007 shows frequent imap disconnect no matter what outlook-idle setting in dovecot.conf

2008-03-28 Thread M. Bobkiewicz

Hi Sam,

Samuel HAMEAU schrieb:

Scott Silva a écrit :

on 3-26-2008 1:33 AM Kielbasiewicz, Peter spake the following:

Hello,
I saw the problem quite often in various posts but could not find a 
real solution .
Problem is that I frequently get annoying popups from outlook 2007 
about imap idle timeouts which block working with outlook until the 
popup is acknowledged.


The popup says:
 Your IMAP server closed the connection. This can occur if you leave 
the connection idle for too long.

 Protocol: IMAP
 Server: testhost
 Port: 143
 Error Code: 0x800CCCDD

I tried to run dovecot with or without  imap_client_workarounds = 
outlook-idle but do not see any difference.
I am running dovecot on Red Hat Enterprise Linux Client release 5.1 
(Tikanga).

Below is the output of some commands to get a clue about my config.

Background info:
Our primary mailboxes are on exchange servers.
As there is a size limit on the server mailboxes I am evaluating a 
local storage solution for our users.

Thus  I set up an additional mailbox in outlook using IMAP.
Local .pst files can not be backuped easily (especially when outlook 
is running) and I am investigating a local IMAP server where users 
can move their mails to. This server can easily be backuped (even 
incrementally when using Maildir) and users do  always have access to 
their mails.
The drawbacks are that users must have an extra login to the imap 
server because I have no ldap access to the company AD server from 
our local site domain.
The solution will not be accepted though if I can not prevent the 
frequent disconnect popups.


Peter


#dovecot --version
1.0.rc15
First try upgrading to a more current version. 1.0.rc15 has got to be 
a year old by now. You can get a newer rpm at atrpms.net.




I do have the same problem with dovecot 1.0.10 : disconnection popups 
with Outlook 2003/2007 with this kind of line in the logs:
dovecot: 2008-03-26 15:16:01 Info: IMAP(user): Connection closed: 
Connection reset by peer


sam


in my experience it´s a general Outlook problem, no matter which 
version. I´ve seen this with uw and courier imap. I think it is related 
to the way how MS handles idle timeouts...


Greetings,

 Mike



[Dovecot] UID inserted in the middle of mailbox errors

2008-03-28 Thread Dean Brooks
Hi,

We are still getting, on a daily basis, users who cannot move messages
to Trash or expunge Trash due to these errors:

   Mar 28 10:43:57 tm2 dovecot: [ID 107833 mail.error] IMAP(kss021):
   mbox sync: UID inserted in the middle of mailbox
   /home/kss021/Mail/Trash (3137  536, seq=2, idx_msgs=76)

Our users have no other access to their mailbox other than Dovecot,
and we are using mbox format and 1.1rc3.

Deleting the indexes fixes the problem, so it seems to be a problem
with index corruption and not something inherently wrong with the
mailbox.  That is, once I delete the index files, the problem does not
come back immediately.

I've seen others on the list with the same problem, but I wasn't able
to find a workaround.  It's happening more and more frequently.

I guess what I don't understand is why Dovecot cant just mark the index
invalid and purge it instead of failing over and over.  I thought the
whole point behind Dovecot's indexing is that it was able to detect
index inconsistencies and mark the index invalid.

Any help is much appreciated.  Even a quick stopgap fix would be
a lifesaver, short of a cronjob that just purges everyone's index
files every 2 hours (which sort of defeats the point of using Dovecot).

--
Dean Brooks
[EMAIL PROTECTED]




Re: [Dovecot] UID inserted in the middle of mailbox errors

2008-03-28 Thread Frank Elsner
On Fri, 28 Mar 2008 10:53:49 -0400 Dean Brooks wrote:
 Hi,
 
 We are still getting, on a daily basis, users who cannot move messages
 to Trash or expunge Trash due to these errors:
 
Mar 28 10:43:57 tm2 dovecot: [ID 107833 mail.error] IMAP(kss021):
mbox sync: UID inserted in the middle of mailbox
/home/kss021/Mail/Trash (3137  536, seq=2, idx_msgs=76)
 
 Our users have no other access to their mailbox other than Dovecot,
 and we are using mbox format and 1.1rc3.

With maildir format too 

Mar 27 10:19:26 mailbox dovecot: imap(exim4000): Maildir 
/var/Mail/Boxes/e/exim4000/.Trash sync: UID inserted in the middle of mailbox 
(105265  105264, file = 
1206604287.H478110P28054.mailbox.tu-berlin.de,S=6185:2,b)



Re: [Dovecot] Proxy Problems

2008-03-28 Thread Richard Cooper


On 27 Mar 2008, at 19:08, Scott Silva wrote:

on 3-27-2008 11:46 AM Richard Cooper spake the following:

Hi,
I'm trying to use dovecot as a proxy as described on http://wiki.dovecot.org/PasswordDatabase/ExtraFields/Proxy 
 but without much success. The problem is that when I send a IMAP  
login command dovecot is responding with BYE Internal login  
failure. Refer to server log for more information. Can anyone help  
me shed light on this problem?


Here's the log (Username, password and IPs have been anonymised):
dovecot: Mar 27 13:07:11 Info: Dovecot v1.0.rc15 starting up
dovecot: Mar 27 13:07:12 Info: auth(default): passwd-file /root/ 
dovecot-proxy-test.passwd: Read 1 users
dovecot: Mar 27 13:07:29 Info: auth(default): client in: AUTH 
1PLAINservice=IMAPlip=192.168.0.1rip=192.168.0.2 
resp=WWVzIEkgYW5vbnltaXNlZCB0aGlzIHRvbyA7LSk=
dovecot: Mar 27 13:07:29 Info: auth(default): client out: OK 
1user=test_proxyproxyhost=192.168.0.3port=143 
pass=password
dovecot: Mar 27 13:07:29 Info: auth(default): master in: REQUEST 
1117861
dovecot: Mar 27 13:07:29 Error: auth(default): Master request  
11786.1 not found
dovecot: Mar 27 13:07:29 Info: auth(default): master out:  
NOTFOUND1
dovecot: Mar 27 13:07:29 Info: imap-login: Internal login failure:  
user=test_proxy, method=PLAIN, rip=192.168.0.2, lip=192.168.0.1


I am on Cent OS 5 using dovecot version 1.0.rc15 from their  
official yum repositories. If I connect my client directly to  
192.168.0.3:143 using the same username and password everything  
works correctly.

Thanks in advance.
- Richard
Try getting a newer version of dovecot from atrpms.net and see if it  
works.
Current is 1.0.13, at least a year newer then the release candidate  
you are using.


That worked. Thank you.

- Richard


[Dovecot] Using LDA with postfix and virtual users

2008-03-28 Thread Chris Cohen
Hi list,

I have 7 virtual users in a sql database. I don't want any systemusers 
or local delivery using postfix.
On the postfix side everything works fine as long as I use the 'local' 
delivery agent. But since I want to use dovecot's sieve functionality I 
set local_transport to dovecot. From now on Postfix seems to ignore 
local_* settings like local_recipient_maps.

Here is my current configuration:
log_timestamp: %Y-%m-%d %H:%M:%S
protocols: imaps managesieve
login_dir: /var/run/dovecot/login
login_executable(default): /usr/lib/dovecot/imap-login
login_executable(imap): /usr/lib/dovecot/imap-login
login_executable(managesieve): /usr/lib/dovecot/managesieve-login
mail_privileged_group: mail
mail_location: maildir:/var/mail/%u
mail_executable(default): /usr/lib/dovecot/imap
mail_executable(imap): /usr/lib/dovecot/imap
mail_executable(managesieve): /usr/lib/dovecot/managesieve
mail_plugin_dir(default): /usr/lib/dovecot/modules/imap
mail_plugin_dir(imap): /usr/lib/dovecot/modules/imap
mail_plugin_dir(managesieve): /usr/lib/dovecot/modules/managesieve
sieve_storage(default):
sieve_storage(imap):
sieve_storage(managesieve): /var/mail/%u/dovecot/sieve/
sieve(default):
sieve(imap):
sieve(managesieve): /var/mail/%u/.dovecot.sieve
auth default:
  mechanisms: plain login
  verbose: yes
  debug: yes
  debug_passwords: yes
  passdb:
driver: sql
args: /etc/dovecot/dovecot-sql.conf
  userdb:
driver: static
args: uid=5000 gid=5000 home=/var/mail/%u
  socket:
type: listen
master:
  path: /var/run/dovecot/auth-master
  mode: 384
  user: vmail
  group: vmail
plugin:
  sieve: /var/mail/%u/.dovecot.sieve

And my postfix configuration:
alias_maps = mysql:/etc/postfix/alias_maps-mysql.cf
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/lib/postfix
data_directory = /var/lib/postfix
inet_interfaces = all
local_recipient_maps = mysql:/etc/postfix/local_recipients-mysql.cf 
$alias_maps
local_transport = dovecot
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mydomain = unixhosts.org
myhostname = amy.unixhosts.org
mynetworks = 127.0.0.0/8
myorigin = $myhostname
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
unknown_local_recipient_reject_code = 550

And accourding to the wiki I have:
dovecot   unix  -   n   n   -   -   pipe
  flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f 
${sender} -d ${user}

As soon as I set local_transport to dovecot postfix seems to lookup 
local_recipients using dovecot. And dovecot doesn't know anything about 
my alias table. Heres a small log:

Mar 28 14:49:25 amy postfix/smtpd[4412]: warning: 10.1.32.13: address 
not listed for hostname amy.unixhosts.org
Mar 28 14:49:25 amy postfix/smtpd[4412]: connect from 
unknown[10.1.32.13]
Mar 28 14:49:25 amy postfix/smtpd[4412]: 820D478399: 
client=unknown[10.1.32.13]
Mar 28 14:49:25 amy postfix/cleanup[4415]: 820D478399: 
message-id=[EMAIL PROTECTED]
Mar 28 14:49:25 amy postfix/qmgr[4410]: 820D478399: 
from=[EMAIL PROTECTED], size=762, nrcpt=1 (queue 
active)
Mar 28 14:49:25 amy postfix/smtpd[4412]: disconnect from 
unknown[10.1.32.13]
Mar 28 14:49:25 amy dovecot: auth(default): master in: 
USER^I1^Iroot^Iservice=deliver
Mar 28 14:49:25 amy dovecot: auth-worker(default): sql(root): query: 
SELECT password FROM users WHERE username = 'root';
Mar 28 14:49:25 amy dovecot: auth-worker(default): sql(root): unknown 
user
Mar 28 14:49:25 amy dovecot: auth(default): master out: NOTFOUND^I1
Mar 28 14:49:25 amy postfix/pipe[4416]: 820D478399: 
to=[EMAIL PROTECTED], relay=dovecot, delay=0.09, 
delays=0.03/0.02/0/0.04, dsn=5.1.1, status=bounced (user unknown)
Mar 28 14:49:25 amy postfix/cleanup[4415]: 914C978407: 
message-id=[EMAIL PROTECTED]
Mar 28 14:49:25 amy postfix/qmgr[4410]: 914C978407: from=, size=2516, 
nrcpt=1 (queue active)
Mar 28 14:49:25 amy postfix/bounce[4418]: 820D478399: sender 
non-delivery notification: 914C978407
Mar 28 14:49:25 amy postfix/qmgr[4410]: 820D478399: removed
Mar 28 14:49:25 amy dovecot: auth(default): master in: 
USER^I1^Ivirtualuser^Iservice=deliver
Mar 28 14:49:25 amy dovecot: auth-worker(default): sql(virtualuser): 
query: SELECT password FROM users WHERE username = 'virtualuser';
Mar 28 14:49:25 amy dovecot: auth(default): password(virtualuser): 
Credentials: {CRYPT}{PLAIN-MD5}ebb12eb47da2af187241a0d74fc3d14f
Mar 28 14:49:25 amy dovecot: auth(default): master out: 
USER^I1^Ivirtualuser^Iuid=5000^Igid=5000^Ihome=/var/mail/virtualuser
Mar 28 14:49:25 amy postfix/pipe[4416]: 914C978407: 
to=[EMAIL PROTECTED], relay=dovecot, delay=0.03, 
delays=0.01/0/0/0.02, dsn=2.0.0, status=sent (delivered via dovecot 
service)
Mar 28 14:49:25 amy postfix/qmgr[4410]: 914C978407: removed

I have already read a lot of documentation, howtos and so on, but just 
can't figure out how to get this to work.

Could someone please give me a hint?

-- 
Greetings
Chris


[Dovecot] mbox with sub-folders and messages?

2008-03-28 Thread Richard Lefebvre
Hi,

Is it possible to have dovecot configured to use mbox format and yet
have folders that contains sub-folders and messages? I'm thinking of
a simple setup where any files directory with extension .sbd are
presented to the IMAP client without the extension. So if you have a
mbox file named BOX01 and a directory name BOX01.sdb would show has one
on the client side (note: that is the way Thunderbird keeps it's mail
locally).

I know that the Maildir format does the sub-folders+messages, but I'm
not really interested by the one file per email.

Richard


Re: [Dovecot] mbox with sub-folders and messages?

2008-03-28 Thread Timo Sirainen
On Fri, 2008-03-28 at 14:25 -0400, Richard Lefebvre wrote:
 Hi,
 
 Is it possible to have dovecot configured to use mbox format and yet
 have folders that contains sub-folders and messages? I'm thinking of
 a simple setup where any files directory with extension .sbd are
 presented to the IMAP client without the extension. So if you have a
 mbox file named BOX01 and a directory name BOX01.sdb would show has one
 on the client side (note: that is the way Thunderbird keeps it's mail
 locally).
 
 I know that the Maildir format does the sub-folders+messages, but I'm
 not really interested by the one file per email.

With v1.1 you could have maildir++ directory layout with mboxes
(mbox:~/mail:LAYOUT=maildir):

~/mail/.mbox1
~/mail/.mbox1.submbox



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


[Dovecot] How to force working of a redirect features in sieve plugin?

2008-03-28 Thread Vitalij Satanivskij


Hello

Trying to setup dovecot installation with sieve plugin, can't configure how to 
make redirect working.


My setup

1 Exim + dovecot lda

begin transports

dovecot_virtual_delivery:
  driver = pipe
  command = /usr/local/dovecot/libexec/dovecot/deliver -d $local_part
  message_prefix =
  message_suffix =
  delivery_date_add
  envelope_to_add
  return_path_add
  log_output
  user = exim

2 Dovecot

protocol lda {
  postmaster_address = [EMAIL PROTECTED]

  hostname = **

  mail_plugins = cmusieve
  mail_plugin_dir = /usr/local/dovecot/lib/dovecot/lda

  # Binary to use for sending mails.
  sendmail_path = /usr/sbin/sendmail
  # UNIX socket path to master authentication server to find users.
  auth_socket_path = /var/run/dovecot/auth-master
}


/usr/sbin/sendmail it's realy exim binary
but I.m try full path to real exim - /usr/local/sbi/exim too.

That's I.m getting  in log files

Mar 28 22:23:10 scorpio deliver(satan): Sending a forward to [EMAIL 
PROTECTED] with return path [EMAIL PROTECTED]
Mar 28 22:23:10 scorpio deliver(satan): Sendmail process terminated abnormally, 
signal 11
Mar 28 22:23:10 scorpio deliver(satan): sieve runtime error: Redirect: Error 
sending mail
and in exim log

2008-03-28 22:23:10 1JfL6U-000LBj-24 [EMAIL PROTECTED]: 
dovecot_virtual_delivery transport output: /libexec/ld-elf.so.1: environment 
corrupt; mi


Question is - how deliver sending mail thru sendmail_path = 
/usr/sbin/sendmail?
 Via pipe?

--
Vitalij  Satanivskij





Re: [Dovecot] mbox with sub-folders and messages?

2008-03-28 Thread Scott Silva

on 3-28-2008 11:47 AM Timo Sirainen spake the following:

On Fri, 2008-03-28 at 14:25 -0400, Richard Lefebvre wrote:

Hi,

Is it possible to have dovecot configured to use mbox format and yet
have folders that contains sub-folders and messages? I'm thinking of
a simple setup where any files directory with extension .sbd are
presented to the IMAP client without the extension. So if you have a
mbox file named BOX01 and a directory name BOX01.sdb would show has one
on the client side (note: that is the way Thunderbird keeps it's mail
locally).

I know that the Maildir format does the sub-folders+messages, but I'm
not really interested by the one file per email.


With v1.1 you could have maildir++ directory layout with mboxes
(mbox:~/mail:LAYOUT=maildir):

~/mail/.mbox1
~/mail/.mbox1.submbox

Now you are scaring me. Fixing something even BEFORE someone asks. You are 
good!!  ;-P



--
MailScanner is like deodorant...
You hope everybody uses it, and
you notice quickly if they don't



signature.asc
Description: OpenPGP digital signature