Re: [Dovecot] OT - small hd recommendation

2011-09-02 Thread Kerem Erciyes
Hi,

At least, rather than Seagate AS series or some green series try
using Seagate ST.SV series SATA HDDs, the 10$ difference is woth it.
They are certified for 7/24 operation and will not fail on you as
quickly. And they perform a little bit faster.

Regards,
Kerem



On Fri, Sep 2, 2011 at 8:55 AM, Spyros Tsiolis sts...@yahoo.co.uk wrote:
 Ditto,

 Don't know anything on RAID 10 with four disks, but I agree with the two-disk 
 scenario.

 s.



 
 I merely function as a channel that filters
 music through the chaos of noise
 - Vangelis


 
 From: Thomas Harold thomas-li...@nybeta.com
 To: dovecot@dovecot.org
 Sent: Friday, 2 September 2011, 3:23
 Subject: Re: [Dovecot] OT - small hd recommendation

 On 9/1/2011 12:48 PM, Daniel L. Miller wrote:

 Given my extensive requirements - I haven't yet filled my existing 320GB
 - size isn't a big deal. Am I actually deriving much benefit from 4-disk
 RAID10 using 160GB discs - vs a 2-4 disc 1TB RAID1 array?


 A pair of RAID-1 mirrors:

 - easy to deal with
 - you can attempt to manually balance load between the two arrays (storage on 
 one pair, indexes and mail queue on other pair)
 - disks can be pulled and taken to another machine and read one by one
 - slightly harder to screw up (but both setups die if the wrong 2 disks fail)

 RAID-10 over 4 disks:

 - generally faster seeks
 - generally faster read/write speeds due to striping
 - generally the better choice for performance
 - a bit harder to bury the disks vs a pair of mirrors
 - lets you have a bigger partition
 - all the eggs in a single array

 If you're having performance problems on the existing RAID-10, your only real 
 choices are to throw more spindles at it (move to a 6 or 8 disk RAID-10 w/ a 
 hot-spare disk), throw faster spindles at it (10k/15k SAS), or move to SSD.

 So, if you think you can manually balance the needs of the system, you could 
 try a pair of independent mirrors.  But if you want less hassle, stick with 
 the RAID-10.

 (And look into a tool like atop which can be run in the terminal and does a 
 decent job of showing you whether the CPU/DISK is overly busy.)



-- 
Kerem Erciyes - Sistem Danismani
http://keremerciyes.com


Re: [Dovecot] AUTH fail 2.0.9 on redhat 6

2011-07-22 Thread Kerem Erciyes
Try dovecot -n for configuration.

