Opened 4 years ago

#16522 new bug

Review mail ProviderInfo

Reported by: kallisti5 Owned by: nobody
Priority: low Milestone: Unscheduled
Component: - General Version: R1/Development
Keywords: easy Cc:
Blocked By: Blocking:
Platform: All

Description

Several of our built-in mail providers are no longer valid or have half-valid configurations.

Review and correct. Report attached

src/preferences/mail/ProviderInfo

$ cat check.sh 
#!/bin/bash

function testPort {
	if timeout 5 bash -c "< /dev/tcp/$1/$2 &>/dev/null"; then
		echo "  $1 - $3 is open"
	else
		echo "  $1 - $3 is closed!"
	fi
}

for i in $(find . -name "*.rdef"); do
	echo "======= $(basename $i)"
	while read LINE; do
		echo $LINE | grep -i Server > /dev/null || continue
		TYPE=$(echo $LINE | cut -d'"' -f2 | cut -d' ' -f1)
		SERVER=$(echo $LINE | cut -d'"' -f4)
		[[ -z $SERVER ]] && continue
		if [[ "$TYPE" == "POP" ]]; then
			testPort $SERVER 110 POP3
			testPort $SERVER 995 POP_SSL
		fi
		if [[ "$TYPE" == "IMAP" ]]; then
			testPort $SERVER 143 IMAP
			testPort $SERVER 993 IMAPS
		fi
		if [[ "$TYPE" == "SMTP" ]]; then
			testPort $SERVER 25 SMTP
		fi
	done < $i
done

Attachments (1)

ProviderInfo-Check.txt (7.8 KB ) - added by kallisti5 4 years ago.

Download all attachments as: .zip

Change History (1)

by kallisti5, 4 years ago

Attachment: ProviderInfo-Check.txt added
Note: See TracTickets for help on using tickets.