Hi Max,

comments inside..


2010/4/20 Max Levinson <[email protected]>:
> Hi guys, that's me again. :)
>
> My task is to make James 3.0 installation to relay all checked emails to
> another host and to allow this host to send messages through James
> installation. I was reading couple of manuals but they are all for James 2.3
> and there was no ActiveMq integration yet. So here is my current config:
>
>  <processor name="transport">
>  <mailet match="RemoteAddrNotInNetwork=127.0.0.1,external.myhost.com,
> internal.myhost.com" class="ToProcessor">
>      <processor>relay-denied</processor>
>      <notice>550 - Requested action not taken: relaying denied</notice>
>  </mailet>
>  <mailet match="HostIs=myhost.com" class="ActiveMQRemoteDelivery">
>       <outgoingQueue> relay</outgoingQueue>
>       <outgoingRetryQueue> relay.retry</outgoingRetryQueue>
>       <deliveryThreads> 10 </deliveryThreads>
>       <delayTime>  5 minutes </delayTime>
>       <delayTime> 10 minutes </delayTime>
>       <delayTime> 45 minutes </delayTime>
>       <delayTime>  2 hours </delayTime>
>       <delayTime>  3 hours </delayTime>
>       <delayTime>  6 hours </delayTime>
>       <maxRetries> 25 </maxRetries>
>       <gateway> internal.myhost.com </gateway>
>       <gatewayPort>25</gatewayPort>
>      </mailet>
>
>      <mailet match="All" class="ActiveMQRemoteDelivery">
>        <outgoingQueue> outgoing</outgoingQueue>
>        <outgoingRetryQueue> outgoing.retry</outgoingRetryQueue>
> <deliveryThreads> 10 </deliveryThreads>
>        <delayTime>  5 minutes </delayTime>
>        <delayTime> 10 minutes </delayTime>
>        <delayTime> 45 minutes </delayTime>
>        <delayTime>  2 hours </delayTime>
>        <delayTime>  3 hours </delayTime>
>        <delayTime>  6 hours </delayTime>
>        <maxRetries> 25 </maxRetries>
>      </mailet>
>  </processor>
>
> So my questions are:
>
> 1. I took those lines from default config <outgoingQueue>
> outgoing</outgoingQueue> and <outgoingRetryQueue>
> outgoing.retry</outgoingRetryQueue> and made my own ones for relay queue
> like this: <outgoingQueue> relay</outgoingQueue> and <outgoingRetryQueue>
> relay.retry</outgoingRetryQueue>
> Are those queues made dynamically after I added them in config or are they
> predefined and relay queue won't exist.
>

The queues specified by you will get created on the fly.

> 2. Are those queues in my current config are stored in DB or on a disk, if
> on a disk what should I add to make them be in a DB.
>

The "meta-data" of the queue is stored in ActiveMQ which use karadb as
default storage. If you want to change it you need to adjust the
activemq.xml file in the conf directory. The "real" MimeMessage is
stored in the filesystem, in the directory
/path/to/james/var/mail/spool. If you want to store it in the db you
need to write your own SpoolMessageStore. To get an idea about it have
a look here:

http://svn.apache.org/viewvc/james/server/trunk/spoolmanager/src/main/java/org/apache/james/FileSpoolMessageStore.java?view=markup

Having a db implementation and a JCR implementation was on the todo
list of me.. Maybe you want to contribute one ;)


> 3. I also use this matcher match="HostIs=myhost.com" I found description
> about mailets and matchers here
> http://james.apache.org/mailet/standard/mailet-report.html#HostIs
> it is written there that this matcher matches email *FROM* given host. This
> "from" word getting me confused because what I need it that all mail which
> goes *TO *this domain must be relayed to internal.myhost.com. How can I do
> that?
>

Thats a "bug" in the current documentation. HostIs is matching against
recipient. SenderHostIs is matching against the sender. I will fix it.
thx...


Bye,
Norman

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to