1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2025-12-16 14:27:01 +00:00
Alberto Bertogli ae1c246bde chasquid: Make "MAIL FROM" ignore extra parameters
MAIL FROM commands usually come in the form of:

  MAIL FROM:<from@from> BODY=8BITMIME

Note that there's extra parameters after the address, which for now we want to
ignore.

The current parser doesn't ignore them, and relies on mail.ParseAddress doing
so (that is, on mail.ParseAddress("<from> BODY=8BITMIME") working).
However, in go 1.7, the parser will get more strict and start to fail these
cases.

To fix this, we change the way we parse the line to use fmt.Sprintf, which is
much nicer than splitting by hand, and is more readable as well.
2016-07-22 01:44:45 +01:00
2016-07-16 12:33:50 +01:00
Description
No description provided
1.7 MiB
Languages
Go 84.1%
Shell 11.1%
Python 2.8%
Dockerfile 1%
CSS 0.7%
Other 0.3%