postfixadmin-devel Mailing List for PostfixAdmin (Page 23)
Brought to you by:
christian_boltz,
gingerdog
You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(39) |
Nov
(29) |
Dec
(4) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(5) |
Feb
|
Mar
(8) |
Apr
(8) |
May
|
Jun
(11) |
Jul
(21) |
Aug
(4) |
Sep
(9) |
Oct
(5) |
Nov
(25) |
Dec
(11) |
2009 |
Jan
(40) |
Feb
(16) |
Mar
(1) |
Apr
(46) |
May
(3) |
Jun
|
Jul
(1) |
Aug
(9) |
Sep
(9) |
Oct
(27) |
Nov
(35) |
Dec
(20) |
2010 |
Jan
(3) |
Feb
(2) |
Mar
(8) |
Apr
(1) |
May
(9) |
Jun
(8) |
Jul
(1) |
Aug
(7) |
Sep
(2) |
Oct
(2) |
Nov
(12) |
Dec
(7) |
2011 |
Jan
(45) |
Feb
(11) |
Mar
(18) |
Apr
(15) |
May
(20) |
Jun
|
Jul
(5) |
Aug
(1) |
Sep
|
Oct
(8) |
Nov
|
Dec
(14) |
2012 |
Jan
(30) |
Feb
(36) |
Mar
(6) |
Apr
(32) |
May
(20) |
Jun
(5) |
Jul
(2) |
Aug
|
Sep
(4) |
Oct
|
Nov
(22) |
Dec
(1) |
2013 |
Jan
(13) |
Feb
(4) |
Mar
(70) |
Apr
(10) |
May
(6) |
Jun
(11) |
Jul
(1) |
Aug
(3) |
Sep
(2) |
Oct
(15) |
Nov
(4) |
Dec
(4) |
2014 |
Jan
|
Feb
|
Mar
(2) |
Apr
(2) |
May
(3) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(8) |
Dec
(2) |
2015 |
Jan
(1) |
Feb
(9) |
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
(6) |
Oct
|
Nov
|
Dec
|
2016 |
Jan
(4) |
Feb
|
Mar
(10) |
Apr
(3) |
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
(1) |
Oct
(4) |
Nov
|
Dec
(13) |
2017 |
Jan
(1) |
Feb
(6) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
(3) |
2018 |
Jan
(2) |
Feb
|
Mar
(2) |
Apr
(7) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
(10) |
Apr
|
May
(1) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(7) |
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
2021 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
|
2023 |
Jan
|
Feb
(2) |
Mar
(3) |
Apr
|
May
|
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2024 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
(3) |
From: J4 <ju...@kl...> - 2011-01-07 11:31:30
|
Dear all, I had postfixadmin working, and a few days I created an account in it (1234@xxxinfo). The account could login, send email & so on. Today, I added another test account, but the account would not log in. The IMP server is dovecot. Error message: a login te...@xx... fred a NO [AUTHENTICATIONFAILED] Authentication failed. * BYE Disconnected for inactivity. closed I compared the entries for each account in mysql and noticed that these differed: mysql> select * from mailbox; | 12...@xx... | $1111111111111 | S.L TEST | xxx.info/1234/ | 10240000 | 1234 | xxx.info | 2011-01-04 15:41:24 | 2011-01-04 15:41:24 | 1 | | te...@xx... | $11111111111111 | test Test | xxx.info/test/ | 5120000 | test | xxx.info | 2011-01-07 11:35:01 | 2011-01-07 11:36:29 | 1 | The virtual_userstable only has this entry: mysql> select * from virtual_users; +----+-----------+----------------------------------+------------------------+ | id | domain_id | password | email | +----+-----------+----------------------------------+------------------------+ | 1 | 1 | xxxx | 12...@xx... | +----+-----------+----------------------------------+------------------------+ 1 row in set (0.00 sec) mysql> select * from virtual_aliases; +----+-----------+------------------------+------------------------+ | id | domain_id | source | destination | +----+-----------+------------------------+------------------------+ | 1 | 1 | 12...@xx... | 12...@xx... | | 2 | 1 | 12...@xx... | fre...@kl... | +----+-----------+------------------------+------------------------+ Again, I don't know what has happened to cause this problem. The only thing that was changed was the location of the postfixadmin directory on apache. It was moved to a vhost. These errors keep popping up in the apache error.log, and I do not know whether these are related to the problem. [Fri Jan 07 11:36:29 2011] [error] [client 11.11.11.11] PHP Notice: Undefined index: flash in /www/postfixadmin/templates_c/0d1a714f76f647ac5097fa38ac2b35080d18dd12.file.header.tpl.php on line 54, referer: http://admin.xxx.info/edit-mailbox.php?username=test%40xxxx.info&domain=xxxx.info [Fri Jan 07 11:36:29 2011] [error] [client 11.11.11.11] PHP Notice: Undefined variable: motd_file in /www/postfixadmin/smarty/libs/sysplugins/smarty_internal_data.php on line 287, referer: http://admin.xxxx.info/edit-mailbox.php?username=test%40xxxx.info&domain=xxxx.info [Fri Jan 07 11:36:29 2011] [error] [client 11.11.11.11] PHP Notice: Undefined variable: PALANG_pFooter_logged_as in /www/postfixadmin/smarty/libs/sysplugins/smarty_internal_data.php on line 287, referer: http://admin.xxxx.info/edit-mailbox.php?username=test%40xxxx.info&domain=xxxx.info Does anyone know what went amiss? Best wishes, J |
From: J4 <ju...@kl...> - 2011-01-06 09:37:51
|
On 01/05/2011 10:41 PM, Christian Boltz wrote: > What about changing that settings? ;-) >>>> $CONF['new_quota_table'] = 'YES'; > Did you read the comment above that setting while changing it? ;-) Now I understand. It actually wants me to create a table called quota2. It has taken days for this penny to drop, and I see that there is already a quota2 table. I have added these grants: SHOW GRANTS FOR 'mailuser'@'localhost'; +-----------------------------------------------------------------------------------------------------------------+ | Grants for mailuser@localhost | +-----------------------------------------------------------------------------------------------------------------+ | GRANT USAGE ON *.* TO 'xxxxx'@'localhost' IDENTIFIED BY PASSWORD '*11111111111111111111' | | GRANT SELECT ON `xxxxx`.* TO 'xxxxx'@'localhost' | | GRANT INSERT, UPDATE ON `xxxxx`.`quota` TO 'xxxxx'@'localhost' | | GRANT UPDATE ON `xxxxx`.`quota2` TO 'xxxxx'@'localhost' | +-----------------------------------------------------------------------------------------------------------------+ > Oh well - one more time where I have to say "Please read the > postfixadmin documentation first - and don't trust external HOWTOs etc. > too much" (not meant to sound selfish, but it's true ;-) Nor strangely self-serving, but really good advice. People will gravitate to the external manuals because they simply want the sever to work. If I had not run into so many problems, and had to work this out in a painful fashion, then I would have even less understanding than had I followed the tutorials and had a working set-up immediately. >> mysql> describe quota; >> +----------+--------------+------+-----+---------+-------+ >> | Field | Type | Null | Key | Default | Extra | >> +----------+--------------+------+-----+---------+-------+ >> | username | varchar(255) | NO | PRI | NULL | | >> | bytes | bigint(20) | NO | | 0 | | >> | messages | int(11) | NO | | 0 | | >> +----------+--------------+------+-----+---------+-------+ > If you read the postfixadmin documentation, you'll see that we already > have a table with exactly those columns - however it's named "quota2" > because we keep the old-style "quota" table for backward compatibility. > > Please change your config to use the quota2 instead of the quota > table... [SNIP] > Do you see any INSERT permissions in the GRANT quoted above? I don't ;-) INSERT added as noted above. Thank-you for noticing this. > > BTW: If you have anything that should be added or changed in > DOVECOT.txt, please send us the changes (as patch would be best, but the > edited file will do also). > > > Regards, > > Christian Boltz |
From: Robert S. <ro...@sc...> - 2011-01-06 08:41:57
|
Am 05.01.2011 18:30, schrieb J4: > > > On 01/05/2011 05:52 PM, Robert Schetterer wrote: >> Am 05.01.2011 12:42, schrieb J4: >>> >>>> Am 05.01.2011 09:36, schrieb JKL: >>>>> Dear everyone, >>>>> >>>>> Originally, I posted this question to the dovecot mailing list and >>>>> dovecot IRC. The postfixadmin IRC offered help, I still have run into >>>>> problems. IRC might well be less suited because there is a bit of >>>>> information in this Email. I followed the instructions in >>>>> DOCUMENTS/DOVECOT.txt for set-up dovecot for postfixadmin's use. >>>>> >>>>> Best regards, J. >>>> first you should upgrade dovecot 2.X >>>> and use lmtp >>> I would love to, but v2 is unavailable in the Squeeze Debian repos. >>> This includes the backports repo for Squeeze :( >> >> use >> http://xi.rename-it.nl/debian/pool/testing-auto/dovecot-2.0/ >> > > This does not work. > > deb http://xi.rename-it.nl/debian/pool/testing-auto/dovecot-2.0/ > testing-auto/dovecot-2.0 main > > > > Ign http://xi.rename-it.nl testing-auto/dovecot-2.0/main amd64 Packages > Hit http://ftp.debian.org squeeze/non-free amd64 Packages/DiffIndex > Err http://xi.rename-it.nl testing-auto/dovecot-2.0/main amd64 Packages > 404 Not Found > W: Failed to fetch > http://xi.rename-it.nl/debian/pool/testing-auto/dovecot-2.0/dists/testing-auto/dovecot-2.0/main/binary-amd64/Packages.gz > 404 Not Found no problems here , but i recompile it always myself from sources, very easy > > ------------------------------------------------------------------------------ > Learn how Oracle Real Application Clusters (RAC) One Node allows customers > to consolidate database storage, standardize their database environment, and, > should the need arise, upgrade to a full multi-node Oracle RAC database > without downtime or disruption > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > Postfixadmin-devel mailing list > Pos...@li... > https://lists.sourceforge.net/lists/listinfo/postfixadmin-devel -- Best Regards MfG Robert Schetterer Germany/Munich/Bavaria |
From: Christian B. <pos...@cb...> - 2011-01-05 21:41:14
|
Hello, Am Mittwoch, 5. Januar 2011 schrieb J4: > On 01/05/2011 04:11 PM, Greg C wrote: > > On Wed, Jan 5, 2011 at 12:36 AM, JKL <ju...@kl...> wrote: > >> $CONF['admin_email'] = > >> 'pos...@ch...d'; > >> $CONF['vacation_domain'] = > >> 'autoreply.change-this-to-your.domain.tld'; > >> $CONF['user_footer_link'] = > >> "http://change-this-to-your.domain.tld/main"; > >> $CONF['footer_text'] = 'Return to change-this-to-your.domain.tld'; > >> $CONF['footer_link'] = 'http://change-this-to-your.domain.tld'; What about changing that settings? ;-) > >> $CONF['new_quota_table'] = 'YES'; Did you read the comment above that setting while changing it? ;-) > After following the document and making some changes: > Jan 5 16:39:23 logout dovecot: dict: sql dict: commit failed: > Unknown column 'bytes' in 'field list' > I know that I have to add a new columns into the quota table, as > noted in the Wiki so I dropped the old quota table and created this > one as per wiki (for v2): Oh well - one more time where I have to say "Please read the postfixadmin documentation first - and don't trust external HOWTOs etc. too much" (not meant to sound selfish, but it's true ;-) > mysql> describe quota; > +----------+--------------+------+-----+---------+-------+ > | Field | Type | Null | Key | Default | Extra | > +----------+--------------+------+-----+---------+-------+ > | username | varchar(255) | NO | PRI | NULL | | > | bytes | bigint(20) | NO | | 0 | | > | messages | int(11) | NO | | 0 | | > +----------+--------------+------+-----+---------+-------+ If you read the postfixadmin documentation, you'll see that we already have a table with exactly those columns - however it's named "quota2" because we keep the old-style "quota" table for backward compatibility. Please change your config to use the quota2 instead of the quota table... > | Grants for mailuser@localhost > | GRANT USAGE ON *.* TO 'xxxxx'@'localhost' IDENTIFIED BY ... > | GRANT SELECT ON `xxxxxx`.* TO 'xxxxx'@'localhost' > | GRANT UPDATE ON `xxxxx`.`quota` TO 'xxxx'@'localhost' > However, these messages are logged for dovecot: > Jan 5 17:18:25 logout dovecot: dict: sql dict: commit > failed: INSERT command denied to user 'mailuser'@'localhost' for > table 'quota' > > A bit weird. What did I misplace? Do you see any INSERT permissions in the GRANT quoted above? I don't ;-) BTW: If you have anything that should be added or changed in DOVECOT.txt, please send us the changes (as patch would be best, but the edited file will do also). Regards, Christian Boltz -- Look at Debian... its stable, works on a variety of platforms.... and development is racing along at the speed of a turtle with 3 broken legs. [Joseph M. Gaffney in opensuse] |
From: J4 <ju...@kl...> - 2011-01-05 17:30:21
|
On 01/05/2011 05:52 PM, Robert Schetterer wrote: > Am 05.01.2011 12:42, schrieb J4: >> >>> Am 05.01.2011 09:36, schrieb JKL: >>>> Dear everyone, >>>> >>>> Originally, I posted this question to the dovecot mailing list and >>>> dovecot IRC. The postfixadmin IRC offered help, I still have run into >>>> problems. IRC might well be less suited because there is a bit of >>>> information in this Email. I followed the instructions in >>>> DOCUMENTS/DOVECOT.txt for set-up dovecot for postfixadmin's use. >>>> >>>> Best regards, J. >>> first you should upgrade dovecot 2.X >>> and use lmtp >> I would love to, but v2 is unavailable in the Squeeze Debian repos. >> This includes the backports repo for Squeeze :( > > use > http://xi.rename-it.nl/debian/pool/testing-auto/dovecot-2.0/ > This does not work. deb http://xi.rename-it.nl/debian/pool/testing-auto/dovecot-2.0/ testing-auto/dovecot-2.0 main Ign http://xi.rename-it.nl testing-auto/dovecot-2.0/main amd64 Packages Hit http://ftp.debian.org squeeze/non-free amd64 Packages/DiffIndex Err http://xi.rename-it.nl testing-auto/dovecot-2.0/main amd64 Packages 404 Not Found W: Failed to fetch http://xi.rename-it.nl/debian/pool/testing-auto/dovecot-2.0/dists/testing-auto/dovecot-2.0/main/binary-amd64/Packages.gz 404 Not Found |
From: Robert S. <ro...@sc...> - 2011-01-05 16:54:02
|
Am 05.01.2011 12:42, schrieb J4: > >> Am 05.01.2011 09:36, schrieb JKL: >>> Dear everyone, >>> >>> Originally, I posted this question to the dovecot mailing list and >>> dovecot IRC. The postfixadmin IRC offered help, I still have run into >>> problems. IRC might well be less suited because there is a bit of >>> information in this Email. I followed the instructions in >>> DOCUMENTS/DOVECOT.txt for set-up dovecot for postfixadmin's use. >>> >>> Best regards, J. >> first you should upgrade dovecot 2.X >> and use lmtp > I would love to, but v2 is unavailable in the Squeeze Debian repos. > This includes the backports repo for Squeeze :( use http://xi.rename-it.nl/debian/pool/testing-auto/dovecot-2.0/ -- Best Regards MfG Robert Schetterer Germany/Munich/Bavaria |
From: J4 <ju...@kl...> - 2011-01-05 16:21:54
|
On 01/05/2011 04:11 PM, Greg C wrote: > On Wed, Jan 5, 2011 at 12:36 AM, JKL <ju...@kl...> wrote: >> Dear everyone, >> >> Originally, I posted this question to the dovecot mailing list and >> dovecot IRC. The postfixadmin IRC offered help, I still have run into >> problems. IRC might well be less suited because there is a bit of >> information in this Email. I followed the instructions in >> DOCUMENTS/DOVECOT.txt for set-up dovecot for postfixadmin's use. >> >> Best regards, J. >> >> >> *** SET-UP is: >> >> postfix -> dovecot LDA -> /var/vmail <- postfixadmin >> mysql backupend >> >> *** VERSIONS are: >> postfix 2.7.1-1 >> dovecot 1.2.15 >> postfixadmin version unknown - latest checked out from svn on the 3rd Jan 2011. >> All packages are from the Debian Squeeze repos except postfixadmin. >> >> *** WHAT WORKS: >> postfix delivers to dovecot. >> postfixadmin is configured, and have created one domain test.info. >> >> *** WHAT IS BROKEN: >> dovecot is mis-configured. >> postfixadmin might well be mis-configured, but am unsure. >> >> I have followed the instructions in the >> postfixadmin/DOCUMENTS/DOVECOT.TXT for the additional dovecot configuration. >> >> >> *** ERROR MESSAGES >> All Emails passed from postfix to dovecot generate: >> Jan 4 20:35:02 logout dovecot: deliver(te...@te...): Unknown dict >> module: quota >> Jan 4 20:35:02 logout dovecot: deliver(te...@te...): Fatal: Quota >> root storage=200000 proxy init() failed >> Jan 4 20:57:18 logout dovecot: IMAP(te...@te...): >> mkdir(/var/mail/vmail/test.info/te...@te.../cur) failed: Permission >> denied (euid=5000(vmail) egid=5000(vmail) missing +w perm: /var/mail) >> >> *** POSTFIXADMIN CONFIG >> config.php.ini >> $CONF['configured'] = true; >> $CONF['setup_password'] = 'xxxxxxxxxxxxxxxxxxxxxx:xxxxxxxxxxxxxxxxxxxxxxxxxxxxx'; >> $CONF['postfix_admin_url'] = 'http://www.test.info/postfixadmin'; >> $CONF['postfix_admin_path'] = dirname(__FILE__); >> $CONF['default_language'] = 'en'; >> $CONF['database_type'] = 'mysql'; >> $CONF['database_host'] = 'localhost'; >> $CONF['database_user'] = 'postfixadmin'; >> $CONF['database_password'] = 'xxxxxxxxxxxxxxxxxxxxx'; >> $CONF['database_name'] = 'mailxxxx'; >> $CONF['database_prefix'] = ''; >> $CONF['database_tables'] = array ( >> $CONF['admin_email'] = 'pos...@ch...d'; >> $CONF['smtp_server'] = 'localhost'; >> $CONF['smtp_port'] = '25'; >> $CONF['encrypt'] = 'md5crypt'; >> $CONF['authlib_default_flavor'] = 'md5raw'; >> $CONF['dovecotpw'] = "/usr/sbin/dovecotpw"; >> $CONF['min_password_length'] = 5; >> $CONF['generate_password'] = 'NO'; >> $CONF['show_password'] = 'NO'; >> $CONF['page_size'] = '10'; >> $CONF['default_aliases'] = array ( >> $CONF['domain_path'] = 'YES'; >> $CONF['domain_in_mailbox'] = 'NO'; >> $CONF['maildir_name_hook'] = 'NO'; >> $CONF['aliases'] = '10'; >> $CONF['mailboxes'] = '10'; >> $CONF['maxquota'] = '10'; >> $CONF['quota'] = 'YES'; >> $CONF['quota_multiplier'] = '1024000'; >> $CONF['transport'] = 'NO'; >> $CONF['transport_options'] = array ( >> $CONF['transport_default'] = 'virtual'; >> $CONF['vacation'] = 'NO'; >> $CONF['vacation_domain'] = 'autoreply.change-this-to-your.domain.tld'; >> $CONF['vacation_control'] ='YES'; >> $CONF['vacation_control_admin'] = 'YES'; >> $CONF['alias_control'] = 'NO'; >> $CONF['alias_control_admin'] = 'NO'; >> $CONF['special_alias_control'] = 'NO'; >> $CONF['alias_goto_limit'] = '0'; >> $CONF['alias_domain'] = 'YES'; >> $CONF['backup'] = 'YES'; >> $CONF['sendmail'] = 'YES'; >> $CONF['logging'] = 'YES'; >> $CONF['fetchmail'] = 'YES'; >> $CONF['fetchmail_extra_options'] = 'NO'; >> $CONF['show_header_text'] = 'NO'; >> $CONF['header_text'] = ':: Postfix Admin ::'; >> $CONF['user_footer_link'] = "http://change-this-to-your.domain.tld/main"; >> $CONF['show_footer_text'] = 'YES'; >> $CONF['footer_text'] = 'Return to change-this-to-your.domain.tld'; >> $CONF['footer_link'] = 'http://change-this-to-your.domain.tld'; >> $CONF['welcome_text'] = <<<EOM >> $CONF['emailcheck_resolve_domain']='YES'; >> $CONF['show_status']='NO'; >> $CONF['show_status_key']='NO'; >> $CONF['show_status_text']=' '; >> $CONF['show_undeliverable']='NO'; >> $CONF['show_undeliverable_color']='tomato'; >> $CONF['show_undeliverable_exceptions']=array("unixmail.domain.ext","exchangeserver.domain.ext","gmail.com"); >> $CONF['show_popimap']='NO'; >> $CONF['show_popimap_color']='darkgrey'; >> $CONF['show_custom_domains']=array("subdomain.domain.ext","domain2.ext"); >> $CONF['show_custom_colors']=array("lightgreen","lightblue"); >> $CONF['recipient_delimiter'] = ""; >> $CONF['create_mailbox_subdirs_prefix']='INBOX.'; >> $CONF['used_quotas'] = 'YES'; >> $CONF['new_quota_table'] = 'YES'; >> $CONF['theme_logo'] = 'images/logo-default.png'; >> $CONF['theme_css'] = 'css/default.css'; >> $CONF['xmlrpc_enabled'] = false; >> >> >> ** DOVECOT -n >> # 1.2.15: /etc/dovecot/dovecot.conf >> # OS: Linux 2.6.32-xxxxxxxx-xxxxx x86_64 Debian squeeze/sid >> log_timestamp: %Y-%m-%d %H:%M:%S >> disable_plaintext_auth: no >> login_dir: /var/run/dovecot/login >> login_executable: /usr/lib/dovecot/imap-login >> login_chroot: no >> first_valid_uid: 106 >> mail_privileged_group: mail >> mail_location: maildir:/var/mail/vmail/%d/%u/ >> mbox_write_locks: fcntl dotlock >> lda: >> log_path: >> auth_socket_path: /var/run/dovecot/auth-master >> postmaster_address: pos...@te... >> mail_plugins: sieve quota >> auth default: >> mechanisms: plain login >> passdb: >> driver: pam >> passdb: >> driver: sql >> args: /etc/dovecot/dovecot-sql.conf >> userdb: >> driver: passwd >> userdb: >> driver: static >> args: uid=5000 gid=5000 home=/var/vmail/%d/%n allow_all_users=yes >> userdb: >> driver: sql >> args: /etc/dovecot/dovecot-sql.conf >> socket: >> type: listen >> client: >> path: /var/spool/postfix/private/auth >> mode: 432 >> user: postfix >> group: postfix >> master: >> path: /var/run/dovecot/auth-master >> mode: 384 >> user: vmail >> plugin: >> quota: dict:storage=200000 proxy::quota >> quota: dict:storage=200000 proxy::quota:w >> dict: >> quota: mysql:/etc/dovecot/dovecot-dict-quota.conf >> >> >> *** MYSQL DOVECOT FILES >> # grep -v '^ *\(#.*\)\?$' dovecot-sql.conf >> connect = host=localhost dbname=xxxxx user=xxxxx password=xxxxx >> driver = mysql >> default_pass_scheme = MD5-CRYPT >> password_query = SELECT username AS user,password FROM mailbox WHERE >> username = '%u' AND active='1' >> user_query = SELECT CONCAT('/var/vmail/', maildir) AS home, 106 AS uid, >> 110 AS gid, >> CONCAT('*:bytes=', quota) AS quota_rule FROM mailbox WHERE >> username = '%u' AND active='1' >> ## Note: 106:110 = postfix:avahi For some reason squeeze drops postfix >> into avahi group: To Fix. >> >> >> *** DICT QUOTA >> # cat /etc/dovecot/dovecot-dict-quota.conf >> driver = mysql >> connect = host=localhost dbname=xxxxx user=xxxxx password=xxxxx >> default_pass_scheme = MD5-CRYPT >> table = quota >> select_field = current >> where_field = path >> username_field = username >> >> >> *** /VAR/VMAIL directory >> # ls -la /var/vmail >> total 28 >> drwxrwx--- 3 vmail vmail 4096 Jan 4 20:53 . >> drwxr-xr-x 15 root root 4096 Jan 3 12:19 .. >> -rw-r--r-- 1 root root 0 Jan 3 15:14 auth_socket_path >> -rw-r--r-- 1 root root 173 Dec 31 12:15 globalsieverc >> -rw-r--r-- 1 root root 0 Jan 3 15:14 info_log_path >> -rw-r--r-- 1 root root 0 Jan 3 15:14 log_path >> drwx------ 2 root root 16384 Jan 4 15:28 lost+found >> -rw-r--r-- 1 root root 0 Jan 3 15:14 mail_plugins >> -rw-r--r-- 1 root root 0 Jan 3 15:14 postmaster_address >> >> *** VMAIL user >> vmail:x:5000:5000::/var/vmail:/bin/sh (soon to be changed to /bin/false >> after testing completed) >> dovecot:x:109:114:Dovecot mail server,,,:/usr/lib/dovecot:/bin/false >> postfix:x:106:110::/var/spool/postfix:/bin/false >> >> >> > > Change mail_location to /var/vmail or create /var/mail/vmail owned by > user vmail and store/retrieve mail from there. > > The dovecot-dict-quota.conf appears to be using v1.0/1.1 style config, > see http://wiki.dovecot.org/Quota/Dict and change to v1.2+ style. > After following the document and making some changes: Jan 5 16:39:23 logout dovecot: deliver(te...@te...): msgid=<4D2...@si...>: saved mail to INBOX Jan 5 16:39:23 logout dovecot: deliver(te...@te...): dict quota: Quota update failed, it's now desynced Jan 5 16:39:23 logout dovecot: dict: sql dict: commit failed: Unknown column 'bytes' in 'field list' The changes I made were these: MYSQL: GRANT update on xxxxx.quota to 'xxxxx'@'localhost'; # dovecot.conf plugin { quota = dict:user::proxy::quotadict quota_rule = *:storage=10M:messages=1000 } # cat dovecot-dict-quota.conf connect = host=localhost dbname=xxxxx user=xxxxx password=xxxxx map { pattern = priv/quota/storage table = quota username_field = username value_field = bytes } map { pattern = priv/quota/messages table = quota username_field = username value_field = messages } I know that I have to add a new columns into the quota table, as noted in the Wiki so I dropped the old quota table and created this one as per wiki (for v2): mysql> describe quota; +----------+--------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +----------+--------------+------+-----+---------+-------+ | username | varchar(255) | NO | PRI | NULL | | | bytes | bigint(20) | NO | | 0 | | | messages | int(11) | NO | | 0 | | +----------+--------------+------+-----+---------+-------+ The old grant is still there so did not add it again: mysql> SHOW GRANTS FOR 'mailuser'@'localhost'; +-----------------------------------------------------------------------------------------------------------------+ | Grants for mailuser@localhost | +-----------------------------------------------------------------------------------------------------------------+ | GRANT USAGE ON *.* TO 'xxxxx'@'localhost' IDENTIFIED BY PASSWORD '*abcdefghijklmoop' | | GRANT SELECT ON `xxxxxx`.* TO 'xxxxx'@'localhost' | | GRANT UPDATE ON `xxxxx`.`quota` TO 'xxxx'@'localhost' | +-----------------------------------------------------------------------------------------------------------------+ However, these messages are logged for dovecot: Jan 5 17:18:25 logout dovecot: deliver(te...@te...): msgid=<4D2...@te...>: saved mail to INBOX Jan 5 17:18:25 logout dovecot: dict: mysql: Connected to localhost (test) Jan 5 17:18:25 logout dovecot: dict: sql dict: commit failed: INSERT command denied to user 'mailuser'@'localhost' for table 'quota' A bit weird. What did I misplace? |
From: Greg C <ag...@gm...> - 2011-01-05 15:11:12
|
On Wed, Jan 5, 2011 at 12:36 AM, JKL <ju...@kl...> wrote: > Dear everyone, > > Originally, I posted this question to the dovecot mailing list and > dovecot IRC. The postfixadmin IRC offered help, I still have run into > problems. IRC might well be less suited because there is a bit of > information in this Email. I followed the instructions in > DOCUMENTS/DOVECOT.txt for set-up dovecot for postfixadmin's use. > > Best regards, J. > > > *** SET-UP is: > > postfix -> dovecot LDA -> /var/vmail <- postfixadmin > mysql backupend > > *** VERSIONS are: > postfix 2.7.1-1 > dovecot 1.2.15 > postfixadmin version unknown - latest checked out from svn on the 3rd Jan 2011. > All packages are from the Debian Squeeze repos except postfixadmin. > > *** WHAT WORKS: > postfix delivers to dovecot. > postfixadmin is configured, and have created one domain test.info. > > *** WHAT IS BROKEN: > dovecot is mis-configured. > postfixadmin might well be mis-configured, but am unsure. > > I have followed the instructions in the > postfixadmin/DOCUMENTS/DOVECOT.TXT for the additional dovecot configuration. > > > *** ERROR MESSAGES > All Emails passed from postfix to dovecot generate: > Jan 4 20:35:02 logout dovecot: deliver(te...@te...): Unknown dict > module: quota > Jan 4 20:35:02 logout dovecot: deliver(te...@te...): Fatal: Quota > root storage=200000 proxy init() failed > Jan 4 20:57:18 logout dovecot: IMAP(te...@te...): > mkdir(/var/mail/vmail/test.info/te...@te.../cur) failed: Permission > denied (euid=5000(vmail) egid=5000(vmail) missing +w perm: /var/mail) > > *** POSTFIXADMIN CONFIG > config.php.ini > $CONF['configured'] = true; > $CONF['setup_password'] = 'xxxxxxxxxxxxxxxxxxxxxx:xxxxxxxxxxxxxxxxxxxxxxxxxxxxx'; > $CONF['postfix_admin_url'] = 'http://www.test.info/postfixadmin'; > $CONF['postfix_admin_path'] = dirname(__FILE__); > $CONF['default_language'] = 'en'; > $CONF['database_type'] = 'mysql'; > $CONF['database_host'] = 'localhost'; > $CONF['database_user'] = 'postfixadmin'; > $CONF['database_password'] = 'xxxxxxxxxxxxxxxxxxxxx'; > $CONF['database_name'] = 'mailxxxx'; > $CONF['database_prefix'] = ''; > $CONF['database_tables'] = array ( > $CONF['admin_email'] = 'pos...@ch...d'; > $CONF['smtp_server'] = 'localhost'; > $CONF['smtp_port'] = '25'; > $CONF['encrypt'] = 'md5crypt'; > $CONF['authlib_default_flavor'] = 'md5raw'; > $CONF['dovecotpw'] = "/usr/sbin/dovecotpw"; > $CONF['min_password_length'] = 5; > $CONF['generate_password'] = 'NO'; > $CONF['show_password'] = 'NO'; > $CONF['page_size'] = '10'; > $CONF['default_aliases'] = array ( > $CONF['domain_path'] = 'YES'; > $CONF['domain_in_mailbox'] = 'NO'; > $CONF['maildir_name_hook'] = 'NO'; > $CONF['aliases'] = '10'; > $CONF['mailboxes'] = '10'; > $CONF['maxquota'] = '10'; > $CONF['quota'] = 'YES'; > $CONF['quota_multiplier'] = '1024000'; > $CONF['transport'] = 'NO'; > $CONF['transport_options'] = array ( > $CONF['transport_default'] = 'virtual'; > $CONF['vacation'] = 'NO'; > $CONF['vacation_domain'] = 'autoreply.change-this-to-your.domain.tld'; > $CONF['vacation_control'] ='YES'; > $CONF['vacation_control_admin'] = 'YES'; > $CONF['alias_control'] = 'NO'; > $CONF['alias_control_admin'] = 'NO'; > $CONF['special_alias_control'] = 'NO'; > $CONF['alias_goto_limit'] = '0'; > $CONF['alias_domain'] = 'YES'; > $CONF['backup'] = 'YES'; > $CONF['sendmail'] = 'YES'; > $CONF['logging'] = 'YES'; > $CONF['fetchmail'] = 'YES'; > $CONF['fetchmail_extra_options'] = 'NO'; > $CONF['show_header_text'] = 'NO'; > $CONF['header_text'] = ':: Postfix Admin ::'; > $CONF['user_footer_link'] = "http://change-this-to-your.domain.tld/main"; > $CONF['show_footer_text'] = 'YES'; > $CONF['footer_text'] = 'Return to change-this-to-your.domain.tld'; > $CONF['footer_link'] = 'http://change-this-to-your.domain.tld'; > $CONF['welcome_text'] = <<<EOM > $CONF['emailcheck_resolve_domain']='YES'; > $CONF['show_status']='NO'; > $CONF['show_status_key']='NO'; > $CONF['show_status_text']=' '; > $CONF['show_undeliverable']='NO'; > $CONF['show_undeliverable_color']='tomato'; > $CONF['show_undeliverable_exceptions']=array("unixmail.domain.ext","exchangeserver.domain.ext","gmail.com"); > $CONF['show_popimap']='NO'; > $CONF['show_popimap_color']='darkgrey'; > $CONF['show_custom_domains']=array("subdomain.domain.ext","domain2.ext"); > $CONF['show_custom_colors']=array("lightgreen","lightblue"); > $CONF['recipient_delimiter'] = ""; > $CONF['create_mailbox_subdirs_prefix']='INBOX.'; > $CONF['used_quotas'] = 'YES'; > $CONF['new_quota_table'] = 'YES'; > $CONF['theme_logo'] = 'images/logo-default.png'; > $CONF['theme_css'] = 'css/default.css'; > $CONF['xmlrpc_enabled'] = false; > > > ** DOVECOT -n > # 1.2.15: /etc/dovecot/dovecot.conf > # OS: Linux 2.6.32-xxxxxxxx-xxxxx x86_64 Debian squeeze/sid > log_timestamp: %Y-%m-%d %H:%M:%S > disable_plaintext_auth: no > login_dir: /var/run/dovecot/login > login_executable: /usr/lib/dovecot/imap-login > login_chroot: no > first_valid_uid: 106 > mail_privileged_group: mail > mail_location: maildir:/var/mail/vmail/%d/%u/ > mbox_write_locks: fcntl dotlock > lda: > log_path: > auth_socket_path: /var/run/dovecot/auth-master > postmaster_address: pos...@te... > mail_plugins: sieve quota > auth default: > mechanisms: plain login > passdb: > driver: pam > passdb: > driver: sql > args: /etc/dovecot/dovecot-sql.conf > userdb: > driver: passwd > userdb: > driver: static > args: uid=5000 gid=5000 home=/var/vmail/%d/%n allow_all_users=yes > userdb: > driver: sql > args: /etc/dovecot/dovecot-sql.conf > socket: > type: listen > client: > path: /var/spool/postfix/private/auth > mode: 432 > user: postfix > group: postfix > master: > path: /var/run/dovecot/auth-master > mode: 384 > user: vmail > plugin: > quota: dict:storage=200000 proxy::quota > quota: dict:storage=200000 proxy::quota:w > dict: > quota: mysql:/etc/dovecot/dovecot-dict-quota.conf > > > *** MYSQL DOVECOT FILES > # grep -v '^ *\(#.*\)\?$' dovecot-sql.conf > connect = host=localhost dbname=xxxxx user=xxxxx password=xxxxx > driver = mysql > default_pass_scheme = MD5-CRYPT > password_query = SELECT username AS user,password FROM mailbox WHERE > username = '%u' AND active='1' > user_query = SELECT CONCAT('/var/vmail/', maildir) AS home, 106 AS uid, > 110 AS gid, > CONCAT('*:bytes=', quota) AS quota_rule FROM mailbox WHERE > username = '%u' AND active='1' > ## Note: 106:110 = postfix:avahi For some reason squeeze drops postfix > into avahi group: To Fix. > > > *** DICT QUOTA > # cat /etc/dovecot/dovecot-dict-quota.conf > driver = mysql > connect = host=localhost dbname=xxxxx user=xxxxx password=xxxxx > default_pass_scheme = MD5-CRYPT > table = quota > select_field = current > where_field = path > username_field = username > > > *** /VAR/VMAIL directory > # ls -la /var/vmail > total 28 > drwxrwx--- 3 vmail vmail 4096 Jan 4 20:53 . > drwxr-xr-x 15 root root 4096 Jan 3 12:19 .. > -rw-r--r-- 1 root root 0 Jan 3 15:14 auth_socket_path > -rw-r--r-- 1 root root 173 Dec 31 12:15 globalsieverc > -rw-r--r-- 1 root root 0 Jan 3 15:14 info_log_path > -rw-r--r-- 1 root root 0 Jan 3 15:14 log_path > drwx------ 2 root root 16384 Jan 4 15:28 lost+found > -rw-r--r-- 1 root root 0 Jan 3 15:14 mail_plugins > -rw-r--r-- 1 root root 0 Jan 3 15:14 postmaster_address > > *** VMAIL user > vmail:x:5000:5000::/var/vmail:/bin/sh (soon to be changed to /bin/false > after testing completed) > dovecot:x:109:114:Dovecot mail server,,,:/usr/lib/dovecot:/bin/false > postfix:x:106:110::/var/spool/postfix:/bin/false > > > Change mail_location to /var/vmail or create /var/mail/vmail owned by user vmail and store/retrieve mail from there. The dovecot-dict-quota.conf appears to be using v1.0/1.1 style config, see http://wiki.dovecot.org/Quota/Dict and change to v1.2+ style. |
From: J4 <ju...@kl...> - 2011-01-05 11:42:46
|
> Am 05.01.2011 09:36, schrieb JKL: >> Dear everyone, >> >> Originally, I posted this question to the dovecot mailing list and >> dovecot IRC. The postfixadmin IRC offered help, I still have run into >> problems. IRC might well be less suited because there is a bit of >> information in this Email. I followed the instructions in >> DOCUMENTS/DOVECOT.txt for set-up dovecot for postfixadmin's use. >> >> Best regards, J. > first you should upgrade dovecot 2.X > and use lmtp I would love to, but v2 is unavailable in the Squeeze Debian repos. This includes the backports repo for Squeeze :( |
From: Robert S. <ro...@sc...> - 2011-01-05 09:37:27
|
Am 05.01.2011 09:36, schrieb JKL: > Dear everyone, > > Originally, I posted this question to the dovecot mailing list and > dovecot IRC. The postfixadmin IRC offered help, I still have run into > problems. IRC might well be less suited because there is a bit of > information in this Email. I followed the instructions in > DOCUMENTS/DOVECOT.txt for set-up dovecot for postfixadmin's use. > > Best regards, J. first you should upgrade dovecot 2.X and use lmtp > > > *** SET-UP is: > > postfix -> dovecot LDA -> /var/vmail <- postfixadmin > mysql backupend > > *** VERSIONS are: > postfix 2.7.1-1 > dovecot 1.2.15 > postfixadmin version unknown - latest checked out from svn on the 3rd Jan 2011. > All packages are from the Debian Squeeze repos except postfixadmin. > > *** WHAT WORKS: > postfix delivers to dovecot. > postfixadmin is configured, and have created one domain test.info. > > *** WHAT IS BROKEN: > dovecot is mis-configured. > postfixadmin might well be mis-configured, but am unsure. > > I have followed the instructions in the > postfixadmin/DOCUMENTS/DOVECOT.TXT for the additional dovecot configuration. > > > *** ERROR MESSAGES > All Emails passed from postfix to dovecot generate: > Jan 4 20:35:02 logout dovecot: deliver(te...@te...): Unknown dict > module: quota > Jan 4 20:35:02 logout dovecot: deliver(te...@te...): Fatal: Quota > root storage=200000 proxy init() failed > Jan 4 20:57:18 logout dovecot: IMAP(te...@te...): > mkdir(/var/mail/vmail/test.info/te...@te.../cur) failed: Permission > denied (euid=5000(vmail) egid=5000(vmail) missing +w perm: /var/mail) > > *** POSTFIXADMIN CONFIG > config.php.ini > $CONF['configured'] = true; > $CONF['setup_password'] = 'xxxxxxxxxxxxxxxxxxxxxx:xxxxxxxxxxxxxxxxxxxxxxxxxxxxx'; > $CONF['postfix_admin_url'] = 'http://www.test.info/postfixadmin'; > $CONF['postfix_admin_path'] = dirname(__FILE__); > $CONF['default_language'] = 'en'; > $CONF['database_type'] = 'mysql'; > $CONF['database_host'] = 'localhost'; > $CONF['database_user'] = 'postfixadmin'; > $CONF['database_password'] = 'xxxxxxxxxxxxxxxxxxxxx'; > $CONF['database_name'] = 'mailxxxx'; > $CONF['database_prefix'] = ''; > $CONF['database_tables'] = array ( > $CONF['admin_email'] = 'pos...@ch...d'; > $CONF['smtp_server'] = 'localhost'; > $CONF['smtp_port'] = '25'; > $CONF['encrypt'] = 'md5crypt'; > $CONF['authlib_default_flavor'] = 'md5raw'; > $CONF['dovecotpw'] = "/usr/sbin/dovecotpw"; > $CONF['min_password_length'] = 5; > $CONF['generate_password'] = 'NO'; > $CONF['show_password'] = 'NO'; > $CONF['page_size'] = '10'; > $CONF['default_aliases'] = array ( > $CONF['domain_path'] = 'YES'; > $CONF['domain_in_mailbox'] = 'NO'; > $CONF['maildir_name_hook'] = 'NO'; > $CONF['aliases'] = '10'; > $CONF['mailboxes'] = '10'; > $CONF['maxquota'] = '10'; > $CONF['quota'] = 'YES'; > $CONF['quota_multiplier'] = '1024000'; > $CONF['transport'] = 'NO'; > $CONF['transport_options'] = array ( > $CONF['transport_default'] = 'virtual'; > $CONF['vacation'] = 'NO'; > $CONF['vacation_domain'] = 'autoreply.change-this-to-your.domain.tld'; > $CONF['vacation_control'] ='YES'; > $CONF['vacation_control_admin'] = 'YES'; > $CONF['alias_control'] = 'NO'; > $CONF['alias_control_admin'] = 'NO'; > $CONF['special_alias_control'] = 'NO'; > $CONF['alias_goto_limit'] = '0'; > $CONF['alias_domain'] = 'YES'; > $CONF['backup'] = 'YES'; > $CONF['sendmail'] = 'YES'; > $CONF['logging'] = 'YES'; > $CONF['fetchmail'] = 'YES'; > $CONF['fetchmail_extra_options'] = 'NO'; > $CONF['show_header_text'] = 'NO'; > $CONF['header_text'] = ':: Postfix Admin ::'; > $CONF['user_footer_link'] = "http://change-this-to-your.domain.tld/main"; > $CONF['show_footer_text'] = 'YES'; > $CONF['footer_text'] = 'Return to change-this-to-your.domain.tld'; > $CONF['footer_link'] = 'http://change-this-to-your.domain.tld'; > $CONF['welcome_text'] = <<<EOM > $CONF['emailcheck_resolve_domain']='YES'; > $CONF['show_status']='NO'; > $CONF['show_status_key']='NO'; > $CONF['show_status_text']=' '; > $CONF['show_undeliverable']='NO'; > $CONF['show_undeliverable_color']='tomato'; > $CONF['show_undeliverable_exceptions']=array("unixmail.domain.ext","exchangeserver.domain.ext","gmail.com"); > $CONF['show_popimap']='NO'; > $CONF['show_popimap_color']='darkgrey'; > $CONF['show_custom_domains']=array("subdomain.domain.ext","domain2.ext"); > $CONF['show_custom_colors']=array("lightgreen","lightblue"); > $CONF['recipient_delimiter'] = ""; > $CONF['create_mailbox_subdirs_prefix']='INBOX.'; > $CONF['used_quotas'] = 'YES'; > $CONF['new_quota_table'] = 'YES'; > $CONF['theme_logo'] = 'images/logo-default.png'; > $CONF['theme_css'] = 'css/default.css'; > $CONF['xmlrpc_enabled'] = false; > > > ** DOVECOT -n > # 1.2.15: /etc/dovecot/dovecot.conf > # OS: Linux 2.6.32-xxxxxxxx-xxxxx x86_64 Debian squeeze/sid > log_timestamp: %Y-%m-%d %H:%M:%S > disable_plaintext_auth: no > login_dir: /var/run/dovecot/login > login_executable: /usr/lib/dovecot/imap-login > login_chroot: no > first_valid_uid: 106 > mail_privileged_group: mail > mail_location: maildir:/var/mail/vmail/%d/%u/ > mbox_write_locks: fcntl dotlock > lda: > log_path: > auth_socket_path: /var/run/dovecot/auth-master > postmaster_address: pos...@te... > mail_plugins: sieve quota > auth default: > mechanisms: plain login > passdb: > driver: pam > passdb: > driver: sql > args: /etc/dovecot/dovecot-sql.conf > userdb: > driver: passwd > userdb: > driver: static > args: uid=5000 gid=5000 home=/var/vmail/%d/%n allow_all_users=yes > userdb: > driver: sql > args: /etc/dovecot/dovecot-sql.conf > socket: > type: listen > client: > path: /var/spool/postfix/private/auth > mode: 432 > user: postfix > group: postfix > master: > path: /var/run/dovecot/auth-master > mode: 384 > user: vmail > plugin: > quota: dict:storage=200000 proxy::quota > quota: dict:storage=200000 proxy::quota:w > dict: > quota: mysql:/etc/dovecot/dovecot-dict-quota.conf > > > *** MYSQL DOVECOT FILES > # grep -v '^ *\(#.*\)\?$' dovecot-sql.conf > connect = host=localhost dbname=xxxxx user=xxxxx password=xxxxx > driver = mysql > default_pass_scheme = MD5-CRYPT > password_query = SELECT username AS user,password FROM mailbox WHERE > username = '%u' AND active='1' > user_query = SELECT CONCAT('/var/vmail/', maildir) AS home, 106 AS uid, > 110 AS gid, > CONCAT('*:bytes=', quota) AS quota_rule FROM mailbox WHERE > username = '%u' AND active='1' > ## Note: 106:110 = postfix:avahi For some reason squeeze drops postfix > into avahi group: To Fix. > > > *** DICT QUOTA > # cat /etc/dovecot/dovecot-dict-quota.conf > driver = mysql > connect = host=localhost dbname=xxxxx user=xxxxx password=xxxxx > default_pass_scheme = MD5-CRYPT > table = quota > select_field = current > where_field = path > username_field = username > > > *** /VAR/VMAIL directory > # ls -la /var/vmail > total 28 > drwxrwx--- 3 vmail vmail 4096 Jan 4 20:53 . > drwxr-xr-x 15 root root 4096 Jan 3 12:19 .. > -rw-r--r-- 1 root root 0 Jan 3 15:14 auth_socket_path > -rw-r--r-- 1 root root 173 Dec 31 12:15 globalsieverc > -rw-r--r-- 1 root root 0 Jan 3 15:14 info_log_path > -rw-r--r-- 1 root root 0 Jan 3 15:14 log_path > drwx------ 2 root root 16384 Jan 4 15:28 lost+found > -rw-r--r-- 1 root root 0 Jan 3 15:14 mail_plugins > -rw-r--r-- 1 root root 0 Jan 3 15:14 postmaster_address > > *** VMAIL user > vmail:x:5000:5000::/var/vmail:/bin/sh (soon to be changed to /bin/false > after testing completed) > dovecot:x:109:114:Dovecot mail server,,,:/usr/lib/dovecot:/bin/false > postfix:x:106:110::/var/spool/postfix:/bin/false > > > > > > ------------------------------------------------------------------------------ > Learn how Oracle Real Application Clusters (RAC) One Node allows customers > to consolidate database storage, standardize their database environment, and, > should the need arise, upgrade to a full multi-node Oracle RAC database > without downtime or disruption > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > Postfixadmin-devel mailing list > Pos...@li... > https://lists.sourceforge.net/lists/listinfo/postfixadmin-devel -- Best Regards MfG Robert Schetterer Germany/Munich/Bavaria |
From: JKL <ju...@kl...> - 2011-01-05 08:53:46
|
Dear everyone, Originally, I posted this question to the dovecot mailing list and dovecot IRC. The postfixadmin IRC offered help, I still have run into problems. IRC might well be less suited because there is a bit of information in this Email. I followed the instructions in DOCUMENTS/DOVECOT.txt for set-up dovecot for postfixadmin's use. Best regards, J. *** SET-UP is: postfix -> dovecot LDA -> /var/vmail <- postfixadmin mysql backupend *** VERSIONS are: postfix 2.7.1-1 dovecot 1.2.15 postfixadmin version unknown - latest checked out from svn on the 3rd Jan 2011. All packages are from the Debian Squeeze repos except postfixadmin. *** WHAT WORKS: postfix delivers to dovecot. postfixadmin is configured, and have created one domain test.info. *** WHAT IS BROKEN: dovecot is mis-configured. postfixadmin might well be mis-configured, but am unsure. I have followed the instructions in the postfixadmin/DOCUMENTS/DOVECOT.TXT for the additional dovecot configuration. *** ERROR MESSAGES All Emails passed from postfix to dovecot generate: Jan 4 20:35:02 logout dovecot: deliver(te...@te...): Unknown dict module: quota Jan 4 20:35:02 logout dovecot: deliver(te...@te...): Fatal: Quota root storage=200000 proxy init() failed Jan 4 20:57:18 logout dovecot: IMAP(te...@te...): mkdir(/var/mail/vmail/test.info/te...@te.../cur) failed: Permission denied (euid=5000(vmail) egid=5000(vmail) missing +w perm: /var/mail) *** POSTFIXADMIN CONFIG config.php.ini $CONF['configured'] = true; $CONF['setup_password'] = 'xxxxxxxxxxxxxxxxxxxxxx:xxxxxxxxxxxxxxxxxxxxxxxxxxxxx'; $CONF['postfix_admin_url'] = 'http://www.test.info/postfixadmin'; $CONF['postfix_admin_path'] = dirname(__FILE__); $CONF['default_language'] = 'en'; $CONF['database_type'] = 'mysql'; $CONF['database_host'] = 'localhost'; $CONF['database_user'] = 'postfixadmin'; $CONF['database_password'] = 'xxxxxxxxxxxxxxxxxxxxx'; $CONF['database_name'] = 'mailxxxx'; $CONF['database_prefix'] = ''; $CONF['database_tables'] = array ( $CONF['admin_email'] = 'pos...@ch...d'; $CONF['smtp_server'] = 'localhost'; $CONF['smtp_port'] = '25'; $CONF['encrypt'] = 'md5crypt'; $CONF['authlib_default_flavor'] = 'md5raw'; $CONF['dovecotpw'] = "/usr/sbin/dovecotpw"; $CONF['min_password_length'] = 5; $CONF['generate_password'] = 'NO'; $CONF['show_password'] = 'NO'; $CONF['page_size'] = '10'; $CONF['default_aliases'] = array ( $CONF['domain_path'] = 'YES'; $CONF['domain_in_mailbox'] = 'NO'; $CONF['maildir_name_hook'] = 'NO'; $CONF['aliases'] = '10'; $CONF['mailboxes'] = '10'; $CONF['maxquota'] = '10'; $CONF['quota'] = 'YES'; $CONF['quota_multiplier'] = '1024000'; $CONF['transport'] = 'NO'; $CONF['transport_options'] = array ( $CONF['transport_default'] = 'virtual'; $CONF['vacation'] = 'NO'; $CONF['vacation_domain'] = 'autoreply.change-this-to-your.domain.tld'; $CONF['vacation_control'] ='YES'; $CONF['vacation_control_admin'] = 'YES'; $CONF['alias_control'] = 'NO'; $CONF['alias_control_admin'] = 'NO'; $CONF['special_alias_control'] = 'NO'; $CONF['alias_goto_limit'] = '0'; $CONF['alias_domain'] = 'YES'; $CONF['backup'] = 'YES'; $CONF['sendmail'] = 'YES'; $CONF['logging'] = 'YES'; $CONF['fetchmail'] = 'YES'; $CONF['fetchmail_extra_options'] = 'NO'; $CONF['show_header_text'] = 'NO'; $CONF['header_text'] = ':: Postfix Admin ::'; $CONF['user_footer_link'] = "http://change-this-to-your.domain.tld/main"; $CONF['show_footer_text'] = 'YES'; $CONF['footer_text'] = 'Return to change-this-to-your.domain.tld'; $CONF['footer_link'] = 'http://change-this-to-your.domain.tld'; $CONF['welcome_text'] = <<<EOM $CONF['emailcheck_resolve_domain']='YES'; $CONF['show_status']='NO'; $CONF['show_status_key']='NO'; $CONF['show_status_text']=' '; $CONF['show_undeliverable']='NO'; $CONF['show_undeliverable_color']='tomato'; $CONF['show_undeliverable_exceptions']=array("unixmail.domain.ext","exchangeserver.domain.ext","gmail.com"); $CONF['show_popimap']='NO'; $CONF['show_popimap_color']='darkgrey'; $CONF['show_custom_domains']=array("subdomain.domain.ext","domain2.ext"); $CONF['show_custom_colors']=array("lightgreen","lightblue"); $CONF['recipient_delimiter'] = ""; $CONF['create_mailbox_subdirs_prefix']='INBOX.'; $CONF['used_quotas'] = 'YES'; $CONF['new_quota_table'] = 'YES'; $CONF['theme_logo'] = 'images/logo-default.png'; $CONF['theme_css'] = 'css/default.css'; $CONF['xmlrpc_enabled'] = false; ** DOVECOT -n # 1.2.15: /etc/dovecot/dovecot.conf # OS: Linux 2.6.32-xxxxxxxx-xxxxx x86_64 Debian squeeze/sid log_timestamp: %Y-%m-%d %H:%M:%S disable_plaintext_auth: no login_dir: /var/run/dovecot/login login_executable: /usr/lib/dovecot/imap-login login_chroot: no first_valid_uid: 106 mail_privileged_group: mail mail_location: maildir:/var/mail/vmail/%d/%u/ mbox_write_locks: fcntl dotlock lda: log_path: auth_socket_path: /var/run/dovecot/auth-master postmaster_address: pos...@te... mail_plugins: sieve quota auth default: mechanisms: plain login passdb: driver: pam passdb: driver: sql args: /etc/dovecot/dovecot-sql.conf userdb: driver: passwd userdb: driver: static args: uid=5000 gid=5000 home=/var/vmail/%d/%n allow_all_users=yes userdb: driver: sql args: /etc/dovecot/dovecot-sql.conf socket: type: listen client: path: /var/spool/postfix/private/auth mode: 432 user: postfix group: postfix master: path: /var/run/dovecot/auth-master mode: 384 user: vmail plugin: quota: dict:storage=200000 proxy::quota quota: dict:storage=200000 proxy::quota:w dict: quota: mysql:/etc/dovecot/dovecot-dict-quota.conf *** MYSQL DOVECOT FILES # grep -v '^ *\(#.*\)\?$' dovecot-sql.conf connect = host=localhost dbname=xxxxx user=xxxxx password=xxxxx driver = mysql default_pass_scheme = MD5-CRYPT password_query = SELECT username AS user,password FROM mailbox WHERE username = '%u' AND active='1' user_query = SELECT CONCAT('/var/vmail/', maildir) AS home, 106 AS uid, 110 AS gid, CONCAT('*:bytes=', quota) AS quota_rule FROM mailbox WHERE username = '%u' AND active='1' ## Note: 106:110 = postfix:avahi For some reason squeeze drops postfix into avahi group: To Fix. *** DICT QUOTA # cat /etc/dovecot/dovecot-dict-quota.conf driver = mysql connect = host=localhost dbname=xxxxx user=xxxxx password=xxxxx default_pass_scheme = MD5-CRYPT table = quota select_field = current where_field = path username_field = username *** /VAR/VMAIL directory # ls -la /var/vmail total 28 drwxrwx--- 3 vmail vmail 4096 Jan 4 20:53 . drwxr-xr-x 15 root root 4096 Jan 3 12:19 .. -rw-r--r-- 1 root root 0 Jan 3 15:14 auth_socket_path -rw-r--r-- 1 root root 173 Dec 31 12:15 globalsieverc -rw-r--r-- 1 root root 0 Jan 3 15:14 info_log_path -rw-r--r-- 1 root root 0 Jan 3 15:14 log_path drwx------ 2 root root 16384 Jan 4 15:28 lost+found -rw-r--r-- 1 root root 0 Jan 3 15:14 mail_plugins -rw-r--r-- 1 root root 0 Jan 3 15:14 postmaster_address *** VMAIL user vmail:x:5000:5000::/var/vmail:/bin/sh (soon to be changed to /bin/false after testing completed) dovecot:x:109:114:Dovecot mail server,,,:/usr/lib/dovecot:/bin/false postfix:x:106:110::/var/spool/postfix:/bin/false |
From: Johan H. <Jo...@do...> - 2011-01-04 14:41:15
|
Hello all. I just did a svn of the latest source to try the latest postfixadmin But on the front page i get the following errors. Under the logo of postfix admin: Notice: Undefined index: flash in /usr/local/www/postfixadmin/templates_c/28bc923eb7a5d09d4dd2be031e156dc0 2fed2e38.file.header.tpl.php on line 54 In the inlog box so to speak Notice: Undefined variable: tMessage in /usr/local/www/postfixadmin/smarty/libs/sysplugins/smarty_internal_data. php on line 287 And in the footer Notice: Undefined index: sessid in /usr/local/www/postfixadmin/templates_c/b7f712224e6359e4b264df92ce752c07 7b8cfadf.file.footer.tpl.php on line 28 Regards, Johan Hendriks |
From: Valkum <va...@go...> - 2010-12-28 23:30:52
|
[easier to handle in german; translation on request] Hallo Leute, ich würde gerne die models global ändern auf ein $this->save $this->load $this->delete etc system. save sollte dann den daten satz speichern bei update und new. update würde ich in edit umbenennen. load sollte einen datensatz laden aber nicht ausgeben. delete sollte den datensatz löschen. Ich würde function new, function edit einführen, welche dann die daten in ein privates array schreiben. ruft man z.b. $handler->save() auf sollte das ganze dann gespeichert werden. das ganze mit success bzw failure. somit sind konstrukte wie if (!$this->save()){ error }else{ lorem ipsum } möglich better then $result variable. ;) gruß Rudi p.s. guten rutsch! |
From: Valkum <va...@go...> - 2010-12-27 22:13:37
|
Am 27.12.2010 23:04, schrieb Christian Boltz: > [easier to handle in german; translation on request] > > Hallo Rudi, hallo Leute, > > Am Montag, 27. Dezember 2010 schrieb Valkum: >> hab es mal eingebaut im aktuellen commit für user add. Bei mir geht >> es nun. Testet es mal selber und sagt mir was ihr davon haltet. > Funktioniert schonmal wie erwartet, aber... ;-) > > Ich glaube, wir sollten zwischen interaktivem Modus und nicht- > interaktivem Modus (sprich: alles auf der Kommandozeile) unterscheiden. > > a) komplette Kommandozeile: > - kein Aufruf von _welcome() (außer bei -v [verbose]) > - keine Ausgabe einer Erfolgsmeldung - außer bei -v > - Fehlermeldungen nur bei -q unterdrücken > -> Ohne -q oder -v sollte im Erfolgsfall gar nichts ausgegeben werden > und bei einem Fehler (nur) die Fehlermeldung. > > b) interaktiver Modus: > - da macht -q generell kaum Sinn ;-) > - grundsätzlich _welcome() aufrufen (außer bei -q) > - Ausgabe der Erfolgsmeldung sollte default sein (außer bei -q) > - aus Konsistenzgründen bei -q auch Fehlermeldungen unterdrücken > - Problem: was, wenn jemand Fehlermeldungen, aber keine Erfolgsmeldung > haben will? (Wobei ich ehrlich gesagt bezweifle, dass das vorkommt - > aber wir sollten es zumindest einplanen ("-v=0"?), um nicht später das > Standard-Verhalten ändern zu müssen.) > Nehmen wir an: User will email (wird in externes system eingetragen); cli wird aufgerufen; die Erfolgsmeldung (mailadresse und generiertes passwort) wird dann auf irgendeine weise automatisch dem User mitgeteilt. Dieses verhalten sollte auch ohne verbose möglich sein, da verbose im übertragenden sinne ine ausführliche auskunft über den programmstatus zur laufzeit gibt. Zum suchen von fehler etc. Nur eine Nummer kleiner als -d für debug. Also sollte zumindest die Erfolgsmeldung bei a) ausgegeben werden im Standart. Gruß Rudi |
From: Christian B. <pos...@cb...> - 2010-12-27 22:04:40
|
[easier to handle in german; translation on request] Hallo Rudi, hallo Leute, Am Montag, 27. Dezember 2010 schrieb Valkum: > hab es mal eingebaut im aktuellen commit für user add. Bei mir geht > es nun. Testet es mal selber und sagt mir was ihr davon haltet. Funktioniert schonmal wie erwartet, aber... ;-) Ich glaube, wir sollten zwischen interaktivem Modus und nicht- interaktivem Modus (sprich: alles auf der Kommandozeile) unterscheiden. a) komplette Kommandozeile: - kein Aufruf von _welcome() (außer bei -v [verbose]) - keine Ausgabe einer Erfolgsmeldung - außer bei -v - Fehlermeldungen nur bei -q unterdrücken -> Ohne -q oder -v sollte im Erfolgsfall gar nichts ausgegeben werden und bei einem Fehler (nur) die Fehlermeldung. b) interaktiver Modus: - da macht -q generell kaum Sinn ;-) - grundsätzlich _welcome() aufrufen (außer bei -q) - Ausgabe der Erfolgsmeldung sollte default sein (außer bei -q) - aus Konsistenzgründen bei -q auch Fehlermeldungen unterdrücken - Problem: was, wenn jemand Fehlermeldungen, aber keine Erfolgsmeldung haben will? (Wobei ich ehrlich gesagt bezweifle, dass das vorkommt - aber wir sollten es zumindest einplanen ("-v=0"?), um nicht später das Standard-Verhalten ändern zu müssen.) Gruß Christian Boltz -- > Ich denke mein Beispiel war gut, nur dein Beispiel hinkt. Wenn mein Beispiel hinkt, dann hat Deines einen Behindertenausweis und darf direkt beim Eingang parken... ;) [Georg Schmidt und Christian Luetgens in dsrs] |
From: Valkum <va...@go...> - 2010-12-27 15:46:14
|
[easier to handle in german; translation on request] hab es mal eingebaut im aktuellen commit für user add. Bei mir geht es nun. Testet es mal selber und sagt mir was ihr davon haltet. Am 27.12.2010 01:01, schrieb Christian Boltz: > Hallo Rudi, > > Am Sonntag, 26. Dezember 2010 schrieb Valkum: >> hab mir das mal angeschaut. Ich habe auch ein paar TODOs und MARKs >> geadded. >> >> Zu 1: >> Was genau meinst du mit $? ?? Also bei mir arbeitet die add funktion >> so wie sie soll. >> Kannst du mir da ein paar mehr infos geben. > Ich meine den Statuscode in der Shell (bash o. ä.) > > Also sowas wie > > postfixadmin-cli user add fo...@cb... [...] || echo "Fehler" > > oder auch (vereinfacht) > > true || echo "Fehler" > false || echo "Fehler" > true && echo "geht" > false && echo "geht" > true ; echo $? > false ; echo $? > > Wenn jemand Domains, Postfächer etc. mit einem Script anlegen will (und > das ist definitiv ein Usecase fürs CLI), ist diese Art der Prüfung > deutlich einfacher als den Output parsen zu müssen. > > Also genau die Shell-Returncodes, die Du beim Schreiben des CLI > bezüglich Returncodes im Kopf hattest - nur eben nach "außen" und nicht > "intern" im PHP-Code. > >> Zu 2: Hab schon mal angefangen. Also sollte mit Vererbung >> funktionieren. Code der in allen shells existiert kann in die mutter >> klasse gelagert werden, also Shell in shell.php >> >> Hast du mir das recht zu commiten entzogen? Würde sonst meinen >> aktuellen code mit den Änderungen und comments hochladen. > Wie Du ja schon festgestellt hast, hast Du nach wie vor > Commit-Rechte ;-) > > > Gruß > > Christian Boltz |
From: Christian B. <pos...@cb...> - 2010-12-26 01:01:43
|
Hello, Am Samstag, 18. Dezember 2010 schrieb Rudi Floren: > Between the models and the cli are the shells. In these classes we > can change the 0, 1 problem. > When i created the classes i orientated at the unix/linux format. 0 > ok 1-n failure code. Good motivation, but in PHP more code uses true/false ;-) I changed UserHandler and parts of AliasHandler to true/false, and also updated the CLI - everything should still work as expected. I'will change the remaining *Handlers when time permits (unless someone beats me, of course ;-) Two questions regarding the CLI: 1) When I do an invalid action (for example trying to create an already existing mailbox), I get an error message, but $? is still 0. Is this something I broke while switching to true/false or is that a bug in the CLI code? (and: how to fix it?) 2) Is there some way to have less duplicated code in the shells/* ? For example, shells/alias.php and shells/domain.php have 400 common lines and only 100 lines specific to one of these files. Regards, Christian Boltz -- > /etc/sysconfig/powersave/cpufreq contains the line: > # the next lover CPU frequency. Increasing this value lowers the ^^^^^ we should keep that one ;) [Michael Gross in https://bugzilla.novell.com/show_bug.cgi?id=183704] |
From: Rudi F. <va...@go...> - 2010-12-18 12:07:35
|
Hello, Between the models and the cli are the shells. In these classes we can change the 0, 1 problem. When i created the classes i orientated at the unix/linux format. 0 ok 1-n failure code. Regards Rudi Am Samstag, 18. Dezember 2010 schrieb Christian Boltz <pos...@cb...>: > Hello, > > while merging model/UserHander and scripts/models-ext/UserHandler, I > noticed that they use very different (and unfortunately incompatible) > return values. > > I took UserHandler->change_pw as an example, but this is most probably > an issue that appears at lots of functions inside the model/* classes. > > The "old" model/UserHandler returns > - true on success [1] > - false on failure > > The "new" scripts/models-ext/UserHandler (that I merged to > model/UserHandler some minutes ago, r896) returns > - 0 on success > - 1 on failure > > Needless to say than true and 0 are the exact opposite :-( > > The questions are: > - Will the XMLRPC interface compatibility break if we switch to 0/1? > (you can test this already with current SVN trunk for change_pw ;-) > - Will the CLI break if we use true/false? > - And finally: Which style is "better"? Which one should we use? > > > Regards, > > Christian Boltz > > [1] or if there is no error check, but that's another story ;-) > -- > In the beginning was the word, and the word was content-type: text/plain > > ------------------------------------------------------------------------------ > Lotusphere 2011 > Register now for Lotusphere 2011 and learn how > to connect the dots, take your collaborative environment > to the next level, and enter the era of Social Business. > http://p.sf.net/sfu/lotusphere-d2d > _______________________________________________ > Postfixadmin-devel mailing list > Pos...@li... > https://lists.sourceforge.net/lists/listinfo/postfixadmin-devel > |
From: Christian B. <pos...@cb...> - 2010-12-17 23:16:41
|
Hello, while merging model/UserHander and scripts/models-ext/UserHandler, I noticed that they use very different (and unfortunately incompatible) return values. I took UserHandler->change_pw as an example, but this is most probably an issue that appears at lots of functions inside the model/* classes. The "old" model/UserHandler returns - true on success [1] - false on failure The "new" scripts/models-ext/UserHandler (that I merged to model/UserHandler some minutes ago, r896) returns - 0 on success - 1 on failure Needless to say than true and 0 are the exact opposite :-( The questions are: - Will the XMLRPC interface compatibility break if we switch to 0/1? (you can test this already with current SVN trunk for change_pw ;-) - Will the CLI break if we use true/false? - And finally: Which style is "better"? Which one should we use? Regards, Christian Boltz [1] or if there is no error check, but that's another story ;-) -- In the beginning was the word, and the word was content-type: text/plain |
From: Christian B. <pos...@cb...> - 2010-11-27 19:46:54
|
Hello, Am Samstag, 27. November 2010 schrieb Valkum: > nice to see that something happened with my handlers. > > I hope that you noticed that i added a config class to stay away from > global vars. Yes, I've seen it and had a very quick look at the code, but didn't really read all of it. Just two questions: a) Lots of config options are boolean (yes/no). It would probably make sence to include the boolconf() function (currently in functions.inc.php) in the config class b) If I get function write right, you allow to edit the config. Is this really needed? IMHO it should be read-only, nothing in the code should be allowed to change what the config file provides. When grepping the code, I didn't find many files that contain $CONF[whatever] = newvalue (with the exception of config.inc.php ;-) index.php:$CONF['configured'] = FALSE; -> directly before including config.inc.php -> harmless setup.php:$CONF['show_header_text'] = 'NO'; setup.php:$CONF['theme_logo'] = 'images/logo-default.png'; setup.php:$CONF['theme_css'] = 'css/default.css'; -> setup.php does not include config.inc.php at this point, but includes it before reading anything from $CONF -> harmless smarty.inc.php:$CONF['theme_css'] = $CONF['postfix_admin_url'].'/'.htmlentities($CONF['theme_css']); smarty.inc.php:$CONF['theme_logo'] = $CONF['postfix_admin_url'].'/'.htmlentities($CONF['theme_logo']); -> I consider this a bug or at least strange behaviour. Should probably be fixed/changed. The two variables are used by templates/header.tpl (probably the modified version) and templates/header.php (used by setup.php, most likely the original value) > If we use my handlers we have to add this config class natively. No problem ;-) If you want, you can merge the code from scripts/ into the main code (please wait for Davids response on the possibly conflicting parts or check them yourself). Unless you have a very good reason, please drop the functions that only "rename" existing PHP functions (low, up, r) because they make the code harder to read. FYI: - low() is used in shells/*.php several times - up() is used in shells/shell.php only once - r() is not used at all - or my grep was too strict ;-) - pr() is also not used, but we could keep it (with a more meaningful name, maybe "debug_array") in functions.inc.php. BTW, I don't see the need for the Configure::read check in it - please remove the check. > For l18n we should use something else to. Global Vars in touch with > OOP bring headaches From the style and purity side: yes, sure. From the practical side: as long as the access is well-defined - does it really hurt? (Well, don't take this question too serious, please ;-) but we probably have more important things to fix.) What about a class similar to the config class? (IIRC you have something like that already...) From the functional side, the language class could be a copy of the config class, just that it needs $LANG as data ;-) Regards, Christian Boltz -- >du meinst die "persönliche Erfahrungen" der hier schreibenden, ja? >dann ist es gut, dass du hier nicht gefragt hast was du zum sortieren >deiner mails benutzen sollst. denn ansonsten wäre das wohl procmail. Hehe, 1:0 für Dich. [> Michael Meyer und Thorsten Haude in suse-linux] |
From: Valkum <va...@go...> - 2010-11-27 15:31:26
|
Hello, nice to see that something happened with my handlers. I hope that you noticed that i added a config class to stay away from global vars. If we use my handlers we have to add this config class natively. For l18n we should use something else to. Global Vars in touch with OOP bring headaches Rudi Am 27.11.2010 00:40, schrieb Christian Boltz: > Hello, > > The classes in scripts/models-ext/ contain some changes that affect the > public interface of the classes. > > @David: Can you please review them and add some comments? I don't want > to break the XMLRPC interface or anything else ;-) > > - is model/ > + is scripts/models-ext/ > > AliasClass: > - public function get($all=false) { > - $username = escape_string($this->username); > + public function get($alias, $all=false) { > + $alias = escape_string($alias); > ... > - return $list; > + $this->return = $list; > + return 0; > } > - return array(); > + return 1; > > UserHandler: > - public function change_pass($old_password, $new_password) { > + public function change_pw($new_password, $old_password, > + $match = true) { > > This will break for sure (changed function name and parameter order), > also the code inside the function changed a lot. > > $match = true means that the old password is checked before doing > anything. For admin mode, it would probably be easier to make > $old_password optional (which would also require the changed parameter > order ;-) (Or would this be less secure?) > > If I get xmlrpc.php right, the functions are not directly accessable > over the API, but are wrapped (in this case in the UserProxy, function > change_pass) - right? > > That would mean if we change the function parameters, we have to change > - xmlrpc.php > - users/password.php > (Again: Right?) > > UserHandler in scripts/models-ext/ also contains several new functions, > but this shouldn't break anything ;-) > > > I really have to (find some time to) dig deeper in those classes... > > > Regards, > > Christian Boltz |
From: Christian B. <pos...@cb...> - 2010-11-27 00:03:37
|
Hello, Am Freitag, 26. November 2010 schrieb Juan Carlos Gutiérrez Deliot: > On 25/11/2010 06:54 a.m., David Goodwin wrote: > > [Christian Boltz] > >> We don't have something like coding guidelines, and for historical > >> reasons we even have some files with 3 and some with 4 spaces as > >> tab replacement. (New files should use 4 spaces.) > > > > I'd rather : [...] I just summarized that on the under-utilized wiki @SF: https://sourceforge.net/apps/mediawiki/postfixadmin/index.php?title=Coding_guidelines Let's hope we can point lots of people there *g* BTW: If you want write access to the wiki, see https://sourceforge.net/apps/mediawiki/postfixadmin/index.php?title=Main_Page > When I said personal contact I meant contact via "direct" email or > maybe chat, It was funny, Christian made laugh a lot with my name > not sounding german. ;-) > @Christian: I couldn't find the command-line interface directory (not > even in google), just the cli files in the scripts folder and another > UserHandler.php file inside scripts/models-ext/. Is that the file you > meant for me to check? Yes, exactly. The commandline interface is quite new and unfortunately not mentioned in the documentation - and therefore more or less invisible for Google... The files in scripts/models-ext/ will hopefully be merged with those in model/ - but that should not stop you. The worst thing that can happen is that you have to change the include path ;-) If you want/need to change something inside scripts/models-ext/, please send a short mail before to avoid that we get a marge problem. @David: please see my other mail about merging the classes and comment there on the changes. > I'm feeling a bit dumb with this, all you said > sounds quite obvious but I'm still a bit loss here. I'd say you are on the right track ;-) Regards, Christian Boltz -- 'blah blahb lah' ... I have no idea where it's coming from, grepping rug and zmd sources does not have any matches. [from https://bugzilla.novell.com/show_bug.cgi?id=157405] |
From: Christian B. <pos...@cb...> - 2010-11-26 23:48:37
|
Hello, The classes in scripts/models-ext/ contain some changes that affect the public interface of the classes. @David: Can you please review them and add some comments? I don't want to break the XMLRPC interface or anything else ;-) - is model/ + is scripts/models-ext/ AliasClass: - public function get($all=false) { - $username = escape_string($this->username); + public function get($alias, $all=false) { + $alias = escape_string($alias); ... - return $list; + $this->return = $list; + return 0; } - return array(); + return 1; UserHandler: - public function change_pass($old_password, $new_password) { + public function change_pw($new_password, $old_password, + $match = true) { This will break for sure (changed function name and parameter order), also the code inside the function changed a lot. $match = true means that the old password is checked before doing anything. For admin mode, it would probably be easier to make $old_password optional (which would also require the changed parameter order ;-) (Or would this be less secure?) If I get xmlrpc.php right, the functions are not directly accessable over the API, but are wrapped (in this case in the UserProxy, function change_pass) - right? That would mean if we change the function parameters, we have to change - xmlrpc.php - users/password.php (Again: Right?) UserHandler in scripts/models-ext/ also contains several new functions, but this shouldn't break anything ;-) I really have to (find some time to) dig deeper in those classes... Regards, Christian Boltz -- "Oh, hallo ersma... ick schein zu laufen... Denn wolle mer ma kucken, wat hier so los is... also erstmal isset gut, wenn icke ne CPU finden taet. Denn auf irgendwat schein ick jo ausjefuehrt zu wern, nae? Und denn, was hammwer denn noch so allet? Ah, eine HD? Jut. Denn kucken wer ma, wat da so allet druff is... (usw.) ... ah, unn wat zum Krach- machen hamwer oooch?..." [David Haller in suse-linux zum Bootvorgang] |
From: Juan C. G. D. <jua...@pe...> - 2010-11-26 16:37:40
|
On 25/11/2010 06:54 a.m., David Goodwin wrote: > Hi, > >> Am Mittwoch, 24. November 2010 schrieb Juan Carlos Gutiérrez Deliot: >>> I'm willing, for personal porpouse, to develop some new feature in >>> postfixadmin, it's about exposing mailbox creation and password >>> changing functionalities through web services in order to integrate >>> a mail server with a portal. >> Changing the password, the alias of a mailbox and switching vacaton >> on/off is already available via XMLRPC (but disabled by default in the >> config). >> >> Mailbox creation over XMLRPC sounds like a good feature. > > Ditto. > > >> You should base your work on the files in the postfixadmin-cli directory >> (that's a quite new command-line interface for postfixadmin), especially >> on the model/* files. (Well, they should be merged with the "main" >> model/* files, but that's another story ;-) >> >> postfixadmin-cli/model/UserHandler.php already contains functions to >> create a mailbox. Your task will be to >> a) implement admin login over XMLRPC (using a mailbox login is pointless >> when it comes to creating mailboxes ;-) >> b) integrate the mailbox creation in the XMLRPC interface >> c) make sure that you don't create any security holes ;-) >> >> If you need some inspiration how to use the XMLRPC interface, check the >> squirrelmail plugin in the ADDITIONS directory. > > It's not overly friendly in setup atm - I'm not sure how many people > have moved to using it - I've got one open 'support request' where > someone's emailed me for help, and i've put off doing anything as I > don't have time / motivation. > > >> Just take the SVN checkout (or your edited version of it) and make a >> tarball from it with tar czf. >> In theory you could exclude the .svn directories from the tarball, but >> in practise they won't hurt except taking some disk space ;-) > Yes; 'internally' for development, please point the web server to an svn > checkout of the source code. Once you're happy with your changes, send > us a 'diff' file (e.g. 'svn diff> patch.txt') and we'll merge it. Once > we're vaguely happy that you're competent, we'll add you as a developer > to the project, which will mean you can do what you like, when you like > without an official approval stage. > > > >>> Finally, if you think eclipse is not the right tool to work with >>> postfixadmin, I hope you can introduce me to "the official" >>> alternatives to work with. >> David and I use vi, but I wouldn't go as far as calling it the "Official >> PostfixAdmin source code editor" ;-) >> Seriously: take any editor or IDE you want and like. > Any editor is fine - emacs, nano, vim, eclipse, netbeans .... use which > ever one you're comfortable with. > > >> We don't have something like coding guidelines, and for historical >> reasons we even have some files with 3 and some with 4 spaces as tab >> replacement. (New files should use 4 spaces.) > I'd rather : > > spaces, not tabs > 4 space indentation > > beyond that i'm not fussed.. I code like : > > public function fred($arg1, $arg2) { > if($arg1 == false) { > return true; > } > // etc. > } > > > > > >>> I hope you people can guide me through this, maybe with tutorials or >>> even by personal contact. >> Personal contact as in "face to face meeting" might become difficult due >> to long distances - your name doesn't sound german ;-) > > I'm in the UK. Meetings would be difficult for me.... at least normally > (family/work etc) > > >> Additionally you can join the #postfixadmin channel on the freenode IRC >> network. I'm usually available there in the evening (as seen from CET >> timezone), and David (nick "GingerDog") is there all the day. Be >> "warned" that you won't get an answer within one or two minutes - there >> are not too many people in the channel, and some of them (including >> David) are there 24/7, but obviously not always awake ;-) > > If you want my attention, just say my name 'GingerDog' and i'll > eventually realise and respond. > > > thanks > David. Thank you guys, I really appreciate your help. When I said personal contact I meant contact via "direct" email or maybe chat, It was funny, Christian made laugh a lot with my name not sounding german. In fact, I'm from Colombia and we here are not used to use IRC as a usual communication media but I think it's time time learn something about it. @Christian: I couldn't find the command-line interface directory (not even in google), just the cli files in the scripts folder and another UserHandler.php file inside scripts/models-ext/. Is that the file you meant for me to check? I'm feeling a bit dumb with this, all you said sounds quite obvious but I'm still a bit loss here. Thanks again. |
From: David G. <da...@co...> - 2010-11-25 12:10:47
|
Hi, > Am Mittwoch, 24. November 2010 schrieb Juan Carlos Gutiérrez Deliot: >> I'm willing, for personal porpouse, to develop some new feature in >> postfixadmin, it's about exposing mailbox creation and password >> changing functionalities through web services in order to integrate >> a mail server with a portal. > > Changing the password, the alias of a mailbox and switching vacaton > on/off is already available via XMLRPC (but disabled by default in the > config). > > Mailbox creation over XMLRPC sounds like a good feature. Ditto. > > You should base your work on the files in the postfixadmin-cli directory > (that's a quite new command-line interface for postfixadmin), especially > on the model/* files. (Well, they should be merged with the "main" > model/* files, but that's another story ;-) > > postfixadmin-cli/model/UserHandler.php already contains functions to > create a mailbox. Your task will be to > a) implement admin login over XMLRPC (using a mailbox login is pointless > when it comes to creating mailboxes ;-) > b) integrate the mailbox creation in the XMLRPC interface > c) make sure that you don't create any security holes ;-) > > If you need some inspiration how to use the XMLRPC interface, check the > squirrelmail plugin in the ADDITIONS directory. It's not overly friendly in setup atm - I'm not sure how many people have moved to using it - I've got one open 'support request' where someone's emailed me for help, and i've put off doing anything as I don't have time / motivation. > Just take the SVN checkout (or your edited version of it) and make a > tarball from it with tar czf. > In theory you could exclude the .svn directories from the tarball, but > in practise they won't hurt except taking some disk space ;-) Yes; 'internally' for development, please point the web server to an svn checkout of the source code. Once you're happy with your changes, send us a 'diff' file (e.g. 'svn diff > patch.txt') and we'll merge it. Once we're vaguely happy that you're competent, we'll add you as a developer to the project, which will mean you can do what you like, when you like without an official approval stage. >> Finally, if you think eclipse is not the right tool to work with >> postfixadmin, I hope you can introduce me to "the official" >> alternatives to work with. > > David and I use vi, but I wouldn't go as far as calling it the "Official > PostfixAdmin source code editor" ;-) > Seriously: take any editor or IDE you want and like. Any editor is fine - emacs, nano, vim, eclipse, netbeans .... use which ever one you're comfortable with. > > We don't have something like coding guidelines, and for historical > reasons we even have some files with 3 and some with 4 spaces as tab > replacement. (New files should use 4 spaces.) I'd rather : spaces, not tabs 4 space indentation beyond that i'm not fussed.. I code like : public function fred($arg1, $arg2) { if($arg1 == false) { return true; } // etc. } >> I hope you people can guide me through this, maybe with tutorials or >> even by personal contact. > > Personal contact as in "face to face meeting" might become difficult due > to long distances - your name doesn't sound german ;-) I'm in the UK. Meetings would be difficult for me.... at least normally (family/work etc) > Additionally you can join the #postfixadmin channel on the freenode IRC > network. I'm usually available there in the evening (as seen from CET > timezone), and David (nick "GingerDog") is there all the day. Be > "warned" that you won't get an answer within one or two minutes - there > are not too many people in the channel, and some of them (including > David) are there 24/7, but obviously not always awake ;-) If you want my attention, just say my name 'GingerDog' and i'll eventually realise and respond. thanks David. -- David Goodwin [ david at codepoets dot co dot uk ] [ http://www.codepoets.co.uk ] |