Discussion:
.qmail file
Marco Aurélio
2010-12-16 18:20:39 UTC
Permalink
Hi Guys,

I'm new using qmail-autoresponder and i compiled it for mysql use.
My question is: how can i enter the database infos into the .qmail
($MYSQL_USER, $MYSQL_HOST, $MYSQL_PASS, $MYSQL_DB and $MYSQL_SOCK)?
I tested using mysql on localhost, but my qmail database is on another
server so i need to tell qmail-autoresponder-mysql where to connect.

Take care you all.
--
*Marco Aurélio*
SecrelNet Tecnologia
Web: Secrel.com.br <http://www.secrel.com.br/>
E-mail: ***@secrel.net.br <mailto:***@secrel.net.br>
Fone: 3288-2000
Bruce Guenter
2010-12-17 01:11:35 UTC
Permalink
Post by Marco Aurélio
I'm new using qmail-autoresponder and i compiled it for mysql use.
My question is: how can i enter the database infos into the .qmail
($MYSQL_USER, $MYSQL_HOST, $MYSQL_PASS, $MYSQL_DB and $MYSQL_SOCK)?
I tested using mysql on localhost, but my qmail database is on another
server so i need to tell qmail-autoresponder-mysql where to connect.
The easiest way is to just stick the assignments in front of the
program like this:

| MYSQL_USER=... qmail-autoresponder-mysql ...

If that doesn't work with your shell (it works with bash, dash, and
ksh), you might need to add "env" in front of that. However, it would
be preferable to use either envdir:

| envdir /path/to/whatever qmail-autoresponder-mysql ...

and put the settings into that directory so they could be reused by
other things. Even better would probably be to put them in .my.cnf
since qmail-autoresponder-mysql is written to read them there:

[qmail-autoresponder]
host = mysql.example.com
database = autoresponders
...
--
Bruce Guenter <***@untroubled.org> http://untroubled.org/
Loading...