Cemailvalidator::checkmxports

Hello,

Today I desided to use CEmailValidator::checkMxPorts and it looks like an awesome feature. I wonder if checking for SMTP port 25 is enough. Read some lines in http://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol and noticed mentioning

Anyone have some more knowledge on this matter? Thanks in advance.

Regards,

Yasen

PS Showing the class method just for reference (Yii 1.1.12)


	/**

	 * Retrieves the list of MX records for $domain and checks if port 25

	 * is opened on any of these.

	 * @since 1.1.11

	 * @param string $domain domain to be checked

	 * @return boolean true if a reachable MX server has been found

	 */

	protected function checkMxPorts($domain)

	{

		$records=dns_get_record($domain, DNS_MX);

		if($records===false || empty($records))

			return false;

		usort($records,array($this,'mxSort'));

		foreach($records as $record)

		{

			$handle=fsockopen($record['target'],25);

			if($handle!==false)

			{

				fclose($handle);

				return true;

			}

		}

		return false;

	}