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 Nicola Salvemini <ni...@gmail.com> on 2012/01/19 15:36:41 UTC

James configuration for SMTP servers load balancing and activeMQ

Hello!

I'm using James 3.0-beta3 with maildir, and I'm looking for a efficient 
method to perform load balancing of various SMTP servers.
This is my scenario:
For the email domain mydomain.com exist many MX records: 
mxA.mydomain.com, mxB.mydomain.com, ...
Every MX record corresponds to a SMTP server:

mxA.mydomain.com  ==> SMTP server on hostA
mxB.mydomain.com  ==> SMTP server on hostB

All emails incoming on all SMTP servers are stored on a unique maildir 
repository. Until now I used maildir on a share file system (NFS), but 
now I'm having several problems with the reliability.
The idea now (how Norman suggest me in a previous thread) is to write on 
the same activemq queue which dispatch the mails and deliver it to the 
maildir.
So, the scenario becomes:

James on hostA => use James anbedded activemq
James on hostB => use activemq on hostA
James on hostC => use activemq on hostA
...


What do you think about? Could you please provide me some suggestions 
(or some documents) about how to configure James 
(james-server-context.xml file) on hostA and hostB?
Is it possible to use on hostA the "embedded version" of activemq? How I 
can configure hostB to use it? Wath about camel?

Thanks in advance,

Nicola

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


Re: James configuration for SMTP servers load balancing and activeMQ

Posted by Eric Charles <er...@apache.org>.
Hi,
I wanted to further test a configuration but had no time for.

So here's for now my vague answer: yes, it should be in the amq:broker
ssection. You can have more info on 
http://activemq.apache.org/networks-of-brokers.html

There is also something we have to check on the BlobTransfertPolicy: we 
implemented a custom one that writes mail on disk. I am wondering if 
this james blobtransferpolicy will work in case of distributed brokers.

Thx,

Eric

On 23/01/12 15:13, Nicola Salvemini wrote:
>
>> Hi Nicola,
> Hi Eric,
> thanks for reply.
>>
>> If you are only looking for SMTP loadbalancing, it's indeed a matter
>> of configuring a distributed activemq cluster, with numerous producers
>> (the smtp servers) and only one consumer (the server responsible to
>> dequeue, store in mailbox, and serve via imap4/pop3 the inbox).
> Yes,This is exactly what I'm looking for.
>>
>> Now, if you are looking for imap4/pop3, this is another story (we need
>> some distributed mail uid management), and this is not available, and
>> not planned for 3.0 final.
>>
>> So, how do we go further: will you look at distributed amq
>> configuration (there's plenty on their website, on the net, and on amq
>> mailing list), or would you like us to look it for you (in this case,
>> we can not guarantee the time on which it could be done)? Of course,
>> we can futher help/discuss the ideas/issues here on the mailing list.
>
> I'm not looking for how to configure a distributed amq, I know this
> isn't the best place for this kind requests. I'm only interesting on how
> to edit james-server-context.xml file to use an external instance of
> activemq.
> In this file there are three sections about amq and camel:
>
> <amq broker ... >
> ...
> </amq:broker>
>
> <amq:connectionFactory ... >
> ...
> </amq:connectionFactory>
>
> and
>
> <camel:camelContext ...>
> ...
> </camel:camelContext>
>
> I think I have to edit the "broker" part specifying in
> transportConnectors my external activemq server. Is this correct?
> Instead, I didn't understand what to do of "connectionFactory"and
> "camelContext". I have to leave everything the same?
>
> Could you please suggest me a reference or a link to help me understand
> how James uses ActiveMQ and Camel?
>
>
> Best regards,
>
> Nicola.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>

-- 
eric | http://about.echarles.net | @echarles

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


Re: James configuration for SMTP servers load balancing and activeMQ

Posted by Nicola Salvemini <ni...@gmail.com>.
> Hi Nicola,
Hi Eric,
thanks for reply.
>
> If you are only looking for SMTP loadbalancing, it's indeed a matter 
> of configuring a distributed activemq cluster, with numerous producers 
> (the smtp servers) and only one consumer (the server responsible to 
> dequeue, store in mailbox, and serve via imap4/pop3 the inbox).
Yes,This is exactly what I'm looking for.
>
> Now, if you are looking for imap4/pop3, this is another story (we need 
> some distributed mail uid management), and this is not available, and 
> not planned for 3.0 final.
>
> So, how do we go further: will you look at distributed amq 
> configuration (there's plenty on their website, on the net, and on amq 
> mailing list), or would you like us to look it for you (in this case, 
> we can not guarantee the time on which it could be done)? Of course, 
> we can futher help/discuss the ideas/issues here on the mailing list.

I'm not looking for how to configure a distributed amq, I know this 
isn't the best place for this kind requests. I'm only interesting on how 
to edit james-server-context.xml file to use an external instance of 
activemq.
In this file there are three sections about amq and camel:

<amq broker ... >
     ...
</amq:broker>

<amq:connectionFactory ... >
     ...
</amq:connectionFactory>

and

<camel:camelContext ...>
     ...
</camel:camelContext>

I think I have to edit the "broker" part specifying in 
transportConnectors my external activemq server. Is this correct?
Instead, I didn't understand what to do of "connectionFactory"and 
"camelContext". I have to leave everything the same?

Could you please suggest me a reference or a link to help me understand 
how James uses ActiveMQ and Camel?


Best regards,

Nicola.


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


Re: James configuration for SMTP servers load balancing and activeMQ

Posted by Eric Charles <er...@apache.org>.
Hi Nicola,

If you are only looking for SMTP loadbalancing, it's indeed a matter of 
configuring a distributed activemq cluster, with numerous producers (the 
smtp servers) and only one consumer (the server responsible to dequeue, 
store in mailbox, and serve via imap4/pop3 the inbox).

Now, if you are looking for imap4/pop3, this is another story (we need 
some distributed mail uid management), and this is not available, and 
not planned for 3.0 final.

So, how do we go further: will you look at distributed amq configuration 
(there's plenty on their website, on the net, and on amq mailing list), 
or would you like us to look it for you (in this case, we can not 
guarantee the time on which it could be done)? Of course, we can futher 
help/discuss the ideas/issues here on the mailing list.

Thx,

Eric


On 19/01/12 15:36, Nicola Salvemini wrote:
> Hello!
>
> I'm using James 3.0-beta3 with maildir, and I'm looking for a efficient
> method to perform load balancing of various SMTP servers.
> This is my scenario:
> For the email domain mydomain.com exist many MX records:
> mxA.mydomain.com, mxB.mydomain.com, ...
> Every MX record corresponds to a SMTP server:
>
> mxA.mydomain.com ==> SMTP server on hostA
> mxB.mydomain.com ==> SMTP server on hostB
>
> All emails incoming on all SMTP servers are stored on a unique maildir
> repository. Until now I used maildir on a share file system (NFS), but
> now I'm having several problems with the reliability.
> The idea now (how Norman suggest me in a previous thread) is to write on
> the same activemq queue which dispatch the mails and deliver it to the
> maildir.
> So, the scenario becomes:
>
> James on hostA => use James anbedded activemq
> James on hostB => use activemq on hostA
> James on hostC => use activemq on hostA
> ...
>
>
> What do you think about? Could you please provide me some suggestions
> (or some documents) about how to configure James
> (james-server-context.xml file) on hostA and hostB?
> Is it possible to use on hostA the "embedded version" of activemq? How I
> can configure hostB to use it? Wath about camel?
>
> Thanks in advance,
>
> Nicola
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>

-- 
eric | http://about.echarles.net | @echarles

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