diff --git a/root/etc/e-smith/db/configuration/defaults/qpsmtpd/Log2Sql b/root/etc/e-smith/db/configuration/defaults/qpsmtpd/Log2Sql new file mode 100644 index 0000000..86981e6 --- /dev/null +++ b/root/etc/e-smith/db/configuration/defaults/qpsmtpd/Log2Sql @@ -0,0 +1 @@ +enabled diff --git a/root/etc/e-smith/templates/var/service/qpsmtpd/config/peers/0/03log2sql b/root/etc/e-smith/templates/var/service/qpsmtpd/config/peers/0/03log2sql index 4c0b818..2424983 100644 --- a/root/etc/e-smith/templates/var/service/qpsmtpd/config/peers/0/03log2sql +++ b/root/etc/e-smith/templates/var/service/qpsmtpd/config/peers/0/03log2sql @@ -3,10 +3,11 @@ if (($qpsmtpd{'Log2Sql'} || 'enabled') eq 'enabled'){ my $dbname = $qpsmtpd{'DbName'} || 'smtp_log'; my $dbuser = $qpsmtpd{'DbUser'} || 'qpsmtpd'; my $dbpass = $qpsmtpd{'DbPassword'} || 'secret'; + my $dbhost = $qpsmtpd{'DbHost'} || 'localhost'; $OUT .=<<"EOF"; # 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 } else{ diff --git a/root/etc/e-smith/templates/var/service/qpsmtpd/config/peers/local/03log2sql b/root/etc/e-smith/templates/var/service/qpsmtpd/config/peers/local/03log2sql index 4c0b818..2424983 100644 --- a/root/etc/e-smith/templates/var/service/qpsmtpd/config/peers/local/03log2sql +++ b/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 $dbuser = $qpsmtpd{'DbUser'} || 'qpsmtpd'; my $dbpass = $qpsmtpd{'DbPassword'} || 'secret'; + my $dbhost = $qpsmtpd{'DbHost'} || 'localhost'; $OUT .=<<"EOF"; # 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 } else{