diff -rNu mantis.orig/README.bug_report_mail mantis/README.bug_report_mail
--- mantis.orig/README.bug_report_mail	Thu Jan  1 01:00:00 1970
+++ mantis/README.bug_report_mail	Mon Aug  9 23:26:21 2004
@@ -0,0 +1,54 @@
+The current version of bug_report_mail only support plain text e-mails
+and POP3 Mailaccounts with PEAR's Net_POP3 packge.
+
+bug_report_mail is able to recognize if mail is a reply to an already opened
+bug and adds the content as a bugnote.
+
+If you are alway running Mantis you have to alter you projects table
+with the sql/bug_report_mail.sql script.
+If not, you can create the database tables in the way described in
+the doc/INSTALL file.
+
+This patch changes the following files:
+    core/user_api.php
+    manage_proj_edit_page.php
+    config_inc.php.sample
+These files are new:
+    core/mail_api.php
+    sql/bug_report_mail.php
+    bug_report_mail.php
+    manage_proj_mail_delete.php
+    manage_proj_mail_update.php
+
+After installing this patch, you can add a POP3 server's hostname
+and authentication data for each of your projects with the
+project edit form.
+
+There are two ways to receive mail with bug_report_mail:
+The secure way is to use a standard reporting user:
+You have to create a reporter account, for example 'Mail'.
+The name for this reporter account you have to write in your config_inc.php file:
+	$g_mail_reporter = "Mail";
+and then, bug_report_mail must be informed to behave like this:
+    $g_mail_use_reporter = ON;
+
+The other way is to signup new user accounts automatically.
+For using this, you have to change this
+    $g_mail_auto_signup     = OFF;
+from OFF to ON.
+Now, bug_report_mail will look for an user named like the mail's sender
+or an user which mail adress is identical.
+If no user is found, then a new account will be created.
+The new user's name will be the mail address.
+
+This could be used for attacks, but there is no other way in the moment.
+
+After this, bug_report_mail can be used via cron like this:
+
+*/5 *   *   *   * lynx --dump http://mantis.homepage.com/bug_report_mail.php
+
+This line uses lynx to fetch bug reports from via POP3 every 5 minutes. 
+
+This addon is distributed under the same condition as Mantis itself.
+
+Gerrit Beine, August 2004
diff -rNu mantis.orig/bug_report_mail.php mantis/bug_report_mail.php
--- mantis.orig/bug_report_mail.php	Thu Jan  1 01:00:00 1970
+++ mantis/bug_report_mail.php	Mon Aug  9 23:24:27 2004
@@ -0,0 +1,37 @@
+<?php
+	# Mantis - a php based bugtracking system
+	# Copyright (C) 2000 - 2002  Kenzaburo Ito - kenito@300baud.org
+	# Copyright (C) 2002 - 2004  Mantis Team   - mantisbt-dev@lists.sourceforge.net
+	# This program is distributed under the terms and conditions of the GPL
+	# See the README and LICENSE files for details
+    # Copyright (C) 2004  Gerrit Beine - gerrit.beine@pitcom.de
+    # Copyright (C) 2004  pitcom GmbH, Plauen, Germany
+
+	# --------------------------------------------------------
+	# $Id$
+	# --------------------------------------------------------
+?>
+<?php
+	# This page receives an E-Mail via POP3 and generates an Report
+    header("Content-type: text/plain");
+?>
+<?php
+	require_once( 'core.php' );
+	
+	$t_core_path = config_get( 'core_path' );
+	
+	require_once( $t_core_path.'string_api.php' );
+	require_once( $t_core_path.'bug_api.php' );
+	require_once( $t_core_path.'mail_api.php' );
+?>
+<?php
+	$t_projects = mail_project_get_all_rows();
+	foreach ($t_projects as $t_project) {
+		$t_mails = mail_get_all_mails($t_project);
+        foreach ($t_mails as $t_mail)
+        {
+            mail_add_bug($t_mail, $t_project);
+        }
+	}
+?>
+
diff -rNu mantis.orig/config_inc.php mantis/config_inc.php
--- mantis.orig/config_inc.php	Thu Jan  1 01:00:00 1970
+++ mantis/config_inc.php	Mon Aug  9 22:27:31 2004
@@ -0,0 +1,78 @@
+<?php
+	# Mantis - a php based bugtracking system
+	# Copyright (C) 2000 - 2002  Kenzaburo Ito - kenito@300baud.org
+	# Copyright (C) 2002 - 2004  Mantis Team   - mantisbt-dev@lists.sourceforge.net
+	# This program is distributed under the terms and conditions of the GPL
+	# See the README and LICENSE files for details
+
+	# --------------------------------------------------------
+	# $Id: config_inc.php.sample,v 1.12 2004/02/08 13:16:57 vboctor Exp $
+	# --------------------------------------------------------
+	
+	# This sample file contains the essential files that you MUST
+	# configure to your specific settings.  You may override settings
+	# from config_defaults_inc.php by assigning new values in this file
+
+	# Rename this file to config_inc.php after configuration.
+
+	###########################################################################
+	# CONFIGURATION VARIABLES
+	###########################################################################
+
+	# In general the value OFF means the feature is disabled and ON means the
+	# feature is enabled.  Any other cases will have an explanation.
+
+	# Look in http://www.mantisbt.org/manual or config_defaults_inc.php for more
+	# detailed comments.
+
+	# --- database variables ---------
+
+	# set these values to match your setup
+	$g_hostname      = "localhost";
+	$g_port          = 3306;         # 3306 is default
+	$g_db_username   = "root";
+	$g_db_password   = "root";
+	$g_database_name = "mantis";
+
+	# --- email variables -------------
+	$g_administrator_email  = 'administrator@example.com';
+	$g_webmaster_email      = 'webmaster@example.com';
+
+	# the "From: " field in emails
+	$g_from_email           = 'noreply@example.com';
+
+	# the "To: " address all emails are sent.  This can be a mailing list or archive address.
+	# Actual users are emailed via the bcc: fields
+	$g_to_email             = 'nobody@example.com';
+
+	# the return address for bounced mail
+	$g_return_path_email    = 'admin@example.com';
+
+	# --- login method ----------------
+	# CRYPT or PLAIN or MD5 or LDAP or BASIC_AUTH
+	$g_login_method = MD5;
+
+	# --- email vars ------------------
+	# set to OFF to disable email check
+	# These should be OFF for Windows installations
+	$g_validate_email            = OFF;
+	$g_check_mx_record           = OFF;
+
+	# --- file upload settings --------
+	# This is the master setting to disable *all* file uploading functionality
+	#
+	# The default value is ON but you must make sure file uploading is enabled
+	#  in PHP as well.  You may need to add "file_uploads = TRUE" to your php.ini.
+	$g_allow_file_upload	= ON;
+
+    # --- mail reporting settings -----
+    # This tells Mantis to report all the Mail with only one account
+    $g_mail_use_reporter    = OFF;
+    
+    # The account's name for mail reporting
+    $g_mail_reporter        = 'Mail';
+    
+    # Signup new users automatically (possible security risk!)
+    # Default is OFF, only works if mail_use_reporter is OFF
+    $g_mail_auto_signup     = ON;
+?>
diff -rNu mantis.orig/config_inc.php.sample mantis/config_inc.php.sample
--- mantis.orig/config_inc.php.sample	Sun Feb  8 14:16:56 2004
+++ mantis/config_inc.php.sample	Mon Aug  9 18:32:00 2004
@@ -64,4 +64,15 @@
 	# The default value is ON but you must make sure file uploading is enabled
 	#  in PHP as well.  You may need to add "file_uploads = TRUE" to your php.ini.
 	$g_allow_file_upload	= ON;
