--- a/pkg_upload.cygpart 2019-03-04 19:28:36.593859100 -0700 +++ b/pkg_upload.cygpart 2020-10-24 17:11:34.699008700 -0600 @@ -2,8 +2,8 @@ # # pkg_upload.cygpart - cygport package uploading functions # -# Copyright (C) 2014-2019 Yaakov Selkowitz, Andrew Schulman -# Provided by the Cygwin Ports project +# Copyright (C) 2014-2020 Cygport authors +# Provided by the Cygwin project # # cygport is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -81,7 +81,7 @@ __pkg_upload() { # Check that binary and source package files exist - pkg_files=("${NAME}/${NAME}-${PVR}-src.tar.xz" "${NAME}/${NAME}-${PVR}.hint") + pkg_files=("${NAME}/${NAME}-${PVR}-src.tar.xz" "${NAME}/${NAME}-${PVR}-src.hint") while (( n < pkg_count )) do @@ -202,6 +202,7 @@ _EOF use strict; use MIME::Parser; use Net::SMTP; +use Net::Domain qw(hostdomain); my \$smtp_server = "${SMTP_SERVER:-localhost}"; my \$smtp_encryption = "${SMTP_ENCRYPTION:-none}"; @@ -214,10 +215,13 @@ my \$entity = \$parser->parse_open("$msg print "Sending announcement of ${NAME}-${PVR} via \$smtp_server\n"; +my \$hello = hostdomain(); +\$hello = \$1 if (\$entity->head->get('From') =~ m/]+@([^>]+)>?/); my \$smtp = new Net::SMTP(\$smtp_server, ${SMTP_SERVER_PORT+Port => ${SMTP_SERVER_PORT},} + Hello => \$hello, SSL => \$smtp_encryption eq 'ssl') - or die "No mailserver at ".\$smtp_server; + or die "No mailserver at ".\$smtp_server.":".\$@; if (\$smtp_encryption eq 'tls') { require Net::SMTP::SSL; \$smtp->command('STARTTLS');