Hey Jim:
It sounds like you did not read "INSTALL" nor "INSTALL.postfix" from the DBMAil tarball. You missed DBMail 101.

Anyway, you must do that so you understand what folks are telling you in reply. It sounds like you are two simple configs away from a working system but who knows...

"INSTALL" and "INSTALL.postfix" set out some options you should be aware of such as those I set out for you below. :o)

Mike


####################
Using LMTP

in /etc/postfix/master.cf add:

dbmail-lmtp     unix    -       -       n       -       -       lmtp

If you want verbose output in the mail log, add -v to lmtp, like this:

dbmail-lmtp     unix    -       -       n       -       -       lmtp -v

Mind that you get a LOT of output in your logs when using this setting.

If one or more destinations in your mydestination list are not
DNS-resolvable, DNS lookups must be disabled for the dbmail-lmtp daemon:

dbmail-lmtp     unix    -       -       n       -       -       lmtp
    -o disable_dns_lookups=yes

If you want to send all the email the MTA accepts to DBMail, use the
following setting in /etc/postfix/main.cf:

mailbox_transport = dbmail-lmtp:<host>:<port>

If you want to decide if DBMail should be used per domain please add
the following in /etc/postfix/transport.cf:

<domain>        dbmail-lmtp:<host>:<port>

Where <domain> should replaced by the mail domain you receive mail for.
It is possible to have several domain entries here. For <host> and
<port> fill out the host and port on which the dbmail-lmtp daemon runs.
If unsure about which port they run on, check your dbmail.conf file.
The standard port for the lmtp service is port 24. An example of a
transport file is below:

example.com  dbmail-lmtp:localhost:24
anotherexample.com dbmail-lmtp:localhost:24

NOTE: If you are using Postfix 2.0 or later, and you are NOT using a
MySQL-built alias list (see section 4. for instructions on how to
implement this) you must use the following setting in main.cf:

local_recipient_maps =

Otherwise, Postfix will reject your dbmail recipients with a big fat
"User unknown in local recipient table" error.

now run:

# postmap /etc/postfix/transport
# postfix reload

and you're on your way!



#######################################
Using the Pipe interface (dbmail-smtp)

in /etc/postfix/master.cf add:

dbmail-smtp    unix  -       n       n       -       -       pipe
    flags=  user=<dbmailuser>:<dbmailgroup>
 argv=/usr/local/sbin/dbmail-smtp -d ${recipient} -r ${sender}

where <dbmailuser> and <dbmailgroup> should be the user and group the
dbmail-smtp program should run as. The ${recipient} and ${sender}
fields are filled in by Postfix.

To send all email to DBMail, add this in /etc/postfix/main.cf

mailbox_transport = dbmail-smtp:

If you want to decide whether or not to send to DBMail per domain,
add this in /etc/postfix/transport:

<domain>        dbmail-smtp:

See the section on running Postfix with LMTP if you don't understand
the transport file.

now run:
# postmap /etc/postfix/transport
# postfix reload

And your mail will be delivered!

###################################################################
Postfix can also interface directly with MySQL or PostgreSQL to check
for aliases before sending mail to dbmail (pipe or LMTP). This can
improve performance, especially on a high-traffic server (SPAM!).
In the case of the use of dbmail-smtp, this is especially useful,
because it saves a process starting up and connecting to the database
on every message.

To use MySQL or PostgreSQL with Postfix, first install the
postfix-mysql or postfix-pgsql packages (they're in Debian, probably
also in other distros).

Create a file in your Postfix config directory (/etc/postfix), with
the name sql-recipients.cf, and put the following in it:

user = <username>
password = <password>
hosts = <dbhost>
dbname = <dbname>
table = dbmail_aliases
select_field = alias
where_field = alias

Where you replace <username>, <password>, <dbhost> and <dbname> by the
database username, password, host and name of the dbmail database.

Now we need to tell Postfix to use this file. Add the following line
in main.cf:

local_recipient_maps = mysql:/etc/postfix/sql-recipients.cf

This tells Postfix to use the database to check if a recipient is
present in the database. Postfix will refuse the message  if a
recipient is not present.



----- Original Message ----- From: "Jim Douglas" <[EMAIL PROTECTED]
To: <[email protected]
Sent: Friday, March 10, 2006 3:40 PM
Subject: Re: [Dbmail] Receiving mail


From: Micah Stevens <[EMAIL PROTECTED]
Reply-To: DBMail mailinglist <[email protected]
To: DBMail mailinglist <[email protected]
Subject: Re: [Dbmail] Receiving mail
Date: Fri, 10 Mar 2006 10:03:11 -0800

I made that change and this is the error message i get,

server localhost: Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (2)

This is my dbmail.conf,


[DBMAIL]
# Database settings
# host for database, set to localhost if database is om
# the same host as dbmail and you want to use a local socket
# for connecting.
host=localhost

# if you want to use TCP/IP for connecting to the database,
sqlport=3306

# and have the database running on a non-standard port.
# when using a local socket connection to the database, fill
# in the path to the socket here (e.g. /var/run/mysql.sock)
#sqlsocket=/var/lib/mysql/mysql.sock
sqlsocket=/tmp/mysql.sock

I had to uninstall MySQL  5.0.18 and re-install 4.1.16 and now mysock is
in
tmp.  Why can't dbmail.conf find it?

Jim

This isn't dbmail complaining it can't find the .sock file, it's Postfix.
Configure that, and you'll be okay.

-Micah
_______________________________________________
Dbmail mailing list
[email protected]
https://mailman.fastxs.nl/mailman/listinfo/dbmail

Which postfix file, it's not master, main...I think  I opened all of them..

Thanks,
Jim


_______________________________________________
Dbmail mailing list
[email protected]
https://mailman.fastxs.nl/mailman/listinfo/dbmail

Reply via email to