[Dovecot] Dovecot + MySQL problem

2008-01-25 Thread Timo Neuvonen
I recently upgraded my Fedora Core 6 (mail)server to Fedora 8. Unfortunately 
I don't any more have absolutely reliable information available on the 
Dovecot version that was the last one I had on FC6, but I guess it has been 
1.0.3 (I found it from a FC6 repo right now). Currently, Fedora 8 has 
version 1.0.7 that comes as binary rpm from Fedora repos.


So, the problem:
I had set up an authentication system using mysql database. It worked fine 
as long as I were using FC6, but after upgrade Dovecot dies immediatedly 
after the system startup, writing this to log:


Jan 24 16:14:46 test dovecot: Dovecot v1.0.7 starting up
Jan 24 16:14:46 test dovecot: auth(default): Unknown database driver 'mysql'
Jan 24 16:14:46 test dovecot: Auth process died too early - shutting down

My first idea was that Dovecot is compiled without sql support. However:
[EMAIL PROTECTED] etc]# dovecot --build-options
Build options: ioloop=poll notify=inotify ipv6 openssl
SQL drivers: mysql postgresql sqlite
Passdb: checkpassword ldap pam passwd passwd-file shadow sql
Userdb: checkpassword ldap passwd prefetch passwd-file sql static

If I change mysql to pgsql in the following in the conf file, the error 
message will change accordingly:

# Database driver: mysql, pgsql, sqlite
#driver =
driver = mysql

I also have CentOS 5.1 system with Dovecot 1.0.rc15. I tried the database 
authentication with similar conf there, it did work.


So, is there an essential (intentional) change in sql configuration between 
1.0.rc15 (and obviously 1.0.3) to 1.0.7, or should I start finding the 
problem from incorrectly built binary of 1.0.7?



Regards,
Timo 





Re: [Dovecot] dovecot + antispam + sendmail

2008-01-25 Thread Nikolay Shopik

On 25.01.2008 5:00, Anil wrote:

Spamassassin is perl based, so anything other than that?? I want
something that is non perl based.


On Jan 24, 2008 4:26 PM, Quentin Chung (KTS)
[EMAIL PROTECTED] wrote:
  

I suggest greylist and antivirus/antispam in the MTA instead of MDA/MUA...
just ensure all will pass through the milter..

e.g. milter-greylist, spamassassin, spamass-milter. clamav/clamd,
clamav-milter are all default package u can find in the latest
CentOS/Fedora.
Implementation.. my new server (CentOS) is setup 2 days ago.. this part used
 30 mins to complete..  perhaps because I play with it before so no
problem...




Whats a good antispam solution?
I am using sendmail and dovecot 1.1. I came across dovecot's antispam
plugin, but it seems it does not support 1.1 yet. I am also looking
for something non-perl based.

I am already doing some greylisting with sendmail milter.

Any other good suggestions? If not, I guess I might have to downgrade
back to 1.0 dovecot.

Thanks
  

I recommend dspam but you have to train it, I usually use spamtraps 
addresses for such job. I like spamassassin but 95% of it job in my site 
is bayesian that's why I like dspam too.


Re: [Dovecot] Dovecot + MySQL problem

2008-01-25 Thread Timo Neuvonen

Jan 24 16:14:46 test dovecot: Dovecot v1.0.7 starting up
Jan 24 16:14:46 test dovecot: auth(default): Unknown database driver 
'mysql'

Jan 24 16:14:46 test dovecot: Auth process died too early - shutting down

My first idea was that Dovecot is compiled without sql support. However:
[EMAIL PROTECTED] etc]# dovecot --build-options
Build options: ioloop=poll notify=inotify ipv6 openssl
SQL drivers: mysql postgresql sqlite
Passdb: checkpassword ldap pam passwd passwd-file shadow sql
Userdb: checkpassword ldap passwd prefetch passwd-file sql static



Oops... they had moved the actual driver to another rpm: dovecot-mysql, 
although mysql support was reported without installing it.


So, it's working now. Case closed.

--
TiN 





Re: [Dovecot] sieve vacation

