[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gforge-commits] gforge/cronjobs/mail mailaliases.php,1.7,1.8
From: |
tperdue |
Subject: |
[Gforge-commits] gforge/cronjobs/mail mailaliases.php,1.7,1.8 |
Date: |
Mon, 26 Jul 2004 12:50:28 -0500 |
Update of /cvsroot/gforge/gforge/cronjobs/mail
In directory db.perdue.net:/home/tperdue/share/dev.gforge.org/cronjobs/mail
Modified Files:
mailaliases.php
Log Message:
recommitting gf3.3 mailaliases.php which I accidentally committed forum_gateway
stuff to a minute ago
Index: mailaliases.php
===================================================================
RCS file: /cvsroot/gforge/gforge/cronjobs/mail/mailaliases.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- mailaliases.php 26 Jul 2004 17:49:02 -0000 1.7
+++ mailaliases.php 26 Jul 2004 17:50:25 -0000 1.8
@@ -1,39 +1,9 @@
#! /usr/bin/php4 -f
<?php
-/**
- * GForge Mail Aliases Facility
- *
- * Copyright 2002-2004 GForge, LLC
- * http://gforge.org/
- *
- * @version $Id$
- *
- * This file is part of GForge.
- *
- * GForge is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * GForge is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GForge; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
require ('squal_pre.php');
require ('common/include/cron_utils.php');
-//
-// IMPORTANT - modify this to your correct cron path
-//
-//define("CRON_PATH","/path/to/gforge/cronjobs");
-define("CRON_PATH","/var/www/gforge3/cronjobs");
-
if (!file_exists('/etc/aliases.org')) {
$err .= "CANNOT PROCEED - you must first backup your /etc/aliases file";
exit;
@@ -63,43 +33,23 @@
fclose($h);
//
-// Set up the forum aliases
+// Read in the mailman aliases
//
-if ($sys_use_forum) {
- $resforum=db_query("SELECT groups.unix_group_name,lower(fgl.forum_name)
AS forum_name
- FROM forum_group_list fgl,groups
- WHERE fgl.group_id=groups.group_id
- AND groups.status='A'");
- for ($forres=0; $forres<db_numrows($resforum); $forres++) {
-
$forname=strtolower(db_result($resforum,$forres,'unix_group_name').'-'.strtolower(db_result($resforum,$forres,'forum_name')));
- if ($def_aliases[$forname]) {
- //alias is already taken - perhaps by default
- } else {
- $def_aliases[$forname]=1;
- fwrite($fp,"$forname:
|\"".CRON_PATH."/forum_gateway.php
".db_result($resforum,$forres,'unix_group_name')."
".strtolower(db_result($resforum,$forres,'forum_name'))."\"\n");
- }
+$h2 = fopen("/tmp/mailman-aliases","r");
+$mailmancontents = fread($h2,filesize("/tmp/mailman-aliases"));
+$mailmanlines = explode("\n",$mailmancontents);
+for($k = 0; $k < count($mailmanlines); $k++) {
+ $mailmanline = explode(":",$mailmanlines[$k]);
+ if ($def_aliases[strtolower($mailmanline[0])]) {
+ //alias is already taken - perhaps by default
+ } else {
+ $def_aliases[strtolower($mailmanline[0])]=1;
+ fwrite($fp,$mailmanlines[$k]."\n");
}
}
+$err .= "\n$k Mailman Lines";
+fclose($h2);
-if ($sys_use_mail) {
- //
- // Read in the mailman aliases
- //
- $h2 = fopen("/tmp/mailman-aliases","r");
- $mailmancontents = fread($h2,filesize("/tmp/mailman-aliases"));
- $mailmanlines = explode("\n",$mailmancontents);
- for ($k = 0; $k < count($mailmanlines); $k++) {
- $mailmanline = explode(":",$mailmanlines[$k]);
- if ($def_aliases[strtolower($mailmanline[0])]) {
- //alias is already taken - perhaps by default
- } else {
- $def_aliases[strtolower($mailmanline[0])]=1;
- fwrite($fp,$mailmanlines[$k]."\n");
- }
- }
- $err .= "\n$k Mailman Lines";
- fclose($h2);
-}
//
// Write out the user aliases
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gforge-commits] gforge/cronjobs/mail mailaliases.php,1.7,1.8,
tperdue <=
- Prev by Date:
[Gforge-commits] gforge/cronjobs/mail mailaliases.php, 1.6, 1.7 mailing_lists_create.php, 1.11, 1.12
- Next by Date:
[Gforge-commits] gforge/www/include BaseLanguage.class,1.19,1.20
- Previous by thread:
[Gforge-commits] gforge/cronjobs/mail mailaliases.php, 1.6, 1.7 mailing_lists_create.php, 1.11, 1.12
- Next by thread:
[Gforge-commits] gforge/www/include BaseLanguage.class,1.19,1.20
- Index(es):