X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=smtp.lisp;h=d639abbcb02f287296ed0fa0476702e4c0db277b;hb=7eded1aff6a3e38b36308fe2a223964a9fb42ea0;hp=0b374b1d9ff1529a8c3e77bb85155c8714c0d82c;hpb=81acb4be0ab6aee57b87b724817729cd6394bc52;p=postoffice.git diff --git a/smtp.lisp b/smtp.lisp index 0b374b1..d639abb 100644 --- a/smtp.lisp +++ b/smtp.lisp @@ -23,7 +23,7 @@ ;; Suite 330, Boston, MA 02111-1307 USA ;; ;; -;; $Id: smtp.lisp,v 1.2 2002/10/09 23:28:41 kevin Exp $ +;; $Id$ ;; Description: ;; send mail to an smtp server. See rfc821 for the spec. @@ -251,9 +251,9 @@ (if* (null ipaddr) then (error "Can't determine ip addres for mail server ~s" server)) - (setq sock (make-socket :remote-host ipaddr - :remote-port 25 ; smtp - )) + (setq sock (make-socket :remote-host #+allegro ipaddr #-allegro server + :remote-port 25 ; smtp + )) (unwind-protect (progn (response-case (sock msg) @@ -463,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)) + )) + )