Re: [Dovecot] PAM Authentication with OSX Snow Leopard

2009-08-29 Thread Nicola Tiling


I 've copied /etc/pam.d/ftpd to /etc/pam.d/dovecot. This configuration  
works for OSX 10.6 with user passdb



auth   required   pam_opendirectory.so
accountrequired   pam_permit.so
password   required   pam_deny.so
sessionrequired   pam_permit.so


Am 29.08.2009 um 01:11 schrieb Nicola Tiling:


Hi

Apple changed from Linux PAM to OpenPAM and the dovecot pam file  
(dovecot installed from macports) doesn't work anymore.


Installed pam modules are:

-r--r--r--1 root  wheel   76640 31 Jul 09:15 pam_env.so.2
-r--r--r--1 root  wheel   51024 31 Jul 09:15 pam_group.so.2
-r--r--r--1 root  wheel   99776 31 Jul 09:15 pam_krb5.so.2
-r--r--r--1 root  wheel   51552 31 Jul 09:15 pam_launchd.so.2
-r--r--r--1 root  wheel   68800 31 Jul 09:15 pam_mount.so.2
-r--r--r--1 root  wheel   50896 31 Jul 09:15 pam_nologin.so.2
-r--r--r--1 root  wheel   64272 31 Jul 09:15  
pam_opendirectory.so.2

-r--r--r--1 root  wheel   51008 31 Jul 09:15 pam_sacl.so.2
-r--r--r--1 root  wheel   50608 31 Jul 09:15 pam_self.so.2
-r--r--r--1 root  wheel   60448 31 Jul 09:15 pam_serialnumber.so.2
-r--r--r--1 root  wheel   50880 31 Jul 09:15 pam_uwtmp.so.2


Does anyone know to get dovecot with this modules work?

Nicola









[Dovecot] PAM Authentication with OSX Snow Leopard

2009-08-28 Thread Nicola Tiling

Hi

Apple changed from Linux PAM to OpenPAM and the dovecot pam file  
(dovecot installed from macports) doesn't work anymore.


Installed pam modules are:

-r--r--r--1 root  wheel   76640 31 Jul 09:15 pam_env.so.2
-r--r--r--1 root  wheel   51024 31 Jul 09:15 pam_group.so.2
-r--r--r--1 root  wheel   99776 31 Jul 09:15 pam_krb5.so.2
-r--r--r--1 root  wheel   51552 31 Jul 09:15 pam_launchd.so.2
-r--r--r--1 root  wheel   68800 31 Jul 09:15 pam_mount.so.2
-r--r--r--1 root  wheel   50896 31 Jul 09:15 pam_nologin.so.2
-r--r--r--1 root  wheel   64272 31 Jul 09:15 pam_opendirectory.so.2
-r--r--r--1 root  wheel   51008 31 Jul 09:15 pam_sacl.so.2
-r--r--r--1 root  wheel   50608 31 Jul 09:15 pam_self.so.2
-r--r--r--1 root  wheel   60448 31 Jul 09:15 pam_serialnumber.so.2
-r--r--r--1 root  wheel   50880 31 Jul 09:15 pam_uwtmp.so.2


Does anyone know to get dovecot with this modules work?

Nicola







[Dovecot] Dovecot failed with a correct sql user_query

2008-07-06 Thread Nicola Tiling


Dovecot (1.1.1) criticises a sql user_query that's working on the sql  
console and thats correct.