On Fri, Jul 22, 2011 at 9:24 PM, Selcuk Yazar selcuk.ya...@gmail.com wrote:
 Hi,

 we have postifx + open ldap + Jamm + saslauthd configuration

 SMTP authentication working properly and we send receive mails , and mails
 are delivering succes.

 but dovecot we have problems,

 in dovecot debug :

 Jul 22 20:51:04 auth: Debug: auth client connected (pid=11848)
 Jul 22 20:51:04 auth: Debug: client in: AUTH    1       PLAIN   service=pop3
   lip=193.xxx.xxx.xxx     rip=195.xxx.xxx.xxx      lport=110
 rport=27321     resp=hidden
 Jul 22 20:51:04 auth: Debug: ldap(macir@domain,195.xxx.xxx.xxx): pass
 search: base=o=hosting,dc=myhosting,dc=example scope=subtree
 filter=((objectClass=JammMailAccount)(mail=macir@domain)(accountActive=TRUE)(delete=FALSE))
 fields=mail,userPassword,cn,homeDirectory,mailbox
 Jul 22 20:51:04 auth: Debug: ldap(macir@domain,195.xxx.xxx.xxx): result:
 mail(mail)=macir@domain homeDirectory(homeDirectory)=/home/vmail/domains
 cn(cn)=NAME SURNAME userPassword(userPassword)={CRYPT}JpkzdqceMAuKQ
 mailbox(mailbox)=domain/macir/
 Jul 22 20:51:06 pop3-login: Debug: Ignoring unknown passdb extra field: mail
 Jul 22 20:51:06 pop3-login: Debug: Ignoring unknown passdb extra field:
 homeDirectory
 Jul 22 20:51:06 pop3-login: Debug: Ignoring unknown passdb extra field: cn
 Jul 22 20:51:06 pop3-login: Debug: Ignoring unknown passdb extra field:
 userPassword
 Jul 22 20:51:06 pop3-login: Debug: Ignoring unknown passdb extra field:
 mailbox
 Jul 22 20:51:06 auth: Debug: client out: FAIL   1       user=macir@domain
  mail=macir@domain     homeDirectory=/home/vmail/domains       cn=Mesut
 OZTURK userPassword={CRYPT}JpkzdqceMAuKQ       mailbox=domain/macir/


 in dovecot.info


 Jul 22 20:45:43 master: Info: Dovecot v2.0.9 starting up (core dumps
 disabled)
 Jul 22 20:51:04 auth: Info:
 ldap(ma...@trakyamail.trakya.edu.tr,195.xxx.xxx.xxx):
 No password returned (and no nopassword)
 Jul 22 20:51:06 pop3-login: Info: Disconnected (auth failed, 1 attempts):
 user=ma...@trakyamail.trakya.edu.tr, method=PLAIN, rip=195.xxx.xxx.xxx,
 lip=193.xxx.xxx.xxx


 What is the problem with dovecot, what is the correct conf option for
 OpenLdap confiuration ? why dovecot to many conf file ?


 thank in advance.


 --
 Selçuk YAZAR
 http://www.selcukyazar.blogspot.com




-- 
Kerem Erciyes - Sistem Danismani
http://keremerciyes.com


Re: [Dovecot] [Urgent] Email Retrieval from remote servers doesn't use Dovecot

2011-06-29 Thread Kerem Erciyes
    4u  IPv4   7580      0t0  TCP *:pop3 (LISTEN)
 pop3-logi 8357 dovecot    5u  IPv4   7581      0t0  TCP *:pop3s (LISTEN)
 pop3-logi 8358 dovecot    4u  IPv4   7580      0t0  TCP *:pop3 (LISTEN)
 pop3-logi 8358 dovecot    5u  IPv4   7581      0t0  TCP *:pop3s (LISTEN)
 pop3-logi 8359 dovecot    4u  IPv4   7580      0t0  TCP *:pop3 (LISTEN)
 pop3-logi 8359 dovecot    5u  IPv4   7581      0t0  TCP *:pop3s (LISTEN)
 pop3-logi 8360 dovecot    4u  IPv4   7580      0t0  TCP *:pop3 (LISTEN)
 pop3-logi 8360 dovecot    5u  IPv4   7581      0t0  TCP *:pop3s (LISTEN)
 imap-logi 8364 dovecot    4u  IPv4   7578      0t0  TCP *:imap2 (LISTEN)
 imap-logi 8364 dovecot    5u  IPv4   7579      0t0  TCP *:imaps (LISTEN)
 imap-logi 8375 dovecot    4u  IPv4   7578      0t0  TCP *:imap2 (LISTEN)
 imap-logi 8375 dovecot    5u  IPv4   7579      0t0  TCP *:imaps (LISTEN)
 imap-logi 8378 dovecot    4u  IPv4   7578      0t0  TCP *:imap2 (LISTEN)
 imap-logi 8378 dovecot    5u  IPv4   7579      0t0  TCP *:imaps (LISTEN)



 telnet 127.0.0.1 110

 Trying 127.0.0.1...
 Connected to 127.0.0.1.
 Escape character is '^]'.
 +OK Dovecot ready.



 telnet 127.0.0.1 143

 Trying 127.0.0.1...
 Connected to 127.0.0.1.
 Escape character is '^]'.
 * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE
 STARTTLS AUTH=PLAIN] Dovecot ready.
 1 logout
 * BYE Logging out
 1 OK Logout completed.
 Connection closed by foreign host.



 telnet mail.ut.ee 110

 Trying 193.40.5.156...
 Connected to mailhost.ut.ee.
 Escape character is '^]'.
 +OK POP3 ready
 quit
 +OK
 Connection closed by foreign host.



 telnet mail.ut.ee 143

 Trying 193.40.5.156...
 Connected to mailhost.ut.ee.
 Escape character is '^]'.
 * OK IMAP4 ready
 1 logout
 * BYE
 1 OK completed
 Connection closed by foreign host.


 -
 Commentary:
 -

 As is obvious from the commands and output listed above that dovecot is
 running, listening on 110 and 143 - but only for localhost. When I try to
 telnet mail.ut.ee 110/143 I get to see IMAP4/POP3 ready rather than
 Dovecot ready.



 -
 Queries
 -
 Shouldn't I get Dovecot ready message for remote servers as well? It is
 an MRA and we shouldn't be required to install it on remote servers,
 right? What should I do to make dovecot work for remote servers?








