Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug]: Newlines from SMTP error messages in log entries are not removed #417

Open
1 task done
mjesuele opened this issue May 9, 2024 · 0 comments
Open
1 task done
Labels
bug Something isn't working

Comments

@mjesuele
Copy link

mjesuele commented May 9, 2024

What happened?

Some SMTP errors, like the one below, contain line breaks which are preserved in Stalwart's logs, causing a single log entry to spread over multiple lines in the logfile:

2024-05-08T00:09:01.870163Z  INFO delivery{id=173742629280816684 return_path="[email protected]" nrcpt=1 size=5644}:attempt{domain="nebius.co" attempt_number=0}: smtp::outbound::session: context="rcpt" event="rejected" rcpt="[email protected]" mx="smtp.google.com" reason=Code: 550, Enhanced code: 5.1.1, Message: The email account that you tried to reach does not exist. Please try
double-checking the recipient's email address for typos or
unnecessary spaces. For more information, go to
 https://support.google.com/mail/?p=NoSuchUser z20-20020a19f714000000b0051b5efe7ebcsi3719625lfe.394 - gsmtp

I expect each log entry to be contained in a single line in the logfile.

How can we reproduce the problem?

I can reproduce the problem by doing the following steps:

Take any sufficiently large log file with significant activity in it and you'll likely encounter several examples of this.

Version

v0.7.x

What database are you using?

PostgreSQL

What blob storage are you using?

PostgreSQL

Where is your directory located?

SQL

What operating system are you using?

Docker

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@mjesuele mjesuele added the bug Something isn't working label May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant