[Dovecot] Static list of users with passdb pam

2008-01-18 Thread Koen Vermeer
Hi,

On my system, I want to provide imap access for some of the users listed
in /etc/passwd. The list of users should be provided by me, and should
just be a list in a text file. All the userdb options are static (uid,
gid, home directory). Unfortunately, I cannot think of a way to
configure Dovecot to do this. The closest I get is with:

passdb pam {}
userdb passwd-file {
  args = /path/to/passwd-file
}

However, the passwd-file is now more complex than it really needs to be,
as it includes fields for password, uid, gid and home directory as well.

Is there some way to handle this? Or am I trying to do something stupid?

Thanks!

Koen



Re: [Dovecot] Static list of users with passdb pam

2008-01-18 Thread Rob Coward
If you are using pam already, why not add to /etc/pam.d/dovecot
something like:

authrequiredpam_listfile.so onerr=fail item=user sense=allow
file=/etc/dovecot/allowed_users

The syntax may not be quite correct as this is off the top of my head
and I havent tested it, but we do something very similar with other pam
authentications, such as from vsftpd, to restrict user access.

Regards,
Rob

On Fri, 2008-01-18 at 10:04 +0100, Koen Vermeer wrote:
 Hi,
 
 On my system, I want to provide imap access for some of the users listed
 in /etc/passwd. The list of users should be provided by me, and should
 just be a list in a text file. All the userdb options are static (uid,
 gid, home directory). Unfortunately, I cannot think of a way to
 configure Dovecot to do this. The closest I get is with:
 
 passdb pam {}
 userdb passwd-file {
   args = /path/to/passwd-file
 }
 
 However, the passwd-file is now more complex than it really needs to be,
 as it includes fields for password, uid, gid and home directory as well.
 
 Is there some way to handle this? Or am I trying to do something stupid?
 
 Thanks!
 
 Koen
 


Please consider the environment before printing this email. 


GAME Stores Group Ltd has been awarded ‘Retailer of the Year’ at the 2006 
Golden Joystick Awards and 
'Thames Valley Business Award' for Outstanding Employer of Choice 2006.

This e-mail and any files transmitted with it are confidential and intended 
solely for the use of the 
individual or entity to whom they are addressed. If you have received this 
e-mail in error please 
notify the system manager at:  
 
mailto:[EMAIL PROTECTED]
 
The recipient acknowledges that the transmissions made via the Internet can be 
corrupted and therefore 
THE GAME GROUP PLC and any of its subsidiaries do not give any warranty as to 
the quality or accuracy of 
any information contained in the message or assume any liability for it or for 
its transmission, reception or storage.  

This footnote also confirms that this e-mail message has been swept by 
anti-virus software for the presence of computer viruses.
 
http://www.game.co.uk
http://www.gamegroup.plc.uk 

Registered Number: 1937170
Registered Office: Unity House, Telford Road, Basingstoke, Hampshire. RG21 6YJ 
Registered in England and Wales.


[Dovecot] Squirrel Mail (unknown date) in subject and zero size of messages shown

2008-01-18 Thread Niki Spassov

Hello, I'm having the following problems with a Squirrelmail and Dovecot.
with option SERVER SIDE SORTING in Squirrel, only the first page with 
e-mails is shown in user's inbox, the mails in all the next pages are 
listed with subject: (unknown date) and size 0.
The other similar problem, independent from that option (SERVER SIDE 
SORTING) is: when THREAD VIEW is chosen, we have the same behavior, 
normal first page and damaged all the others.

with option SERVER SIDE SORTING = FASE, and UNTHREADED, everything is OK
Has anyone seen this behavior, any help will be greatly appreciated.
Thank you in advance :)

P.S. Squirrel's version is 1.4.7 and Dovecot is 1.0-stable


Re: [Dovecot] Static list of users with passdb pam

2008-01-18 Thread Koen Vermeer
Thanks for the pointer. I guess I need to change the userdb entry as
well. I now have

userdb static {
  args = uid=xxx gid=xxx home=whatever allow_all_users=yes
}

which seems to do what I want. I'll test some more, but I guess this
works fine. Thanks again!

Best,
Koen


On Fri, 2008-01-18 at 09:25 +, Rob Coward wrote:
 If you are using pam already, why not add to /etc/pam.d/dovecot
 something like:
 
 auth  requiredpam_listfile.so onerr=fail item=user sense=allow
 file=/etc/dovecot/allowed_users
 
 The syntax may not be quite correct as this is off the top of my head
 and I havent tested it, but we do something very similar with other pam
 authentications, such as from vsftpd, to restrict user access.
 
 Regards,
 Rob
 
 On Fri, 2008-01-18 at 10:04 +0100, Koen Vermeer wrote:
  Hi,
  
  On my system, I want to provide imap access for some of the users listed
  in /etc/passwd. The list of users should be provided by me, and should
  just be a list in a text file. All the userdb options are static (uid,
  gid, home directory). Unfortunately, I cannot think of a way to
  configure Dovecot to do this. The closest I get is with:
  
  passdb pam {}
  userdb passwd-file {
args = /path/to/passwd-file
  }
  
  However, the passwd-file is now more complex than it really needs to be,
  as it includes fields for password, uid, gid and home directory as well.
  
  Is there some way to handle this? Or am I trying to do something stupid?
  
  Thanks!
  
  Koen
  
 
 
 Please consider the environment before printing this email. 
 
 
 GAME Stores Group Ltd has been awarded Retailer of the Year at the 2006 
 Golden Joystick Awards and 
 'Thames Valley Business Award' for Outstanding Employer of Choice 2006.
 
 This e-mail and any files transmitted with it are confidential and intended 
 solely for the use of the 
 individual or entity to whom they are addressed. If you have received this 
 e-mail in error please 
 notify the system manager at:  
  
 mailto:[EMAIL PROTECTED]
  
 The recipient acknowledges that the transmissions made via the Internet can 
 be corrupted and therefore 
 THE GAME GROUP PLC and any of its subsidiaries do not give any warranty as to 
 the quality or accuracy of 
 any information contained in the message or assume any liability for it or 
 for its transmission, reception or storage.  
 
 This footnote also confirms that this e-mail message has been swept by 
 anti-virus software for the presence of computer viruses.
  
 http://www.game.co.uk
 http://www.gamegroup.plc.uk 
 
 Registered Number: 1937170
 Registered Office: Unity House, Telford Road, Basingstoke, Hampshire. RG21 
 6YJ Registered in England and Wales.



[Dovecot] Patch for assertion failure in 1.0.10

2008-01-18 Thread Richard Platel


Hi

FETCHing a largish (~30K)  zlib compressed maildir message causes an  
assertion failure on an attempt to grow the stream buffer to smaller  
than its current size.


I believe the attached patch fixes this.



istream-zlib.c.patch
Description: Binary data


Re: [Dovecot] Patch for assertion failure in 1.0.10

2008-01-18 Thread Timo Sirainen
On Fri, 2008-01-18 at 19:04 -0500, Richard Platel wrote:
 Hi
 
 FETCHing a largish (~30K)  zlib compressed maildir message causes an  
 assertion failure on an attempt to grow the stream buffer to smaller  
 than its current size.
 
 I believe the attached patch fixes this.

I fixed it a bit differently:
http://hg.dovecot.org/dovecot/rev/e33119f2dfdc

It was allocating more memory even though there was no need for it after
compress.



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