fix: fixed missing sql column in query

This commit is contained in:
Dominik Meyer 2025-02-07 11:10:18 +01:00
parent e226f244b3
commit cf5cb8c29c
Signed by: byterazor
GPG Key ID: EABDA0FD5981BC97

View File

@ -25,7 +25,7 @@ sub createStatements
{
my $self = shift;
$self->{rcpt_sth} = $self->{dbh}->prepare("select username from email_address where alias=? and domain=?");
$self->{rcpt_sth} = $self->{dbh}->prepare("select username,dovecot_server from email_address where alias=? and domain=?");
$self->{fetch_all_sth} = $self->{dbh}->prepare("select username,dovecot_server from email_address where domain=? and isFetchAll=1");
@ -102,6 +102,8 @@ sub updateTransactionWithRecipientInfo
my $port = $row->{port};
$transaction->notes("queue", "lmtp://$hostname:$port");
$transaction->notes("destination-user",$username);
$self->log(LOGNOTICE, "Setting LMTP server to dovecot on $hostname:$port for user: $username");
return 1;