El d�a Wednesday, July 13, 2016 a las 04:20:02AM -0700, David Champion escribi�:
> * On 13 Jul 2016, Matthias Apitz wrote:
> >
> > Hi,
> >
> > Is there some function in mutt's source which validates e-mail addrs?
> > Thanks
>
> Validates in what sense?
>
> There are parse_address and (more broadly) rfc822_parse_adrlist, which
> will reject or complete certain kinds of malformations based on RFC
> (822, 2822, 5322, etc). But RFC 5322 et al. are the only things mutt
> cares about, address-wise. Nothing in mutt tries to anticipate what
> kind of junk ICANN is sunrising next month, or what ISO CC split from
> another ISO CC last year, or whether a given RHS is a valid DNS name or
> has an A/CNAME/MX record, etc. In short, mutt never makes any effort to
> see that an address is deliverable; only that it conforms the address
> format specification.
> ...
I have had a look into mutt-1.6.0/rfc822.c ... there is a
#ifdef TESTING
which let you compile a main a.out for testing; if you set this
definement, it does not compile:
cc -I/usr/local/include -DPKGDATADIR=\"/usr/local/share/mutt\"
-DSYSCONFDIR=\"/usr/local/etc\" -DBINDIR=\"/usr/local/bin\"
-DMUTTLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H=1 -I. -I.
-I. -I./imap -Iintl -I/usr/include -I/usr/local/include
-I/usr/local/include/db5 -I/usr/local/include -I./intl -O2 -pipe
-fstack-protector -fno-strict-aliasing -DTESTING -MT rfc822.o -MD -MP
-MF .deps/rfc822.Tpo -c -o rfc822.o rfc822.c
...
In file included from rfc822.c:38:
./mutt_idna.h:51:25: error: unknown type name 'ENVELOPE'
void mutt_env_to_local (ENVELOPE *);
^
./mutt_idna.h:52:23: error: unknown type name 'ENVELOPE'
int mutt_env_to_intl (ENVELOPE *, char **, char **);
...
rfc822.c:895:5: error: conflicting types for 'safe_free'
int safe_free (void **p) /* __SAFE_FREE_CHECKED__ */
^
./lib.h:222:6: note: previous declaration is here
void safe_free (void *);
^
rfc822.c:913:48: error: too few arguments to function call, expected 4,
have 3
rfc822_write_address (buf, sizeof (buf), list);
~~~~~~~~~~~~~~~~~~~~ ^
rfc822.c:738:1: note: 'rfc822_write_address' declared here
int rfc822_write_address (char *buf, size_t buflen, ADDRESS *addr, int
display)
^
3 warnings and 4 errors generated.
*** Error code 1
--
Matthias Apitz | /"\ ASCII Ribbon Campaign:
E-mail: [email protected] | \ / - No HTML/RTF in E-mail
WWW: http://www.unixarea.de/ | X - No proprietary attachments
phone: +49-176-38902045 | / \ - Respect for open standards
| en.wikipedia.org/wiki/ASCII_Ribbon_Campaign