From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.help Subject: Re: How do I check if the format of an email address is valid? Date: Thu, 30 Mar 2006 23:00:05 +0200 Message-ID: <442C46D5.8050603@student.lu.se> References: <442BD086.9090805@student.lu.se> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1143752439 13869 80.91.229.2 (30 Mar 2006 21:00:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 30 Mar 2006 21:00:39 +0000 (UTC) Cc: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Mar 30 23:00:35 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FP4Fi-0007g0-Ji for geh-help-gnu-emacs@m.gmane.org; Thu, 30 Mar 2006 23:00:23 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FP4Fi-0006hh-6L for geh-help-gnu-emacs@m.gmane.org; Thu, 30 Mar 2006 16:00:22 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FP4FW-0006hS-TC for help-gnu-emacs@gnu.org; Thu, 30 Mar 2006 16:00:10 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FP4FV-0006hG-20 for help-gnu-emacs@gnu.org; Thu, 30 Mar 2006 16:00:10 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FP4FU-0006hD-Vc for help-gnu-emacs@gnu.org; Thu, 30 Mar 2006 16:00:09 -0500 Original-Received: from [81.228.11.159] (helo=pne-smtpout2-sn1.fre.skanova.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FP4Hk-0006LJ-57 for help-gnu-emacs@gnu.org; Thu, 30 Mar 2006 16:02:28 -0500 Original-Received: from [192.168.123.121] (83.249.218.244) by pne-smtpout2-sn1.fre.skanova.net (7.2.070) id 43F9B8E90096AEE1; Thu, 30 Mar 2006 23:00:05 +0200 User-Agent: Thunderbird 1.5 (Windows/20051201) Original-To: Reiner Steib In-Reply-To: X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:34086 Archived-At: Reiner Steib wrote: > On Thu, Mar 30 2006, Lennart Borgman wrote: > > >> How do I do this in Elisp? >> > > How do you define a "valid email address"? > > (a) Valid according to RFC2822? > > (b) Valid in the sense of the given domain exists, can receive mail > and the localpart corresponds do a mailbox? > > (c) Something different? > > For (a), the variables `gnus-button-mid-or-mail-regexp', > `gnus-button-valid-localpart-regexp' and > `gnus-button-valid-fqdn-regexp' in `gnus-art.el' contain some related > checks. > > Bye, Reiner. > Thanks Reiner! Two small worries: - `message-valid-fqdn-regexp' (which is copied to `gnus-button-valid-local-part-regexp') has a list of TLD:s. Is this really wise? I guess there will be new TLD:s. (In fact there may already be some that are not in this list.) - It is maybe a pitty that you have to load those big modules (message and gnus) just to get the patterns. And then I can not stop myself from wondering if there really are any format of email addresses that asures that conforming addresses are actually existing email adresses ;-)