2008-01-25 Thread Asbjørn Sannes
mouss wrote:
 Asbjørn Sannes wrote:
 I think sieve vacation is cutting off the last line of the vacation
 message, is this a known problem?

 vacation addresses: [EMAIL PROTECTED] not here now
 Would return an empty message, changing it to:
 vacation addresses: [EMAIL PROTECTED] not here now
 have a nice day
 And it would send a message with only not here now in it, but not
 have a nice day.

   

 does your file end with a newline? text files should end with a new
 line, otherwise many line oriented utilities will break. emacs has a
 setting to ask you if you forget one.

It certainly does end with a newline, I doubt that it is intended that
one would have to put a newline inside a variable. Hm, running sendmail
(ssmtp) manually gives me some weird results, could be that it is ssmtp
eating that last line ..

If I put one\ntwo\nthree\n into a text file and cat texfile | sendmail
myaddr it sends a mail without three in it, guess I have to look further
into this.

--
Asbjørn Sannes



Re: [Dovecot] dotlock errors without using dotlock

2008-01-25 Thread Robin Breathe

On 20 Dec 2007, at 16:41, Timo Sirainen wrote:

On Thu, 2007-12-20 at 10:31 -0500, Brian Taber wrote:

I have my setup using fctrl for mailbox and index locking.


Oh, and as for this, Dovecot uses only dotlocking for maildir's
dovecot-uidlist file, regardless of what your settings are. I was
thinking about changing this in future releases though.


A vote for getting this changed - we've been seeing terrible IMAP  
performance under Solaris 10 when CONTROL points to a ZFS filesystem,  
seemingly caused by excessive latency on the low level zfs_create()  
call (client sessions sometimes lock for in excess of a minute).  
Background reading suggests that ZFS currently reacts badly to the  
constant creation/deletion of many tiny files (to give you an idea of  
scale we have ~20k users). As a workaround we've had to create a UFS  
filesystem on a ZFS volume to house CONTROL files.


Regards,
Robin


Re: [Dovecot] dovecot + antispam + sendmail

2008-01-25 Thread Johannes Berg

On Thu, 2008-01-24 at 16:14 -0800, Anil wrote:
 Whats a good antispam solution?
 I am using sendmail and dovecot 1.1. I came across dovecot's antispam
 plugin, but it seems it does not support 1.1 yet.

It should be fairly easy to port based on the quota plugin, all you need
to port is the storage file.

johannes


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


Re: [Dovecot] Dovecot LDA (deliver) stopped working

2008-01-25 Thread tomas
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Fri, Jan 25, 2008 at 08:42:09AM -0600, falz wrote:
 Hello,
 
 One day a week or so ago, a server that's Postifx w/ Local users,
 dovecot w/ LDA decided to stop working [...]

 Postfix people suggested placing a wrapper script for mailbox_command,
 which I did, and have it log to a text file, so I do know that deliver
 is being called.

To get you right here: the wrapper is being called by Postfix, right?

  However, although I have LDA debug logging on, and it
 DID log prior to this, when postfix supposedly calls deliver, dovecot
 does NOT log anything.

...and LDA (called from the wrapper) doesn't run (or doesn't run to the
point of logging anything).

 It DOES however log if I call deliver from any
 account (root or not) from the command line (ls / | /path/to/deliver
 -d localaccountname). Any way I can debug this further? I would assume
 that deliver would log something even if it's called, but it appears
 that it does not.

That's rather bizarre. I would up the verbosity of the wrapper (f.ex.
putting a couple of line 'which /path/to/deliver' or 'ldd /path/to/deliver'
- -- or even 'strace /path/to/deliver'). Something in the environment must
be different to the command lines, right?

Regards
- -- tomás
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFHmf6gBcgs9XrR2kYRAkDBAJ40oLz6KG8sThDwmY29j90RJKtS1wCfYwdF
sbY2JuoGCcsIkKLGnZ8/GJM=
=RrwT
-END PGP SIGNATURE-


Re: [Dovecot] Dovecot LDA (deliver) stopped working

2008-01-25 Thread tomas
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Fri, Jan 25, 2008 at 10:03:30AM -0600, falz wrote:
 On Jan 25, 2008 9:22 AM,  [EMAIL PROTECTED] wrote:
   Postfix people suggested placing a wrapper script for mailbox_command,
   which I did, and have it log to a text file, so I do know that deliver
   is being called.
 
  To get you right here: the wrapper is being called by Postfix, right?
 
 Yes, postfix calls a wrapper. The wrapper is a shell script that calls
 deliver. This is the wrapper. $LOGNAME comes from postfix, it's a
 built in variable it populates as the local username:
 
 #!/bin/sh
 DELIVER=/usr/local/libexec/dovecot/deliver
 DATE=`date`
 echo ==  /tmp/foo.txt
 echo $DATE  /tmp/foo.txt
 echo $USER  /tmp/foo.txt
 $DELIVER -d $LOGNAME
 echo $DATE  /tmp/foo.txt

