Index: openacs-4/packages/acs-mail-lite/tcl/incoming-mail-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-mail-lite/tcl/Attic/incoming-mail-procs.tcl,v diff -u -N -r1.7 -r1.8 --- openacs-4/packages/acs-mail-lite/tcl/incoming-mail-procs.tcl 27 Oct 2014 16:39:42 -0000 1.7 +++ openacs-4/packages/acs-mail-lite/tcl/incoming-mail-procs.tcl 7 Aug 2017 23:47:57 -0000 1.8 @@ -19,7 +19,18 @@ } { set domain [parameter::get_from_package_key -package_key "acs-mail-lite" -parameter "BounceDomain"] if { $domain eq "" } { - regsub {http://} [ns_config [ns_driversection -driver nssock] hostname] _ domain + # + # If there is no domain configured, use the configured + # hostname as domain name + # + foreach driver {nsssl nssock} { + set driver_section [ns_driversection -driver $driver] + set configured_hostname [ns_config $driver_section hostname] + if {$configured_hostname ne ""} { + set domain $configured_hostname + break + } + } } return $domain } @@ -108,7 +119,7 @@ } #let's delete the file now - if {[catch {file delete $msg} errmsg]} { + if {[catch {file delete -- $msg} errmsg]} { ns_log Error "load_mails: unable to delete queued message $msg: $errmsg" } else { ns_log Debug "load_mails: deleted $msg" @@ -123,7 +134,7 @@ } { An email is splitted into several parts: headers, bodies and files lists and all headers directly. - The headers consists of a list with header names as keys and their correponding values. All keys are lower case. + The headers consists of a list with header names as keys and their corresponding values. All keys are lower case. The bodies consists of a list with two elements: content-type and content. The files consists of a list with three elements: content-type, filename and content. @@ -173,7 +184,7 @@ set content [read $stream] close $stream ns_log error $content - file delete $file + file delete -- $file return } @@ -284,4 +295,9 @@ } return $autoreply_p } -} \ No newline at end of file +} +# Local variables: +# mode: tcl +# tcl-indent-level: 4 +# indent-tabs-mode: nil +# End: