My new Internet Service Provider requires authentication with username and password on port 587 for using the provider's SMTP server. I have spent several hours to get this working - here is my solution, so hopefully others can use their time better

The username and password for SMTP is set up in the server manager, put here you cannot change the port number. So this requires a little coding:
Add this key to the configuration database:
# /sbin/e-smith/config setprop smtp-auth-proxy Port 587
Add the lines marked with ++ to /usr/local/sbin/smtp-auth-proxy.pl
$prop->{Passwd} = $smtp_proxy_rec->prop('Passwd');
++ $prop->{Port} = $smtp_proxy_rec->prop('Port');
$prop->{Debug} = $smtp_proxy_rec->prop('Debug');
and
my $system_name = $self->get_property('SystemName');
++ my $port = $self->get_property('Port');
my $name = $self->get_property('Userid');
And in the file also change
my $smtp = Net::SMTP->new($smarthost,
Hello => "${system_name}.${domain_name}",
Debug => $debug
);
to
my $smtp = Net::SMTP->new($smarthost,
Hello => "${system_name}.${domain_name}",
Debug => $debug,
Port => $port
);
Finally restart smtp-auth-proxy and qmail:
#svc -t /var/service/smtp-auth-proxy
#svc -t /var/service/qmail