I'd typically do

#!/bin/sh
{
  DELIVER=...
  echo ==
  echo $DATE
  ...
}  /tmp/foo.txt 21

...so you have the redirection in one place. Plus it catches stdout and
stderr of other calls (especially the one from deliver, you are
interested in).

Maybe an strace $DELIVER, although definitely overkill, might lead you
to the problem.

[...]

 Well, it's hard for me to tell. I know for sure that the wrapper ran,
 as I get my temp log does get the tiemstamp that's before/after
 deliver. However, I guess I dont know the best way to log the
 output/exit status of the deliver command.

As for the output, see above. The exit status is in the special shell
variable $?

[...]

 Hmm, perhaps I should somehow log the entire status of SETENV or
 something.

That would be env (/usr/bin/env)

   What I probably really need to do is figure out the
 appropriate pipes after the deliver line to find out if it's spitting
 anything back to stderr or something. This is usually..  21 or
 something similar? Anyone have suggestions for that?

See above. I'd group everything in { ... } and do the redirection at the
end. Less to write (and less to fix when you change your mind :-)

Regards
- -- tomás
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFHmh/nBcgs9XrR2kYRAtpcAJ91Y43K5UtN+W7+JskD4VVa0EVsvQCfW9tm
qJCCdNitfJFnarvPUU/0shg=
=th7z
-END PGP SIGNATURE-


[Dovecot] Capturing credentials for imap sync

2008-01-25 Thread Master Abi

Hi List

All the imap sync apps I could find requires the username /password 
credentails to be known before a sync occurs. I have Dovecot using ldap 
acting as a nearline backup mail server to MS Exchange. Every hour 
imapsync syncs mail between Exchange and Dovecot. This all works fine 
becuase the users credentials are known, but when new users are added I 
would like the process to work seemless like this:


The user is added to the Active Directory. The mail client is configured 
with 2 accounts with identical credentials, one of which is connected to 
Dovecot. When the new client connects to dovecot, the credentials are 
captured and stored so that imapsync can use it. This


If there is another way this can be done with dovecot, could I please be 
enlighten. I have read the doco on migration but I am not quite 
migrating but more replicating.


Thank you


Re: [Dovecot] Capturing credentials for imap sync

2008-01-25 Thread Gabriel Millerd
On 1/25/08, Master Abi [EMAIL PROTECTED] wrote:


 The user is added to the Active Directory. The mail client is configured
 with 2 accounts with identical credentials, one of which is connected to
 Dovecot. When the new client connects to dovecot, the credentials are
 captured and stored so that imapsync can use it. This


Its not entirely clear what Dovecot is authenticating off of when its
working as intended. Obviously exchange is working from Active
Directory and that is where you are pushing new users manually.

If Dovecot has its own LDAP server, that could potentially be trained
to fall back or sync to AD. Or a perl script could be croned to kick
before your imapsync to do this chore (as well as alter and maintain
users)

You have Outlook clients setup with both Exchange and IMAP accounts to
duplicates of the same mail content? How are you rolling out the
Outlook account changes in the actual client? Some sort of desktop
management tool or manual visits to the desktop?

If your want to thieve passwords from Dovecot login attempts there
would be potential in wrapping the imap binary as mentioned in the
wiki and doing the above perl script in a targeted fashion (being
mindful for DOS issues and what not) I would think.

look head in imap-auth for user in memcache or ldap ? proceed to imap
: sync user quick from AD
imap-dovecot

-- 
Gabriel Millerd


Re: [Dovecot] Dovecot LDA (deliver) stopped working

2008-01-25 Thread tomas
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Fri, Jan 25, 2008 at 01:14:15PM -0600, falz wrote:
 [...] STRACE found the problem for me! [...]

Good to hear!

 write(7, deliver(username): Jan 25 12:58:..., 100) = -1 EFBIG (File too 
 large)

Hmmm...

 So, the issue was that SOMETHING is enforcing /var/log/dovecot-lda/log
 size! I was able to get this working by rotating, and the solution
 will be to constantly rotate, but I still need to figure out what's
 enforcing this.

