james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefano Bagnara (JIRA)" <server-...@james.apache.org>
Subject [jira] Resolved: (JAMES-363) Move PostmasterAlias from code to james-confix.xml
Date Thu, 29 Dec 2005 10:06:03 GMT
     [ http://issues.apache.org/jira/browse/JAMES-363?page=all ]
     
Stefano Bagnara resolved JAMES-363:
-----------------------------------

    Fix Version: 2.3.0
     Resolution: Fixed

Patch applied.

> Move PostmasterAlias from code to james-confix.xml
> --------------------------------------------------
>
>          Key: JAMES-363
>          URL: http://issues.apache.org/jira/browse/JAMES-363
>      Project: James
>         Type: Improvement
>   Components: SpoolManager & Processors
>  Environment: N/A
>     Reporter: Daniel Perry
>     Assignee: Stefano Bagnara
>      Fix For: 2.3.0

>
> James automatically adds a PostmasterAlias mailet to the root processor.  This is ok
for a simple setup, but causes problems in a virtual hosting environment, as different domains
may have different postmaster accounts.
> The fix is to remove the hard-coded mailet, and put it in the xml configuration file.
> A patch to do this is as follows:
> --- src\conf\james-config_orig.xml	Mon Apr 04 12:20:31 2005
> +++ src\conf\james-config.xml	Mon Apr 04 12:29:52 2005
> @@ -149,6 +149,12 @@
>        <!-- This configuration is a sample configuration for the root processor. -->
>        <processor name="root">
>  
> +         <!-- This mailet redirects mail for the user 'postmaster' at any local domain
to -->
> +         <!-- the postmaster address specified for the server.  The postmaster address
-->
> +         <!-- is required by rfc822. Do not remove this mailet unless you are meeting
-->
> +         <!-- this requirement through other means (e.g. a XML/JDBCVirtualUserTable
mailet) -->
> +         <mailet match="All" class="PostmasterAlias"/>
> +
>           <!-- Checks that the email Sender is associated with a valid domain. -->
>           <!-- Useful for detecting and eliminating spam. -->
>           <!-- For this block to function, the spam processor must be configured.
-->
> --- src\java\org\apache\james\transport\JamesSpoolManager_orig.java	Mon Apr 04 12:23:22
2005
> +++ src\java\org\apache\james\transport\JamesSpoolManager.java	Mon Apr 04 12:30:04 2005
> @@ -196,16 +196,6 @@
>                  processor.initialize();
>                  processors.put(processorName, processor);
>  
> -                // If this is the root processor, add the PostmasterAlias
> -                //  mailet silently to the top
> -                if (processorName.equals("root")) {
> -                    Matcher matcher = matchLoader.getMatcher("All",
> -                                                             mailetContext);
> -                    Mailet mailet = mailetLoader.getMailet("PostmasterAlias",
> -                                                           mailetContext, null);
> -                    processor.add(matcher, mailet);
> -                }
> -
>                  final Configuration[] mailetConfs
>                      = processorConf.getChildren( "mailet" );
>                  // Loop through the mailet configuration, load

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message