+    
+    # --- mail reporting settings -----
+    # This tells Mantis to report all the Mail with only one account
+    $g_mail_use_reporter    = ON;
+    
+    # The account's name for mail reporting
+    $g_mail_reporter        = 'Mail';
+    
+    # Signup new users automatically (possible security risk!)
+    # Default is OFF, only works if mail_use_reporter is OFF
+    $g_mail_auto_signup     = OFF;
 ?>
diff -rNu mantis.orig/core/mail_api.php mantis/core/mail_api.php
--- mantis.orig/core/mail_api.php	Thu Jan  1 01:00:00 1970
+++ mantis/core/mail_api.php	Mon Aug  9 23:22:29 2004
@@ -0,0 +1,212 @@
+<?php
+	# Mantis - a php based bugtracking system
+	# Copyright (C) 2002 - 2004  Mantis Team   - mantisbt-dev@lists.sourceforge.net
+	# This program is distributed under the terms and conditions of the GPL
+	# See the README and LICENSE files for details
+    # Copyright (C) 2004  Gerrit Beine - gerrit.beine@pitcom.de
+    # Copyright (C) 2004  pitcom GmbH, Plauen, Germany
+
+	# --------------------------------------------------------
+	# $Id$
+	# --------------------------------------------------------
+
+	$t_core_dir = dirname( __FILE__ ).DIRECTORY_SEPARATOR;
+	
+	require_once( $t_core_dir . 'bug_api.php' );
+	require_once( $t_core_dir . 'bugnote_api.php' );
+	require_once( $t_core_dir . 'user_api.php' );
+	require_once( $t_core_dir . 'project_api.php' );
+?>
+<?php
+	# This page receives an E-Mail via POP3 and generates an Report
+?>
+<?php
+	require_once( 'Net/POP3.php' );
+    
+	# --------------------
+	# Update the mail account data
+	function mail_update( $p_project_id, $p_pop3_host, $p_pop3_user, $p_pop3_pass ) {
+		$c_project_id	= db_prepare_int( $p_project_id );
+		$c_pop3_host	= db_prepare_string( $p_pop3_host );
+		$c_pop3_user	= db_prepare_string( $p_pop3_user );
+		$c_pop3_pass	= db_prepare_string( $p_pop3_pass );
+		
+        $t_project_table = config_get( 'mantis_project_table' );
+        
+		$query = "UPDATE $t_project_table 
+				  SET pop3_host='$c_pop3_host',
+					pop3_user='$c_pop3_user',
+					pop3_pass='$c_pop3_pass'
+				  WHERE id='$c_project_id'";
+		db_query( $query );
+		return true;
+	}
+
+	# --------------------
+	# Removes the mail account data
+	function mail_delete( $p_project_id ) {
+		$c_project_id	= db_prepare_int( $p_project_id );
+		
+        $t_project_table = config_get( 'mantis_project_table' );
+        
+		$query = "UPDATE $t_project_table 
+				  SET pop3_host=NULL,
+					pop3_user=NULL,
+					pop3_pass=NULL
+				  WHERE id='$c_project_id'";
+		db_query( $query );
+		return true;
+	}
+
+	#===================================
+	# Data Access
+	#===================================
+
+	# --------------------
+	# Return all versions for the specified project
+	function mail_get_account_data( $p_project_id ) {
+		$c_project_id = db_prepare_int( $p_project_id );
+
+		$t_project_table = config_get( 'mantis_project_table' );
+
+		$query = "SELECT pop3_host, pop3_user, pop3_pass
+				  FROM $t_project_table 
+				  WHERE id='$c_project_id'";
+		$result = db_query( $query );
+
+		return db_fetch_array( $result );
+	}
+
+	# --------------------
+	# return all projects with valid data for mail access
+	#  return an empty array if there are no such projects
+	function mail_project_get_all_rows() {
+		$m_projects = array();
+		$t_projects = project_get_all_rows();
+		foreach ($t_projects as $t_project) {
+			if ($t_project['pop3_host']) {
+				array_push($m_projects, $t_project);
+			}
+		}
+		return $m_projects;
+	}
+
+	# --------------------
+	# return all mails for a project
+	#  return an empty array if there are no new mails
+	function mail_get_all_mails($p_project) {
+		$t_mails = array();
+		$pop3 = &new Net_POP3();
+		$t_pop3_host = $p_project['pop3_host'];
+		$t_pop3_user = $p_project['pop3_user'];
+		$t_pop3_password = $p_project['pop3_pass'];
+		$pop3->connect($t_pop3_host, 110);
+		$pop3->login($t_pop3_user, $t_pop3_password);
+		for ($i = 1; $i <= $pop3->numMsg(); $i++) {
+			$mail = $pop3->getParsedHeaders($i);
+			$mail['X-Mantis-Body'] = $pop3->getBody($i);
+			$mail['X-Mantis-Complete'] = $pop3->getMsg($i);
+			array_push($t_mails, $mail);
+			$pop3->deleteMsg($i);
+		}
+		$pop3->disconnect();
+		return $t_mails;
+	}
+    
+	# --------------------
+	# return the a valid username from an email address
+    function mail_user_name_from_address ($p_mailaddress) {
+        $t_mailaddress = $p_mailaddress;
+        if (preg_match("/<(.*?)>/", $p_mailaddress, $matches)) {
+            $t_mailaddress = $matches[1];
+        }
+        return preg_replace("/[@\.-]/",'_',$t_mailaddress);
+    }
+
+	# --------------------
+	# return true if there is a valid mantis bug referernce in subject
+    function mail_is_a_bugnote ($p_subject) {
+        return preg_match("/\[([A-Za-z0-9-_\.]*\s[0-9]{7})\]/", $p_subject);
+    }
+    
+	# --------------------
+	# return the bug's id from the subject
+    function mail_get_bug_id_from_subject ($p_subject) {
+        preg_match("/\[([A-Za-z0-9-_\.]*\s([0-9]{7}?))\]/", $p_subject, $matches);
+        return $matches[2];
+    }
+	# --------------------
+	# return the user id for the mail reporting user
+	#  return false if no username can be found
+    function mail_get_user ($p_mail) {
+        $t_mail_use_reporter = config_get( 'mail_use_reporter' );
+        $t_mail_auto_signup = config_get( 'mail_auto_signup' );
+        if ($t_mail_use_reporter) {
+            $t_mail_reporter = config_get( 'mail_reporter' );
+            $t_reporter_id = user_get_id_by_name($t_mail_reporter);
+        }
+        else {
+            $t_user_name = mail_user_name_from_address($p_mail['From']);
+            $t_reporter_id = user_get_id_by_name($t_user_name);
+            if (!$t_reporter_id) { // try to get the user's id searching for mail address
+                $t_reporter_id = user_get_id_by_mail($p_mail['From']);
+            }
+            if (!$t_reporter_id && $t_mail_auto_signup) { // try to signup the user
+                user_signup($t_user_name, $p_mail['From']);
+                $t_reporter_id = user_get_id_by_name($t_user_name);
+            }
+        }
+        return $t_reporter_id;
+    }
+    
+    # --------------------
+    # Adds a bug reported via email
+    # Todo: If there is already a bug, add it as a bug note
+    function mail_add_bug($p_mail, $p_project) {
+		$f_build				= gpc_get_string( 'build', '' );
+		$f_platform				= gpc_get_string( 'platform', '' );
+		$f_os					= gpc_get_string( 'os', '' );
+		$f_os_build				= gpc_get_string( 'os_build', '' );
+		$f_product_version		= gpc_get_string( 'product_version', '' );
+		$f_profile_id			= gpc_get_int( 'profile_id', 0 );
+		$f_handler_id			= gpc_get_int( 'handler_id', 0 );
+		$f_view_state			= gpc_get_int( 'view_state', 0 );
+
+		$f_category				= gpc_get_string( 'category', '' );
+		$f_priority				= gpc_get_int( 'priority', NORMAL );
+		$f_steps_to_reproduce	= gpc_get_string( 'steps_to_reproduce', '' );
+
+        $f_reproducibility		= 10;
+        $f_severity				= 50;
+        $f_summary				= $p_mail['Subject'];
+        $f_description			= $p_mail['X-Mantis-Body'];
+        $f_additional_info		= $p_mail['X-Mantis-Complete'];
+        $f_project_id			= $p_project['id'];
+        $t_reporter_id		    = mail_get_user($p_mail);
+
+        if (mail_is_a_bugnote($p_mail['Subject']))
+        {
+            # Add a bug note
+            $t_bug_id = mail_get_bug_id_from_subject($p_mail['Subject']);
+            bugnote_add ( $t_bug_id, $p_mail['X-Mantis-Body'] );
+            email_bugnote_add ( $t_bug_id );
+        }
+        else
+        {
+	        # Create the bug
+	        $t_bug_id = bug_create( $f_project_id,
+		    	            $t_reporter_id, $f_handler_id,
+                            $f_priority,
+				            $f_severity, $f_reproducibility,
+					        $f_category,
+					        $f_os, $f_os_build,
+					        $f_platform, $f_product_version,
+					        $f_build,
+					        $f_profile_id, $f_summary, $f_view_state,
+					        $f_description, $f_steps_to_reproduce, $f_additional_info );
+            email_new_bug( $t_bug_id );
+        }
+
+    }
+
+?>
diff -rNu mantis.orig/core/user_api.php mantis/core/user_api.php
--- mantis.orig/core/user_api.php	Sun Jan 11 08:16:10 2004
+++ mantis/core/user_api.php	Sun Aug  8 20:08:38 2004
@@ -413,6 +413,26 @@
 	}
 
 	# --------------------
