==================================== su courier cd /home/vmail/$DOMAIN /usr/lib/courier/sbin/userdb $DOMAIN/$ADDRESS set home=/home/vmail/$DOMAIN/$USER uid=502 gid=502 ==================================== userdb john@example.com set home=/home/virtual/example.com/john \ mail=/home/virtual/example.com/john \ uid=999 gid=999 ==================================== /usr/lib/courier/sbin/userdbpw | /usr/lib/courier/sbin/userdb "$DOMAIN/$USER" set systempw /usr/lib/courier/sbin/makeuserdb exit su vmail mkdir /home/vmail/$DOMAIN/$USER cd /home/vmail/$DOMAIN/$USER maildirmake Maildir exit You can then create aliases in the /etc/courier/aliases dir. $USER@$DOMAIN: otheruser@otherdomain.com ============================ courier packages courier-authdaemon - Courier Mail Server authentication daemon courier-authmysql - MySQL Authentication for Courier Mail Server courier-base - Courier Mail Server Base System courier-debug - Debugging Tools for Courier Mail Server courier-doc - Documentation for the Courier Mail Server courier-imap - IMAP daemon with PAM and Maildir support courier-ldap - LDAP support for Courier Mail Server courier-maildrop - Mail delivery agent with filtering abilities courier-mlm - Courier Mail Server mailing list manager courier-mta - Mail Transport Agent of the Courier Mail Server courier-pcp - Courier PCP server courier-pop - POP3 daemon with PAM and Maildir support courier-webadmin - Web-based administration tool for the Courier Mail Server cvm - Credential Validation Modules scalable-cyrfonts - scalable Cyrillic fonts sqwebmail - Webmail Server xfonts-scalable - scalable fonts for X xfonts-scalable-nonfree - non-free Type1 and TrueType fonts from XFree86 msttcorefonts - Installer for Microsoft TrueType core fonts courier-authpostgresql - PostgreSQL Authentication for Courier Mail Server Suite courier-imap-ssl - IMAP daemon with SSL, PAM and Maildir support courier-mta-ssl - Courier Mail Transport Agent (SMTP over SSL) courier-pop-ssl - POP3 daemon with SSL, PAM and Maildir support courier-ssl - Courier Mail Server SSL Package ==================================== userdbpw userdbpw [ [ -md5] [ -hmac-md5] [ -hmac-sha1] ] |userdb name set field userdbpw -md5 | userdb / set systempw userdbpw -hmac-md5 | userdb users/john set hmac-md5pw These commands set the systempw field in the record for the user john in /etc/courier/userdb/users file, and the hmac-md5pw field. Don't forget to run makeuserdb for the change to take effect. ==================================== userdb domain.com/bob@domain.com set home=/home/vmail/domain.com/bob\ uid=502 gid=502 ==================================== /etc/courier/authdaemonrc The authentication record is a chunk of data in the fol? lowing format: SERVICEAUTHTYPEAUTHDATA Each occurence of represents an ASCII linefeed character (#10). "SERVICE" identifies the service that originates the authentication request, such as "imap", or "webmail". Authentication module may use this identifier, or ignore it. login A typical userid/password authentication request. AUTHDATA contains the following data: useridpassword. cram-md5 Specifies the CRAM-MD5 authentication request. AUTHDATA contains the following data: chal? lengeresponse. The "challenge" and "response" strings are base64-encoded. cram-sha1 Specifies the CRAM-SHA1 authentication request, instead of CRAM-MD5, and uses the same format for AUTHDATA. -------------------------------------- Each line in /etc/courier/userdb takes following form: addrfield=value|field=value... addr specifies a unique virtual address. It is followed by a single tab character, then a list of field=value pairs, separated by vertical slash characters. See makeuserdb(8) for field definitions. A text editor can be used to add blank lines or comments in /etc/courier/userdb. Any blank lines or comments are ignored by the userdb script. The names of the actual fields, and their contents, are defined entirely by applications that use the /etc/courier/userdb database, the userdb command just adds or removes arbitrary fields. For example: userdb default/info set mail=/home/mail/info This command accesses the address "info" in /etc/courier/userdb/default. If the second argument to userdb is "set", the remaining arguments are taken as field=value pairs, which are added to the record for addr. If there is no record for addr, a new record will be appended to the file. If addr exists, any existing values of any specified fields are removed. If =value is missing, userdb stops and prompts for it. This is useful if you're setting a password field, where you do not want to specify the password on the command line, which can be seen by the ps(1) command. If userdb is being executed by a script, the value can be provided on standard input.