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

Add option to convert CRLF to LF line endings for sendmail #18075

Merged
merged 7 commits into from
Jan 6, 2022

Commits on Dec 22, 2021

  1. Add option to convert CRLF to LF line endings for sendmail

    It appears that several versions of sendmail require that the mail is sent to them with
    LF line endings instead of CRLF endings - which of course they will then convert back
    to CRLF line endings to comply with the SMTP standard.
    
    This PR adds another setting SENDMAIL_CONVERT_CRLF which will pass the message writer
    through a filter. This will filter out and convert CRLFs to LFs before writing them
    out to sendmail.
    
    Fix go-gitea#18024
    
    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 22, 2021
    Configuration menu
    Copy the full SHA
    aca9a7b View commit details
    Browse the repository at this point in the history
  2. flip the meaning of SENDMAIL_CONVERT_CRLF

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 22, 2021
    Configuration menu
    Copy the full SHA
    b5287ee View commit details
    Browse the repository at this point in the history

Commits on Dec 26, 2021

  1. Use Replacer as code is easier to understand

    Emails are relatively small so just buffer and replace instead of filtering
    \r\n through the writer.
    
    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 26, 2021
    Configuration menu
    Copy the full SHA
    b61cafe View commit details
    Browse the repository at this point in the history
  2. remove old test

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Dec 26, 2021
    Configuration menu
    Copy the full SHA
    39327ec View commit details
    Browse the repository at this point in the history

Commits on Jan 4, 2022

  1. Configuration menu
    Copy the full SHA
    ff4012f View commit details
    Browse the repository at this point in the history

Commits on Jan 5, 2022

  1. Configuration menu
    Copy the full SHA
    6ed273a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c42c903 View commit details
    Browse the repository at this point in the history