+	# get a user id from an mail address
+	#  return false if the mail address does not exist
+	function user_get_id_by_mail( $p_mailadress ) {
+		$c_mailadress = db_prepare_string( $p_mailadress );
+
+		$t_user_table = config_get( 'mantis_user_table' );
+
+		$query = "SELECT id
+				  FROM $t_user_table
+				  WHERE email='$c_mailadress'";
+		$result = db_query( $query );
+
+		if ( 0 == db_num_rows( $result ) ) {
+			return false;
+		} else {
+			return db_result( $result );
+		}
+	}
+
+	# --------------------
 	# return all data associated with a particular user name
 	#  return false if the username does not exist
 	function user_get_row_by_name( $p_username ) {
diff -rNu mantis.orig/manage_proj_edit_page.php mantis/manage_proj_edit_page.php
--- mantis.orig/manage_proj_edit_page.php	Sun Jan 11 08:16:06 2004
+++ mantis/manage_proj_edit_page.php	Mon Aug  9 21:37:44 2004
@@ -18,6 +18,7 @@
 	require_once( $t_core_path . 'version_api.php' );
 	require_once( $t_core_path . 'custom_field_api.php' );
 	require_once( $t_core_path . 'icon_api.php' );
+	require_once( $t_core_path . 'mail_api.php' );
 ?>
 <?php
 	$f_project_id = gpc_get_int( 'project_id' );
@@ -25,6 +26,7 @@
 	access_ensure_project_level( config_get( 'manage_project_threshold' ), $f_project_id );
 
 	$row = project_get_row( $f_project_id );
+    $mail = mail_get_account_data( $f_project_id );
 ?>
 <?php html_page_top1() ?>
 <?php html_page_top2() ?>
@@ -524,6 +526,57 @@
 	}  # end for
 ?>
 	</table>