-- 
Kerem Erciyes - Sistem Danismani
http://keremerciyes.com


Re: [Dovecot] dovecot lda aliases doesn't work

2011-04-28 Thread Kerem Erciyes
Hi Selçuk,

You need to set alias delivery at Qmail level, I did a similar setup with
Dovecot  Postfix, and virtual domains and aliases, I found the easier
solution was to define Virtual Alias Maps for Postfix so it would ask
dovecot deliver to the correct mailbox user.

YMMV...

Kerem

On Mon, Apr 25, 2011 at 9:46 AM, Selcuk MIYNAT 
selcuk.miy...@endersys.com.tr wrote:

 Hi,

 I am trying to use dovecot as lda.

 I have put this line in my .qmail-default file:
 #|/var/qmail/bin/preline -f /usr/local/libexec/dovecot/dovecot-lda -d $EXT@
 $USER

 It is working correct with real addresses but couldn't find forwarding
 addresses.

 This is my /usr/local/etc/dovecot-sql.conf:
 driver = mysql
 connect = host=localhost user=vpopmailuser password=vpopmailpassword
 dbname=vpopmail
 default_pass_scheme = PLAIN
 password_query = SELECT CONCAT(pw_name, '@', pw_domain) AS user,
 pw_clear_passwd AS password FROM vpopmail WHERE pw_name = '%n' AND pw_domain
 = '%d'
 user_query = SELECT pw_dir as home, 89 AS uid, 89 AS gid FROM vpopmail
 WHERE pw_name = '%n' AND pw_domain = '%d'

 It is querying vpopmail table all the time but forwarding addresses are in
 the valias table, so it couldn't find forwarding addresses.

 How can I solve this?

 --
 Selcuk MIYNAT
 Endersys Ltd.
 Sistem Destek Muhendisi / System Support Engineer

 Phone : +90 216-4709423 | Fax : +90 216-4709508
 Web : http://www.endersys.com.tr

 Blog : http://blog.endersys.com
 Twitter : http://www.twitter.com/endersys
 LPI : The #1 Linux Certification for IT Professionals
 LPI (Linux Professional Institute) Turkey http://www.lpi-turkey.com

 Endersys is the first Advanced Business Partner of Red Hat in Turkey !
 http://www.europe.redhat.com/partners/endersys/




-- 
Kerem Erciyes - Sistem Danismani
http://keremerciyes.com


[Dovecot] Kerem Erciyes wants to stay in touch on LinkedIn

2011-02-17 Thread Kerem Erciyes
I'd like to add you to my professional network on LinkedIn.

- Kerem Erciyes

Kerem Erciyes
Founder at Kerem Erciyes - Systems Consultant 

Confirm that you know Kerem Erciyes
https://www.linkedin.com/e/458g9e-gk9r6mx4-1u/isd/2349073602/c9W4Eipx/EML-invite_guest_snackified_59/

---

After connecting with Kerem, check out:
- Michael Neil at Merrill Lynch 
- John McBride, SPHR, VBS at Consentium Search 
- Troy Henikoff at Excelerate 

(c) LinkedIn 2011




Re: [Dovecot] How to get a working dovecot.conf?

2010-12-29 Thread Kerem Erciyes
 possibilities, or
 options:
 the path to the databasefile, from which i think it should be:

 connect = /etc/dovecot/authdb.sqlite

 default_pass_scheme = MD5

 but then, i am lost. it atm looks like abracadabra to me..

 at the end of the file is the config of ISPConfig:

 driver = mysql
 connect = host=localhost dbname=dbispconfig user=ispconfig
 password=50b0152ba02189a94881c371ef1ef128
 default_pass_scheme = CRYPT

 password_querry = SELECT password FROM mail_user WHERE email = '%u' AND
 disable%Ls = 'n'
 user_querry = SELECT email as user, maildir as home, CONCAT('maildir:',
 maildir,'/Maildir') as mail, uid, gid, CONCAT('maildir:storage=',
 floor(quota/1024))AS quota, CONCAT(maildir, '/.sieve') as sieve FROM
 mail_user WHERE email = '%u' AND disable%Ls = 'n'

 at this moment i would not know what i should write here when i want to
 login from squirrelmail...
 AND most important: how to create a user and password at the right
place...

 thnx for your attention...

 Rob.


 Op 24-12-10 18:25, Kerem Erciyes schreef:
 Hi,

 Have you populated the dovecot-sql.conf and the SQL database tahat is
 referenced by it?

 -KE

 On Fri, Dec 24, 2010 at 6:24 PM, oddball56 monk...@iae.nl wrote:

 Hi again,

 It seems i have undone some errors, as the output now shows the version
of
 dovecot and the os:

 # 2.0.8: /etc/dovecot/dovecot.conf
 # OS: Linux 2.6.34.7-0.5-default i686 openSUSE 11.3 (i586) reiserfs
 auth_mechanisms = plain login
 disable_plaintext_auth = no
 first_valid_gid = 1000
 first_valid_uid = 1000
 last_valid_gid = 5000
 last_valid_uid = 5000
 log_timestamp = %Y-%m-%d %H:%M:%S 
 mail_location = maildir:/var/vmail/%d/%n/Maildir
 managesieve_notify_capability = mailto
 managesieve_sieve_capability = fileinto reject envelope
encoded-character
 vacation subaddress comperator-i;ascii-numeric relational regex
imap4flags
 copy include variables body enotify environment mailbox date
 passdb {
  driver = pam
 }
 passdb {
  args = /etc/dovecot-sql.conf
  driver = sql
 }
 plugin {
  quota = maildir
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/sieve
 }
 protocols = imap pop3
 ssl = no
 userdb {
  driver = passwd
 }
 userdb {
  args = /etc/dovecot-sql.conf
  driver = sql
 }
 protocol imap {
  mail_plugin_dir = /usr/lib/dovecot/imap
  mail_plugins = quota imap_quota
  service imap {
executable = /usr/lib/dovecot/rawlog /usr/lib/dovecot/imap
  }
 }
 protocol pop3 {
  mail_plugin_dir = /usr/lib/dovecot/modules/pop3
  mail_plugins = quota
  pop3_uidl_format = %08Xu%08Xv
  service pop3 {
executable = /usr/lib/dovecot/rawlog /usr/lib/dovecot/pop3
  }
 }
 protocol sieve {
  service sieve {
executable = /usr/lib/dovecot/managesieve
  }
 }
 protocol lda {
  auth_socket_path = /var/run/dovecot/auth-master
  hostname = AsusTT-sfn6
  mail_plugins = sieve quota
  postmaster_adress = postmas...@asustt-sfn6.site
 }


 I have not been able to login, but going to start over creating a userdb