Check ulimit (in the shell, say ulimit -a). Maybe some script is
over-cautious and is setting user limits.

Regards
- -- tomás
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFHmsi8Bcgs9XrR2kYRApy7AKCBDdClW/u06eRQqbwbFlYFV8krrQCff3gN
AECZmgT574uOGMMk7tFSYFQ=
=+SDt
-END PGP SIGNATURE-


Re: [Dovecot] Capturing credentials for imap sync

2008-01-25 Thread Timo Sirainen
On Sat, 2008-01-26 at 07:54 +1100, Master Abi wrote:
 Hi List
 
 All the imap sync apps I could find requires the username /password 
 credentails to be known before a sync occurs. I have Dovecot using ldap 
 acting as a nearline backup mail server to MS Exchange. Every hour 
 imapsync syncs mail between Exchange and Dovecot. This all works fine 
 becuase the users credentials are known, but when new users are added I 
 would like the process to work seemless like this:

How about using master users instead?
http://wiki.dovecot.org/Authentication/MasterUsers

You can also limit them to be allowed only from specific IPs:
http://wiki.dovecot.org/PasswordDatabase/ExtraFields/AllowNets



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


Re: [Dovecot] Count breaks socket

2008-01-25 Thread Timo Sirainen
On Fri, 2008-01-25 at 06:59 -0800, Marc Perkel wrote:
 If I use the socket option I can't use the count option to create more 
 authentication processes. I get this error. Thanks in advance.
 
 dovecot: Jan 25 06:57:04 Error: auth(default): Socket already exists: 
 /var/run/dovecot/auth-client

Right. This is kind of a design problem which isn't that easy to fix
(until v2.0). Do you really need more than count=1? I don't think
there's any benefit in having count (much) larger than the number of
CPUs in the system, and a count=1 can handle thousands of
connections/sec on my system.



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


[Dovecot] Shared mailboxes

2008-01-25 Thread Wouter Amsterdam
L.S.

 

It is not clear to me why I should use namespaces or symlinks to share a
single maildir mailbox with multiple users. Why not configure multiple mail
clients with the same account information?

 

TIA,

Wouter

 



Re: [Dovecot] Dovecot LDA (deliver) stopped working

2008-01-25 Thread Timo Sirainen
On Fri, 2008-01-25 at 13:14 -0600, falz wrote:
 write(7, deliver(username): Jan 25 12:58:..., 100) = -1 EFBIG (File too 
 large)
..
 So, anyone have thoughts as to what's enforcing the Filesize limit
 exceeded: 25?

Postfix's mailbox_size_limit setting most likely.



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


Re: [Dovecot] Dovecot LDA (deliver) stopped working

2008-01-25 Thread falz
On Jan 25, 2008 11:44 AM,  [EMAIL PROTECTED] wrote:
 I'd typically do

 #!/bin/sh
 {
   DELIVER=...
   echo ==
   echo $DATE
   ...
 }  /tmp/foo.txt 21

Thanks, I wasn't aware of the curly bracket trick. STRACE found the
problem for me! It was something completely unexpected. Patsing my
script here for future reference for anyone:

#!/bin/sh
{
DELIVER=/usr/local/libexec/dovecot/deliver
STRACE=/usr/local/bin/strace
DATE=`date`
echo ==
/usr/bin/env
echo $DATE
echo $LOGNAME
$STRACE $DELIVER -d $LOGNAME
echo $DATE
}  /tmp/foo.txt 21


So, doing this, near the end of the STRACE gave me:

open(/var/log/dovecot-lda.log, O_WRONLY|O_APPEND|O_CREAT, 0666) = 6
lseek(6, 0, SEEK_END)   = 51237618
fcntl(6, F_GETFD)   = 0
fcntl(6, F_SETFD, FD_CLOEXEC)   = 0
open(/var/log/dovecot-lda.log, O_WRONLY|O_APPEND|O_CREAT, 0666) = 7
lseek(7, 0, SEEK_END)   = 51237618
fcntl(7, F_GETFD)   = 0
fcntl(7, F_SETFD, FD_CLOEXEC)   = 0
fstat(7, {st_mode=0, st_size=0, ...})   = 0
gettimeofday({0, 0}, NULL)  = 0
access(/etc/localtime, R_OK)  = 0
open(/etc/localtime, O_RDONLY)= 8
fstat(8, {st_mode=S_IFCHR|S_ISUID|S_ISGID|S_ISVTX|045,
st_rdev=makedev(37, 842006560), ...}) = 0
read(8, \377\377\377\377\377\377\377\377\377\377\377\377\377\377...,
7944) = 1279
close(8)= 0
write(7, deliver(username): Jan 25 12:58:..., 100) = -1 EFBIG (File too large)
--- SIGXFSZ (Filesize limit exceeded: 25) ---
--- SIGXFSZ (Filesize limit exceeded: 25) ---
syscall_417(0xbfbfe820) = -1 (errno 27)
exit(75)= ?


