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 Stephan Wiesner <st...@stephan-wiesner.de> on 2003/04/17 18:39:45 UTC

How to forward a mail from a Mailet

Hi list,
I try to let my Mailet forward a mail based on a mapping.
I am stuck since hours and running out of ideas :-(
What I did manage is to create a new message with the contents of the 
old one and send that, but then I would have to delete the old one and 
don't know how to do that?

Stephan



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


RE: Sending to a domain while doing fetchpop

Posted by "Noel J. Bergman" <no...@devtech.com>.
Marc,

Danny has used FetchPOP more than I, but ...

> 1) I pick up mails from another pop3 box (ex: mybox@otherdomain.com)
>    therefore I have to include the domain of that box in the
>    <servernames> tag (ex: otherdomain.com).

OK.  But not necessarily true.

> 2) When sending mails to other users on the same domain
>    (ex: afriend@otherdomain.com) they are picked up by
>    James because the domain is included in the
>    <servernames> tag. James tries to deliver these mails
>    locally.

So you are picking up e-mail for @otherdomain.com both from FetchPOP and
directly.

> 3) The mails that are sent from James are not matched by
>    the FetchedFrom matcher (because they are not fetched
     from the remote pop3 server).

Right.  They are generated locally, or come in via the SMTP handler.

4) To catch these outbound mails it is necessary to add a HostIs
   matcher and then deliver them using RemoteDelivery.

The code that you reported is:

  <processor name="fetchprocessor">
    <mailet match="RecipientIs=localuser@domain" class="Redirect">
      <recipients>localuser</recipients>
      <passThrough>FALSE</passThrough>
    </mailet>

    <mailet match="RecipientIs=externaluser@domain" class="RemoteDelivery">
      <outgoing>file://var/mail/fetchrepository/</outgoing>
    </mailet>
  </processor>

It appears that you are peeling off local users, and sending the rest using
the MX record for that domain.  Seems to me that you could simply do this:

  ...
    <mailet match="All" class="JDBCVirtualUserTable">
      ...
    </mailet>
  ...

in your root processor, and remove otherdomain.com from your servername
list.

JDBCVirtualUserTable (or the recently posted non-JDBC analogue or a list of
Redirect mailets like in your example) would map from the fetched address to
a local address, and since the remaining addresses would not be for a local
domain, RemoteDelivery would handle them.

	--- Noel


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


Re: Sending to a domain while doing fetchpop

Posted by Marc de Oliveira <Ma...@deOliveira.dk>.
No, that is not what I am trying to address.
1) I pick up mails from another pop3 box (ex: mybox@otherdomain.com)
therefore I have to include the domain of that box in the <servernames> tag
(ex: otherdomain.com).
2) When sending mails to other users on the same domain (ex:
afriend@otherdomain.com) they are picked up by James because the domain is
included in the <servernames> tag. James tries to deliver these mails
locally.
3) The mails that are sent from James are not matched by the FetchedFrom
matcher (because they are not fetched from the remote pop3 server).
4) To catch these outbound mails it is necessary to add a HostIs matcher and
then deliver them using RemoteDelivery.
Does my explanation make sence?
Sincerely,
Marc

----- Original Message -----
From: "Noel J. Bergman" <no...@devtech.com>
To: "James Users List" <ja...@jakarta.apache.org>
Sent: Wednesday, April 23, 2003 7:27 PM
Subject: RE: Sending to a domain while doing fetchpop


> In other words you are picking up messages from a remote POP3 box, and
> distributing some of them to another server, rather than handling them
> locally?  It still sounds as if the FetchedFrom matcher should have been
> able to send all of the fetched messages to the processor.     I'm not
> seeing why that isn't the case, unless other messages are arriving
directly,
> rather than being fetched.
>
> --- Noel
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: james-user-help@jakarta.apache.org
>


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


RE: Sending to a domain while doing fetchpop

Posted by Danny Angus <da...@apache.org>.
Marc

