change from domain so email notifications pass through relay after successful upload
This commit is contained in:
@@ -30,7 +30,7 @@ Upload-File -Path 'C:\ProgramData\Emberkom\Output\report.zip'
|
||||
|
||||
`Get-DSAManifest.ps1` uploads its completed CSV or ZIP when `$Upload` is enabled. If `$DeleteAfterUpload` is also enabled, it deletes that same local file only after a confirmed successful upload. Disabled or failed uploads retain the file. `$Zip`, `$Upload`, and `$DeleteAfterUpload` all accept `true`, `$true`, `yes`, `y`, or `1`; `false`, `$false`, `no`, `n`, `0`, or an empty value disable the option. Casing and surrounding whitespace are ignored. The notification subject identifies the computer, and its message includes the source path and collection start time (local time with UTC offset).
|
||||
|
||||
The default destination is `https://xfer.emberkom.com/filedrop/cmd`. The sender defaults to the computer's hostname plus its primary DNS suffix, followed by `@ek-upload.net` (for example, `pc01.example.com@ek-upload.net`). Without a DNS suffix, it uses the hostname. Override these with `-FileDropUrl` and `-From`; `-Subject` and `-Message` are also optional.
|
||||
The default destination is `https://xfer.emberkom.com/filedrop/cmd`. The sender defaults to the computer's hostname plus its primary DNS suffix, followed by `@emberkom.com` (for example, `pc01.example.com@emberkom.com`). Without a DNS suffix, it uses the hostname. Override these with `-FileDropUrl` and `-From`; `-Subject` and `-Message` are also optional.
|
||||
|
||||
`Upload-File` uses the [LiquidFiles FileDrop API](https://docs.liquidfiles.com/api/v4.3/filedrop/) to obtain a temporary token, upload the file, and submit the message that triggers FileDrop delivery and its configured email notification. It returns a receipt with the path, destination, sender, attachment ID, byte count, and server status. It retains the local file and throws on failure.
|
||||
|
||||
|
||||
@@ -241,7 +241,7 @@ Function Upload-File {
|
||||
Literal path of one completed file. Also accepts -File or a pipeline path.
|
||||
.PARAMETER From
|
||||
Optional sender override. Defaults to the computer's fully qualified host
|
||||
name at ek-upload.net (or its host name when no DNS suffix is configured).
|
||||
name at emberkom.com (or its host name when no DNS suffix is configured).
|
||||
.PARAMETER ChunkSizeMB
|
||||
Maximum upload buffer size in MiB; defaults to 10 regardless of file size.
|
||||
.PARAMETER TimeoutSeconds
|
||||
@@ -285,7 +285,7 @@ Function Upload-File {
|
||||
$UploadHostName = "${UploadHostName}.${UploadDnsSuffix}"
|
||||
}
|
||||
$UploadSender = $From
|
||||
If ( [string]::IsNullOrWhiteSpace($UploadSender) ) { $UploadSender = $UploadHostName.ToLowerInvariant() + '@ek-upload.net' }
|
||||
If ( [string]::IsNullOrWhiteSpace($UploadSender) ) { $UploadSender = $UploadHostName.ToLowerInvariant() + '@emberkom.com' }
|
||||
Try { $UploadSender = ([System.Net.Mail.MailAddress]::new($UploadSender)).Address }
|
||||
Catch { Throw 'From must be a valid sender email address.' }
|
||||
$UploadSubject = $Subject
|
||||
|
||||
@@ -133,7 +133,7 @@ Try {
|
||||
If ($HostInfo.DomainName -and !$ExpectedHost.EndsWith('.' + $HostInfo.DomainName, [StringComparison]::OrdinalIgnoreCase)) {
|
||||
$ExpectedHost += '.' + $HostInfo.DomainName
|
||||
}
|
||||
Assert-True ($Sent.from -eq ($ExpectedHost.ToLowerInvariant() + '@ek-upload.net')) 'Incorrect default sender.'
|
||||
Assert-True ($Sent.from -eq ($ExpectedHost.ToLowerInvariant() + '@emberkom.com')) 'Incorrect default sender.'
|
||||
If ($Mode -ne 'success') { Assert-True ($TestHandler.Attempts[1] -eq 2) 'Failed chunk was not retried.' }
|
||||
Write-Host "PASS: $Mode; exact bytes, filename, sender, metadata, receipt."
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user