to
 test.
 Thanx for the help, it feels great to know there are people out there
who
 care, and want to help others..

 Rob.



 --
 View this message in context:
http://old.nabble.com/How-to-get-a-working-dovecot.conf--tp30506797p30528849.html
 Sent from the Dovecot mailing list archive at Nabble.com.








 --

 Enjoy your time around,


 Oddball(M9.) (Now or never...)


  OS:  Linux 2.6.34-12-desktop x86_64
  Huidige gebruiker:  oddb...@amd64x2sfn1
  Systeem:  openSUSE 11.3 (x86_64)
  KDE:  4.4.4 (KDE 4.4.4) release 2





-- 
Kerem Erciyes
Sistem Danismani
http://proje.keremerciyes.com

kerem.erci...@gmail.com
+90 532 737 05 83


Re: [Dovecot] How to get a working dovecot.conf?

2010-12-24 Thread Kerem Erciyes
Hi,

Have you populated the dovecot-sql.conf and the SQL database tahat is
referenced by it?

-KE

On Fri, Dec 24, 2010 at 6:24 PM, oddball56 monk...@iae.nl wrote:

 Hi again,

 It seems i have undone some errors, as the output now shows the version of
 dovecot and the os:

 # 2.0.8: /etc/dovecot/dovecot.conf
 # OS: Linux 2.6.34.7-0.5-default i686 openSUSE 11.3 (i586) reiserfs
 auth_mechanisms = plain login
 disable_plaintext_auth = no
 first_valid_gid = 1000
 first_valid_uid = 1000
 last_valid_gid = 5000
 last_valid_uid = 5000
 log_timestamp = %Y-%m-%d %H:%M:%S 
 mail_location = maildir:/var/vmail/%d/%n/Maildir
 managesieve_notify_capability = mailto
 managesieve_sieve_capability = fileinto reject envelope encoded-character
 vacation subaddress comperator-i;ascii-numeric relational regex imap4flags
 copy include variables body enotify environment mailbox date
 passdb {
  driver = pam
 }
 passdb {
  args = /etc/dovecot-sql.conf
  driver = sql
 }
 plugin {
  quota = maildir
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/sieve
 }
 protocols = imap pop3
 ssl = no
 userdb {
  driver = passwd
 }
 userdb {
  args = /etc/dovecot-sql.conf
  driver = sql
 }
 protocol imap {
  mail_plugin_dir = /usr/lib/dovecot/imap
  mail_plugins = quota imap_quota
  service imap {
    executable = /usr/lib/dovecot/rawlog /usr/lib/dovecot/imap
  }
 }
 protocol pop3 {
  mail_plugin_dir = /usr/lib/dovecot/modules/pop3
  mail_plugins = quota
  pop3_uidl_format = %08Xu%08Xv
  service pop3 {
    executable = /usr/lib/dovecot/rawlog /usr/lib/dovecot/pop3
  }
 }
 protocol sieve {
  service sieve {
    executable = /usr/lib/dovecot/managesieve
  }
 }
 protocol lda {
  auth_socket_path = /var/run/dovecot/auth-master
  hostname = AsusTT-sfn6
  mail_plugins = sieve quota
  postmaster_adress = postmas...@asustt-sfn6.site
 }


 I have not been able to login, but going to start over creating a userdb to
 test.
 Thanx for the help, it feels great to know there are people out there who
 care, and want to help others..

 Rob.



 --
 View this message in context: 
 http://old.nabble.com/How-to-get-a-working-dovecot.conf--tp30506797p30528849.html
 Sent from the Dovecot mailing list archive at Nabble.com.





-- 
Kerem Erciyes
Sistem Danismani


