* a delivery backend.
*
* @author Marc Groot Koerkamp
- * @copyright © 1999-2009 The SquirrelMail Project Team
+ * @copyright 1999-2012 The SquirrelMail Project Team
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
* @package squirrelmail
*
* This function is not yet implemented.
* Reserved for extended functionality.
+ * UPDATE: It is implemented in Deliver_SMTP and Deliver_SendMail classes,
+ * but it remains unimplemented in this base class (and thus not
+ * in Deliver_IMAP or other child classes that don't define it)
+ *
+ * NOTE: some parameters are specific to the child class
+ * that is implementing this method
*
* @param Message $message Message object
+ * @param string $domain
+ * @param integer $length
* @param string $host host name or IP to connect to
+ * @param integer $port
* @param string $user username to log into the SMTP server with
* @param string $pass password to log into the SMTP server with
- * @param integer $length
+ * @param boolean $authpop whether or not to use POP-before-SMTP authorization
+ * @param string $pop_host host name or IP to connect to for POP-before-SMTP authorization
*
* @return handle $stream file handle resource to SMTP stream
*/
- function initStream($message, $length=0, $host='', $port='', $user='', $pass='') {
+ function initStream($message, $domain, $length=0, $host='', $port='', $user='', $pass='', $authpop=false, $pop_host='') {
return $stream;
}
/* Create a message-id */
$message_id = 'MESSAGE ID GENERATION ERROR! PLEASE CONTACT SQUIRRELMAIL DEVELOPERS';
if (empty($rfc822_header->message_id)) {
- $message_id = '<';
- /* user-specifc data to decrease collision chance */
- $seed_data = $username . '.';
- $seed_data .= (!empty($REMOTE_PORT) ? $REMOTE_PORT . '.' : '');
- $seed_data .= (!empty($REMOTE_ADDR) ? $REMOTE_ADDR . '.' : '');
- /* add the current time in milliseconds and randomness */
- $seed_data .= uniqid(mt_rand(),true);
- /* put it through one-way hash and add it to the ID */
- $message_id .= md5($seed_data) . '.squirrel@' . $SERVER_NAME .'>';
+ $message_id = '<'
+ . md5(GenerateRandomString(16, '', 7) . uniqid(mt_rand(),true))
+ . '.squirrel@' . $SERVER_NAME .'>';
}
/* Make an RFC822 Received: line */