File: //usr/local/mailchannels/services/OutboundSMTPService.php
<?php
namespace MailChannels;
interface OutboundSMTPService {
/**
* @return bool
* @throws OutboundConfigurationException
*/
public function isMailServerConfigured();
/**
* @return bool
* @throws \Exception
*/
public function isEditableForMCConfig();
/**
* @throws OutboundConfigurationException
* @throws UAPIException
*/
public function configureMailServer();
/**
* @throws OutboundConfigurationException
* @throws UAPIException
*/
public function unConfigureMailServer();
/**
* @param string $file
* @throws OutboundConfigurationException
*/
public function retryFailedOutboundDomains($file);
/**
* @return array
* @throws OutboundSMTPServiceInternalErrorException
*/
public function addMCSPFForAllDomains();
/**
* @param $domainName
* @throws MissingZoneException
* @throws UnknownDNSRecordClass
* @throws DNSRecordException
* @throws \Net_DNS2_Exception
* @throws OutboundSMTPServiceInternalErrorException
*/
public function addMCSPFForDomain($domainName);
/**
* @param WHM\Domain
* @throws MissingZoneException
* @throws UnknownDNSRecordClass
* @throws DNSRecordException
* @throws Net_DNS2_Exception
* @throws OutboundSMTPServiceInternalErrorException
*/
public function addMCSPFForSubDomain($domain);
/**
* @return array map of domain names to exceptions
* @throws OutboundSMTPServiceInternalErrorException
*/
public function removeMCSPFForAllDomains();
/**
* @param $domainName
* @throws MissingZoneException
* @throws UnknownDNSRecordClass
* @throws \Net_DNS2_Exception
* @throws OutboundSMTPServiceInternalErrorException
* @throws DNSRecordException
*/
public function removeMCSPFForDomain($domainName);
/**
* @param WHM\Domain
* @throws MissingZoneException
* @throws UnknownDNSRecordClass
* @throws \Net_DNS2_Exception
* @throws OutboundSMTPServiceInternalErrorException
* @throws DNSRecordException|WHMApiBadStatusException
*/
public function removeMCSPFForSubDomain($domain);
/**
* @param $username
* @throws OutboundSMTPServiceInternalErrorException
* @return array of WHM Domains
*/
public function getAllDomainsForUser($username);
/**
* @param string $domainName
* @throws OutboundSMTPServiceInternalErrorException
* @return int representing the number of dns lookups it would take to fully resolve the spf record for the given domain
*/
public function countDNSLookups($domainName);
/**
* @param string $domainName
* @throws OutboundSMTPServiceInternalErrorException
* @return boolean indicates whether adding mcspf records will exceed 10 dns lookup limit
*/
public function willSPFExceedDNSLimitMC($domainName);
/**
* @param string $spfRecord
* @throws OutboundSMTPServiceInternalErrorException
* @return int representing the number of dns lookups it would take to fully resolve a given spfrecord
*/
public function SPFRecordDNSCount($spfRecord);
public function addMailManHeaders();
public function removeMailManHeaders();
public function hasMailManHeaders();
}