Folks,

New to DBMail - trying to avoid writing my own from scratch....

Though there are usually at least two ways to make something happen in PostgreSQl, the 'INSTALL' file in FreeBSD ports tree for DBMail 1.2.1 appears to be heavily errored w/r PostgreSQL setup.

Here is the relevant section, **my comments outdented to left margin:
=====================
Postgresql setup
        ----------------

First you need to create the postgresql user dbmail is going to use. This
        is done by:

        createuser -U postgres dbmail
        createuser -U postgres dbmail

        createuser -U postgres dbmail

**??  Doesn't work for me......

**What DOES work is;

**(as root)
**su psql
**createuser dbmail  (yes to create databases, no to create other users)
**exit (back to root)

**  *THEN* I can do:

**su pgsql
**createdb dbmail (there are flags to specify ownership and prompt for **a pw - but see below)
**exit



Off course you can use an other username than dbmail, simply replace it. You
        can set a password for the user by doing a:

        ALTER USER dbmail WITH PASSWORD 'secret';

**?? If that were to work, one should first:
**(as root)
**su pgsql
**psql dbmail
**GRANT ALL ON DATABASE  dbmail  TO dbmail;
**ALTER USER dbmail WITH [ENCRYPTED] PASSWORD 'secret';
**\q
**exit
**(back to root)

In a postgresql console. After doing this you should create the database for
        dbmail:

        createdb -U dbmail dbmail

**?? We already did that....

The first dbmail is the user you just created, the second the name of the database. Off course you can use an other databasename. After setting up the user and database
        it's time to create the tables, do a:

        psql -U dbmail dbmail < sql/postgresql/create_tables.pgsql

**?? Not so.  One needs the *path*
**(as root)
**su pgsql
**psql dbmail
**\i (all on one line) **/usr/local/ports/mail/dbmail/work/sql/postgresql/create_tables.pgsql
**<see it happen>
**\q
**exit
**(back to root)

Don't forget to start postgresql with the -i option, so it accepts TCP/IP connections.

**- more accurately, as one uses pg_ctl to have it run detached, which **in turn passes parms to postmaster :

** -o "-i 5432 -h localhost" (use single or double quotes, so long ** as they match)

** - ELSE the TCP/IP connection will be accessible off-box, which is a ** security hole you do not need....


2.      Set the database settings

        Copy the dbmail.conf file to /etc

** ... and chmod it to something other than read-only, else it cannot BE ** edited!

        Edit the dbmail.conf file and set everything in there
        to your likeings.

3.      Run build.sh

**?? Why?  The whole system has been built and installed already?
** Seems this is out of its proper sequence *in any case* is it not?


If you want to use md5 hash passwords, you need to make sure the crypt() you link in supports them. For most people this amounts to linking in GNU libc's libcrypt
        via entering -lcrypt instead of -lcrypto.

** On Linux, perhaps. *BSD is more likely to use OpenXXX libs..

4.      Create users in the dbmail system

Next you will need to create some users into the dbmail mailing sytem. Currently this can be done in two ways. One way is using the dbmail-adduser
        utility. The other way is doing it in the database itself.
        To do it using the dbmail-adduser utility and do the following:

** ?? Should we not first specify where al these executables live?

dbmail-adduser a <username> <password> <clientid> <maxmail> [aliases]

clientid can be left 0 (this is if you want certain mailadministrators administer
        specific groups of mailusers).

** Can we clarify that or give an example?

 maxmail is the maximum number of bytes this user may
        have in his/her mailboxes. 0 is unlimited.
aliases are a number of aliases for this user. @domain are domain aliases.
        A user always needs to have at least one alias to receive mail.

        example:
./dbmail-adduser a john secret 0 25000000 [EMAIL PROTECTED] [EMAIL PROTECTED] @net.com

This will create a user john, with a password secret. It will set john's maillimit 25 Mb and all mail for [EMAIL PROTECTED], [EMAIL PROTECTED] and @net.com will be sent to john. The @net.com is a fallback alias. This means that all mail that cannot be delivered to
        an existing alias for a @net.com address will sent to john.

5.
Become root and run install-dbmail.sh, it will install the dbmail executables.
        This is not necessary if you have installed the binaries at step 4.

**?? Again - this seems to be out of sequence - already done by the
** "make install"....


6.      Configure your MTA

*SNIP*
==================================================================

Confused. DBMail site shows its own smtpd, imapd, popd in the diagram. Other info on site speaks of latest release having POP and IMAP features.

So:

A) If I already have another MTA, why do I also want DBMail?

B) Nothing against Postfix or Qmail, but IIRC, *BSD boxen come with 'Sendmail' as the factory default, and (some? all?) Linux boxen (I am told) with Exim as the default. Neither of which are covered here.

Also - IIRC, most other MTA's (Postfix and Courier to name just two) emulate a subset of sendmail's commands - at least to carry traffic originating on-box, i.e

'mail -s test [EMAIL PROTECTED] <Retrn>
Test <Return>
. <Return>
-- Will pump out a message with almost any MTA extent.

- Nothing said in your docs about those 'common' commands - which are AFAIK, a de facto simple, standard way of invoking outbound smtp....

Curious,

Bill Hacker



Reply via email to