[sork] Patch for the vacation module
Sébastien CORBEAU
scorbeau at improve.fr
Wed Jul 16 07:06:07 PDT 2003
Hello,
When the alias support work :), and you enter several alias, your .forward is
like this:
\user, "|/usr/bin/vacation -a alias1 alias2 user"
It doesn't work on my server:
<user at pouet.com>: Command died with status 1: "/usr/bin/vacation -a
alias1 alias2 user". Command output: usage: vacation [ -I ] or:
vacation [ -j ] [ -a alias ] [ -h hostname ] [ -tN ] [ -r ] login
The good syntax for me is:
\user, "|/usr/bin/vacation -a alias1 -a alias2 user".
So, it isn't ok in the cvs version. I'm trying to do the correction.
I'm not a developper, so tell me if there is problem or security hole.
This patch is for the forwards.php file version 1.5.2.4. What do you think about
it?
seb
diff -U 4 forwards.php forwards.php-1.5.2.4:
--- forwards.php Wed Jul 16 16:00:14 2003
+++ forwards.php-1.5.2.4 Wed Jul 16 15:55:42 2003
@@ -10,9 +10,9 @@
* Vacation_Driver_forwards:: implements the Vacation_Driver API for ftp driven
* dot-forward compliant mail servers.
*
* @author Eric Rostetter <eric.rostetter at physics.utexas.edu>
- * @version $Revision: 1.5.2.4-unofficial $
+ * @version $Revision: 1.5.2.4 $
* @package Vacation
*/
class Vacation_Driver_forwards extends Vacation_Driver {
@@ -222,21 +222,14 @@
$alias = $this->_make_email_address($alias, $realm);
if ($alias === false) {
return false;
}
- // separate alias
- $lc_allalias = explode(" ", $alias);
- $alias = "";
- // add "-a" for each alias
- foreach ($lc_allalias as $lc_alias) {
- $alias = $alias . " -a " . $lc_alias;
- }
}
// Now set up the .forward file
if (!empty($alias) && ($alias != $my_email)) {
$contents = "\\$my_email, \"|" . $conf['vacation']['path'] .
- " $alias $my_email\"";
+ " -a $alias $my_email\"";
} else {
$contents = "\\$my_email, \"|" . $conf['vacation']['path'] .
" $my_email\"";
}
More information about the sork
mailing list