So, the issue was that SOMETHING is enforcing /var/log/dovecot-lda/log
size! I was able to get this working by rotating, and the solution
will be to constantly rotate, but I still need to figure out what's
enforcing this.

- I have no filesystem quotas enabled (FreeBSD) and never have.

- I could not find any 'max file size' type of settings in dovecot.
Even if there were, I don't know why this would be the default
behavior!

So, anyone have thoughts as to what's enforcing the Filesize limit
exceeded: 25?

--falz


Re: [Dovecot] Dovecot LDA (deliver) stopped working

2008-01-25 Thread falz
On Jan 25, 2008 9:22 AM,  [EMAIL PROTECTED] wrote:
  Postfix people suggested placing a wrapper script for mailbox_command,
  which I did, and have it log to a text file, so I do know that deliver
  is being called.

 To get you right here: the wrapper is being called by Postfix, right?

Yes, postfix calls a wrapper. The wrapper is a shell script that calls
deliver. This is the wrapper. $LOGNAME comes from postfix, it's a
built in variable it populates as the local username:

#!/bin/sh
DELIVER=/usr/local/libexec/dovecot/deliver
DATE=`date`
echo ==  /tmp/foo.txt
echo $DATE  /tmp/foo.txt
echo $USER  /tmp/foo.txt
$DELIVER -d $LOGNAME
echo $DATE  /tmp/foo.txt



   However, although I have LDA debug logging on, and it
  DID log prior to this, when postfix supposedly calls deliver, dovecot
  does NOT log anything.

 ...and LDA (called from the wrapper) doesn't run (or doesn't run to the
 point of logging anything).

Well, it's hard for me to tell. I know for sure that the wrapper ran,
as I get my temp log does get the tiemstamp that's before/after
deliver. However, I guess I dont know the best way to log the
output/exit status of the deliver command.


  It DOES however log if I call deliver from any
  account (root or not) from the command line (ls / | /path/to/deliver
  -d localaccountname). Any way I can debug this further? I would assume
  that deliver would log something even if it's called, but it appears
  that it does not.

 That's rather bizarre. I would up the verbosity of the wrapper (f.ex.
 putting a couple of line 'which /path/to/deliver' or 'ldd /path/to/deliver'
 - -- or even 'strace /path/to/deliver'). Something in the environment must
 be different to the command lines, right?

Hmm, perhaps I should somehow log the entire status of SETENV or
something. What I probably really need to do is figure out the
appropriate pipes after the deliver line to find out if it's spitting
anything back to stderr or something. This is usually..  21 or
something similar? Anyone have suggestions for that?

--falz


Re: [Dovecot] dovecot + antispam + sendmail

2008-01-25 Thread Nikolay Shopik

On 25.01.2008 16:48, mouss wrote:

Nikolay Shopik wrote:
 
I recommend dspam but you have to train it, I usually use spamtraps 
addresses for such job. 


That's not good enough :)

- you need ham as well
- spamtrap as a spam corpus is only ok if the recipient gets similar 
spam.



Sure thing, spamassassin doing this out of box ;), dspam need little 
more configuration to have ham automatically learned.


[Dovecot] symbolic links to root node

2008-01-25 Thread Martin Preen

Hello,
I have a question about the way Dovecot limits file system access.
Currently we're using Dovecot 1.0.5 (Solaris 10).

In some cases users have a symbolic link like z: - / in their
mail directory. As a result there are log entries like

