gunnar: server/php-kolab/Kolab_Filter/tests forged_sender.phpt, NONE, 1.1
cvs at kolab.org
cvs at kolab.org
Mon Feb 11 18:34:45 CET 2008
- Previous message: gunnar: server/php-kolab/Kolab_Filter/tests/_data forged.eml, NONE, 1.1
- Next message: gunnar: server/php-kolab/Kolab_Filter/Filter Content.php, 1.5, 1.6 Filter.php, 1.5, 1.6 Incoming.php, 1.8, 1.9 Outlook.php, 1.4, 1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: gunnar
Update of /kolabrepository/server/php-kolab/Kolab_Filter/tests
In directory doto:/tmp/cvs-serv2706/php-kolab/Kolab_Filter/tests
Added Files:
forged_sender.phpt
Log Message:
kolab/issue2467 (Koab Filter ignores configuration in 2.2 RC1)
--- NEW FILE: forged_sender.phpt ---
--TEST--
Test sending a mail as an untrusted sender.
--SKIPIF--
--FILE--
<?php
require_once 'Kolab/Filter/Content.php';
/* Our test configuration */
$conf = array();
$conf['log']['enabled'] = true;
$conf['log']['priority'] = PEAR_LOG_DEBUG; // Leave this on DEBUG for now. We just restructured the package...
$conf['log']['type'] = 'console';
$conf['log']['name'] = 'ignored';
$conf['log']['ident'] = 'Kolab Filter';
$conf['log']['params']['append'] = true;
$conf['filter']['tempdir'] = './tmp';
$conf['filter']['reject_forged_from_header'] = false;
$conf['filter']['email_domain'] = 'example.com';
$_SERVER['argv'] = array('test', '-s', 'me at example.com', '-r', 'you at example.com', '-c', '192.168.178.1');
$logger = Horde::getLogger();
$logger->_lineFormat = '%2$s [%3$s] %7$s';
// Activate this if you need the log information. This will
// make the test fail though
//$logger->_lineFormat = '%2$s [%3$s] %4$s %7$s';
$inh = fopen('_data/forged.eml', 'r');
/* Setup the class */
$parser = &new Filter_Content('StdOut', true);
/* Parse the mail */
$parser->parse($inh);
?>
--EXPECT--
Kolab Filter [debug] logMessage
Kolab Filter [debug] logMessage
Kolab Filter [debug] logMessage
Kolab Filter [debug] logMessage
Mail from sender: me at example.com
Mail to recipient: you at example.com
Return-Path: <me at example.com>
Received: from localhost (fqdn.example.com [127.0.0.1])
by demo.example.com (Cyrus v2.3.9-openpkg) with LMTPA;
Sat, 10 Nov 2007 20:44:52 +0100
Message-ID: <1d2101c823d2$3555aa10$ac112c15 at Meredith>
From: "Me (UNTRUSTED, sender <me at example.com> is not authenticated)" <me at example.com>
To: "You" <you at example.com>
Subject: Me to You
Date: Sat, 10 Nov 2007 22:45:12 +0300
User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/22.1.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
test
.
Kolab Filter [info] logMessage
- Previous message: gunnar: server/php-kolab/Kolab_Filter/tests/_data forged.eml, NONE, 1.1
- Next message: gunnar: server/php-kolab/Kolab_Filter/Filter Content.php, 1.5, 1.6 Filter.php, 1.5, 1.6 Incoming.php, 1.8, 1.9 Outlook.php, 1.4, 1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the commits
mailing list