Posts Tagged ‘smtp’

Indicates whether to use a secure connection (SSL or TLS). If SSL or TLS is selected, the server’s certificate or its authority must be in protectedstore/trusted.jks.
 
Error while sending
 
javax.mail.MessagingException: Could not convert socket to TLS; nested exception is: javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
 
Solution ( Change to your Java version on PC ) 

C:\BizLink\app\protectedstore>”C:\Program Files\Java\jre1.8.0_241\bin\keytool.exe” -importkeystore -srckeystore “C:\Program Files\Java\jre1.8.0_241\lib\security\cacerts” -destkeystore trusted.jks
Importing keystore C:\Program Files\Java\jre1.8.0_241\lib\security\cacerts to trusted.jks…

“By default, the password for the GlassFish truststore is already specified. The password is changeit .”


Enter destination keystore password:
Enter source keystore password:
Entry for alias verisignclass2g2ca [jdk] successfully imported.

After you will need to restart OpenText BizManager BizLink Msgsrv and OpenText BizManager BizLink Configuration Services

GD Star Rating
loading...
GD Star Rating
loading...

#Unlock diag user and set password

NETAPP::> security login unlock -username diag

NETAPP::> security login password -username diag

Go into Privileged Mode

NETAPP::> set -privilege advanced

Change to Diag User

NETAPP::> set diag

NETAPP::> systemshell local

 

Once here you can telnet like normal

NETAPP%>telnet mail.domain.com 25

to Break out 

CTRL C and CTRL D 

Relock Diag Account

NETAPP::> security login unlock -username diag

GD Star Rating
loading...
GD Star Rating
loading...

You can send emails via Mimecast instead of 365 , so you don’t need a licensed 365 user.

Login and enable SMTP Email submissions for that user

Use the users Cloud password and email address for Auth

$creds = get-credential

Send-MailMessage -From [email protected] -To [email protected] -Subject "Test Email" -Body "Test SMTP Service from Powershell on Port 587" -SmtpServer au-smtp-outbound-1.mimecast.com -Credential $creds -UseSsl -Port 587

 

If you see

Send-MailMessage : Unable to read data from the transport connection: net_io_connectionclosed

You need to create an Authentication profile with 2fa disabled , and apply it to that user via Application Settings

 

“Send-MailMessage : A call to SSPI failed, see inner exception”

Trying to send email comes back with this error , you need to change TLS1.2

‘ServicePointManager.SecurityProtocol’ is not recognized as the name

Trying to use

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
to Force TLS 1.2 doesn’t work 
 
 
Use 
 
# Enable TLS 1.2 as Security Protocol
[Net.ServicePointManager]::SecurityProtocol = `
    [Net.SecurityProtocolType]::Tls12 ;
 
 
 
 
 
 
GD Star Rating
loading...
GD Star Rating
loading...

In October Microsoft is shutting down TLS 1.0 and TLS 1.1 so we need to check Legacy decives that speak to 365 with protocols that use this like SMTP

https://dirteam.com/dave/2018/01/10/office-365-only-allows-tls-1-2/

TLS 1.2 Supported

Toshiba E-Studio MFD – Have checked with an Engineer, the device support all 3 version of TLS and will failover when required , no issue 

Veeam – This uses SSL not TLS 

DocuCenter-V and Above Supported ( needs latest firmware ) 

No TLS 1.2 Support

ApeosPort-IV C3371 does not support for TLS 1.2 as it only support to TLS 1.1 even after the possibility to upgrade to the latest firmware

TBC

Avaya IP Office 500 V2 

GD Star Rating
loading...
GD Star Rating
loading...

Recently after setting an Office 365 Mailbox user up via Windows Live as they did not have Microsoft Outlook installed and didn’t want to use Webmail

You need to use IMAP settings for this as there is no Active Sync connector

After setting up Windows Live , a test email to the user’s self from himself never reached the Inbox after it was sent. If I sent one from Webmail it would come through

After research , it turns out it was going into Junk Email in Office 365 after being sent from smtp.office365.com on port 587 and this folder was not syncronised in the Windows Live settings so did not show.

I had to disable the junk mail filter or add a rule which would whitelist the own user from Junk Mail!

GD Star Rating
loading...
GD Star Rating
loading...

What you need to do to enable Mailguard Filtering and Officemailguard 365

Login to 365 Portal 

Inbound Filter by IP

This forces all internal mail to only be accepted by 365 from Mailguard IP’s. Spammers start caching DNS records so even though you changed MX records they use old ones!

  • Exchange Administration 
  • Mailflow
  • Connectors

From Partner Organization
To Office 365
How do you want to identify the partner organization? Domain
Specify one or more sender domains: *
Reject email messages if they aren’t sent from within this IP address range ( IP Range from Mailguard )

203.21.125.32/32
69.16.202.203/32
174.36.235.195/32
69.16.202.216/32
50.23.246.238/32
50.23.252.166/32
108.168.255.216/32
108.168.255.217/32
203.21.125.33/32

Outbound Filter forcing SMTP relay

Make sure all Office 365 IP’s http://pastebin.com/6UZZcWPQ are in trusted networks

  • Exchange Administration 
  • Mailflow
  • Connectors

Only when I have a transport rule set up that redirects messages to this connector – Tick
Route email through these smart hosts : filter.riskca-1.mailguard.com.au
Always use Transport Layer Security (TLS) to secure the connection (recommended)

  • Exchange Administration 
  • Mailflow
  • Rules

Name : Relay Outbound through MailGuard
*Apply this rule if… – The Sender is Located … Inside the organization
*Do the following… : Use the following connector Name of Connector Above

SMTP SPF

Add this include to the TXT record for the outgoing domains

include:customer.mailguard.com

GD Star Rating
loading...
GD Star Rating
loading...
# Change these values
$Logfile = “C:\Scripts\Logs\AffSql_” + (Get-Date).tostring(“yyyyMMdd”) + “.log”
 
Add-PSSnapin Microsoft.Exchange.Management.Powershell.Admin -erroraction silentlyContinue
 
# Copy Folder with Robocopy
$command = 'Robocopy.exe "\\unc\path\" "E:\localpath" /S /MIR /R:10 /W:5 /LOG+:$Logfile /NP /TS /FP /COPY:DAT'
iex $command
 
# Send E-mail message with log file attachment
$smtpServer = "smtpserver"
$msg = new-object Net.Mail.MailMessage
$smtp = new-object Net.Mail.SmtpClient($smtpServer)
$msg.From = "[email protected]"
$msg.To.Add("[email protected]")
$msg.Subject = "SQL Backup"
$msg.Body = get-content $Logfile | out-string
$smtp.Send($msg)
GD Star Rating
loading...
GD Star Rating
loading...