Re: [ietf-smtp] [Emailcore] Proposed ESMTP keyword RCPTLIMIT

Mike Hillyer <mike@mikehillyer.com> Tue, 20 April 2021 12:24 UTC

Return-Path: <mike@mikehillyer.com>
X-Original-To: ietf-smtp@ietfa.amsl.com
Delivered-To: ietf-smtp@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B97E13A2082 for <ietf-smtp@ietfa.amsl.com>; Tue, 20 Apr 2021 05:24:08 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level:
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=emailninjasio.onmicrosoft.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9sVpUeF4plkV for <ietf-smtp@ietfa.amsl.com>; Tue, 20 Apr 2021 05:24:04 -0700 (PDT)
Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2133.outbound.protection.outlook.com [40.107.92.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D24F63A207F for <ietf-smtp@ietf.org>; Tue, 20 Apr 2021 05:24:03 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BXuLyx+/64t4m0qCf73WTfZL37PBHWy2MIaVekb+JTHzlviDJPdqYjRCzUJj1kPA43X4UAuYf6nXXm+GWGYTCqE5ZzOWLDeFnOhJrW8YmHIu3rYtl3RwJ1tfrWGzcMsCKAprkeQGjpFqgJ7ERuQiG8VetrwKUg7RJUHqI1V4zW6GxOwjCWENnSvK94YkgbAxcMgm1bNhZDpRDFJ0pymcfbQo/jmk/Z/M0YZmVmtbx1cDVfIQa5Bjsujw7zqoE6XhTlHg25XXpQ7ZmjnS3w3aU7kC7vOkIJniNgGblG8W8mFNLfF4deDDIK3u5r3dCO7RySNnrTqH2Z8UrUKzAaOeQQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HwLZJi+f3WCbG7Udx0zOm22zGV94iZcHcF23a+9gf0M=; b=lqv/GpPA8avEck0o0/LYmoTXHXFpcvR27Ai+SaJ7zmnPkFWahmTHtzME/jtCjiakzk8h6ja8zbG3bGdiuIRef/sf+U1aI+U8aqOplU9cpQfyWFgQ38KEnXfnfc7ynlyxpl9lLSuIDdsKckDqgYY8FItPLQNcb5JttPN9krXAvYj0RZlwcJ8irBu/PeRStEF6epo0uZAnVlsd236cH+Xfwa3+if6ANC2qoYHR++noXRneLRYdAxx5f+uhDb1SlLCDoz5MAshoH09hZzzH1KrcD7jb5iF7yFQcvjGY5mNJqjjAnWcKTjBzT+hjK6ma/UFFt8Yd8oKbE0drdE4WtFgbGw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mikehillyer.com; dmarc=pass action=none header.from=mikehillyer.com; dkim=pass header.d=mikehillyer.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emailninjasio.onmicrosoft.com; s=selector2-emailninjasio-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HwLZJi+f3WCbG7Udx0zOm22zGV94iZcHcF23a+9gf0M=; b=bctzIqIr7XuMMv809e7Aoh7ZblhPeX4ib5jAdAbaRlEowyH8iALS9SfwRP9d7ylfduDN3GjO55k2ENfetVJstmhAxT9YUcWPveaP6ucp51YgC8THRXWiH+5XMfWQasbTb7wbtlgkhP4FT2DqzU7B2eGp0Zxk866421zNG1pKW+E=
Received: from BN6PR22MB0226.namprd22.prod.outlook.com (2603:10b6:404:2d::12) by BN6PR2201MB1539.namprd22.prod.outlook.com (2603:10b6:405:34::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.16; Tue, 20 Apr 2021 12:24:00 +0000
Received: from BN6PR22MB0226.namprd22.prod.outlook.com ([fe80::e846:fe9a:6d3c:1da6]) by BN6PR22MB0226.namprd22.prod.outlook.com ([fe80::e846:fe9a:6d3c:1da6%7]) with mapi id 15.20.4042.024; Tue, 20 Apr 2021 12:24:00 +0000
From: Mike Hillyer <mike@mikehillyer.com>
To: Ned Freed <ned.freed@mrochek.com>, John R Levine <johnl@taugh.com>
CC: "ietf-smtp@ietf.org" <ietf-smtp@ietf.org>
Thread-Topic: [ietf-smtp] [Emailcore] Proposed ESMTP keyword RCPTLIMIT
Thread-Index: AQHXNXRtPd8+H/ijekSmSm6cvswntaq9VJ4Q
Date: Tue, 20 Apr 2021 12:24:00 +0000
Message-ID: <BN6PR22MB022669CD015B89D47AA063F3DA489@BN6PR22MB0226.namprd22.prod.outlook.com>
References: <cone.1615844513.220592.51342.1004@monster.email-scan.com> <20210315234648.563C0708B340@ary.qy> <CAO=DXp-+fJwsNegzu3zgwDLtCcSF104AUF=i+_GMgSYVBAKjWg@mail.gmail.com> <01RY24IJ225Q0085YQ@mauve.mrochek.com> <4fe09f20-66ee-b3c-94bb-be654b8354bc@taugh.com> <01RY292U84V40085YQ@mauve.mrochek.com>
In-Reply-To: <01RY292U84V40085YQ@mauve.mrochek.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: mrochek.com; dkim=none (message not signed) header.d=none;mrochek.com; dmarc=none action=none header.from=mikehillyer.com;
x-originating-ip: [193.56.116.135]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: bcc37f9d-97d4-4f27-f3e7-08d903f72da2
x-ms-traffictypediagnostic: BN6PR2201MB1539:
x-microsoft-antispam-prvs: <BN6PR2201MB1539E8AA35893217B66A0EF8DA489@BN6PR2201MB1539.namprd22.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:8882;
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: eiLZiDAdmjjvTrmfr2Yl3cP9KWVohhOCLcfa7WlNjYxBEBz/qtdhZrRAT8Q2JY5ZLixk7mm9dzULOI/YLR9UZPdYHHP+i7HO2xyC9pQw8XmDSUG38GSxk/a0/psSXNvIbSvhcteGQNlp29hd66sMFIuQ/baJtU26d8nfGAOml/LTQGL5SgpaHeRYjBoJNNyvglWmr7dYhn2EaPctrXUUKdQkUPk57QEZNRWHuqkM2JKiL9/7x/5oYjRnEqt5Bv0uozkuNwnTEsnGcw4celWk0PlFDyB8IM3A5I8W1ZjPHglZw5NJR5zQ+a8r8EKJBdK0njPBR2pWd+6fBVG8CTDSAOLSr/BBZkvi2o51gOQ7iDDzzhLpOrj5LLtpgL9Yr7GA0n064pEtyG6TeN+rswroxCvq6jgyYhjTAnM8AmpgUkc4RXrznTEyEoL2Y+d9FtMP0TUzdrQ2didQSZvYYg53guql29VrzJh1Ea8SJFN5HKqR3164PXvcE98kVfebnkxwVZsbJF3vslO2Ci1EULcMQgoBgjhQjdoX4Sf1yF6PyH+9Lys/aqsvr48AshE3a5ziK9cLKWL4HHbGMlSdQvRmSMe8s1lFWeP1vC8fR/V85eOS21YWCq6usCvRl/GabqzR8lGyrag5a5bvo5RcntD/S3agTzxVW8ay8SIpioUlsPHdHEN7C//aqmjCwGuvDY49
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN6PR22MB0226.namprd22.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39830400003)(346002)(366004)(376002)(396003)(136003)(9686003)(55016002)(316002)(122000001)(66556008)(52536014)(5660300002)(71200400001)(83380400001)(33656002)(86362001)(2906002)(110136005)(66946007)(8936002)(8676002)(478600001)(38100700002)(966005)(26005)(76116006)(4326008)(186003)(7696005)(6506007)(53546011)(66446008)(64756008)(66476007); DIR:OUT; SFP:1102;
x-ms-exchange-antispam-messagedata: =?us-ascii?Q?MKJhrkjK4sfOUg1z/8RAz9u+WDii/x49oNfEtuAelxAvbHaBRgBpGdz2gpc5?= =?us-ascii?Q?3vUwukdkjV/YXhyCfmjQvWfYdfiV7dHICCEcFl57o77FG4tCBQ10zrdkyj/z?= =?us-ascii?Q?2W2LbMPgOMwKExc/x/Z/XmJbQjN3rExcWpthxlp58o1ygOwBiwXjJPPVjGgv?= =?us-ascii?Q?eoMBGA/nKhODbY0M/j/ZEyoyeHrV4jTBF7uwqJ9qsvHzn0i18K8NpKNfZK5n?= =?us-ascii?Q?gbT2vCZwXErEYSevjdVFVGfevguDudoaZhSR8NbFrYuMIBzPVjg9wjOpqmUm?= =?us-ascii?Q?Z/7Ju9Oq6BqPDWovMuEvroBU9QVgrLUirxqwxQoLjLA09/ORo35RENKXhle6?= =?us-ascii?Q?sds8F9Nk4POy2aYq39lCRZbbSFMIO1XuIBSYlZgMMUgRJB10acQNoweWqzlr?= =?us-ascii?Q?jUwqKXwXnuKA4oOjn8Y/nvFzlbmmLQwh2FGW4kZGyXKO448fklm2aoO6s+mW?= =?us-ascii?Q?UQmxzXiuRiyfAcxsLKOEt8YwH/z2cdCKK6LQB5aMRK9DWejyxkLSim/Ry4vp?= =?us-ascii?Q?C6/Qe87wE60tjbt5SICF9MRefGqfpSyrT593y8NtMYZZd9Zm8iiEE86yft3h?= =?us-ascii?Q?5FJpHtmDwOp58bmul0hgr26rcYTWPVdzTfSyjsRiRoDo+IhqwIs+Y/npAFHh?= =?us-ascii?Q?nrYEY1/TLeTSYJp8zdYJENLDzxqBqXuQG7x2MKWamU986aGlFShXP0G1h5DD?= =?us-ascii?Q?lQMwHWt/k9gqqAY2mao29LcVtWMezKzV+chuZymqXAu/yUNx4E59TO5cBerP?= =?us-ascii?Q?JFnuMIUo1SWWqEjFJJNAw9+xMTEdCKmMGIC4sLW+481Wp/FIwjQUCBpYaMB6?= =?us-ascii?Q?0BRY5VXozZKxsu7SdSVLNqSPo0luTs+fDVf7z7r/5ayA91UT/60NOGBj6qLM?= =?us-ascii?Q?HFAVregX3r3xj6xgje/Ix8vVaxB+lApB428/VP+SmhKaXXYkBiRGHThB3w8E?= =?us-ascii?Q?XdM/aKD5ivzrBOiYN/eg/K94+XcqLd+xoWtuzTTTqdG14wZ97xZi5gMcODjF?= =?us-ascii?Q?1G4rsEWNHW07BJlogoiOypy+ZMBDcjt76EDYRqx903gl+U+Wz7FDMpj417b+?= =?us-ascii?Q?vssVxQAuH0B7867jKRom0FRFGJDVm+FSVAHiWfQsJ0kBnjjaA2TPnslz1Csd?= =?us-ascii?Q?6z7O/xpimYaUgQj2us08YXZu066ruSxyQfBczjHoNG/FP6uTSkzCP40Np5iO?= =?us-ascii?Q?aRKDWdX9Xbxu7vF44xVeBxo+UFULHFWLQALQY+O27tGpagmyFArMIwfIi/Ci?= =?us-ascii?Q?Kp30EXhClfu2LE3XYUArDHgJLaLEITa9KV5de1v0d0dYnMIzRJbd8qcQXhQG?= =?us-ascii?Q?ynp0V/ELdIPuOM9pBRhDhTeh?=
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: mikehillyer.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: BN6PR22MB0226.namprd22.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: bcc37f9d-97d4-4f27-f3e7-08d903f72da2
X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Apr 2021 12:24:00.5555 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 35994d56-c4e1-4ceb-92c2-6ed5f31967ae
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: cE6f4GMekUvElXz/Ac1k2eVf/pATNvnZ8fC3ogZ3mkvhfgxbzZzYfKiwuqTgCiBeROIvbtzpYazdNeQgpO3K5w==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR2201MB1539
Archived-At: <https://mailarchive.ietf.org/arch/msg/ietf-smtp/N44NOIn-F0xqLvGmrqFigBeXYL4>
Subject: Re: [ietf-smtp] [Emailcore] Proposed ESMTP keyword RCPTLIMIT
X-BeenThere: ietf-smtp@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Discussion of issues related to Simple Mail Transfer Protocol \(SMTP\) \[RFC 821, RFC 2821, RFC 5321\]" <ietf-smtp.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ietf-smtp>, <mailto:ietf-smtp-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ietf-smtp/>
List-Post: <mailto:ietf-smtp@ietf.org>
List-Help: <mailto:ietf-smtp-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ietf-smtp>, <mailto:ietf-smtp-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 20 Apr 2021 12:24:09 -0000

Generally speaking when I advise senders on their rate limits, I have them use the smallest denominator possible, because most commercial MTAs will take a per-hour rate limit and implement it as "send the hour's allotment in a single burst and then wait 59 minutes", which I don't think most receivers want, so I advise setting a per second limit when possible. One message per second is better than 3600 messages per hour if it means a 3600 message burst and then a long wait.

Mike

-----Original Message-----
From: ietf-smtp <ietf-smtp-bounces@ietf.org> On Behalf Of Ned Freed
Sent: Monday, April 19, 2021 7:34 PM
To: John R Levine <johnl@taugh.com>
Cc: Ned Freed <ned.freed@mrochek.com>om>; ietf-smtp@ietf.org
Subject: Re: [ietf-smtp] [Emailcore] Proposed ESMTP keyword RCPTLIMIT

> On Mon, 19 Apr 2021, Ned Freed wrote:
> > I'm especially interested in people's thoughts on rate limits. The 
> > problem I have with rate limits is, well, how to express them. ...

> A little surveying might be in order.

> I see that Postfix lets you set both the numerator and denominator of 
> the rate limit, but the denominator defaults to a minute.  It has 
> separate rate limits for connections and messages.

> Exim also lets you set both, the examples use an hour.  The 
> documentation says that if you use a large interval that lets people send bursts.

Sounds familiar. Oracle Messaging Server lets you set both; the denominator default is one hour. 

We store the limits in memcache or Redis so they can apply across mutiple MTAs.
The usual limit is per-IP, but we support per-host and per-domain as well.

The demoninator in PowerMTA is a string rather than a number, possible values are sec, s, min, m, hr, or h. It supports per-IP and per-host and probably other stuff; my familiarity here is limited.

I assume the Exim and Postfix limits are per-host, which in most cases translates to per-IP.

I have to say there's more consistency here than I expected.

				Ned

_______________________________________________
ietf-smtp mailing list
ietf-smtp@ietf.org
https://www.ietf.org/mailman/listinfo/ietf-smtp