> Maybe the warning should be refrased.

I think you are right.

The trouble with fetch pop is that it is really doing things that it shouldn't be, it "hijacks" mail which it also still appears to belong on another host.

What we have to do is either handle all of that mail locally, which we use the servername for, or we have to distingush between fetched mail and outgoing mail to the same domain and handle them differently, which is what the FetchedFrom attribute is for. 

As the servername case is easier to explain I put that in the config to prevent new users getting in a Big Mess.

I'm sorry I didn't pay more attention to your problem earlier, and I'm glad you've worked it out.

d.


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


Re: Sending to a domain while doing fetchpop

Posted by Marc de Oliveira <Ma...@deOliveira.dk>.
Thanks, I like your solution better. I only included the <servername> tag
because the config file has the following warning:
<!--  Warning: If you are using fetchpop it is important to include
e   -->
<!--  fetched domains in the server name list to prevent
         -->
Maybe the warning should be refrased.

Sincerely,
Marc

----- Original Message -----
From: "Danny Angus" <da...@apache.org>
To: "James Users List" <ja...@jakarta.apache.org>
Sent: Wednesday, April 23, 2003 11:50 PM
Subject: RE: Sending to a domain while doing fetchpop


sort of..

drop the domain from the handled domains, use forwarding in another
processor to forward mail for individual users to either a local address of
a remote one. use FetchedFrom to switch mail to the other processor, not
HostIs.

d.

> -----Original Message-----
> From: Marc de Oliveira [mailto:Marc@deOliveira.dk]
> Sent: 23 April 2003 19:53
> To: James Users List
> Subject: Re: Sending to a domain while doing fetchpop
>
>
> I don't get it. Is that an answer to my mail?
> - Marc
> ----- Original Message -----
> From: "Danny Angus" <da...@apache.org>
> To: "James Users List" <ja...@jakarta.apache.org>
> Sent: Wednesday, April 23, 2003 8:39 PM
> Subject: RE: Sending to a domain while doing fetchpop
>
>
> > use FetchedFrom and another processor
>
> **Instead**
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: james-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: james-user-help@jakarta.apache.org
>


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


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


RE: Sending to a domain while doing fetchpop

Posted by Danny Angus <da...@apache.org>.
sort of..

drop the domain from the handled domains, use forwarding in another processor to forward mail for individual users to either a local address of a remote one. use FetchedFrom to switch mail to the other processor, not HostIs.

d.

> -----Original Message-----
> From: Marc de Oliveira [mailto:Marc@deOliveira.dk]
> Sent: 23 April 2003 19:53
> To: James Users List
> Subject: Re: Sending to a domain while doing fetchpop
> 
> 
> I don't get it. Is that an answer to my mail?
> - Marc
> ----- Original Message ----- 
> From: "Danny Angus" <da...@apache.org>
> To: "James Users List" <ja...@jakarta.apache.org>
> Sent: Wednesday, April 23, 2003 8:39 PM
> Subject: RE: Sending to a domain while doing fetchpop
> 
> 
> > use FetchedFrom and another processor
> 
> **Instead**
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: james-user-help@jakarta.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: james-user-help@jakarta.apache.org
> 


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


Re: Sending to a domain while doing fetchpop

Posted by Marc de Oliveira <Ma...@deOliveira.dk>.
I don't get it. Is that an answer to my mail?
- Marc
----- Original Message ----- 
From: "Danny Angus" <da...@apache.org>
To: "James Users List" <ja...@jakarta.apache.org>
Sent: Wednesday, April 23, 2003 8:39 PM
Subject: RE: Sending to a domain while doing fetchpop


> use FetchedFrom and another processor

**Instead**



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


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


RE: Sending to a domain while doing fetchpop

Posted by Danny Angus <da...@apache.org>.
> use FetchedFrom and another processor

**Instead**



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


RE: Sending to a domain while doing fetchpop

