Re: [EXIM] Email address validation

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Nigel Metheringham
Dátum:  
Címzett: Manar Hussain
CC: exim-users
Tárgy: Re: [EXIM] Email address validation

manar@??? said:
} We've often found the email address validation you get by doing:
}     exim -bt <address>
} very useful when doing web forms and checking email addresses. So far
} we have use a perl wrapper around a call to exim to do this but of
} course it's not always possible to have access to an installed exim. 


As Andrew said, pulling out this functionality is not really possible - it
would be much better to just install exim onto that box.

However, for systems without local mail addresses, you would do better to 
just resolve the DNS for the given domain and see if there is a valid MX 
or an A record (could drop the A record checks if you are being strict).  
The great thing about perl is there are all these modules to help you with 
this sort of thing:-
  - The domain part of an address can be extracted using the Mail::Address
    module from the MailTools package
  - MX lookups can be done using the Net::DNS package


I guess a Mail::Check module building on these 2 modules would be of the
order of 30 lines of actual perl plus whatever sugar you wish to apply (ie
documentation). Why not take it up with the modules co-ordinator, and
when you have finished upload it to PAUSE/CPAN.

    Nigel.
-- 
[ Nigel.Metheringham@???   -  Systems Software Engineer ]
[ Tel : +44 113 207 6112                   Fax : +44 113 234 6065 ]
[      Real life is but a pale imitation of a Dilbert strip       ]




--
*** Exim information can be found at http://www.exim.org/ ***