+</div>
+
+<!-- MAIL ACCOUNT RESET -->
+<br />
+<div align="center">
+	<form method="post" action="manage_proj_mail_update.php">
+		<input type="hidden" name="project_id" value="<?php echo $f_project_id ?>" />
+		<table class="width75" cellspacing="1">
+			<tr>
+				<td class="form-title" colspan="4">
+					<?php echo 'Mail Account Settings' ?>
+				</td>
+			</tr>
+			<tr class="row-1">
+				<td class="category" width="25%">
+					<?php echo "POP3 Host"?>
+				</td>
+				<td width="75%">
+					<input type="text" name="pop3_host" size="64" maxlength="255" value="<?php echo string_attribute( $mail['pop3_host'] ) ?>" />
+				</td>
+			</tr>
+			<tr class="row-1">
+				<td class="category" width="25%">
+					<?php echo "POP3 User"?>
+				</td>
+				<td width="75%">
+					<input type="text" name="pop3_user" size="64" maxlength="255" value="<?php echo string_attribute( $mail['pop3_user'] ) ?>" />
+				</td>
+			</tr>
+			<tr class="row-1">
+				<td class="category" width="25%">
+					<?php echo "POP3 Password"?>
+				</td>
+				<td width="75%">
+					<input type="text" name="pop3_pass" size="64" maxlength="255" value="<?php echo string_attribute( $mail['pop3_pass'] ) ?>" />
+				</td>
+			</tr>
+			<tr>
+				<td colspan="2">
+					<input type="submit" value="<?php echo 'Set Mail Account Data' ?>" />
+				</td>
+			</tr>
+		</table>
+	</form>
+</div>
+<!-- MAIL ACCOUNT RESET -->
+<div class="border-center">
+	<form method="post" action="manage_proj_mail_delete.php">
+		<input type="hidden" name="project_id" value="<?php echo $f_project_id ?>" />
+		<input type="submit" value="<?php echo 'Delete Mail Account Data' ?>" />
+	</form>
 </div>
 
 <?php html_page_bottom1( __FILE__ ) ?>
