Chapter 3. Life with Virtual Qmail

Table of Contents
3.1. Configuration
3.1.1. Environment variables
3.1.2. Configuration for Qmail part
3.1.3. Configuration for PostgreSQL authorization part
3.1.4. Configuration for JDBC authorization part
3.1.5. Configuration for PostgreSQL logging part
3.1.6. Configuration for JDBC logging part
3.2. Security not by obscurity
3.2.1. Steps done to make this system secure
3.2.2. Limiting access to sockets
3.3. Integration with other software
3.3.1. Incredible Hosting System
3.3.2. Omail-webmail
3.3.3. bincimap

This chapter describes how to configure and use v-q. It includes also part about securing v-q system.

3.1. Configuration

V-q is a highly configurable system. Almost all options can be set at the runtime.

3.1.1. Environment variables

Some programs can be customized using environment variables, below is a list of globally used variables.

  • VQ_HOME this is the most important variable. It points to a base directory when v-q files are stored. Default value is set during compilation, usually it is /var/vq.

  • VQ_ETC_DIR points to a directory where configuration files are stored. Default value is set during compilation, usually it is /var/vq/etc.

3.1.2. Configuration for Qmail part

Configuration files are stored in VQ_ETC_DIR/ivq/qmail/.

Table 3-1. Configuration files for Qmail part

FileDefault valueDescription
autoresp_ttl60 How many minutes autoresp will remeber that it sent a message to specified address. Usually you don't want to automatically answer to every incoming mail from the same address. If you want to answer on every incoming mail set it to 0.
backup_deleted1 Backup user's maildir while removing an account if value larger than 0.

Note: Directory VQ_HOME/deleted must be on the same file system as user's maildir because rename system call is used.

iauth_importname_service#Auth.iauth Instruction how to find object program should use as a vq::iauth implementation. See corba_utils.pdf.
maildirMaildir Name of a directory that users's mail is stored in. Directory is created when user is added.
split_dom1 How many times split a path for a domain. You can change this value only if you don't have any domains registered. If you change it in other situation programs won't be able to find domains and users.
split_user3 How many times split a path for user's directory. Like split_dom you can change it only when you don't have any users.
fmode0640 Mode of created files.
mmode0750 Mode of subdirectories in Maildir.
dmode0750 Mode of other created directories.
user_vq Name of a v-q's user. It is put in qmail/users/assign.
uidUID of this process It is put into qmail/users/assign.
gidGID of this process It is put into qmail/users/assign.
data/var/vq Directory where Virtual Qmail stores domains and users' mailboxes.
qmail_home/var/qmail Qmail's home directory.
qmode0644 Mode of files created in a qmail's directory.
dep_modfixed_ports_no_imr Deployment model. You can read more in corba_utils.pdf.
policysingle_thread_model Sets CORBA servant policy - using threads, persistency, etc. See corba_utils.pdf.

3.1.3. Configuration for PostgreSQL authorization part

Configuration files are stored in VQ_ETC_DIR/iauth/pgsql/.

Table 3-2. Configuration files for PostgreSQL authorization part

FileDefault valueDescription
dep_modfixed_ports_no_imr Deployment model. You can read more in corba_utils.pdf.
pgsqldbname=mail password=mail user=mail String used to connect to a database. Remember to use different password.
pgsql_pool1 Number of connections to a database server that are created during statup. You can try to use few connections if your CORBA implementation implements threading and policy allows using it.
policysingle_thread_model Sets CORBA servant policy - using threads, persistency, etc. See corba_utils.pdf.
read_by_sql1 If value is different than 0 it's possible to call functions read_by_sql and count_by_sql. Otherwise functions are disabled and calls return with error.
rm_by_sql0 If value is different than 0 it's possible to call function rm_by_sql. Otherwise function is disabled and calls return with error.

3.1.4. Configuration for JDBC authorization part

All options are passed to application through command line arguments, there are no configuration files. Bellow there is a list of supported options. To pass them to program use something like:

-Dcom.foo_baz.v_q.jdbcauthd.jdbc=jdbc:postgresql://localhost/mail

Table 3-3. Configuration files for JDBC authorization part

PropertyDefault valueDescription
com.foo_baz.v_q.jdbcauthd.jdbcno defaults String used to initialize JDBC driver.
com.foo_baz.v_q.jdbcauthd.jdbc.usermail User used to connect to a database.
com.foo_baz.v_q.jdbcauthd.jdbc.passmail Password user for authorization.
com.foo_baz.v_q.jdbcauthd.dsno defaults Data source used as a database. If you have configured JNDI server which includes database references you can use them directly. This options is mutually exclusive with com.foo_baz.v_q.jdbcauthd.jdbc.

Note: This options has not been tested. At this time I don't know how to use JNDI directly.

com.foo_baz.v_q.jdbcauthd.dep_modfixed_ports_no_imr Deployment model. You can read more in corba_utils.pdf.
com.foo_baz.v_q.jdbcauthd.policysingle_thread_model Sets CORBA servant policy - using threads, persistency, etc. See corba_utils.pdf.

3.1.5. Configuration for PostgreSQL logging part

Configuration files are stored in VQ_ETC_DIR/ilogger/pgsql/.

Table 3-4. Configuration files for PostgreSQL logging part

FileDefault valueDescription
pgsqldbname=mail password=mail user=mail String used to connect to a database.
dep_modfixed_ports_no_imr Deployment model. You can read more in corba_utils.pdf.
policysingle_thread_model Sets CORBA servant policy - using threads, persistency, etc. See corba_utils.pdf.

3.1.6. Configuration for JDBC logging part

All options are passed to application through command line arguments, there are no configuration files. Bellow there is a list of supported options. To pass them to program use something like:

-Dcom.foo_baz.v_q.jdbclogd.jdbc=jdbc:postgresql://localhost/mail

Table 3-5. Configuration files for JDBC logging part

PropertyDefault valueDescription
com.foo_baz.v_q.jdbclogd.jdbcno defaults String used to initialize JDBC driver.
com.foo_baz.v_q.jdbclogd.jdbc.usermail User used to connect to a database.
com.foo_baz.v_q.jdbclogd.jdbc.passmail Password user for authorization.
com.foo_baz.v_q.jdbclogd.dsno defaults Data source used as a database. If you have configured JNDI server which includes database references you can use them directly. This options is mutually exclusive with com.foo_baz.v_q.jdbclogd.jdbc.

Note: This options has not been tested. At this time I don't know how to use JNDI directly.

com.foo_baz.v_q.jdbclogd.dep_modfixed_ports_no_imr Deployment model. You can read more in corba_utils.pdf.
com.foo_baz.v_q.jdbclogd.policysingle_thread_model Sets CORBA servant policy - using threads, persistency, etc. See corba_utils.pdf.
com.foo_baz.v_q.jdbclogd.rm_by_sql0 If value is different than 0 enable rm_by_sql function.
com.foo_baz.v_q.jdbclogd.read_by_sql0 If value is different than 0 enable read_by_sql function.
Hosted by: BerliOS Logo SourceForge.net Logo