Posted by Danny Angus <da...@apache.org>.
use FetchedFrom and another processor

> -----Original Message-----
> From: Noel J. Bergman [mailto:noel@devtech.com]
> Sent: 23 April 2003 18:27
> To: James Users List
> Subject: RE: Sending to a domain while doing fetchpop
> 
> 
> In other words you are picking up messages from a remote POP3 box, and
> distributing some of them to another server, rather than handling them
> locally?  It still sounds as if the FetchedFrom matcher should have been
> able to send all of the fetched messages to the processor.     I'm not
> seeing why that isn't the case, unless other messages are 
> arriving directly,
> rather than being fetched.
> 
> 	--- Noel
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: james-user-help@jakarta.apache.org
> 


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


RE: Sending to a domain while doing fetchpop

Posted by "Noel J. Bergman" <no...@devtech.com>.
In other words you are picking up messages from a remote POP3 box, and
distributing some of them to another server, rather than handling them
locally?  It still sounds as if the FetchedFrom matcher should have been
able to send all of the fetched messages to the processor.     I'm not
seeing why that isn't the case, unless other messages are arriving directly,
rather than being fetched.

	--- Noel


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


Re: Sending to a domain while doing fetchpop

Posted by Marc de Oliveira <Ma...@deOliveira.dk>.
  Below is the kind of documentation that I needed when setting this up.

  Sincerely,

  Marc

  When sending mails to users of a domain that is partly managed by James
the mails are sent through the root process to try to deliver them locally.
In case mails are being sent to an external account using a domain partly
managed by James it is necessary to add a HostIs matcher to redirect the
mail management to the fetchprocessor mentioned above, like this:


       <mailet match="HostIs=hostname" class="ToProcessor">
<processor>fetchprocessor</processor>
</mailet>



  Where hostname is the name of the domain used by FetchPOP.

  The fetchprocessor should then have mailets for managing both mails to
local users and to remote users. A simple example of a fetchprocessor that
can receive mails for one local user and send mails to one external user
could look like this:


       <processor name="fetchprocessor"> <mailet
match="RecipientIs=localuser@domain" class="Redirect">
<recipients>localuser</recipients>  <passThrough>FALSE</passThrough>
</mailet> <mailet match="RecipientIs=externaluser@domain"
class="RemoteDelivery">
<outgoing>file://var/mail/fetchrepository/</outgoing> </mailet> <mailet
match="All" class="Null"/></processor>


----- Original Message -----
From: "Noel J. Bergman" <no...@devtech.com>
To: "James Users List" <ja...@jakarta.apache.org>
Sent: Wednesday, April 23, 2003 4:09 PM
Subject: RE: Sending to a domain while doing fetchpop


> Can you provide a more complete example, with context?
>
> --- Noel
>
> -----Original Message-----
> From: Marc de Oliveira [mailto:Marc@deOliveira.dk]
> Sent: Wednesday, April 23, 2003 1:00
> To: James Users List
> Subject: Re: Sending to a domain while doing fetchpop
>
>
> Yes, I know that. But to have the fetchpop working when "Handling a Subset
> of a Domain's Mail" you need to have a second "HostIs" matcher to handle
> outgoing mails:
>
>         <mailet match="HostIs=dylan.dk" class="ToProcessor">
>            <processor>fetchdylanprocessor</processor>
>          </mailet>
>
>  I believe this part is missing from the documentation.
>
> Sincerely,
> Marc
>
> ----- Original Message -----
> From: "Noel J. Bergman" <no...@devtech.com>
> To: "James Users List" <ja...@jakarta.apache.org>
> Sent: Wednesday, April 23, 2003 3:36 AM
> Subject: RE: Sending to a domain while doing fetchpop
>
>
> > > It seems that the FetchedFrom matcher [is not]
> > > recognising the mail to be send
> >
> > >    <mailet match="FetchedFrom=dylan.dk" class="ToProcessor">
> > >       <processor>fetchdylanprocessor</processor>
> > >    </mailet>
> >
> > FetchFrom doesn't match an e-mail address.  It matches the name
attribute
> of
> > the <fetch> tag, which defines the individual task.  See:
> > http://james.apache.org/fetchpop_configuration_2_1.html.
> >
> > --- Noel
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: james-user-help@jakarta.apache.org
>