Re: [Dovecot] Question about slow storage but fast cpus, plenty of ram and dovecot

2010-12-11 Thread Kerem Erciyes
Hi,

I am running a fair amount of stored e-mails on maildirs(10 GB+) in 846
folders that gets a fair amount of searching, and 20+ users accessing them,
mostly via IMAP and a few POP3 accounts. I am running these on a Linode XEN
server and have yet to hit any hard limits of bare metal. User and Virual
databases are plain text files.

# 1.2.9: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32.16-linode28 i686 Ubuntu 10.04.1 LTS ext3

Postfix + Dovecot + SSL for Both with Amavisd seems a breeze. No problems
related to infrastructure yet.

Yet I will wait to see how this system will grow, as we are planning to
include more users and doamins in our system in 2011.

So:

1. I am very interested in these questions about performance
2. My setup should provide some people another way to do things, since I am
not using mysql, ldap etc., kust plain old text files update via scripts
3. I am goind to test this system as we scale out, yet we are bound to add
LDAP for authentication for single sign on at some point, and I will try to
publish my benchmarks public, even if it is just for publicity's sake.

Regards,
Kerem


On Sat, Dec 11, 2010 at 6:47 PM, Eric Rostetter
rostet...@mail.utexas.eduwrote:

 Quoting a...@test123.ru:

  Guys. Who is interested in obvious reasoning?


 The same people who are interested in vague questions?


  Let me remind original concrete question. I am also interested.

  We can exchange CPU  RAM to minimize disk i/o.
 Should we change to dovecot 2.0?
 Maybe mdbox can help us?
 Maybe ext4 instead of ext3?


 Uhm, well, again, depends on your needs.  Pop3? Imap? Both?  Number of
 accounts?  Can't really help without more details.  Maybe I can't help
 with more details either, but that is a risk you take on a mailing list.


  1. Is migration to dovecot 2.0 good idea if I want to decrease I/O?


 Depends on what version you run now really.  But I would recommend it
 anyway just on principle.


  2. Can mdbox help decrease IO?
 3. What is better for mdbox or maildir - ext3 or ext4?


 Dont' know.  But you can certainly tune the FS in either case (atime/dtime,
 flush rate, external journal, etc).  Some will say XFS is better, etc.
 Besides, you can hardly decide the best FS until you know the mailbox
 format (mbox, maildir, mdbox, etc).

 If you want concret answers, you need concret questions...


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

 Go Longhorns!




-- 
Kerem Erciyes
Sistem Danismani
http://proje.keremerciyes.com

kerem.erci...@gmail.com
+90 532 737 05 83


[Dovecot] Debugging IMAP ACLs

2009-10-06 Thread Kerem Erciyes
Hello,

I upgraded my server to 1.2.4 and now I'm trying to implement ACL support to
use with Bynari Insight Connector. Starting out with the wiki page on shared
namespaces from http://wiki.dovecot.org/SharedMailboxes/Shared I tried to
implement shared mailbox support so that my customers can enjoy more
exhange-like qualities with outlook.

However I am not sure if the ACLs or Shared Namespaces are really working. I
sure would like some help debugging ACL requests by clients, and the
configuration I did.

Thanks,
Kerem

Here is the run down of my configuration, if I have screwed up somewhere.

