X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=smtp.lisp;h=458ca2743d79f11a4a5744aed50cd49b68f8e946;hb=7c64c46ac800ace1998a50736e6e4e2f01e07678;hp=31a53c5f31091b997b3ca0c12cd9a8742a9b7c9a;hpb=3982daabce7eab2cac2fad524e3bae9c3fec3fef;p=postoffice.git diff --git a/smtp.lisp b/smtp.lisp index 31a53c5..458ca27 100644 --- a/smtp.lisp +++ b/smtp.lisp @@ -23,7 +23,7 @@ ;; Suite 330, Boston, MA 02111-1307 USA ;; ;; -;; $Id: smtp.lisp,v 1.1 2002/10/09 14:26:11 kevin Exp $ +;; $Id: smtp.lisp,v 1.3 2002/10/16 01:35:48 kevin Exp $ ;; Description: ;; send mail to an smtp server. See rfc821 for the spec. @@ -36,15 +36,6 @@ -(defpackage :net.post-office - (:use #:lisp #:excl - #+allegro #:socket - #-allegro #:acl-socket) - (:export - #:send-letter - #:send-smtp - #:test-email-address)) - (in-package :net.post-office) @@ -472,17 +463,19 @@ (dotted-to-ipaddr name :errorp nil))) then ipaddr else ; do mx lookup if acldns is being used -#| - (if* (or (eq *dns-mode* :acldns) - (member :acldns *dns-mode* :test #'eq)) - then (let ((res (dns-query name :type :mx))) - (if* (and res (consp res)) - then (cadr res) ; the ip address - else (dns-query name :type :a))) - else ; just do a hostname lookup -|# - (ignore-errors (lookup-hostname name))))) -;; ) + #+allegro + (if* (or (eq *dns-mode* :acldns) + (member :acldns *dns-mode* :test #'eq)) + then (let ((res (dns-query name :type :mx))) + (if* (and res (consp res)) + then (cadr res) ; the ip address + else (dns-query name :type :a))) + else ; just do a hostname lookup + (ignore-errors (lookup-hostname name))) + #-allegro + (ignore-errors (lookup-hostname name)) + )) + )