Re: [Proposal/Patch] SMTP logging
- From: Jack <ostroffjh users sourceforge net>
- To: balsa-list gnome org
- Subject: Re: [Proposal/Patch] SMTP logging
- Date: Wed, 31 Jul 2019 14:16:36 -0400
On 2019.07.31 08:17, Albrecht Dreß wrote:
Hi all,
when Balsa sends a message to a local or remote SMTP server, a
feedback is given only on failure. However, sometimes it is
necessary to trace sent messages on the SMTP server.
As to simplify this, I propose to add syslog logging for SMTP
operations. The attached patch will basically send a message to the
facility LOG_MAIL with priority LOG_INFO for messages accepted by the
SMTP server, and LOG_NOTICE for rejected ones, respectively. The
message includes the user name, the PID, the server, the message ID
and the final server reply, e.g.:
Jul 30 13:59:20 deneb balsa: [4116:albrecht] SMTP=localhost:25
Message-ID=TXYM6J7S.O4T6EXDP.EJQOUC54@TJOAIDH7.JSKKDXYR.UQTYV7L3
Result='2.0.0 Ok: queued as 682BD1FF079'
Note that syslog() is a standard API defined by IEEE 1003.1, and
should thus work on every compliant system. Of course, it is up the
system admin to configure the syslog backend properly.
Opinions?
Best,
Albrecht.
---
Patch details:
- libbalsa/send.c: new function balsa_send_message_syslog(), changed
API of net_client_smtp_send_msg()
- libnetclient/net-client-smtp.[ch]: extend API of
net_client_smtp_send_msg() for optionally passing the final SMTP
server reply
Your description makes it sound like this is a new use of syslog() for
Balsa. If so, why use a new logging mechanism, or is this intended as
a possible start to migrating all logging to this approach? (Just
curious - no objections.)
Jack
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]