*dovecot -n*
# 1.2.4: /usr/local/etc/dovecot.conf
# OS: FreeBSD 6.2-STABLE i386
base_dir: /var/run/dovecot/
log_path: /var/log/dovecot.log
info_log_path: /var/log/dovecot-debug.log
protocols: imap imaps pop3 pop3s
disable_plaintext_auth: no
login_dir: /var/run/dovecot//login
login_executable(default): /usr/local/libexec/dovecot/imap-login
login_executable(imap): /usr/local/libexec/dovecot/imap-login
login_executable(pop3): /usr/local/libexec/dovecot/pop3-login
login_greeting: Kupyazilim IMAPS/POP3S Server - Dovecot ready.
verbose_proctitle: yes
first_valid_uid: 100
first_valid_gid: 6
mail_privileged_group: mail
mail_location: mbox:~/mail/:INBOX=/usr/home/vmail/%d/%u
mail_executable(default): /usr/local/libexec/dovecot/imap
mail_executable(imap): /usr/local/libexec/dovecot/imap
mail_executable(pop3): /usr/local/libexec/dovecot/pop3
mail_plugins(default): quota imap_quota
mail_plugins(imap): quota imap_quota
mail_plugins(pop3): quota
mail_plugin_dir(default): /usr/local/lib/dovecot/imap
mail_plugin_dir(imap): /usr/local/lib/dovecot/imap
mail_plugin_dir(pop3): /usr/local/lib/dovecot/pop3
imap_client_workarounds(default): outlook-idle delay-newmail
tb-extra-mailbox-sep
imap_client_workarounds(imap): outlook-idle delay-newmail
tb-extra-mailbox-sep
imap_client_workarounds(pop3):
pop3_client_workarounds(default):
pop3_client_workarounds(imap):
pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh
namespace:
  type: private
  separator: /
  inbox: yes
  list: yes
  subscriptions: yes
namespace:
  type: shared
  separator: /
  prefix: shared/%%u/
  location: mbox:/usr/home/vmail/%d/%u:INDEX=/usr/home/vmail/shared/%%u
  list: children
lda:
  postmaster_address: postmas...@kupyazilim.com.tr
  mail_plugins: quota
  log_path: /var/log/dovecot-deliver.log
  info_log_path: /var/log/dovecot-deliver.log
auth default:
  mechanisms: plain login
  user: nobody
  passdb:
driver: sql
args: /usr/local/etc/dovecot-sql.conf
  userdb:
driver: sql
args: /usr/local/etc/dovecot-sql.conf
  userdb:
driver: prefetch
  socket:
type: listen
client:
  path: /var/spool/postfix/private/auth
  mode: 432
  user: postfix
  group: mail
master:
  path: /var/run/dovecot/auth-master
  mode: 432
  user: vmail
  group: mail
plugin:
  acl_shared_dict: proxy::acl
dict:
  quota: maildir:storage=10240:messages=1000
  trash: /usr/local/etc/trash.conf
  acl: mysql:/usr/local/etc/dovecot-dict-sql.conf
*
cat /usr/local/etc/dovecot-acl.conf *

# mail_location copied from dovecot.conf for reference only
#
# mail_location: mbox:~/mail/:INBOX=/usr/home/vmail/%d/%u
# note: it is %d/%u here but only %u in dovecot-sql.conf

# You need to create also a private namespace:
namespace private {
  separator = /
  prefix =
  #location defaults to mail_location.
  inbox = yes
}

namespace shared {
  separator = /
  prefix = shared/%%u/
  #location = maildir:%%h/Maildir:INDEX=~/Maildir/shared/%%u
  location = mbox:/usr/home/vmail/%d/%u:INDEX=/usr/home/vmail/shared/%%u
  subscriptions = no
  list = children
}

# Set ACL to SQL Server and Reference sql-dictionary
# Table implemented in mysql:/postfix/user_shares

plugin {
  acl_shared_dict = proxy::acl
}

dict {
  acl = mysql:/usr/local/etc/dovecot-dict-sql.conf
}

*cat /usr/local/etc/dovecot-dict-sql.conf *

map {
  pattern = shared/shared-boxes/user/$to/$from
  table = user_shares
  value_field = dummy

  fields {
from_user = $from
to_user = $to
  }
}






-- 
Kerem Erciyes
Sistem Danismani
http://proje.keremerciyes.com

kerem.erci...@gmail.com
+90 532 737 05 83


Re: [Dovecot] Debugging IMAP ACLs

2009-10-06 Thread Kerem Erciyes
Hi Timo,

