PGNet Dev
2009-Oct-10 19:57 UTC
[Dovecot] clarify 'type', 'executable' & 'path' in 2.0 master.conf?
@2.0's master.conf, there's, e.g., service config { type= config executable =config unix_listener { path = config mode = 0666 } } can someone please explain function/usage for the 'type', 'executable' & 'path' fields? and, for any file paths, are the presumed to be _relative_ to the dovecot executable? in $PATH? can they accept full/absolute paths? thanks.
Timo Sirainen
2009-Oct-10 20:25 UTC
[Dovecot] clarify 'type', 'executable' & 'path' in 2.0 master.conf?
On Oct 10, 2009, at 3:57 PM, PGNet Dev wrote:> @2.0's master.conf, there's, e.g., > > service config { > type= config > executable =config > unix_listener { > path = config > mode = 0666 > } > } > > can someone please explain function/usage for the 'type', 'executable' > & 'path' fields?There are a few internal special-case services and type specifies what type it is. So with type=config Dovecot knows that to reload configuration it needs to connect to that service. executable is the binary name, relative to PKG_LIBEXECDIR. path inside unix_listener is the path to the unix socket where to listen for connections, relative to base_dir.> and, for any file paths, are the presumed to be _relative_ to the > dovecot executable? in $PATH? can they accept full/absolute paths?They don't use $PATH. Absolute paths are fine.
Dear Sirs Thanks for your reply, this is the configuration of dovecot: # 1.1.16: /usr/local/etc/dovecot.conf # OS: Linux 2.6.9-67.0.15.plus.c4smp i686 CentOS release 4.6 (Final) log_path: /var/log/dovecot.log listen: *:10143 ssl_listen: *:10943 disable_plaintext_auth: no login_dir: /usr/local/var/run/dovecot/login login_executable: /usr/local/libexec/dovecot/imap-login first_valid_uid: 89 last_valid_uid: 89 first_valid_gid: 89 last_valid_gid: 89 mail_uid: 89 mail_gid: 89 mail_location: maildir:~/Maildir mail_plugins: quota namespace: type: private separator: . prefix: INBOX. inbox: yes list: yes subscriptions: yes auth default: passdb: driver: checkpassword args: /usr/vpopmail/bin/vchkpw /usr/local/bin/vchkpw-wrapper.sh userdb: driver: prefetch args: uid=89 gid=89 home=/usr/vpopmail/domains/%d/%u plugin: quota: maildir quota_rule: ?:storage=0 quota_rule2: Trash:ignore Thanks Jose Luis> From: tss at iki.fi > To: jolumape_al at hotmail.com > Date: Mon, 12 Oct 2009 16:03:18 -0400 > CC: dovecot at dovecot.org > Subject: Re: [Dovecot] Autocreate plugin for some domains > > On Mon, 2009-10-12 at 14:59 -0500, Jose Luis Marin Perez wrote: > > > In my mail server are hosted multiple domains, I > > need to create folders automatically only to users of certain domains, it is feasible to > > use the plugin "Autocreate" only for certain domains? > > What do you use as userdb? From userdb you can add/override any > settings. >_________________________________________________________________ Explore the seven wonders of the world http://search.msn.com/results.aspx?q=7+wonders+world&mkt=en-US&form=QBRE
Dear Sirs, I use as userdb, the following: userdb: driver: prefetch args: uid=89 gid=89 home=/usr/vpopmail/domains/%d/%u Dovecot -n # 1.1.16: /usr/local/etc/dovecot.conf # OS: Linux 2.6.9-67.0.15.plus.c4smp i686 CentOS release 4.6 (Final) log_path: /var/log/dovecot.log listen: *:10143 ssl_listen: *:10943 disable_plaintext_auth: no login_dir: /usr/local/var/run/dovecot/login login_executable: /usr/local/libexec/dovecot/imap-login first_valid_uid: 89 last_valid_uid: 89 first_valid_gid: 89 last_valid_gid: 89 mail_uid: 89 mail_gid: 89 mail_location: maildir:~/Maildir mail_plugins: quota namespace: type: private separator: . prefix: INBOX. inbox: yes list: yes subscriptions: yes auth default: passdb: driver: checkpassword args: /usr/vpopmail/bin/vchkpw /usr/local/bin/vchkpw-wrapper.sh userdb: driver: prefetch args: uid=89 gid=89 home=/usr/vpopmail/domains/%d/%u plugin: quota: maildir quota_rule: ?:storage=0 quota_rule2: Trash:ignore How could create folders to users in certain domains by autocreate plugin? Thanks Jose Luis> Subject: Re: [Dovecot] Autocreate plugin for some domains > From: tss at iki.fi > To: jolumape_al at hotmail.com > CC: dovecot at dovecot.org > Date: Mon, 12 Oct 2009 16:03:18 -0400 > > On Mon, 2009-10-12 at 14:59 -0500, Jose Luis Marin Perez wrote: > > > In my mail server are hosted multiple domains, I > > need to create folders automatically only to users of certain domains, it is feasible to > > use the plugin "Autocreate" only for certain domains? > > What do you use as userdb? From userdb you can add/override any > settings. >_________________________________________________________________ Discover the new Windows Vista http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE
Jose Luis Marin Perez
2009-Oct-13 13:15 UTC
[Dovecot] Userdb prefetch vpopmail and autocreate plugin
Dear Sirs Yesterday consulted regarding autocreate plugin. Userdb is configured as prefetch and vpopmail. I need to configure the plugin autocreate for users of some domains that have hosted on the server. How can I configure it? Thanks Jose Luis dovecot -n # 1.1.16: /usr/local/etc/dovecot.conf # OS: Linux 2.6.9-67.0.15.plus.c4smp i686 CentOS release 4.6 (Final) log_path: /var/log/dovecot.log listen: *:10143 ssl_listen: *:10943 disable_plaintext_auth: no login_dir: /usr/local/var/run/dovecot/login login_executable: /usr/local/libexec/dovecot/imap-login first_valid_uid: 89 last_valid_uid: 89 first_valid_gid: 89 last_valid_gid: 89 mail_uid: 89 mail_gid: 89 mail_location: maildir:~/Maildir mail_debug: yes mail_plugins: quota imap_quota expire mail_log namespace: type: private separator: . prefix: INBOX. inbox: yes list: yes subscriptions: yes auth default: passdb: driver: checkpassword args: /usr/vpopmail/bin/vchkpw /usr/local/bin/vchkpw-wrapper.sh userdb: driver: prefetch args: uid=89 gid=89 home=/usr/vpopmail/domains/%d/%u userdb: driver: vpopmail socket: type: listen master: path: /usr/local/var/run/dovecot/auth-master mode: 384 user: vpopmail group: vchkpw plugin: quota: maildir quota_rule: ?:storage=0 quota_rule2: Trash:ignore expire: INBOX.Spam 1 INBOX.Spam.* 1 expire_dict: proxy::expire mail_log_events: delete undelete expunge copy mailbox_delete mail_log_group_events: mail_log_fields: uid box msgid size dict: expire: mysql:/usr/local/etc/dovecot-dict-expire.conf _________________________________________________________________ Connect to the next generation of MSN Messenger? http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline
Dear Timo, Thanks for your reply. In the case of having two domains, eg: dominio1.com dominio2.com And I just want to use the plugin autocreate for dominio2.com, how could configure vchkpw-wrapper.sh? This would be the same logic if I want to use the plugin expires for certain domains? Thanks Jose Luis> From: tss at iki.fi > To: jolumape_al at hotmail.com > Date: Tue, 13 Oct 2009 14:00:11 -0400 > CC: dovecot at dovecot.org > Subject: Re: [Dovecot] Autocreate plugin for some domains > > On Mon, 2009-10-12 at 15:48 -0500, Jose Luis Marin Perez wrote: > > passdb: > > driver: checkpassword > > args: /usr/vpopmail/bin/vchkpw /usr/local/bin/vchkpw-wrapper.sh > > userdb: > > driver: prefetch > > args: uid=89 gid=89 home=/usr/vpopmail/domains/%d/%u > > So basically you get the configuration from checkpassword script. You > can change vchkpw-wrapper.sh to set environment variables: > > AUTOCREATE=box1 > AUTOCREATE2=box2 > EXTRA=autocreate autocreate2 > etc. > > Insert your own logic there to figure out for what domains that needs to > be done._________________________________________________________________ News, entertainment and everything you care about at Live.com. Get it now! http://www.live.com/getstarted.aspx
Dear Timo, I am currently using the vchkpw-wrapper.sh script to register users connected to the server. So adding the configuration that tells me and would be as follows: #!/bin/bash DOMAIN=`echo $USER|sed s/^.*@//` if [ "$DOMAIN" = "domain2.com" ]; then export USERDB_AUTOCREATE=box1 export USERDB_AUTOCREATE2=box2 export EXTRA="USERDB_AUTOCREATE USERDB_AUTOCREATE2" fi unset USER exec $* This properly configured? This would be the same procedure for using any plugins (Example expires) in a certain domain? Thanks Jose Luis> Subject: Re: [Dovecot] Autocreate plugin for some domains > From: tss at iki.fi > To: dovecot at dovecot.org > CC: jolumape_al at hotmail.com > Date: Tue, 13 Oct 2009 15:58:57 -0400 > > On Tue, 2009-10-13 at 15:58 -0400, Timo Sirainen wrote: > > if [ "$DOMAIN" = "domain2.com" ]; then > > export AUTOCREATE=box1 > > export AUTOCREATE2=box2 > > export EXTRA="AUTOCREATE AUTOCREATE2" > > Oh, actually: > > export USERDB_AUTOCREATE=box1 > export USERDB_AUTOCREATE2=box2 > export EXTRA="USERDB_AUTOCREATE USERDB_AUTOCREATE2" >_________________________________________________________________ Discover the new Windows Vista http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE
Dear Timo, I tried with the script you mentioned and did not create the directories are configured. Additionally I have made this modification: #!/bin/bash DOMAIN=`echo $USER|sed s/^.*@//` if [ "$DOMAIN" = "domain2.com" ]; then export USERDB_AUTOCREATE=INBOX.box1 export USERDB_AUTOCREATE2=INBOX.box2 export EXTRA="USERDB_AUTOCREATE USERDB_AUTOCREATE2" fi unset USER exec $* But it does not work, and dovecot.log not log any information about the plugin autocreate In that I am wrong? Thanks Jose Luis dovecot -n # 1.1.16: /usr/local/etc/dovecot.conf # OS: Linux 2.6.9-67.0.15.plus.c4smp i686 CentOS release 4.6 (Final) log_path: /var/log/dovecot.log listen: *:10143 ssl_listen: *:10943 disable_plaintext_auth: no login_dir: /usr/local/var/run/dovecot/login login_executable: /usr/local/libexec/dovecot/imap-login first_valid_uid: 89 last_valid_uid: 89 first_valid_gid: 89 last_valid_gid: 89 mail_uid: 89 mail_gid: 89 mail_location: maildir:~/Maildir mail_debug: yes mail_plugins: quota imap_quota expire mail_log autocreate namespace: type: private separator: . prefix: INBOX. inbox: yes list: yes subscriptions: yes auth default: passdb: driver: checkpassword args: /usr/vpopmail/bin/vchkpw /usr/local/bin/vchkpw-wrapper.sh userdb: driver: prefetch args: uid=89 gid=89 home=/usr/vpopmail/domains/%d/%u userdb: driver: vpopmail socket: type: listen master: path: /usr/local/var/run/dovecot/auth-master mode: 384 user: vpopmail group: vchkpw plugin: quota: maildir quota_rule: ?:storage=0 quota_rule2: Trash:ignore expire: INBOX.Spam 1 INBOX.Spam.* 1 expire_dict: proxy::expire mail_log_events: delete undelete expunge copy mailbox_delete mail_log_group_events: mail_log_fields: uid box msgid size dict: expire: mysql:/usr/local/etc/dovecot-dict-expire.conf> Subject: Re: [Dovecot] Autocreate plugin for some domains > From: tss at iki.fi > To: jolumape_al at hotmail.com > CC: dovecot at dovecot.org > Date: Tue, 13 Oct 2009 17:58:43 -0400 > > On Tue, 2009-10-13 at 15:31 -0500, Jose Luis Marin Perez wrote: > > #!/bin/bash > > > > DOMAIN=`echo $USER|sed s/^.*@//` > > if [ "$DOMAIN" = "domain2.com" ]; then > > export USERDB_AUTOCREATE=box1 > > export USERDB_AUTOCREATE2=box2 > > export EXTRA="USERDB_AUTOCREATE USERDB_AUTOCREATE2" > > fi > > > > unset USER > > exec $* > > > > This properly configured? > > Looks right. Try and see. > > > This would be the same procedure for using any plugins (Example expires) in a certain domain? > > Right. You can override any settings that way. >_________________________________________________________________ Discover the new Windows Vista http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE
On Oct 13, 2009, at 6:32 PM, Jose Luis Marin Perez wrote:> Additionally I have made this modification: > > #!/bin/bash > > DOMAIN=`echo $USER|sed s/^.*@//` > if [ "$DOMAIN" = "domain2.com" ]; then > export USERDB_AUTOCREATE=INBOX.box1 > export USERDB_AUTOCREATE2=INBOX.box2 > export EXTRA="USERDB_AUTOCREATE USERDB_AUTOCREATE2"Are you sure this code gets called? Maybe add something here such as: echo "yeah i got here" > /tmp/autocreate> fi > > unset USER > exec $* > > > But it does not work, and dovecot.log not log any information about > the plugin autocreateWhat does it log with auth_debug=yes enabled?
Dear Timo, I added the line you mentioned echo "yeah i got here" > /tmp/autocreate and did not create the file /tmp/autocreate This is the script with the real domain: #!/bin/bash DOMAIN=`echo $USER|sed s/^.*@//` if [ "$DOMAIN" = "operaciones.qnet.com.pe" ]; then export USERDB_AUTOCREATE=INBOX.spam1 export USERDB_AUTOCREATE2=INBOX.spam2 export EXTRA="USERDB_AUTOCREATE USERDB_AUTOCREATE2" echo "yeah i got here" > /tmp/autocreate fi unset USER exec $* What could be happening? Thanks Jose Luis> From: tss at iki.fi > To: jolumape_al at hotmail.com > Date: Tue, 13 Oct 2009 20:58:47 -0400 > CC: dovecot at dovecot.org > Subject: Re: [Dovecot] Autocreate plugin for some domains > > On Oct 13, 2009, at 6:32 PM, Jose Luis Marin Perez wrote: > > > Additionally I have made this modification: > > > > #!/bin/bash > > > > DOMAIN=`echo $USER|sed s/^.*@//` > > if [ "$DOMAIN" = "domain2.com" ]; then > > export USERDB_AUTOCREATE=INBOX.box1 > > export USERDB_AUTOCREATE2=INBOX.box2 > > export EXTRA="USERDB_AUTOCREATE USERDB_AUTOCREATE2" > > Are you sure this code gets called? Maybe add something here such as: > > echo "yeah i got here" > /tmp/autocreate > > > fi > > > > unset USER > > exec $* > > > > > > But it does not work, and dovecot.log not log any information about > > the plugin autocreate > > What does it log with auth_debug=yes enabled? > >_________________________________________________________________ Discover the new Windows Vista http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE
Thanks Timo.> From: tss at iki.fi > To: jolumape_al at hotmail.com > Date: Wed, 14 Oct 2009 17:37:25 -0400 > CC: dovecot at dovecot.org > Subject: Re: [Dovecot] Autocreate plugin for some domains > > On Wed, 2009-10-14 at 16:33 -0500, Jose Luis Marin Perez wrote: > > working correctly, just wanted to ask if I use the variable VPOPUSER not bring trouble? > > Anything that works is fine. >_________________________________________________________________ News, entertainment and everything you care about at Live.com. Get it now! http://www.live.com/getstarted.aspx