You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Steve Brewin <sb...@synsys.com> on 2007/01/02 17:48:40 UTC

RE: FetchMail and

Norman Maurer wrote:
>
>
> Hi Dima,
>
> i had no time to check the code but if you are right then its
> a bug. Can
> you please test it and if it not work fill a JIRA issue.

Fetchmail is designed to fetch mail for domains whose mail is administered
by James. Its just another way of injecting mail into the spool for these
domains, an alternative to SMTP. The requirement to specify the fetched
domain is not a bug, its required by the local mailet matcher.

If mail for a domain should be delivered remotely for users not registered
with James, the mailet chain can be programmed accordingly. This snippet
should help...

      <processor name="transport">
         <!-- If the recipient is for a local account, deliver it
locally -->
         <mailet match="RecipientIsLocal" class="ToProcessor">
             <processor> localTransport </processor>
         </mailet>

         <!-- If the host is matched, use remote delivery. -->
         <mailet match="HostIs=gmail.com" class="ToProcessor">
             <processor> remoteTransport </processor>
         </mailet>

         <!-- If the host is handled by this server and it did not get -->
         <!-- locally delivered, this is an invalid recipient -->
         <mailet match="HostIsLocal" class="ToProcessor">
            <processor> local-address-error </processor>
            <notice>550 - Requested action not taken: no such user
here</notice>
         </mailet>

         <!-- Process remaining messages as remote-->
         <mailet match="All" class="ToProcessor">
            <processor> remoteTransport </processor>
         </mailet>
      </processor>

      <processor name="localTransport">
         <!-- Add local processing here -->

         <!-- Deliver local messages-->
         <mailet match="All" class="LocalDelivery"/>
      </processor>

Now, if user1@gmail.com is registered with James, their mail will be
delivered locally. Mail for all other gmails users will be delivered
remotely.

Cheers
-- Steve


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