On Tue, Oct 6, 2009 at 4:39 PM, Timo Sirainen t...@iki.fi wrote:

 On Oct 6, 2009, at 7:24 AM, Kerem Erciyes wrote:

  mail_location: mbox:~/mail/:INBOX=/usr/home/vmail/%d/%u


 I don't think I've ever tried shared mailboxes with mbox format before, no
 idea if it even works..


Is there any way to trace ACL commands isssued by the client? Or should they
pop up in debug log if ACLs are active?

I tried via telnet to issue imap acl commands and all I could get to work
was NAMESPACE command. I think you are right, and ACLs are not supported
with mbox, or there is something wrong with my setup. Yet I can see the
namespace defined in the configuration via NAMESPACE command.

telnet localhost 143
Trying 127.0.0.1...
Connected to localhost
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE
STARTTLS AUTH=PLAIN AUTH=LOGIN] Kupyazilim IMAPS/POP3S Server - Dovecot
ready.

a05 CAPABILITY
* CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE SORT
THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT IDLE CHILDREN NAMESPACE
UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES
WITHIN CONTEXT=SEARCH QUOTA STARTTLS AUTH=PLAIN AUTH=LOGIN
a05 OK Capability completed.

a08 login * *
a08 OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE SORT
THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT IDLE CHILDREN NAMESPACE
UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES
WITHIN CONTEXT=SEARCH QUOTA] Logged in

a09 MYRIGHTS
a09 BAD Error in IMAP command MYRIGHTS: Unknown command.

a10 GETACL INBOX
a10 BAD Error in IMAP command GETACL: Unknown command.

a11 SETACL Inbox pr...@***.com +s
a11 BAD Error in IMAP command SETACL: Unknown command.

a13 NAMESPACE
* NAMESPACE (( /)) ((shared/ /)) NIL
a13 OK Namespace completed.






  namespace:
  type: shared
  separator: /
  prefix: shared/%%u/
  location: mbox:/usr/home/vmail/%d/%u:INDEX=/usr/home/vmail/shared/%%u


 This doesn't really look right. Should probably be more like:

 location =
 mbox:%%h/mail:INBOX=/usr/home/vmail/%%d/%%u:INDEX=/usr/home/vmail/shared/%%u


Sorry, my bad at 3:00 AM. It is fixed now.


-- 
Kerem Erciyes
Sistem Danismani
http://proje.keremerciyes.com

kerem.erci...@gmail.com
+90 532 737 05 83


Re: [Dovecot] Debugging IMAP ACLs

2009-10-06 Thread Kerem Erciyes
Hi,

Well seems I have a problem. When I enable the imap_acl plugin dovecot will
not start.

Edlopen(/usr/local/lib/dovecot/imap/lib02_imap_acl_plugin.so) failed:
/usr/local/lib/dovecot/imap/lib02_imap_acl_plugin.so: Undefined symbol
acl_mailbox_right_lookup
FCouldn't load required plugins
Error: imap dump-capability process returned 89
Fatal: Invalid configuration in /usr/local/etc/dovecot.conf

Do you think this is related to mbox instead of maildir setup that we have.
If so, I think I will start by converting to maildirs from mbox and then go
on testing the ACL and Shared Namespace setups.

Regards,
Kerem

On Tue, Oct 6, 2009 at 5:37 PM, Timo Sirainen t...@iki.fi wrote:

 On Tue, 2009-10-06 at 17:04 +0300, Kerem Erciyes wrote:
   I don't think I've ever tried shared mailboxes with mbox format before,
 no
   idea if it even works..
 
 
  Is there any way to trace ACL commands isssued by the client? Or should
 they
  pop up in debug log if ACLs are active?

 http://wiki.dovecot.org/Debugging/Rawlog could be useful.




-- 
Kerem Erciyes
Sistem Danismani
http://proje.keremerciyes.com

kerem.erci...@gmail.com
+90 532 737 05 83