Possibilité de sélectionner un hôte alternatif pour la base de donnée

tags/0.1.1
Daniel Berteaud 12 years ago
parent 7030e6afe6
commit 142219c7aa
  1. 1
      root/etc/e-smith/db/configuration/defaults/qpsmtpd/Log2Sql
  2. 3
      root/etc/e-smith/templates/var/service/qpsmtpd/config/peers/0/03log2sql
  3. 3
      root/etc/e-smith/templates/var/service/qpsmtpd/config/peers/local/03log2sql

@ -3,10 +3,11 @@ if (($qpsmtpd{'Log2Sql'} || 'enabled') eq 'enabled'){
my $dbname = $qpsmtpd{'DbName'} || 'smtp_log'; my $dbname = $qpsmtpd{'DbName'} || 'smtp_log';
my $dbuser = $qpsmtpd{'DbUser'} || 'qpsmtpd'; my $dbuser = $qpsmtpd{'DbUser'} || 'qpsmtpd';
my $dbpass = $qpsmtpd{'DbPassword'} || 'secret'; my $dbpass = $qpsmtpd{'DbPassword'} || 'secret';
my $dbhost = $qpsmtpd{'DbHost'} || 'localhost';
$OUT .=<<"EOF"; $OUT .=<<"EOF";
# Log to MySQL # Log to MySQL
logging/log2sql d $dbname o mysql_socket=/var/lib/mysql/mysql.sock u $dbuser p $dbpass D Yes logging/log2sql d $dbname h $dbhost u $dbuser p $dbpass D Yes
EOF EOF
} }
else{ else{

@ -3,10 +3,11 @@ if (($qpsmtpd{'Log2Sql'} || 'enabled') eq 'enabled'){
my $dbname = $qpsmtpd{'DbName'} || 'smtp_log'; my $dbname = $qpsmtpd{'DbName'} || 'smtp_log';
my $dbuser = $qpsmtpd{'DbUser'} || 'qpsmtpd'; my $dbuser = $qpsmtpd{'DbUser'} || 'qpsmtpd';
my $dbpass = $qpsmtpd{'DbPassword'} || 'secret'; my $dbpass = $qpsmtpd{'DbPassword'} || 'secret';
my $dbhost = $qpsmtpd{'DbHost'} || 'localhost';
$OUT .=<<"EOF"; $OUT .=<<"EOF";
# Log to MySQL # Log to MySQL
logging/log2sql d $dbname o mysql_socket=/var/lib/mysql/mysql.sock u $dbuser p $dbpass D Yes logging/log2sql d $dbname h $dbhost u $dbuser p $dbpass D Yes
EOF EOF
} }
else{ else{

Loading…
Cancel
Save