Jan 25 13:30:31 imap1 dovecot: [ID 107833 mail.error] IMAP(xyz): 
stat(/home/xyz/.wine/dosdevices/c:/windows/profiles/xyz/.../z:/proc/28381/root/proc/28381/.../root/proc/28381/Player/#SharedObje
Jan 25 13:30:31 imap1 dovecot: [ID 107833 mail.error] IMAP(xyz): x) failed: File 
name too long


We know the reason (the links are create by Wine) but unfortunately we cannot
get rid of them.

Is there something I can do (these links should be ignored) ?
Or is it a bug ?

Greetings.
Martin

---
Martin Preen, Universität Freiburg, Institut für Informatik
Georges-Koehler-Allee 52, Raum 00-006, 79110 Freiburg, Germany

phone: ++49 761 203-8250  [EMAIL PROTECTED]
fax: ++49 761 203-8242www.informatik.uni-freiburg.de


Re: [Dovecot] Is there a way to limit multiple POP3 connections?

2008-01-25 Thread Timo Sirainen
On Fri, 2008-01-11 at 16:28 +0200, Timo Sirainen wrote:
 On 11.1.2008, at 16.23, arvids wrote:
 
  just tested with the latest hg(740a17139b67) - removed the whole  
  mail directory,
  then sent two mails, then retrieved them with POP3, then repeated  
  sending and
  retrieving. After each step cache file was updated(both after  
  deliver and POP3 session).
  Here are cached fields from idxview output after the test:
 .
   5: size.physicalfix 8 tmp   
  2008-01-11 16:11
 ..
  mail_plugins: quota
 
 OK, quota is causing it. I'll see what to do about this..

Fixed: http://hg.dovecot.org/dovecot/rev/e5af14239137



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


Re: [Dovecot] symbolic links to root node

2008-01-25 Thread Adam Tilghman
 In some cases users have a symbolic link like z: - / in their
 mail directory. As a result there are log entries like
 
 stat(/home/xyz/.wine/dosdevices/c:/windows/profiles/xyz/.../z:/proc/28381/root/proc/28381/.../root/proc/28381/Player/#SharedObje
 Jan 25 13:30:31 imap1 dovecot: [ID 107833 mail.error] IMAP(xyz): x) failed: 
 File name too long

Like you, our users store mail in their home directories*
and sometimes they make symlinks to strange places like - /usr.

I patched dovecot to simply ignore symlinks; maybe you can, too.

diff -c -r dovecot-1.0.0-pristine/src/lib-storage/index/mbox/mbox-list.c 
dovecot-1.0.0/src/lib-storage/index/mbox/mbox-list.c
*** dovecot-1.0.0-pristine/src/lib-storage/index/mbox/mbox-list.c   Mon Feb 
 5 05:57:32 2007
