Add OpenSMTPD support for email server functionality
This commit is contained in:
@@ -172,6 +172,42 @@ main() {
|
||||
exit_code=1
|
||||
fi
|
||||
|
||||
# Check OpenSMTPD service (ports 25, 587, 465)
|
||||
health_log "INFO" "=== OpenSMTPD Service ==="
|
||||
OPENSMTPD_BINARY="/workspace/src/backend/app/opensmtpd/install/sbin/smtpd"
|
||||
if [ -x "$OPENSMTPD_BINARY" ]; then
|
||||
# Check SMTP port 25
|
||||
if check_port 25 "SMTP"; then
|
||||
health_log "INFO" "✓ SMTP port 25 is listening"
|
||||
else
|
||||
health_log "WARN" "⚠ SMTP port 25 is not listening (may be normal if not using inbound email)"
|
||||
fi
|
||||
|
||||
# Check SMTP submission port 587
|
||||
if check_port 587 "SMTP Submission"; then
|
||||
health_log "INFO" "✓ SMTP submission port 587 is listening"
|
||||
else
|
||||
health_log "WARN" "⚠ SMTP submission port 587 is not listening"
|
||||
fi
|
||||
|
||||
# Check SMTPS port 465
|
||||
if check_port 465 "SMTPS"; then
|
||||
health_log "INFO" "✓ SMTPS port 465 is listening"
|
||||
else
|
||||
health_log "WARN" "⚠ SMTPS port 465 is not listening"
|
||||
fi
|
||||
|
||||
# Check OpenSMTPD process
|
||||
if pgrep -f "smtpd" > /dev/null; then
|
||||
local smtpd_pid=$(pgrep -f "smtpd" | head -1)
|
||||
health_log "INFO" "✓ OpenSMTPD process running (PID: ${smtpd_pid})"
|
||||
else
|
||||
health_log "WARN" "⚠ OpenSMTPD process not found (may be disabled)"
|
||||
fi
|
||||
else
|
||||
health_log "INFO" "OpenSMTPD not installed at expected location, skipping SMTP checks"
|
||||
fi
|
||||
|
||||
# ttyd service has been removed, no longer checking port 4501
|
||||
|
||||
health_log "INFO" "========== HEALTH CHECK END ==========="
|
||||
|
||||
Reference in New Issue
Block a user