{"thread":{"id":"48803","subject":"send-email: change the default value of sendmail.validate","startedAt":"2018-06-29T19:17:17Z","lastAt":"2018-07-02T02:05:15Z","messageCount":5,"participants":["Drew DeVault","brian m. carlson"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"351370","messageId":"20180629190751.GA2559@miku","threadId":"48803","inReplyTo":null,"subject":"send-email: change the default value of sendmail.validate","fromName":"Drew DeVault","fromEmail":"sir@cmpwn.com","sentAt":"2018-06-29T19:07:51Z","receivedAt":"2018-06-29T19:17:17Z","isPatch":false,"sender":{"key":"sir@cmpwn.com","avatar":"https://avatars.githubusercontent.com/u/1310872?v=4"},"body":"The purpose of this configuration option is to prevent your emails from\nblowing up on SMTP servers (rather than Extended SMTP servers). However,\nI find it often confuses people whose patches are otherwise correct, and\nthey don't know how to solve the issue.\n\nI haven't seen an SMTP server in a very long time which doesn't support\nextended SMTP. The default behavior should probably change. If not, the\nerror message should be more clear about action items to address the\nissue.\n\nI'll send a patch around to change this shortly.\n\n--\nDrew DeVault\n"},{"id":"351479","messageId":"20180701181546.GD7965@genre.crustytoothpaste.net","threadId":"48803","inReplyTo":"20180629190751.GA2559@miku","subject":"Re: send-email: change the default value of sendmail.validate","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2018-07-01T18:15:46Z","receivedAt":"2018-07-01T18:15:59Z","isPatch":false,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"On Fri, Jun 29, 2018 at 03:07:51PM -0400, Drew DeVault wrote:\n> The purpose of this configuration option is to prevent your emails from\n> blowing up on SMTP servers (rather than Extended SMTP servers). However,\n> I find it often confuses people whose patches are otherwise correct, and\n> they don't know how to solve the issue.\n> \n> I haven't seen an SMTP server in a very long time which doesn't support\n> extended SMTP. The default behavior should probably change. If not, the\n> error message should be more clear about action items to address the\n> issue.\n> \n> I'll send a patch around to change this shortly.\n\nCan you say a bit more about the exact error message you're seeing?\n\nAre you suggesting that we not limit lines to 998 octets?  I've seen\nlots of mail servers that do reject mail over 998 octets.  I've\nconfigured Postfix to do so because being strict on mail standards is a\ngreat way to stop spam.\n\nIf that's the issue you're seeing, it might be better to either\nautomatically encode those patches as binary patches or teach git\nsend-email and git am how to automatically handle quoted-printable.\n-- \nbrian m. carlson: Houston, Texas, US\nOpenPGP: https://keybase.io/bk2204\n"},{"id":"351481","messageId":"20180702001753.GA30086@homura.localdomain","threadId":"48803","inReplyTo":"20180701181546.GD7965@genre.crustytoothpaste.net","subject":"Re: send-email: change the default value of sendmail.validate","fromName":"Drew DeVault","fromEmail":"sir@cmpwn.com","sentAt":"2018-07-02T00:17:53Z","receivedAt":"2018-07-02T00:17:59Z","isPatch":false,"sender":{"key":"sir@cmpwn.com","avatar":"https://avatars.githubusercontent.com/u/1310872?v=4"},"body":"On 2018-07-01  6:15 PM, brian m. carlson wrote:\n> Can you say a bit more about the exact error message you're seeing?\n\n\"patch contains a line longer than 998 characters\"\n\nA recent occasion when this came up was when someone attempted to send\nme a patch which included a base64-encoded data URI, which cannot be\nwrapped.\n\n> Are you suggesting that we not limit lines to 998 octets?  I've seen\n> lots of mail servers that do reject mail over 998 octets.  I've\n> configured Postfix to do so because being strict on mail standards is a\n> great way to stop spam.\n\nYes, that's what I'm suggesting. We should error out later when the SMTP\nserver rejects the mail.\n\nAlso, Extended SMTP is a standard. RFC 1869.\n\n> If that's the issue you're seeing, it might be better to either\n> automatically encode those patches as binary patches or teach git\n> send-email and git am how to automatically handle quoted-printable.\n\nI'm really not fond of quoted-printable. Extended SMTP has been\nstandardized for over 20 years. Assuming people don't blithly disable it\non their servers, we can expect it to be present on almost all mail\nservers.\n\nI don't think I've ever seen a spam email that would have been stopped\nbecause it contained 998 lines. Approaches like SpamAssassin,\ngreylisting, DNSBLs, SPF/DKIM, these are much more effective.\n"},{"id":"351508","messageId":"20180702015216.GA627376@genre.crustytoothpaste.net","threadId":"48803","inReplyTo":"20180702001753.GA30086@homura.localdomain","subject":"Re: send-email: change the default value of sendmail.validate","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2018-07-02T01:52:16Z","receivedAt":"2018-07-02T01:52:29Z","isPatch":false,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"On Sun, Jul 01, 2018 at 08:17:53PM -0400, Drew DeVault wrote:\n> On 2018-07-01  6:15 PM, brian m. carlson wrote:\n> > Are you suggesting that we not limit lines to 998 octets?  I've seen\n> > lots of mail servers that do reject mail over 998 octets.  I've\n> > configured Postfix to do so because being strict on mail standards is a\n> > great way to stop spam.\n> \n> Yes, that's what I'm suggesting. We should error out later when the SMTP\n> server rejects the mail.\n\nI don't think it's a good idea to continue when we know we're going to\nsend invalid data.  If you really want to send the email and you know\nit's safe in your environment, use --no-validate.\n\n> Also, Extended SMTP is a standard. RFC 1869.\n\nESMTP doesn't lift the 998-octet limit.  RFC 5321 specifies ESMTP and is\nsilent about line length.  RFC 5322, which defines the email message\nformat, limits lines in an email message to 998 octets.  The limit is in\nthe email format, rather than the ESMTP protocol.\n\n> > If that's the issue you're seeing, it might be better to either\n> > automatically encode those patches as binary patches or teach git\n> > send-email and git am how to automatically handle quoted-printable.\n> \n> I'm really not fond of quoted-printable. Extended SMTP has been\n> standardized for over 20 years. Assuming people don't blithly disable it\n> on their servers, we can expect it to be present on almost all mail\n> servers.\n\nI'm not bothered if we don't support pre-ESMTP servers.  I do care\nwhether we produce properly formatted email messages.  Long lines\nrequire wrapping, and that means either base64 or quoted-printable.  For\nplain text data, quoted-printable is less likely to be filtered as spam\nthan base64.  It's also easier to read with plain text tools such as\nless.\n\nI'd be willing to implement quoted-printable formatting at some point if\nthat's the direction we want to go.\n\n> I don't think I've ever seen a spam email that would have been stopped\n> because it contained 998 lines. Approaches like SpamAssassin,\n> greylisting, DNSBLs, SPF/DKIM, these are much more effective.\n\nIt is actually extremely effective.  Most spam-ware produces invalid\nmessages, and IME almost all malformed messages are spam.  I use a\nvariety of techniques, including this one and most of the others you've\nmentioned.  Other people do so as well.\n\nRegardless, a default mail server configuration on Debian rejects overly\nlong lines, and there are various other systems that do so as well, so\n\"just send it\" isn't a viable solution.  Fixing Git so it produces valid\ndata in this case seems more robust.\n-- \nbrian m. carlson: Houston, Texas, US\nOpenPGP: https://keybase.io/bk2204\n"},{"id":"351509","messageId":"20180702020507.GA15354@homura.localdomain","threadId":"48803","inReplyTo":"20180702015216.GA627376@genre.crustytoothpaste.net","subject":"Re: send-email: change the default value of sendmail.validate","fromName":"Drew DeVault","fromEmail":"sir@cmpwn.com","sentAt":"2018-07-02T02:05:08Z","receivedAt":"2018-07-02T02:05:15Z","isPatch":false,"sender":{"key":"sir@cmpwn.com","avatar":"https://avatars.githubusercontent.com/u/1310872?v=4"},"body":"I seem to be mistaken about the degree to which this is standardized and\nsupported. The Debian argument cinches it for me. Quoted printable is\nprobably the right way to go, then.\n"}]}