Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.albasani.net!weretis.net!feeder4.news.weretis.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.013 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'scripts': 0.03; 'instance.': 0.09; 'rejected': 0.09; 'spec': 0.09; 'cc:addr :python-list': 0.11; 'bug': 0.12; 'assume': 0.14; "'e',": 0.16; 'excluded': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'rejection': 0.16; 'those,': 0.16; 'vary.': 0.16; 'wrote:': 0.18; 'server,': 0.19; 'thu,': 0.19; 'shell': 0.22; 'cc:addr:python.org': 0.22; 'subject:problem': 0.24; 'fairly': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'michael': 0.29; 'am,': 0.29; 'dec': 0.30; 'message-id:@mail.gmail.com': 0.30; 'lists': 0.32; 'says': 0.33; 'could': 0.34; 'subject:with': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'really': 0.36; 'smtp': 0.36; 'should': 0.36; 'server': 0.38; 'subject:emails': 0.60; 'black': 0.61; 'more': 0.64; 'worth': 0.66; 'compliant': 0.68; 'special': 0.74; 'harm.': 0.84; 'legit.': 0.84; 'risks.': 0.84; 'subject:skip:S 20': 0.91; 'to:none': 0.92 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type:content-transfer-encoding; bh=cDRyeoQ33ZRLrh5rlMupmNmObpW5VQQBQU/EpFG8/cc=; b=N4lmv7Su2wfuosRwL6c1yP14B8+ssNViQtbX0Gnzb7OlHdhUSi2ouOXwA/VDNn15kT hwdNd4g5MwMk3rR0KWnMxAZD2WOylVCNkZosQmb8eYJSPS9Sx++u9gg6DE6W+D8aoTLV 4/sNe76GHj8ylRGMWwNuoQpVkzTFonSRwoN/8GfsEVX87DkHsxUXk/49cO7hHra1SjWx dXNI/lSbeHV2vCg8u/b8pGRH6Tma+xiFyslF0CK4s16I6i+0Z89elD7yCizsn+E7fKMq QyMd/+9TcwX4MARbwgXYiZibOK+0u+4Cb6Kcm7OCA/WUk0dpHROwToMJOitVwrC4BsOT XVhA== MIME-Version: 1.0 X-Received: by 10.50.33.51 with SMTP id o19mr10601033igi.34.1418853650231; Wed, 17 Dec 2014 14:00:50 -0800 (PST) In-Reply-To: References: <2ca6ae04-fd8f-4370-96b9-5af04072e102@googlegroups.com> Date: Thu, 18 Dec 2014 09:00:50 +1100 Subject: Re: smptplib problem SMTPRecipientsRefused for emails with ! exclamation mark in local portion of email From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 23 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1418853653 news.xs4all.nl 2836 [2001:888:2000:d::a6]:39363 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:82618 On Thu, Dec 18, 2014 at 7:59 AM, Michael Str=C3=B6der wrote: > You should really think about why these chars were excluded in the > configuration: The reason is that those they are special in shells. > > And many SMTP deployments have pretty naive (shell) scripts or software w= ith > shell exits. So allowing those chars can cause more or less big security > risks. For this reason it's likely that you will end in spam filters / bl= ack > lists etc. because systems may assume you want to do some harm. > > So I would really rethink the requirements. > > Your mileage may vary. But you have been warned. It's worth noting that the SMTP spec never says that every server must accept all characters. I could create a perfectly compliant mail server in which recipient names may not include the letter 'e', for instance. It would be a bug if smtplib rejected those, but since the rejection is coming from the server, that's fairly legit. ChrisA