GeoNetAgent, LDAPWeb, server-audit, server-connection
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

35 lines
1.2 KiB

#!/usr/bin/env bash
# Test SMTP connectivity from Zammad host (10.100.1.24)
# Usage: ./scripts/test-smtp-connectivity.sh
set -euo pipefail
HOSTS=("sc138.idcloudhosting.cloud" "mail.geonet.co.id")
PORTS=(465 587)
echo "=== SMTP port connectivity ==="
for host in "${HOSTS[@]}"; do
for port in "${PORTS[@]}"; do
if nc -zv -w5 "$host" "$port" 2>&1; then
echo "OK: $host:$port"
else
echo "FAIL: $host:$port"
fi
done
done
echo ""
echo "=== SSL certificate (sc138:465) ==="
echo | openssl s_client -connect sc138.idcloudhosting.cloud:465 \
-servername sc138.idcloudhosting.cloud 2>/dev/null \
| openssl x509 -noout -subject -issuer 2>/dev/null || true
echo ""
echo "=== Zammad Email::Notification channels ==="
if docker ps --format '{{.Names}}' | grep -q zammad-zammad-railsserver; then
docker exec zammad-zammad-railsserver-1 bundle exec rails runner \
"Channel.where(area: 'Email::Notification').each { |c| puts \"id=#{c.id} active=#{c.active} adapter=#{c.options.dig(:outbound,:adapter)} status=#{c.status_out}\" }" \
2>/dev/null | grep -vE 'INFO|WARN|ActionCable|memcached|Redis|Dalli' || true
else
echo "Zammad railsserver container not running on this host"
fi