diff -rNu mantis.orig/manage_proj_mail_delete.php mantis/manage_proj_mail_delete.php
--- mantis.orig/manage_proj_mail_delete.php	Thu Jan  1 01:00:00 1970
+++ mantis/manage_proj_mail_delete.php	Mon Aug  9 21:25:02 2004
@@ -0,0 +1,45 @@
+<?php
+	# Mantis - a php based bugtracking system
+	# Copyright (C) 2000 - 2002  Kenzaburo Ito - kenito@300baud.org
+	# Copyright (C) 2002 - 2004  Mantis Team   - mantisbt-dev@lists.sourceforge.net
+	# This program is distributed under the terms and conditions of the GPL
+	# See the README and LICENSE files for details
+
+	# --------------------------------------------------------
+	# $Id$
+	# --------------------------------------------------------
+?>
+<?php
+	require_once( 'core.php' );
+	
+	$t_core_path = config_get( 'core_path' );
+	
+	require_once( $t_core_path.'mail_api.php' );
+?>
+<?php
+	$f_project_id	= gpc_get_int( 'project_id' );
+
+	access_ensure_project_level( config_get( 'manage_project_threshold' ), $f_project_id );
+
+	mail_delete( $f_project_id );
+
+	$t_redirect_url = 'manage_proj_edit_page.php?project_id=' . $f_project_id;
+?>
+<?php
+	html_page_top1();
+
+	html_meta_redirect( $t_redirect_url );
+
+	html_page_top2();
+?>
+
+<br />
+<div align="center">
+<?php
+	echo lang_get( 'operation_successful' ) . '<br />';
+
+	print_bracket_link( $t_redirect_url, lang_get( 'proceed' ) );
+?>
+</div>
+
+<?php html_page_bottom1( __FILE__ ) ?>
diff -rNu mantis.orig/manage_proj_mail_update.php mantis/manage_proj_mail_update.php
--- mantis.orig/manage_proj_mail_update.php	Thu Jan  1 01:00:00 1970
+++ mantis/manage_proj_mail_update.php	Mon Aug  9 21:35:44 2004
@@ -0,0 +1,60 @@
+<?php
+	# Mantis - a php based bugtracking system
+	# Copyright (C) 2000 - 2002  Kenzaburo Ito - kenito@300baud.org
+	# Copyright (C) 2002 - 2004  Mantis Team   - mantisbt-dev@lists.sourceforge.net
+	# This program is distributed under the terms and conditions of the GPL
+	# See the README and LICENSE files for details
+
+	# --------------------------------------------------------
+	# $Id$
+	# --------------------------------------------------------
+?>
+<?php
+	require_once( 'core.php' );
+	
+	$t_core_path = config_get( 'core_path' );
+	
+	require_once( $t_core_path.'mail_api.php' );
+?>
+<?php
+	$f_project_id	= gpc_get_int( 'project_id' );
+	$f_pop3_host	= gpc_get_string( 'pop3_host' );
+	$f_pop3_user	= gpc_get_string( 'pop3_user' );
+	$f_pop3_pass	= gpc_get_string( 'pop3_pass' );
+
+	access_ensure_project_level( config_get( 'manage_project_threshold' ), $f_project_id );
+
+	if ( is_blank( $f_pop3_host ) ) {
+			trigger_error( ERROR_EMPTY_FIELD, ERROR );
+	}
+	else {
+		if ( is_blank( $f_pop3_user ) ) {
+			trigger_error( ERROR_EMPTY_FIELD, ERROR );
+        }
+		if ( is_blank( $f_pop3_pass ) ) {
+			trigger_error( ERROR_EMPTY_FIELD, ERROR );
+        }
+	}
+
+	mail_update( $f_project_id, $f_pop3_host, $f_pop3_user, $f_pop3_pass );
+
+	$t_redirect_url = 'manage_proj_edit_page.php?project_id=' . $f_project_id;
+?>
+<?php
+	html_page_top1();
+
+	html_meta_redirect( $t_redirect_url );
+
+	html_page_top2();
+?>
+
+<br />
+<div align="center">
+<?php
+	echo lang_get( 'operation_successful' ) . '<br />';
+
+	print_bracket_link( $t_redirect_url, lang_get( 'proceed' ) );
+?>
+</div>
+
+<?php html_page_bottom1( __FILE__ ) ?>
diff -rNu mantis.orig/sql/bug_report_mail.sql mantis/sql/bug_report_mail.sql
--- mantis.orig/sql/bug_report_mail.sql	Thu Jan  1 01:00:00 1970
+++ mantis/sql/bug_report_mail.sql	Fri Aug  6 15:14:24 2004
@@ -0,0 +1,5 @@
+
+ALTER TABLE `mantis_project_table`
+ADD `pop3_host` VARCHAR( 255 ) DEFAULT NULL ,
+ADD `pop3_user` VARCHAR( 255 ) DEFAULT NULL ,
+ADD `pop3_pass` VARCHAR( 255 ) DEFAULT NULL ;
diff -rNu mantis.orig/sql/db_generate.sql mantis/sql/db_generate.sql
--- mantis.orig/sql/db_generate.sql	Fri Feb  6 20:44:24 2004
+++ mantis/sql/db_generate.sql	Mon Aug  9 18:16:44 2004
@@ -306,6 +306,9 @@
   access_min int(2) NOT NULL default '10',
   file_path varchar(250) NOT NULL default '',
   description text NOT NULL,
+  pop3_host varchar(255) default NULL,
+  pop3_user varchar(255) default NULL,
+  pop3_pass varchar(255) default NULL,
   PRIMARY KEY  (id),
   UNIQUE KEY name (name),
   KEY id (id)
