X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?p=lambdamail.git;a=blobdiff_plain;f=lambdamail.scm;h=9bc71978f250939d4f9c0f03bbacb48dd82f9a33;hp=90c186f8e3afbe8b58cb4cff6f2face02fd59f92;hb=461a9b6eb88c9ec7e4b5c978f8bd59c47d4584ee;hpb=68469a9c497a0a6f2b1c4715c26d0d6665f60391 diff --git a/lambdamail.scm b/lambdamail.scm index 90c186f..9bc7197 100644 --- a/lambdamail.scm +++ b/lambdamail.scm @@ -140,9 +140,9 @@ ((smtp-command? "data" line) (smtp-session 'send "354 intermediate") (let text-loop ((text (conc "Received: from " (smtp-session 'helo) "\n" - " by " (config-host config) "\n" - " for " (message-from msg) - "; " (time-stamp) "\n"))) + "\tby " (config-host config) "\n" + "\tfor " (message-to msg) ";\n" + "\t" (time-stamp) "\n"))) (let ((text-line (smtp-session 'get-line))) (if (string=? "." text-line) (message-text-set! msg text) @@ -158,14 +158,15 @@ (loop msg received-messages)) (else (smtp-session 'send "502 command not implemented") - (loop msg received-messages))))))) + (loop msg received-messages)))))) + '()) ;;; Sending/Delivering messages ;; (define (deliver-messages config messages) - (print "**** Attempting delivery of " (length messages) " mail items.") + (print "*** Attempting delivery of " (length messages) " mail items.") (filter (lambda (msg) (not (deliver-message msg config))) messages)) @@ -198,6 +199,7 @@ (print-error-message o) #t))) + ;; Local delivery (define (get-local-addresses config) @@ -220,6 +222,7 @@ (print "* MESSAGE DELIVERED (local)") #t) + ;; Remote delivery (define (get-domain-from-email email-string) @@ -283,6 +286,7 @@ '(("\n" . "\r\n"))))) (write-string processed-string #f tcp-out))))) + ;;; Command line argument parsing ;;