From reading the wiki for a filesystem quota, I took my shot at 1) building my binaries using the mods in AIXPluginsSupport 2) changing dovecot.conf and 3) putting the plugins in the library But I'm getting this error message when I invoke dovecot: Plugin imap_quota not found from directory /usr/local/lib/dovecot Error: imap dump-capability process returned 89 It would seem that a) I have the syntax or the parameters wrong b) I didn't get the changes to the AIX build environment right I've attached the dovecot -n output. Here are the details of what I did. 1) dovecot.conf =========== within the imap config section ========== # Support for dynamically loadable plugins. mail_plugins is a space separated # list of plugins to load. #mail_plugins #mail_plugin_dir = /usr/lib/dovecot/imap # SD 5/24/07 tryout FS quota plugin mail_plugins = quota imap_quota mail_plugin_dir = /usr/local/lib/dovecot/imap plugin { # Here you can give some extra environment variables to mail processes. # This is mostly meant for passing parameters to plugins. %variable # expansion is done for all values. # Quota plugin. Multiple backends are supported: # dirsize: Find and sum all the files found from mail directory. # Extremely SLOW with Maildir. It'll eat your CPU and disk I/O. # dict: Keep quota stored in dictionary (eg. SQL) # maildir: Maildir++ quota # fs: Read-only support for filesystem quota #quota = maildir # SD 5/24/07 Try FS quota support quota = fs I've tried it as both mail_plugin_dir = /usr/local/lib/dovecot/imap and mail_plugin_dir = /usr/local/lib/dovecot 2) Both ways I see this error message:> 4229 root at mercury:/usr/local/etc ## dovecot > ILoading modules from directory: /usr/local/lib/dovecot > IModule loaded: /usr/local/lib/dovecot/lib10_quota_plugin.so > FPlugin imap_quota not found from directory /usr/local/lib/dovecot > Error: imap dump-capability process returned 89 > > 4272 root at mercury:/usr/local/lib/dovecot/imap ## dovecot > ILoading modules from directory: /usr/local/lib/dovecot/imap > IModule loaded: /usr/local/lib/dovecot/imap/lib10_quota_plugin.so > FPlugin imap_quota not found from directory /usr/local/lib/dovecot/imap > Error: imap dump-capability process returned 89 >3) These directories have the following contents: 4292 root at mercury:/usr/local/lib/dovecot ## ls -al total 1168 drwxr-xr-x 3 root system 512 May 24 12:36 ./ drwxr-xr-x 7 root system 512 May 21 14:31 ../ -rw-r--r-- 1 root sys 292522 May 22 15:12 052207-1455-64bit-ssl.lib10_quota_plugin.a -rwxr-xr-x 1 root sys 904 May 22 15:12 052207-1455-64bit-ssl.lib10_quota_plugin.la* -rwxr-xr-x 1 root sys 270499 May 22 15:12 052207-1455-64bit-ssl.lib10_quota_plugin.so* drwxr-xr-x 2 root system 512 May 24 12:41 imap/ lrwxrwxrwx 1 root system 65 May 24 12:36 lib10_quota_plugin.a@ -> /usr/local/lib/dovecot/052207-1 455-64bit-ssl.lib10_quota_plugin.a lrwxrwxrwx 1 root system 66 May 24 12:36 lib10_quota_plugin.la@ -> /usr/local/lib/dovecot/052207- 1455-64bit-ssl.lib10_quota_plugin.la* lrwxrwxrwx 1 root system 66 May 24 12:36 lib10_quota_plugin.so@ -> /usr/local/lib/dovecot/052207- 1455-64bit-ssl.lib10_quota_plugin.so* root at mercury:/usr/local/lib/dovecot/imap ## ls -al total 152 drwxr-xr-x 2 root system 512 May 24 12:41 ./ drwxr-xr-x 3 root system 512 May 24 12:36 ../ -rw-r--r-- 1 root system 19250 May 22 15:12 052207-1455-64bit-ssl.lib11_imap_quota_plugin.a -rwxr-xr-x 1 root system 944 May 22 15:12 052207-1455-64bit-ssl.lib11_imap_quota_plugin.la* -rwxr-xr-x 1 root system 28645 May 22 15:12 052207-1455-64bit-ssl.lib11_imap_quota_plugin.so* lrwxrwxrwx 1 root system 66 May 24 12:36 lib10_quota_plugin.so@ -> /usr/local/lib/dovecot/052207- 1455-64bit-ssl.lib10_quota_plugin.so* lrwxrwxrwx 1 root system 75 May 24 12:36 lib11_imap_quota_plugin.a@ -> /usr/local/lib/dovecot/ima p/052207-1455-64bit-ssl.lib11_imap_quota_plugin.a lrwxrwxrwx 1 root system 76 May 24 12:36 lib11_imap_quota_plugin.la@ -> /usr/local/lib/dovecot/im ap/052207-1455-64bit-ssl.lib11_imap_quota_plugin.la* lrwxrwxrwx 1 root system 76 May 24 12:36 lib11_imap_quota_plugins.so@ -> /usr/local/lib/dovecot/i Any suggestions? -- ===Stewart Dean, Unix System Admin, Henderson Computer Resources Center of Bard College, Annandale-on-Hudson, New York 12504 sdean at bard.edu voice: 845-758-7475, fax: 845-758-7035 -------------- next part -------------- An embedded message was scrubbed... From: Stewart Dean <sdean> Subject: Dovecot enironmnet Date: Thu, 24 May 2007 15:04:21 -0400 Size: 868 URL: <http://dovecot.org/pipermail/dovecot/attachments/20070530/e0c629a7/attachment-0002.mht>
On Wed, 2007-05-30 at 12:46 -0400, Stewart Dean wrote:> > 4272 root at mercury:/usr/local/lib/dovecot/imap ## dovecot > > ILoading modules from directory: /usr/local/lib/dovecot/imap > > IModule loaded: /usr/local/lib/dovecot/imap/lib10_quota_plugin.so > > FPlugin imap_quota not found from directory /usr/local/lib/dovecot/imap > > Error: imap dump-capability process returned 89quota is loaded OK, imap_quota isn't.> root at mercury:/usr/local/lib/dovecot/imap ## ls -al..> -rwxr-xr-x 1 root system 28645 May 22 15:12 > 052207-1455-64bit-ssl.lib11_imap_quota_plugin.so*So it should be loading this.> lrwxrwxrwx 1 root system 76 May 24 12:36 > lib11_imap_quota_plugins.so@ -> /usr/local/lib/dovecot/iWhy is it "plugins"? It should be "plugin". -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20070604/5e0da60e/attachment-0002.bin>
Stewart Dean
2007-Jun-05 16:15 UTC
[Dovecot] AIX mail quota plugin problems + dotlock problem resolved
Duh. Egg all over my face, for missing such a simple thing as a misspelled word. OK. Incidentally, I have found and resolved the dotlock problem. Nothing to do with NFS, rather there was some legacy (something my predecessor had set up 10 years ago or more) instructions in the .procmailrc file that were trashing the locks; details to follow. Anway, I corrected the misspelled filename, and Dovecot now loads successfully with the fs quota plugin...but that then fails... Please again, your help...hopefully, this is not as elementary as a misspelled filename, but just as quickly fixable with your eagle eye. Again this is AIX; FWIW, what Ralf does doesn't use fs quota, so this is new territory. There is a trace attached. Here it goes: I start DC under truss truss -d -f -t !_poll dovecot > /tmp/dovecot.truss.out 2>&1 in maillog, I see: =====================================Jun 5 11:31:38 mercury mail:info dovecot: Dovecot v1.0.0 starting up Draves does some stuff: Jun 5 11:32:56 mercury mail:info dovecot: auth(default): client out: OK 1 user=draves Jun 5 11:32:56 mercury mail:info dovecot: auth(default): master in: REQUEST 1 851978 1 Jun 5 11:32:56 mercury mail:info dovecot: auth(default): passwd(draves,10.20.30.14): lookup Jun 5 11:32:56 mercury mail:info dovecot: auth(default): master out: USER 1 draves system_user=draves uid=220 gid=20 0 home=/home/hcrc/draves Jun 5 11:32:56 mercury mail:info dovecot: imap-login: Login: user=<draves>, method=PLAIN, rip=10.20.30.14, lip=192.246.229.21, TLS Jun 5 11:32:56 mercury mail:info dovecot: IMAP(draves): Loading modules from directory: /usr/local/lib/dovecot/imap Jun 5 11:32:56 mercury mail:info dovecot: IMAP(draves): Module loaded: /usr/local/lib/dovecot/imap/lib10_quota_plugin.so Jun 5 11:32:56 mercury mail:info dovecot: IMAP(draves): Module loaded: /usr/local/lib/dovecot/imap/lib11_imap_quota_plugin.so Jun 5 11:32:57 mercury mail:info dovecot: IMAP(draves): Effective uid=220, gid=200, home=/home/hcrc/draves Jun 5 11:32:57 mercury mail:info dovecot: IMAP(draves): mbox: data=/home/hcrc/draves/mail:INBOX=/var/spool/mail/draves:INDEX=/var/dcn dx/draves Jun 5 11:32:57 mercury mail:info dovecot: IMAP(draves): mbox: root=/home/hcrc/draves/mail, index=/var/dcndx/draves, inbox=/var/spool/ mail/draves Jun 5 11:32:57 mercury mail:info dovecot: IMAP(draves): fs quota add storage dir = /home/hcrc/draves/mail Jun 5 11:32:57 mercury mail:info dovecot: IMAP(draves): fs quota block device = /dev/hd4 Jun 5 11:32:57 mercury mail:info dovecot: IMAP(draves): fs quota mount point = / Jun 5 11:32:58 mercury mail:err|error dovecot: IMAP(draves): quotactl(Q_GETQUOTA, /) failed: Invalid argument This is 1:20 or 80 seconds after the start of DC and about line 11982 in the trace file I (sdean) do some stuff: Jun 5 11:33:05 mercury mail:info dovecot: auth(default): client out: OK 1 user=sdean Jun 5 11:33:05 mercury mail:info dovecot: auth(default): master in: REQUEST 2 1351756 1 Jun 5 11:33:05 mercury mail:info dovecot: auth(default): passwd(sdean,10.20.10.75): lookup Jun 5 11:33:05 mercury mail:info dovecot: auth(default): master out: USER 2 sdean system_user=sdean uid=202 gid=20 0 home=/home/hcrc/sdean Jun 5 11:33:05 mercury mail:info dovecot: imap-login: Login: user=<sdean>, method=PLAIN, rip=10.20.10.75, lip=192.246.229.21, TLS Jun 5 11:33:05 mercury mail:info dovecot: IMAP(sdean): Loading modules from directory: /usr/local/lib/dovecot/imap Jun 5 11:33:05 mercury mail:info dovecot: IMAP(sdean): Module loaded: /usr/local/lib/dovecot/imap/lib10_quota_plugin.so Jun 5 11:33:05 mercury mail:info dovecot: IMAP(sdean): Module loaded: /usr/local/lib/dovecot/imap/lib11_imap_quota_plugin.so Jun 5 11:33:06 mercury mail:info dovecot: IMAP(sdean): Effective uid=202, gid=200, home=/home/hcrc/sdean Jun 5 11:33:06 mercury mail:info dovecot: IMAP(sdean): mbox: data=/home/hcrc/sdean/mail:INBOX=/var/spool/mail/sdean:INDEX=/var/dcndx/ sdean Jun 5 11:33:06 mercury mail:info dovecot: IMAP(sdean): mbox: root=/home/hcrc/sdean/mail, index=/var/dcndx/sdean, inbox=/var/spool/mai l/sdean Jun 5 11:33:06 mercury mail:info dovecot: IMAP(sdean): fs quota add storage dir = /home/hcrc/sdean/mail Jun 5 11:33:06 mercury mail:info dovecot: IMAP(sdean): fs quota block device = /dev/hd4 Jun 5 11:33:06 mercury mail:info dovecot: IMAP(sdean): fs quota mount point = / Jun 5 11:33:06 mercury mail:err|error dovecot: IMAP(sdean): quotactl(Q_GETQUOTA, /) failed: Invalid argument This is 1:28 or 88 seconds after the start of DC and about line 23478 in the trace file ===================================== In syslog, the same stuff: 4220 root at mercury:/var/log ## tail -f syslog | grep dovecot Jun 5 11:32:58 mercury mail:err|error dovecot: IMAP(draves): quotactl(Q_GETQUOTA, /) failed: Invalid argument Jun 5 11:33:06 mercury mail:err|error dovecot: IMAP(sdean): quotactl(Q_GETQUOTA, /) failed: Invalid argument ===================================== Compressed trace file attached......... Thanks in advance. Timo Sirainen wrote:> > Why is it "plugins"? It should be "plugin". >-- ===Stewart Dean, Unix System Admin, Henderson Computer Resources Center of Bard College, Annandale-on-Hudson, New York 12504 sdean at bard.edu voice: 845-758-7475, fax: 845-758-7035
Timo Sirainen
2007-Jun-05 18:06 UTC
[Dovecot] AIX mail quota plugin problems + dotlock problem resolved
On Tue, 2007-06-05 at 12:30 -0400, Stewart Dean wrote:> quotactl(Q_GETQUOTA, /) failed: Invalid argumentSo apparently this quotactl() call is wrong with AIX: if (quotactl(root->mount->mount_path, QCMD(Q_GETQUOTA, USRQUOTA), root->uid, (void *)&dqblk) < 0) { I don't know why though. You could try changing root->mount->mount_path to some actual mbox file path to see if it returns errors then. Except weren't your mailboxes NFS mounted? quotactl() doesn't work for NFS mounts at all. For NFS you could try this instead http://dovecot.org/patches/quota-rquotad.c -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20070605/58364f91/attachment-0002.bin>
Stewart Dean
2007-Jun-05 18:29 UTC
[Dovecot] AIX mail quota plugin problems + dotlock problem resolved
1) The AIX quotactl subroutine is defined here....(put it in the search box) http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp Partial cut and paste of it:> *#include <jfs/quota.h>* > > *int quotactl (*/Path/*,*/ Cmd/*,*/ ID/*,*/ Addr/*)* > *int* /Cmd/ > <http://publib.boulder.ibm.com/infocenter/pseries/v5r3/topic/com.ibm.aix.basetechref/doc/basetrf2/quotactl.htm#a2qk21b0bob>*,* /ID/ > <http://publib.boulder.ibm.com/infocenter/pseries/v5r3/topic/com.ibm.aix.basetechref/doc/basetrf2/quotactl.htm#bqk2d0bob>*;* > *char ** /Addr/ > <http://publib.boulder.ibm.com/infocenter/pseries/v5r3/topic/com.ibm.aix.basetechref/doc/basetrf2/quotactl.htm#oqk2310bob>*, > ** /Path/ > <http://publib.boulder.ibm.com/infocenter/pseries/v5r3/topic/com.ibm.aix.basetechref/doc/basetrf2/quotactl.htm#xpk2250bob>*;* > > > Description > > The *quotactl* subroutine enables, disables, and manipulates disk > quotas for file systems on which quotas have been enabled. > > On AIX, disk quotas are supported by the legacy Journaled File System > (JFS) and the enhanced Journaled File System (JFS2). > > The /Cmd/ parameter is constructed through use of the > *QCMD(*/Qcmd/*,*/ type/*)* macro contained within the > *sys/fs/quota_common.h* file. The /Qcmd/ parameter specifies the quota > control command. The /type/ parameter specifies either user > (*USRQUOTA*) or group (*GRPQUOTA*) quota type. > > The valid values for the /Cmd/ parameter in all supported file system > types sare: > > *Q_QUOTAON* > Enables disk quotas for the file system specified by the /Path/ > parameter. The /Addr/ parameter specifies a file from which to > take the quotas. The quota file must exist; it is normally created > with the *quotacheck* > <http://publib.boulder.ibm.com/infocenter/pseries/v5r3/topic/com.ibm.aix.cmds/doc/aixcmds4/quotacheck.htm#a84c12e> > command. The /ID/ parameter is unused. Root user authority is > required to enable quotas. By specifying the new quota file path > in the /Addr/ parameter, the *quotactl* command can also be used > to change the quota file that is being used without first > disabling disk quotas. > *Q_QUOTAOFF* > Disables disk quotas for the file system specified by the /Path/ > parameter. The /Addr/ and /ID/ arguments are unused. Root user > authority is required to disable quotas. > > Additional JFS specific values for the /Cmd/ parameter are as follows: > > *Q_GETQUOTA* > Gets disk quota limits and current usage for a user or group > specified by the /ID/ parameter. The /Addr/ parameter points to a > *dqblk* buffer to hold the returned information. The *dqblk* > structure is defined in the *jfs/quota.h* file. Root user > authority is required if the /ID/ value is not the current ID of > the caller. >Did the trace hold any more information? Note that I didn't attach it the first time I sent it to you, the second time I did. I also resent the note with the trace attached to mailing list, but the mailman software said it was too big, so I canceled the second post. 2) No, nothing is remote here: 1) dovecot is running here on mercury 2) mercury is where all the inboxes and home/folder dirs physically reside 3) These /are/ exported to other machines by mercury. 4) The quotaing is running on here mercury itself as part of O/S and FSes; it is enabled during boot 5) rquotad runs to provide quota info to the remote machines where the inboxes and home/folder dirs are NFS client imported and mounted Timo Sirainen wrote:> On Tue, 2007-06-05 at 12:30 -0400, Stewart Dean wrote: > >> quotactl(Q_GETQUOTA, /) failed: Invalid argument >> > > So apparently this quotactl() call is wrong with AIX: > > if (quotactl(root->mount->mount_path, QCMD(Q_GETQUOTA, USRQUOTA), > root->uid, (void *)&dqblk) < 0) { > > I don't know why though. You could try changing root->mount->mount_path > to some actual mbox file path to see if it returns errors then. > > Except weren't your mailboxes NFS mounted? quotactl() doesn't work for > NFS mounts at all. For NFS you could try this instead > http://dovecot.org/patches/quota-rquotad.c > >-- ===Stewart Dean, Unix System Admin, Henderson Computer Resources Center of Bard College, Annandale-on-Hudson, New York 12504 sdean at bard.edu voice: 845-758-7475, fax: 845-758-7035