RE: Sending to a domain while doing fetchpop

Posted by "Noel J. Bergman" <no...@devtech.com>.
Can you provide a more complete example, with context?

	--- Noel

-----Original Message-----
From: Marc de Oliveira [mailto:Marc@deOliveira.dk]
Sent: Wednesday, April 23, 2003 1:00
To: James Users List
Subject: Re: Sending to a domain while doing fetchpop


Yes, I know that. But to have the fetchpop working when "Handling a Subset
of a Domain's Mail" you need to have a second "HostIs" matcher to handle
outgoing mails:

        <mailet match="HostIs=dylan.dk" class="ToProcessor">
           <processor>fetchdylanprocessor</processor>
         </mailet>

 I believe this part is missing from the documentation.

Sincerely,
Marc

----- Original Message -----
From: "Noel J. Bergman" <no...@devtech.com>
To: "James Users List" <ja...@jakarta.apache.org>
Sent: Wednesday, April 23, 2003 3:36 AM
Subject: RE: Sending to a domain while doing fetchpop


> > It seems that the FetchedFrom matcher [is not]
> > recognising the mail to be send
>
> >    <mailet match="FetchedFrom=dylan.dk" class="ToProcessor">
> >       <processor>fetchdylanprocessor</processor>
> >    </mailet>
>
> FetchFrom doesn't match an e-mail address.  It matches the name attribute
of
> the <fetch> tag, which defines the individual task.  See:
> http://james.apache.org/fetchpop_configuration_2_1.html.
>
> --- Noel


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


Re: Sending to a domain while doing fetchpop

Posted by Marc de Oliveira <Ma...@deOliveira.dk>.
Yes, I know that. But to have the fetchpop working when "Handling a Subset
of a Domain's Mail" you need to have a second "HostIs" matcher to handle
outgoing mails:

        <mailet match="HostIs=dylan.dk" class="ToProcessor">
           <processor>fetchdylanprocessor</processor>
         </mailet>

 I believe this part is missing from the documentation.

Sincerely,
Marc

----- Original Message -----
From: "Noel J. Bergman" <no...@devtech.com>
To: "James Users List" <ja...@jakarta.apache.org>
Sent: Wednesday, April 23, 2003 3:36 AM
Subject: RE: Sending to a domain while doing fetchpop


> > It seems that the FetchedFrom matcher [is not]
> > recognising the mail to be send
>
> >    <mailet match="FetchedFrom=dylan.dk" class="ToProcessor">
> >       <processor>fetchdylanprocessor</processor>
> >    </mailet>
>
> FetchFrom doesn't match an e-mail address.  It matches the name attribute
of
> the <fetch> tag, which defines the individual task.  See:
> http://james.apache.org/fetchpop_configuration_2_1.html.
>
> --- Noel
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: james-user-help@jakarta.apache.org
>
>


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


RE: Sending to a domain while doing fetchpop

Posted by "Noel J. Bergman" <no...@devtech.com>.
> It seems that the FetchedFrom matcher [is not]
> recognising the mail to be send

>    <mailet match="FetchedFrom=dylan.dk" class="ToProcessor">
>       <processor>fetchdylanprocessor</processor>
>    </mailet>

FetchFrom doesn't match an e-mail address.  It matches the name attribute of
the <fetch> tag, which defines the individual task.  See:
http://james.apache.org/fetchpop_configuration_2_1.html.

	--- Noel


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


Re: Sending to a domain while doing fetchpop

