Workaround: baculas bsmtp to localhost not further working in debian 10

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Workaround: baculas bsmtp to localhost not further working in debian 10

Pierre Bernhardt
Hello,

after upgrading my debian backup server with bacula from debian 9 to 10 I wonder me
that the status mails not further arrived me.
My server uses a exim4 instance which was allowed only local connoections before.
The exim4 on my backup server sends all mails to my mail server. On Mailserver
relaying is only allowed by smtp-auth connections which are not configured on
my backupserver, so only sending mails to local users configured on my mailsserver
is allowed.
So I use a local forward mail rule to send all mails to backups root to my
own mail account.

bacula had send a mail to root@localhost smtp connection via the bsmtp before.
But beginning with defaults debian 10 exim 4 a identification of a host is
needed at start of smtpconnection which is not send by bsmtp.
I didn't find a solution to fix it in bsmtp shortly.
bsmtp get the message via pipe as like mailx it do. So I simply replaced the
bsmtp by replacing the following lines in the bacula-dir.conf:

-  mailcommand = "/usr/sbin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: %t %e of %c %l\" %r"
-  operatorcommand = "/usr/sbin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: Intervention needed for %j\" %r"
+  mailcommand = "/usr/bin/mailx -s \"Bacula: %t %e of %c %l\" %r"
+  operatorcommand = "/usr/bin/mailx -s \"Bacula: Intervention needed for %j\" %r"

Maybe it is possible also to fix the issue by a different bsmtp option,
by the way the mailx solution was a better way because I don't want
to loose the messages even the smtp port is closed or a remote server
is not available.

Cheers,
Pierre

Reply | Threaded
Open this post in threaded view
|

Re: Workaround: baculas bsmtp to localhost not further working in debian 10

Marc Haber-14
On Tue, 3 Mar 2020 09:17:51 +0100, Pierre Bernhardt
<[hidden email]> wrote:
>bacula had send a mail to root@localhost smtp connection via the bsmtp before.
>But beginning with defaults debian 10 exim 4 a identification of a host is
>needed at start of smtpconnection which is not send by bsmtp.

Are you saying that bsmtp is directly talking to an SMTP server
without using the required HELO/EHLO command first?

Exim has been rejecting such traffic for at least a decade. This is by
no way new to Debian 10.

"Logs or it didn't happen".

Btw, you're posting to a German language list.

Greetings
Marc
--
-------------------------------------- !! No courtesy copies, please !! -----
Marc Haber         |   " Questions are the         | Mailadresse im Header
Mannheim, Germany  |     Beginning of Wisdom "     |
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 621 72739834

Reply | Threaded
Open this post in threaded view
|

Re: Workaround: baculas bsmtp to localhost not further working in debian 10

Pierre Bernhardt


Am 03.03.20 um 11:26 schrieb Marc Haber:
>> bacula had send a mail to root@localhost smtp connection via the bsmtp before.
>> But beginning with defaults debian 10 exim 4 a identification of a host is
>> needed at start of smtpconnection which is not send by bsmtp.
> Are you saying that bsmtp is directly talking to an SMTP server
> without using the required HELO/EHLO command first?
Yes, exactly.

> Exim has been rejecting such traffic for at least a decade. This is by
> no way new to Debian 10.
But it has been worked for localhost connections before upgraded from
debian 9 to 10. Maybe before 10 it was not needed.

Are you know how it is possible that bsmtp sends also HELO/EHLO?

Cheers,
Pierre


Reply | Threaded
Open this post in threaded view
|

Re: Workaround: baculas bsmtp to localhost not further working in debian 10

Sven Hartge-5
Pierre Bernhardt <[hidden email]> wrote:
> Am 03.03.20 um 11:26 schrieb Marc Haber:

>>> bacula had send a mail to root@localhost smtp connection via the
>>> bsmtp before.  But beginning with defaults debian 10 exim 4 a
>>> identification of a host is needed at start of smtpconnection which
>>> is not send by bsmtp.

>> Are you saying that bsmtp is directly talking to an SMTP server
>> without using the required HELO/EHLO command first?

> Yes, exactly.

Zeige, dass das passiert, z.B. durch Debugging in Exim oder
Paket-Capture via wireshark/tcpdump.

Ich zumindest kann dein Problem mit Bacula weder unter Debian 9 noch
unter Debian 10 noch unter Debian Sid mailend gegen Exim in der
Debian-Standard-Konfiguration nachvollziehen.

Plus der Code in bsmtp.c nutzt klar und deutlich HELO und zwar seit
mindestens 2003, wie man einfach im GIT von Bacula nachsehen kann.

Was auch immer dein Problem ist, es liegt *nicht* an Bacula.

Grüße,
Sven (Co-Maintainer Bacula)

--
Sigmentation fault. Core dumped.