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 Emmanuel BLONVIA <eb...@wanadoo.fr> on 2004/05/03 15:27:38 UTC

Help using XMLVirtualUserTable maillet

Hello,
I experience difficulties to use the XMLVirtualUserTable maillet. I don't
understand the exemple provided in james' config.xml file for I have no
documentation about that maillet. I want to forward all James outgoing and
incoming emails to the same email address (my own email address).
Here is what is provided in the config.xml file and I don't understand
anything:
 
 <mailet match="All" class="XMLVirtualUserTable">
            <!- 1:1 mapping ->
            <mapping>morgoth@middle-earth=sauron@mordor</mapping>
            <!- 1:n mapping ->
            <mapping>istari@middle-earth=saruman@isengard;radigast
gandalf</mapping>
            <!- DSN mapping ->
            <mapping>boromir@osgilliath=error:550 Requested action not
taken: no such user here</mapping>
            <!- regex based mapping ->
            <mapping>*@osgilliath=regex:(
*)@osgilliath:${1}@minas-tirith</mapping>
            <!- both standard and regex mapping ->
            <mapping>ring@*=onering@mordor;regex:ring@(
*):ring@${1}</mapping>
            <!- conditional regex mapping example ->
            <mapping>*@listserver=regex:(
*)-on@listserver:${1}-subscribe@listserver;
                                  regex:(
*)-off@listserver:${1}-unsubscribe@listserver
            </mapping>
         </mailet>
 
 
Could anyone help me ?

RE: Réf. : RE: Help using XMLVirtualUserTable maillet

Posted by "Noel J. Bergman" <no...@devtech.com>.
Once again, please do not use HTML when posting to the list.

> > > I want to forward all James outgoing and incoming emails to
> > > the same email address (my own email address).
> >
> > You could use the Forward mailet with the All matcher.
>
> So the example provided in the API is false !?
> How may I use your james server if there is no real documentation.

No, it is not false.  But the VirtualUserTable is more complex than a simple
forwarding of everything to a single address.

> 1-create an account on james server (example a user named toto )
> 2-configure james to forward all the emails I send using the user toto,
>   to my own adress (myname@mydomain.com);

You don't need to create a local account at all if you are using the Forward
or VirtualUserTable mailets.

> <mailet match="All" class="XMLVirtualUserTable">
>             <mapping>*@*=myname@mydomain.com</mapping>
> </mailet>

That won't work.  The XMLVirtualUserTable code is currently documented only
to match USER@DOMAIN.TLD, *@DOMAIN.TLD and USER@*, and will not match *@*.

What you want to do can be tricky in a sense, because if you were to put the
obvious:

 <mailet match="All" class="Forward">
   <forwardTo>myname@mydomain.com</forwardTo>
 </mailet>

in your root or transport processors, your mail would loop.  What I might do
is something like this:

 <processor name="root>
 ...
  <mailet match="HasMailAttribute=forwarded"
          class="ToProcessor">
   <processor> transport </processor>
  </mailet>

  <mailet match="All"
          class="ToProcessor">
   <processor> forward </processor>
  </mailet>
 </processor>

 <processor name="forward>
  <mailet match="All" class="SetMailAttribute">
    <forwarded>true</forwarded>
  </mailet>
  <mailet match="All" class="Forward">
    <forwardTo>myname@mydomain.com</forwardTo>
  </mailet>
 </processor>

That will make sure that mail only goes through the Forward mailet once.  If
you turn on DEBUG for the spool manager, you can watch the message flow
until you've got it working.

	--- Noel


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


Réf. : RE: Help using XMLVirtualUserTable maillet

Posted by Emmanuel BLONVIA <eb...@wanadoo.fr>.
 
 So the example provided in the API is false !?
How may I use your james server if there is no real documentation.

Moreover the example provided in the config.xml file for XMLVirtualUserTable
 is not enough.

I still don't succeed in forwarding all outgoing emails to another emails
address.
Maybe I am going about it in the wrong way? here is what I do:

1-create an account on james server (example a user named toto )
2-configure james to forward all the emails I send using the user toto,  to
my own adress (myname@mydomain.com); 

In the root processor I put the following mailet tag:

<mailet match="All" class="XMLVirtualUserTable">
            <mapping>*@*=myname@mydomain.com</mapping>
</mailet>

3-Then I connect to the smtp port of my localhost (james) server to send
email to any address mail (for instance peter@anaddress.com )
 
And I want the email to be forwarded to myname@mydomain.com. 

Can anyone help me ?
I want to use XML Virtual User or any other maillet to forward all the
emails but it never works.
 


-------Message original-------
 
De : James Users List
Date : 05/07/04 08:54:37
A : James Users List
Sujet : RE: Help using XMLVirtualUserTable maillet
 
Please do not send HTML mail to the mailing list.
 
> I want to forward all James outgoing and incoming emails to
> the same email address (my own email address).
 
You could use the Forward mailet with the All matcher.
 
  --- Noel
 
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org
 

RE: Help using XMLVirtualUserTable maillet

Posted by "Noel J. Bergman" <no...@devtech.com>.
Please do not send HTML mail to the mailing list.

> I want to forward all James outgoing and incoming emails to
> the same email address (my own email address).

You could use the Forward mailet with the All matcher.

	--- Noel

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