Posted by Marc de Oliveira <Ma...@deOliveira.dk>.
I think I narrowed down the problem. It seems that the FetchedFrom matcher
suggested in the documentation is not recognising the mail to be send (which
I guess is ok). By adding a HostIs matcher the problem went away:

         <mailet match="FetchedFrom=dylan.dk" class="ToProcessor">
           <processor>fetchdylanprocessor</processor>
         </mailet>
         <mailet match="HostIs=dylan.dk" class="ToProcessor">
           <processor>fetchdylanprocessor</processor>
         </mailet>

It might be appropriate to include this in the documentation that explains
"Handling a Subset of a Domain's Mail" (under "FetchPop Configuration").

Thanks for the help, Noel!

Sincerely,
Marc

----- Original Message -----
From: "Noel J. Bergman" <no...@devtech.com>
To: "James Users List" <ja...@jakarta.apache.org>
Sent: Tuesday, April 22, 2003 11:30 PM
Subject: RE: Sending to a domain while doing fetchpop


> It is important to learn how to read the spool manager's log, since it
tells
> you what is happening with the message.  In the log, I see this:
>
> spoolmanager: Processing Mail1051039499263-1 through transport
> spoolmanager.transport: Servicing mail: Mail1051039499263-1
> spoolmanager.transport: Checking Mail1051039499263-1 with
> org.apache.james.transport.matchers.RecipientIsLocal
> ... a whole bunch of other matchers ...
> spoolmanager.transport: Checking Mail1051039499263-1 with
> org.apache.james.transport.matchers.HostIsLocal
> spoolmanager.transport: Servicing Mail1051039499263-1 by Resend Mailet
> spoolmanager.transport: Checking Mail1051039499263-1 with
> org.apache.james.transport.matchers.HostIsLocal
> spoolmanager.transport: Servicing Mail1051039499263-1 by ToProcessor
Mailet
> spoolmanager: Processed Mail1051039499263-1 through transport
> spoolmanager: Result was error
>
> Apparently RecipientIsLocal did not resolve to true, but HostIsLocal
> resolved to true.  Then you have a Redirect mailet (we should fix the
> internal string to say "Redirect" instead of "Resend", and whatever else
it
> did, it passed the message through, so the ToProcessor mailet that sends
any
> unhandled local mail to the error processor handled it up.
>
> You have a configuration error.
>
> --- Noel
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: james-user-help@jakarta.apache.org
>


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


RE: Sending to a domain while doing fetchpop

Posted by "Noel J. Bergman" <no...@devtech.com>.
It is important to learn how to read the spool manager's log, since it tells
you what is happening with the message.  In the log, I see this:

spoolmanager: Processing Mail1051039499263-1 through transport
spoolmanager.transport: Servicing mail: Mail1051039499263-1
spoolmanager.transport: Checking Mail1051039499263-1 with
org.apache.james.transport.matchers.RecipientIsLocal
... a whole bunch of other matchers ...
spoolmanager.transport: Checking Mail1051039499263-1 with
org.apache.james.transport.matchers.HostIsLocal
spoolmanager.transport: Servicing Mail1051039499263-1 by Resend Mailet
spoolmanager.transport: Checking Mail1051039499263-1 with
org.apache.james.transport.matchers.HostIsLocal
spoolmanager.transport: Servicing Mail1051039499263-1 by ToProcessor Mailet
spoolmanager: Processed Mail1051039499263-1 through transport
spoolmanager: Result was error

Apparently RecipientIsLocal did not resolve to true, but HostIsLocal
resolved to true.  Then you have a Redirect mailet (we should fix the
internal string to say "Redirect" instead of "Resend", and whatever else it
did, it passed the message through, so the ToProcessor mailet that sends any
unhandled local mail to the error processor handled it up.

You have a configuration error.

	--- Noel


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


Re: Sending to a domain while doing fetchpop

Posted by Marc de Oliveira <Ma...@deOliveira.dk>.
I have turned on DEBUG on the spoolmanager log and the resulting output
related to mail 1051039499263-1 is attached to this mail. I have also
included the line from the mailet log file that indicates that the mail
generates an error and the mail itself (below).

I would really appreciate  some feedback that could help me resolve this
problem.

Sincerely,
Marc

mailet log file:
22/04/03 21:25:00 INFO  James.Mailet: ToRepository: Storing mail
Mail1051039499263-1 in file://var/mail/error/

the mail in "var/mail/error":
Return-Path: <Ma...@deOliveira.dk>
Received: from WEB ([192.168.1.37])
          by WEB (JAMES SMTP Server 2.1.3a1) with SMTP ID 978
          for <Ma...@dylan.dk>;
          Tue, 22 Apr 2003 21:24:59 +0200 (CEST)
Message-ID: <01...@WEB>
From: "Marc de Oliveira" <Ma...@deOliveira.dk>
To: "Marc de Oliveira" <Ma...@dylan.dk>
Subject: test 7
Date: Tue, 22 Apr 2003 21:24:58 +0200
MIME-Version: 1.0
Content-Type: text/plain;
 charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106

test 7


----- Original Message -----
From: "Noel J. Bergman" <no...@devtech.com>
To: "James Users List" <ja...@jakarta.apache.org>
Sent: Tuesday, April 22, 2003 6:07 PM
Subject: RE: Sending to a domain while doing fetchpop


> > I am not sure what I should be able to see in the log file. What I can
see
> > is the following from the spoolmanager, remotemanager and smtpserver log
> > files indicating that the mail was supposedly delivered for
marc@dylan.dk.
>
> Hardly.  All that I see in the logs is that the SMTP server spooled mail
for
> Marc@dylan.dk.  There is nothing else of use in the logs segments you
> posted.  Clearly you did not turn set environment.xml to have DEBUG for
the
> spool manager, for example.  Even so, if RemoteDelivery attempted to send
> mail to Marc@dylan.dk, you would see an entry in the mailet log.
>
> > Is there something I have overlooked?
>
> Well, so far we know that this has nothing to do with FetchPOP.  SMTP
shows
> that it spooled mail, and you are indicating that it wasn't delivered.
>
> --- Noel
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: james-user-help@jakarta.apache.org
>
>

RE: Sending to a domain while doing fetchpop

Posted by "Noel J. Bergman" <no...@devtech.com>.
> I am not sure what I should be able to see in the log file. What I can see
> is the following from the spoolmanager, remotemanager and smtpserver log
> files indicating that the mail was supposedly delivered for marc@dylan.dk.

Hardly.  All that I see in the logs is that the SMTP server spooled mail for
Marc@dylan.dk.  There is nothing else of use in the logs segments you
posted.  Clearly you did not turn set environment.xml to have DEBUG for the
spool manager, for example.  Even so, if RemoteDelivery attempted to send
mail to Marc@dylan.dk, you would see an entry in the mailet log.

> Is there something I have overlooked?

Well, so far we know that this has nothing to do with FetchPOP.  SMTP shows
that it spooled mail, and you are indicating that it wasn't delivered.

	--- Noel


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


Re: Sending to a domain while doing fetchpop

Posted by Marc de Oliveira <Ma...@deOliveira.dk>.
I am not sure what I should be able to see in the log file. What I can see
is the following from the spoolmanager, remotemanager and smtpserver log
files indicating that the mail was supposedly delivered for marc@dylan.dk.
Yet, the external marc@dylan.dk account does not receive anything... :-(

spoolmanager log file:
22/04/03 17:27:06 INFO  spoolmanager: Matcher RecipientIs=marc@dylan.dk
instantiated.
22/04/03 17:27:06 INFO  spoolmanager: Mailet RemoteDelivery instantiated.

remotemanager log file:
22/04/03 17:27:06 INFO  remotemanager: Remote Manager Service uses default
thread group.
22/04/03 17:27:06 INFO  remotemanager: Remote Manager Service is running on:
WEB
22/04/03 17:27:06 INFO  remotemanager: Remote Manager Service handler hello
name is: WEB
22/04/03 17:27:06 INFO  remotemanager: Remote Manager Service handler
connection timeout is: 60000
22/04/03 17:27:06 INFO  remotemanager: Remote Manager Service started
plain:4555

smtpserver log file:
22/04/03 17:27:10 INFO  smtpserver: Connection from WEB (192.168.1.37)
22/04/03 17:27:11 INFO  smtpserver: Successfully spooled mail from
Marc@deOliveira.dk for [Marc@dylan.dk]

I did change the name of the outgoing repository but it does not seem to
make any difference:

         <mailet match="RecipientIs=marc@dylan.dk" class="RemoteDelivery">
           <outgoing>file://var/mail/dylan/</outgoing>
           <debug>true</debug>
         </mailet>

Currently I am not able to send mails to anybody on the dylan.dk domain. Is
there something I have overlooked?

Sincerely,
Marc
----- Original Message -----
From: "Noel J. Bergman" <no...@devtech.com>
To: "James Users List" <ja...@jakarta.apache.org>
Sent: Sunday, April 20, 2003 7:10 PM
Subject: RE: Sending to a domain while doing fetchpop


> > <mailet match="FetchedFrom=dylan.dk" class="ToProcessor">
> >   <processor>fetchdylanprocessor</processor>
> > </mailet>
>
> > <processor name="fetchdylanprocessor">
> >   <mailet match="RecipientIs=ellen@dylan.dk" class="RemoteDelivery">
> >     <outgoing>file://var/mail/outgoing/</outgoing>
> >   </mailet>
> > </processor>
>
> > But this setup still does not deliver the mails to ellen@dylan.dk
> remotely.
>
> Is it recognizing the mail as being for ellen@dylan.dk?  You can turn on
> DEBUG for the spool manager in environment.xml to see which happens at
each
> matcher.
>
> Do not use the same outgoing spool as is used for the normal
RemoteDelivery
> mail.
>
> --- Noel
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: james-user-help@jakarta.apache.org
>


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


RE: Sending to a domain while doing fetchpop

Posted by "Noel J. Bergman" <no...@devtech.com>.
> <mailet match="FetchedFrom=dylan.dk" class="ToProcessor">
>   <processor>fetchdylanprocessor</processor>
> </mailet>

> <processor name="fetchdylanprocessor">
>   <mailet match="RecipientIs=ellen@dylan.dk" class="RemoteDelivery">
>     <outgoing>file://var/mail/outgoing/</outgoing>
>   </mailet>
> </processor>

> But this setup still does not deliver the mails to ellen@dylan.dk
remotely.

Is it recognizing the mail as being for ellen@dylan.dk?  You can turn on
DEBUG for the spool manager in environment.xml to see which happens at each
matcher.

Do not use the same outgoing spool as is used for the normal RemoteDelivery
mail.

	--- Noel


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


Sending to a domain while doing fetchpop

Posted by Marc de Oliveira <Ma...@deOliveira.dk>.
I am reading mails from an external server using fetchpop it seems to work
just fine. But I just realized that when sending mails to other accounts on
that external server James tries to handle them. That results in the message
"We were unable to deliver the attached message because of an error in the
mail server." obviously because James does not have a local account for that
user.

The situation seem to be described in the James documentation but I can't
seem to quite understand how I should make it work.

The documentation claims that one must redirect the fetchpop mails to a
seperate processor, like this:

<mailet match="FetchedFrom=dylan.dk" class="ToProcessor">

<processor>fetchdylanprocessor</processor>

</mailet>

<processor name="fetchdylanprocessor">

<mailet match="RecipientIs=ellen@dylan.dk" class="RemoteDelivery">

<outgoing>file://var/mail/outgoing/</outgoing>

</mailet>

</processor>



But this setup still does not deliver the mails to ellen@dylan.dk remotely.
I must be missing something. Can anybody help me out?

Sincerely,

Marc de Oliveira




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


RE: Ghost Mails

Posted by "Noel J. Bergman" <no...@devtech.com>.
Mail.GHOST is an indicator that the message is to be deleted.

	--- Noel


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


Ghost Mails

Posted by ak...@eurosoftindia.com.
hi

i want to know what is this Ghost mail is.......as I see the logs of
spoolmanger i come across the ghost mail.The related problem is that when
I start the fetchPop utility some of the mails are fetched and get
tranfered to the respective local account but some mails are lost in this
transition i know they are  not spam mails but is it that they are ghost
mails that is y or any other reason.......

THE LOG READ IN THE SPOOLMANAGER LOG FILE IS

22/12/02 15:02:35 DEBUG spoolmanager: Processed Mail1040549486860-1
through transport
22/12/02 15:02:35 DEBUG spoolmanager: Result was ghost

Please Suggest

Thanks & Bye
Akshay




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


Re: config.xml dtd

Posted by Stephan Wiesner <st...@stephan-wiesner.de>.
Thought so, any reason there is not? I keep misspelling things or doing 
them in the wrong order and getting ugly runtime errors because of that. 
A DTD would help greatly.

Stephan


Noel J. Bergman wrote:

>>can I download the DTD for config.xml somewhere?
>>    
>>
>
>There isn't one.
>
>	--- Noel
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: james-user-help@jakarta.apache.org
>
>
>  
>



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


RE: config.xml dtd

Posted by "Noel J. Bergman" <no...@devtech.com>.
> can I download the DTD for config.xml somewhere?

There isn't one.

	--- Noel

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


config.xml dtd

Posted by Stephan Wiesner <st...@stephan-wiesner.de>.
Hi list,
can I download the DTD for config.xml somewhere?

Stephan



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


Re: How to forward a mail from a Mailet

Posted by ak...@eurosoftindia.com.
hi

i want to know what is this Ghost mail is.......as I see the logs of
spoolmanger i come across the ghost mail.The related problem is that when
I start the fetchPop utility some of the mails are fetched and get
tranfered to the respective local account but some mails are lost in this
transition i know they are  not spam mails but is it that they are ghost
mails that is y or any other reason.......

THE LOG READ IN THE SPOOLMANAGER LOG FILE IS

22/12/02 15:02:35 DEBUG spoolmanager: Processed Mail1040549486860-1
through transport
22/12/02 15:02:35 DEBUG spoolmanager: Result was ghost

Please Suggest

Thanks & Bye
Akshay





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


RE: How to forward a mail from a Mailet

Posted by "Noel J. Bergman" <no...@devtech.com>.
> I have something slightly different in mind

I just wanted you to see the forwarding mechanism used in that code.

Actually, a lot of the existing mailets, including JDBCVirtualUserTable,
should be redone to subclass Redirect.  Redirect needs a bit of work from
its current state, but otherwise that consolidates the code into one place.

Likewise, JDBCVirtualUserTable and Robert Cadena's new virtual user table
class could share a common base.  The distinction between them would then be
in the actual mapping method.

	--- Noel


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


Re: How to forward a mail from a Mailet

Posted by Stephan Wiesner <st...@stephan-wiesner.de>.
Hi Noel,
thanks for the tip. I have something slightly different in mind, but I 
am looking at your code and certainly learned something from it.

Stephan

Noel J. Bergman wrote:

>>I try to let my Mailet forward a mail based on a mapping.
>>    
>>
>
>See JDBCVirtualUserTable.
>
>	--- Noel
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: james-user-help@jakarta.apache.org
>
>
>  
>



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


RE: How to forward a mail from a Mailet

Posted by "Noel J. Bergman" <no...@devtech.com>.
> I try to let my Mailet forward a mail based on a mapping.

See JDBCVirtualUserTable.

	--- Noel


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