--- dovecot-1.0.0/src/lib-storage/index/mbox/mbox-list.cThu Apr 26 
09:56:22 2007
***
*** 69,74 
--- 69,85 
  static int list_opendir(struct mail_storage *storage,
const char *path, bool root, DIR **dirp)
  {
+ /* ACS local modification */
+   struct stat st;
+   if (lstat(*path == '\0' ? / : path, st)  0) {
+   mail_storage_set_error(storage, lstat failed!);
+   return -1;
+   }
+   if (st.st_mode  S_IFLNK) {
+   return 0; /*ignore*/
+   }
+ /* end ACS local modification */
+ 
*dirp = opendir(*path == '\0' ? / : path);
if (*dirp != NULL)
return 1;

-- Adam

* although we're finally starting to convert our 30k users
  over to dedicated maildirs+NFS.  I'll share my experiences 
  with the list once we're done (early March I hope).

-- 
Adam Tilghman  |  Systems Support / Academic Computing  | +1 858 822 0711
 [EMAIL PROTECTED]  |  University of California, San Diego   | fax +1 858 534 
7018


Re: [Dovecot] dovecot + antispam + sendmail

2008-01-25 Thread mouss

Nikolay Shopik wrote:
 
I recommend dspam but you have to train it, I usually use spamtraps 
addresses for such job. 


That's not good enough :)

- you need ham as well
- spamtrap as a spam corpus is only ok if the recipient gets similar spam.


I like spamassassin but 95% of it job in my site is bayesian that's 
why I like dspam too.




Re: [Dovecot] symbolic links to root node

2008-01-25 Thread Timo Sirainen
On Fri, 2008-01-25 at 14:48 +0100, Martin Preen wrote:
 Hello,
 I have a question about the way Dovecot limits file system access.
 Currently we're using Dovecot 1.0.5 (Solaris 10).
 
 In some cases users have a symbolic link like z: - / in their
 mail directory. As a result there are log entries like
 
 Jan 25 13:30:31 imap1 dovecot: [ID 107833 mail.error] IMAP(xyz): 
 stat(/home/xyz/.wine/dosdevices/c:/windows/profiles/xyz/.../z:/proc/28381/root/proc/28381/.../root/proc/28381/Player/#SharedObje
 Jan 25 13:30:31 imap1 dovecot: [ID 107833 mail.error] IMAP(xyz): x) failed: 
 File 
 name too long

So you're exposing the entire home directory to Dovecot? Everything
would go a lot more nicely (and faster) if Dovecot would have access
only to actual mailboxes. Can't you just force everyone to use e.g.
~/mail/ directory (mail_location = mbox:~/mail)?

 Is there something I can do (these links should be ignored) ?
 Or is it a bug ?

I don't think Dovecot should ignore those kind of errors, because if it
happens on a normal mail directory, it's most likely a problem sysadmin
should know about and fix. But in this kind of a mixed system.. well,
modifying sources would be the only solution.



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


Re: [Dovecot] New server error

2008-01-25 Thread Anne Wilson
On Thursday 24 Jan 2008, Bill Cole wrote:
 At 5:14 PM + 1/24/08, Anne Wilson  imposed structure on a stream

 of electrons, yielding:
 I'm setting up a replacement mail server on a CentOS 5.1 box.  The dovecot
 version is 1.0.rc15.  'dovecot -n' returns
 
 # /etc/dovecot.conf
 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_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/lib/dovecot/imap
 mail_plugin_dir(imap): /usr/lib/dovecot/imap
 mail_plugin_dir(pop3): /usr/lib/dovecot/pop3
 auth default:
passdb:
  driver: pam
userdb:
  driver: passwd
 
 I can telnet localhost 143 and log in.
 
 I have given kmail the address of the server and an Inbox has been
  created, but no option to create sub-folders.  If I attempt to send a
  message kmail freezes.  Clearly something's wrong.
 
 I am using configuration files from the old server, modified only to the
  new server details.  I have alias and transport hashes.  What else should
  I be looking at?

 Your MTA. Your references to alias and transport hashes makes me
 suspect that it is Postfix.

 Dovecot has nothing to do with sending mail.

You're right, of course.  Sorry - I was over-tired when I wrote that.  You'll 
have seen that in my reply to mouss, the problem was in dovecot.conf.  It's 
fixed now, thanks.

Anne


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


Re: [Dovecot] symbolic links to root node

2008-01-25 Thread Martin Preen

Timo Sirainen wrote:

On Fri, 2008-01-25 at 14:48 +0100, Martin Preen wrote:


Hello,
I have a question about the way Dovecot limits file system access.
Currently we're using Dovecot 1.0.5 (Solaris 10).

In some cases users have a symbolic link like z: - / in their
mail directory. As a result there are log entries like

Jan 25 13:30:31 imap1 dovecot: [ID 107833 mail.error] IMAP(xyz): 
stat(/home/xyz/.wine/dosdevices/c:/windows/profiles/xyz/.../z:/proc/28381/root/proc/28381/.../root/proc/28381/Player/#SharedObje
Jan 25 13:30:31 imap1 dovecot: [ID 107833 mail.error] IMAP(xyz): x) failed: File 
name too long



So you're exposing the entire home directory to Dovecot? Everything
would go a lot more nicely (and faster) if Dovecot would have access
only to actual mailboxes. Can't you just force everyone to use e.g.
~/mail/ directory (mail_location = mbox:~/mail)?


It is on my long term ToDo list (I would prefer that). But actually it is
very difficult to realize that in our environment.

Currently we're saying that one should configure an IMAP server directory
(but most users don't want to read the documentation).


Is there something I can do (these links should be ignored) ?
Or is it a bug ?



I don't think Dovecot should ignore those kind of errors, because if it
happens on a normal mail directory, it's most likely a problem sysadmin
should know about and fix. But in this kind of a mixed system.. well,
modifying sources would be the only solution.


Ok.

Martin

---
Martin Preen, Universität Freiburg, Institut für Informatik
Georges-Koehler-Allee 52, Raum 00-006, 79110 Freiburg, Germany

phone: ++49 761 203-8250  [EMAIL PROTECTED]
fax: ++49 761 203-8242www.informatik.uni-freiburg.de


Re: [Dovecot] New server error

2008-01-25 Thread Axel Thimm
On Thu, Jan 24, 2008 at 07:12:20PM +, Anne Wilson wrote:
 On Thursday 24 January 2008 19:00:23 Timo Sirainen wrote:
  On Thu, 2008-01-24 at 18:47 +, Anne Wilson wrote:
   On Thursday 24 January 2008 18:23:49 Asheesh Laroia wrote:
On Thu, 24 Jan 2008, Anne Wilson wrote:
 I'm setting up a replacement mail server on a CentOS 5.1 box.  The
 dovecot version is 1.0.rc15.  'dovecot -n' returns
   
Can you try upgrading to a more recent Dovecot?  1.0.10 is the current
stable release.
  
   I'm new to CentOS and still finding my way around.  It isn't being
   offered as an upgrade, but perhaps an FC6 package might work.   I'll see
   what I can find out.
 
  Packages in http://atrpms.net/dist/el5/dovecot/ work for CentOS 5.
 
 Hmm - I have some packages from rpmforge.  IIRC I had problems in FC6 with 
 atrpms conflicting with other repos.  I wonder whether it is safe to use 
 rpmforge and atrpms at the same time?  I do remember Axel saying that he was 
 working to try to improve the situation.

Usually there is little trouble combining them and we're actually
working on merging them as rpmrepo.org.
-- 
Axel.Thimm at ATrpms.net


pgplsZubFHisz.pgp
Description: PGP signature


[Dovecot] Dovecot LDA (deliver) stopped working

2008-01-25 Thread falz
Hello,

One day a week or so ago, a server that's Postifx w/ Local users,
dovecot w/ LDA decided to stop working. The only thing that stopped is
the LDA portion, the rest all works fine. I also posted to the postfix
mailing list yesterday but wasn't able to debug any further. Here's
the situation:

if I use mailbox_command to point to deliver, postfix will always put
the message in the deferred queue. However, if I run deliver from the
command line, it works fine. I've recompiled Dovecot and Postfix
cleanly and reinstalled a few times to ensure permissions are OK. It's
not a virtual setup, so I do NOT have setuid root on the deliver
binary.

Postfix people suggested placing a wrapper script for mailbox_command,
which I did, and have it log to a text file, so I do know that deliver
is being called. However, although I have LDA debug logging on, and it
DID log prior to this, when postfix supposedly calls deliver, dovecot
does NOT log anything. It DOES however log if I call deliver from any
account (root or not) from the command line (ls / | /path/to/deliver
-d localaccountname). Any way I can debug this further? I would assume
that deliver would log something even if it's called, but it appears
that it does not.

My postfix related details are here:

http://marc.info/?l=postfix-usersm=120119147917409w=2

I followed the postfix/lda wiki (http://wiki.dovecot.org/LDA/Postfix)
when setting it up, and it worked perfectly for months. I did indeed
only have to change mailbox_command and it worked (I'm also using sasl
auth, but that should be unrelated). Obviously something happened on
my system, but I would assume recompiling/reinstalling would reset
things. Nothing in the config files for postfix or dovecot changed,
from what I can see, as generally I am the only one making changes.

Thanks,
--falz


[Dovecot] Count breaks socket

2008-01-25 Thread Marc Perkel
If I use the socket option I can't use the count option to create more 
authentication processes. I get this error. Thanks in advance.


dovecot: Jan 25 06:57:04 Error: auth(default): Socket already exists: 
/var/run/dovecot/auth-client


auth default {

 mechanisms = plain

 passdb passwd-file {
   # Master users that can log in as anyone
   args = /etc/dovecot.masterusers
   master = yes
   pass =yes
 }


 # Linuxconf passwd-like file with specified location
 passdb passwd-file {
   args = /etc/exim/control/vmail/shadow.%d
 }


 # Linuxconf passwd-like file with specified location
 userdb passwd-file {
   args = /etc/exim/control/vmail/passwd.%d
 }

 socket listen {
   master {
 path = /var/run/dovecot/auth-master
 mode = 0666
   }
   client {
 path = /var/run/dovecot/auth-client
 mode = 0666
   }
 }


 # Number of authentication processes to create
#  count = 10

}