DOVECOT-LOG:
dovecot: Jul 06 22:58:29 Error: auth(default): sql(nti): User query  
failed: ERROR:  syntax error at or near mbox
dovecot: Jul 06 22:58:29 Error: auth(default): LINE 1: ...gid, home,  
(CASE WHEN smtp like '/var/pop3/ THEN 'mbox:' || ...


QUERY:
user_query = SELECT '%u' AS user, uid, gid, home, (CASE WHEN home like  
'/var/pop3/%' THEN 'mbox:' || home || '/mail/:INDEX=' || home || '/ 
indexes/' WHEN home like '/var/maildir/%' THEN 'maildir:' || home || '/ 
mail/:INDEX=' || home || '/indexes/' END) AS mail FROM users WHERE  
username = '%u'  AND users.enabled = '1' AND users.type='local'


PGSQL-PROMPT:
mail=# SELECT 'nti' AS user, uid, gid, home, (CASE WHEN home like '/ 
var/pop3/%' THEN 'mbox:' || home || '/mail/:INDEX=' || home || '/ 
indexes/' WHEN home like '/var/maildir/%' THEN 'maildir:' || home || '/ 
mail/:INDEX=' || home || '/indexes/' END) AS mail FROM users WHERE  
username = 'nti' AND users.enabled = '1' AND users.type='local';
 user | uid | gid |   home   |   
mail
--+-+-+-- 
+
 nti  |  99 |  99 | /var/maildir/nti | maildir:/var/maildir/nti/ 
mail/:INDEX=/var/maildir/nti/indexes/


Re: [Dovecot] Dovecot failed with a correct sql user_query

2008-07-06 Thread Nicola Tiling




Am 06.07.2008 um 23:30 schrieb Andy Shellam:
I'm not 100% certain if this will work, but try changing your % in  
your SQL query to %% (i.e. make them double %'s instead of single.)


Cool - Thats it !


[Dovecot] Cant't get quota / dict work

2008-07-02 Thread Nicola Tiling

Hi

I have a mixed configuration for MAILDIR und MBOX accounts  LDA is  
exim. For maildir exim writes a maildirsize file and I can see the  
IMAP contingent in my mailclient.


But I can't find a solution for mbox. I tried dict with mysql, db, and  
pgsql - but notihing works for me.


- db: a file is written but it seems to be empty:
 1013 [mail] =db_dump-4.6 -p quota.db
VERSION=3
format=print
type=btree
db_pagesize=4096
HEADER=END
 priv/quota/messages
 0
 priv/quota/storage
 0
DATA=END

- mysql: the dict-server connects, but nothing is written to the table
dovecot: Jul 02 11:24:13 Info: dict: mysql: Connected to mail
the mysql log shows no entries for an update or insert to the table  
quota


- pgsql: same: the dict-server connects, but nothing is written to the  
table

dovecot: Jul 02 10:56:45 Info: dict: pgsql: Connected to mail
the pgsql log shows no activities

System:
FreeBSD 6.2-STABLE-200709

dict-quota.conf:
connect = host= ...
table = quota
select_field = current
where_field = path
username_field = username

Dovecot:
 1027 [mail] =dovecot --version
1.1.1
 1046 [mail] =dovecot --build-options
Build options: ioloop=kqueue notify=kqueue openssl
Mail storages: maildir mbox dbox cydir raw
SQL drivers: mysql postgresql
Passdb: checkpassword passwd passwd-file sql
Userdb: checkpassword passwd prefetch passwd-file sql static
 1047 [mail] =dovecot -n
# 1.1.1: /usr/local/etc/dovecot.conf
base_dir: /var/run/dovecot
log_path: /var/log/dovecot/dovecot
info_log_path: /var/log/dovecot/dovecot
protocols: imap imaps pop3 pop3s
...
disable_plaintext_auth: no
shutdown_clients: 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: W4W Dovecot ready.
login_process_per_connection: no
verbose_proctitle: yes
first_valid_uid: 99
last_valid_uid: 99
first_valid_gid: 99
last_valid_gid: 99
mail_privileged_group: pop3

mail_location: mbox:/var/mbox/%u/mail:INBOX=/var/pop3/%u:INDEX=/var/ 
mbox/%u/indexes

(for maildir values comes from database)

mbox_write_locks: fcntl dotlock
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 expire autocreate
mail_plugins(imap): quota imap_quota expire autocreate
mail_plugins(pop3):
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): delay-newmail outlook-idle netscape- 
eoh tb-extra-mailbox-sep
imap_client_workarounds(imap): delay-newmail outlook-idle netscape-eoh  
tb-extra-mailbox-sep

imap_client_workarounds(pop3):
pop3_lock_session(default): no
pop3_lock_session(imap): no
pop3_lock_session(pop3): yes
pop3_client_workarounds(default):
pop3_client_workarounds(imap):
pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh
dict_db_config: /usr/local/etc/dovecot/dovecot-db.conf
auth default:
  mechanisms: plain login
  user: dovecot_auth
  verbose: yes
  passdb:
driver: sql
args: /usr/local/etc/dovecot/pgsql.conf
  userdb:
driver: prefetch
  userdb:
driver: sql
args: /usr/local/etc/dovecot/pgsql.conf
  socket:
type: listen
client:
  path: /var/run/dovecot/auth-client
  mode: 432
master:
  path: /var/run/dovecot/auth-master
  mode: 384
plugin:
  autocreate: Sent
  autocreate2: Trash
  autocreate3: Drafts
  autocreate4: Junk
  autosubscribe: Sent
  autosubscribe2: Trash
  autosubscribe3: Drafts
  autosubscribe4: Junk
  expire: Trash 1 Trash/* 1 Junk 1
  expire_dict: proxy:/var/run/dovecot/dict-server:expire
  quota: maildir
  quota2: dict:::proxy:/var/run/dovecot/dict-server:quota
  quota_rule: *:storage=20M
  quota_rule2: Trash:storage=10M
  quota_rule3: Spam:storage=20M
  quota_rule4: Junk:storage=20M
  quota2_rule: *:storage=20M
  quota2_rule2: Trash:storage=10M
  quota2_rule3: Spam:storage=20M
  quota2_rule4: Junk:storage=20M
dict:
  expire: db:/usr/local/lib/dovecot/db/expire.db
  quota: mysql:/usr/local/etc/dovecot/dict-quota.conf
  or:
  quota: pgsql:/usr/local/etc/dovecot/dict-quota.conf
  or:
  quota = db:/usr/local/lib/dovecot/db/quota.db