Re: Hupa or Alternative

2023-04-29 Thread Jerry Malcolm

David,

Definitely wouldn't ask for additional coding from you.  I could create  
private Git branch and tweak it there.


The only thing I would really like to have initially is some way to 
bypass the signin page and bring up JWMA already authenticated to a 
certain ID/PW.  Something like calling JWMA with a hashcode on the URL 
that can be resolved to a user ID/PW entry in the user db.  Again, I can 
tweak the code and add a few things, just as long as I can figure out 
how to do it.


I may be in touch later :-). Thanks for all your help.

Jerry


On 4/29/2023 1:12 PM, David Matthews wrote:

hi Jerry


Thanks again.  I'm not really concerned about it working properly.
Totally trust you there... :-)

:-) total? Not sure I can recommend that!

As for your requirements, I just run a few tomcat apps on a subdomain, 
including jwma. I've written up how to do that also incidentally and wire up 
tomacat to apache. If that's adequate for your customers, all other things 
being equal, it should be straightforward  enough.

Not sure I like "embedded" - well I don't dislike it, but I think that would 
require some coding that I'm probably not interested in doing.

Best wishes with it anyway; I'd be delighted if it works out.

--
David Matthews
m...@dmatthews.org


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



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



Re: Hupa or Alternative

2023-04-29 Thread Jerry Malcolm

David,

Thanks again.  I'm not really concerned about it working properly.  
Totally trust you there... :-)   I have a few specific 
requirements/desires that I might want to discuss with you.  It might be 
a bit premature now since I haven't yet started playing with it.  But 
I'd like to embed this into my client's backoffice web site and have a 
user's JWMA instance as part of the user's currently existing profile 
page.  The login to JWMA would be automatic based on the user's 
profile.  The fewer moving parts I have to expose to the user, the 
better :-).   I'm having fits with users having to configure 
Thunderbird/Outlook/iPhone/Android/etc in order to get their mail.  
Initially, just having a link to the JWMA client page will be a huge 
improvement.   I'll likely be back to you with a few questions about 
future integration when I get the first step going.


Jerry

On 4/29/2023 10:11 AM, David Matthews wrote:

David, thanks for the quick response.  JWMA didn't show up in my
original google search.  It looks like it will definitely meet my
needs.  Is there a forum for tech discussions for JWMA?

hi Jerry

Any questions - ask me - after you've ready the doc, which is pretty good; it's 
my project these days.

I got onto it around 2012 or something like; I thought it looked very pretty, 
but it worked like ... no I don't want to be rude. Problem was the original 
people had rolled their own instead of using a framework and the code was 
pretty pasta like - the long thin stuff.

I rewrote it all using the stripes framework, which was excellent - very sad that it 
seems to be slipping to oblivion. I wrote the view stuff for small screen clients, but 
the desktop view code and appearance is pretty mush as the original guys did it. I tried 
to rewrite it in "modern" html - doing away with tables, but came to the 
opinion it wasn't possible.

I also extended it a bit by making maildir storage format an option - it was 
mbox only originally. I don't use maildir, so it's not had a lot of testing, 
but I think it's ok. You'll need maildir of course if james is your imap server 
as I don't think it does mbox?. mail exchanger, imap server (james acts as both 
of course) and webmail client must all use same storage format.

TBH it's unlikely I'll do much more with it as it works perfectly and does 
exactly what I need. the code is a bit clunking in places where I bolted on 
stuff I didn't appreciate would be necessary at original design stage, but :-) 
it's not so bad!

--
David Matthews
m...@dmatthews.org


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



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



Re: Hupa or Alternative

2023-04-29 Thread Jerry Malcolm
David, thanks for the quick response.  JWMA didn't show up in my 
original google search.  It looks like it will definitely meet my 
needs.  Is there a forum for tech discussions for JWMA?


Thanks again.

Jerry

On 4/29/2023 2:08 AM, David Matthews wrote:

I realize that Hupa project has been retired.  However, I need to embed
a webMail client into my web site, and Hupa appears to be able to do
what I need.  But all of the source and binary download links on the
Apache Hupa page are dead.

Is there a new/better alternative to Hupa now?  If not, is there some
place I can download the binary for Hupa?

hi Jerry

consider jwma?

https://jwma.sourceforge.net/

I anyway doubt running unsupported software would be a great idea.

--
David Matthews
m...@dmatthews.org


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



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



Hupa or Alternative

2023-04-28 Thread Jerry Malcolm
I realize that Hupa project has been retired.  However, I need to embed 
a webMail client into my web site, and Hupa appears to be able to do 
what I need.  But all of the source and binary download links on the 
Apache Hupa page are dead.


Is there a new/better alternative to Hupa now?  If not, is there some 
place I can download the binary for Hupa?


Thanks.


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



Re: Killing long-running tasks

2022-10-05 Thread Jerry Malcolm

Sorry.  Totally forgot to include it.  Currently it's Spring.

Jerry

On 10/5/2022 8:41 PM, Benoit TELLIER wrote:

Hello Jerry,

Which backend are you using? JPA ?

On 06/10/2022 08:32, Jerry Malcolm wrote:
A client yesterday had a folder with 20,000 emails and decided to 
delete and/or move most of them to other folders (using Thunderbird 
client).  The server slowed to a crawl. Since that time, opening any 
folder on any account takes forever with Thunderbird timing out most 
of the time. I've tried rebooting james several times.  No luck.  
Does James cache long-running tasks and continue on the tasks after a 
reboot?

No.
If so, how do I kill the task(s) permanently?  If tasks do not carry 
over across reboots, where is the best place to look in the logs to 
see what has is causing the server to go to its knees?  It's been 36 
hours and it's still barely responding.
I would recommend you starting an Application Performance Manager like 
glowroot. We have some set up on it to capture IMAP transactions, and 
it should support SQL queries as well, you would be able to 
investigate your slow traces. Link to a James set up with glowroot: 
https://github.com/apache/james-project/tree/master/server/apps/distributed-app/src/main/glowroot


Thx


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




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



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



Killing long-running tasks

2022-10-05 Thread Jerry Malcolm
A client yesterday had a folder with 20,000 emails and decided to delete 
and/or move most of them to other folders (using Thunderbird client).  
The server slowed to a crawl. Since that time, opening any folder on any 
account takes forever with Thunderbird timing out most of the time.  
I've tried rebooting james several times.  No luck.  Does James cache 
long-running tasks and continue on the tasks after a reboot?  If so, how 
do I kill the task(s) permanently?  If tasks do not carry over across 
reboots, where is the best place to look in the logs to see what has is 
causing the server to go to its knees?  It's been 36 hours and it's 
still barely responding.


Thx


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



Re: Keystore Renewal Policy?

2020-05-12 Thread Jerry Malcolm
I have a lot of customers that use Thunderbird, Outlook, iPhone, etc to 
access their mail.  All of these scream if the certificate is expired.


I'm not having any problems per se.  I use a three step process with 
LetsEncrypt, openssl, and keytool.  Everything functions fine.  
LetsEncrypt has a command that you run as a cron job that will renew the 
certs automatically usually when they are 2 months into a 3-month 
expiration cycle.  It runs daily.  But it only triggers the cert 
renewals when it decides it's close enough to expiration.  I'm just 
worried about the cert auto-renewing, but in the process invalidating 
the keystore files I'm using for imap and smtp.  I agree that the 
process of running openssl and keytool is trivial.  But I just need to 
figure out a way to auto-run them as well if I discover that LetsEncrypt 
has auto-refreshed the certs and thereby invalidated the keystore.  The 
'best' answer would be that the keystore will continue to work with a 
refreshed cert. But I guess I'll need to wait a couple of months until 
LetsEncrypt does its thing and I find out if everything dies.  Not a big 
deal.  Just trying to get ahead of the problem.


Thanks.

Jerry

On 5/12/2020 3:46 PM, David Matthews wrote:

David,

That's good info in the article.  But my question was does the
keytool-generated file expire as well when the underlying cert
(LetsEncrypt or self-signed cert) expires?  Or can I simply renew the
underlying cert without having to re-execute the keytool step each time
the cert auto-renews?


Short answer - I don't know.

But a couple of thoughts:-

1) That keytool command completes as you snap your fingers, it's not an 
intensive thing.

2)LetsEncrypt for https, I totally get (and use it myself); you do not want 
people having to ignore browser warnings to see your web site. I don't see it 
as an issue with imaps though. Dovecot is another imap server and depending on 
which version/distro you use, for imaps it comes with a certificate or offers a 
script to create one.

Seems to me that using keytool is just the equivalent for James - I guess you 
could also use openssl, which dovecot uses. I just checked that and saw the 
cert expires after 365 days, so I've certainly run on an out of date cert at 
times even if I'm not doing it now. :-)

Do I care? No, my webmail program doesn't check the cert for validity - it runs 
on the same machine as dovecot so that is hardly a serious issue -  I just want 
the encryption. I'm pretty sure there's no problem with sylpheed either, 
although it's a good while since I used it. May be things like thunderbird 
check cert validity? Not sure.

How many people are going to access their email on your server? It's not like a 
web page which is for the whole world.

--
David Matthews
m...@dmatthews.org


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



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



Re: Keystore Renewal Policy?

2020-05-12 Thread Jerry Malcolm

David,

That's good info in the article.  But my question was does the 
keytool-generated file expire as well when the underlying cert 
(LetsEncrypt or self-signed cert) expires?  Or can I simply renew the 
underlying cert without having to re-execute the keytool step each time 
the cert auto-renews?


Jerry

On 5/12/2020 9:03 AM, David Matthews wrote:

hi Jerry

Not sure how helpful this is, but I mention it just in case

https://dmatthews.org/java_email.html#imaps

discusses imaps with james.

I use a self signed cert and TBH not sure what extra LetsEncrypt offers you 
over that, but I produce the key with

keytool -genkey -alias james -keyalg RSA

and from

https://letsencrypt.org/docs/integration-guide/

"Let’s Encrypt accepts RSA keys from 2048 to 4096 bits in length"

--
David Matthews
m...@dmatthews.org


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



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



Keystore Renewal Policy?

2020-05-11 Thread Jerry Malcolm
I finally got the process down with certbot-->openssl-->keytool to get 
LetsEncrypt certs and convert them to keystore files for SMTP and IMAP.  
One question... Since LetsEncrypt requires renewing the certs every 90 
days, does that also add a requirement to re-generate the keystore files 
if there is a renewed cert?  If so, are there any tools to auto-renew 
the keystore files?



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



Re: Building JAMES

2020-04-26 Thread Jerry Malcolm
Sadly I realized a while back that it does not build out of the box.  
Through much trial and error, I finally got the build to complete.  
However, even with that, for some reason I still get several errors.  
Apparently they aren't fatal errors.  I have learned that if there is 
really something wrong, the build won't complete.  However, if the maven 
build gets to the end, even if there were errors reported, the build 
works.  I would really like to understand this better.  If the 'errors' 
I get aren't really critical, seems they should be warnings.  I build 
and use James. But it doesn't give me a whole load of confidence that 
there were errors in the build, even though the build doesn't abort on them.


What kind of errors are you getting?  Does the build stop on those errors?

Jerry

On 4/26/2020 5:58 AM, David Leangen wrote:

Hi!

I am trying to build JAMES from HEAD using mvn install. It is my expectation 
(from working with other projects) that I should just be able to build “out of 
the box”.

My first question: is my expectation correct? Am I supposed to be able to build 
JAMES without any compilation errors?


If so, is anybody willing to help me understand the problems so I can make PRs 
to fix the build issues?

If not: what is the expected path to be able to use the source code. It is not 
clear to me from the documentation (which only seems to discuss building the 
websites).


Thanks!
=David


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



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



Re: [James 3.4.0] log files

2020-03-17 Thread Jerry Malcolm
Tommy, I hit this problem as well.  Turns out that all the logs were 
restructured in 3.4, and the log4j file was not updated accordingly.  
I've updated mine and also added several more log points.  This one 
works for me.  Replace your /conf/log4j.properties file with this one, 
and play around with it:


#  Licensed to the Apache Software Foundation (ASF) under one
#  or more contributor license agreements.  See the NOTICE file
#  distributed with this work for additional information
#  regarding copyright ownership.  The ASF licenses this file
#  to you under the Apache License, Version 2.0 (the
#  "License"); you may not use this file except in compliance
#  with the License.  You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
#  Unless required by applicable law or agreed to in writing,
#  software distributed under the License is distributed on an
#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
#  KIND, either express or implied.  See the License for the
#  specific language governing permissions and limitations
#  under the License.

# See http://james.apache.org/server/3/config.html for usage

log4j.rootLogger=INFO

log4j.appender.CONS=org.apache.log4j.ConsoleAppender
log4j.appender.CONS.layout=org.apache.log4j.PatternLayout
log4j.appender.CONS.layout.ConversionPattern=%-5p %d{HH:mm:ss,SSS} | %c 
| %m%n


log4j.appender.FILE=org.apache.log4j.DailyRollingFileAppender
log4j.appender.FILE.File=../log/james-server.log
log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
log4j.appender.FILE.layout.ConversionPattern=%-5p %d{HH:mm:ss,SSS} | %c 
| %m%n


log4j.appender.MAILBOXMANAGER=org.apache.log4j.DailyRollingFileAppender
log4j.appender.MAILBOXMANAGER.File=../log/mailboxmanager.log
log4j.appender.MAILBOXMANAGER.DatePattern='.'-MM-dd
log4j.appender.MAILBOXMANAGER.layout=org.apache.log4j.PatternLayout
log4j.appender.MAILBOXMANAGER.layout.ConversionPattern=%-5p 
%d{HH:mm:ss,SSS} | %c | %m%n


log4j.appender.IMAPSERVER=org.apache.log4j.DailyRollingFileAppender
log4j.appender.IMAPSERVER.File=../log/imapserver.log
log4j.appender.IMAPSERVER.DatePattern='.'-MM-dd
log4j.appender.IMAPSERVER.layout=org.apache.log4j.PatternLayout
log4j.appender.IMAPSERVER.layout.ConversionPattern=%-5p %d{HH:mm:ss,SSS} 
| %c | %m%n


log4j.appender.MAILETCONTAINER=org.apache.log4j.DailyRollingFileAppender
log4j.appender.MAILETCONTAINER.File=../log/mailetcontainer.log
log4j.appender.MAILETCONTAINER.DatePattern='.'-MM-dd
log4j.appender.MAILETCONTAINER.layout=org.apache.log4j.PatternLayout
log4j.appender.MAILETCONTAINER.layout.ConversionPattern=%-5p 
%d{HH:mm:ss,SSS} | %c | %m%n


log4j.appender.DNSSERVICE=org.apache.log4j.DailyRollingFileAppender
log4j.appender.DNSSERVICE.File=../log/dnsservice.log
log4j.appender.DNSSERVICE.DatePattern='.'-MM-dd
log4j.appender.DNSSERVICE.layout=org.apache.log4j.PatternLayout
log4j.appender.DNSSERVICE.layout.ConversionPattern=%-5p %d{HH:mm:ss,SSS} 
| %c | %m%n


log4j.appender.POP3SERVER=org.apache.log4j.DailyRollingFileAppender
log4j.appender.POP3SERVER.File=../log/pop3server.log
log4j.appender.POP3SERVER.DatePattern='.'-MM-dd
log4j.appender.POP3SERVER.layout=org.apache.log4j.PatternLayout
log4j.appender.POP3SERVER.layout.ConversionPattern=%-5p %d{HH:mm:ss,SSS} 
| %c | %m%n


log4j.appender.SMTPSERVER=org.apache.log4j.DailyRollingFileAppender
log4j.appender.SMTPSERVER.File=../log/smtpserver.log
log4j.appender.SMTPSERVER.DatePattern='.'-MM-dd
log4j.appender.SMTPSERVER.layout=org.apache.log4j.PatternLayout
log4j.appender.SMTPSERVER.layout.ConversionPattern=%-5p %d{HH:mm:ss,SSS} 
| %c | %m%n


log4j.appender.LMTPSERVER=org.apache.log4j.DailyRollingFileAppender
log4j.appender.LMTPSERVER.File=../log/lmtpserver.log
log4j.appender.LMTPSERVER.DatePattern='.'-MM-dd
log4j.appender.LMTPSERVER.layout=org.apache.log4j.PatternLayout
log4j.appender.LMTPSERVER.layout.ConversionPattern=%-5p %d{HH:mm:ss,SSS} 
| %c | %m%n


log4j.appender.MAILREPOSITORYSTORE=org.apache.log4j.DailyRollingFileAppender
log4j.appender.MAILREPOSITORYSTORE.File=../log/mailrepositorystore.log
log4j.appender.MAILREPOSITORYSTORE.DatePattern='.'-MM-dd
log4j.appender.MAILREPOSITORYSTORE.layout=org.apache.log4j.PatternLayout
log4j.appender.MAILREPOSITORYSTORE.layout.ConversionPattern=%-5p 
%d{HH:mm:ss,SSS} | %c | %m%n


log4j.appender.USERSREPOSITORY=org.apache.log4j.DailyRollingFileAppender
log4j.appender.USERSREPOSITORY.File=../log/usersrepository.log
log4j.appender.USERSREPOSITORY.DatePattern='.'-MM-dd
log4j.appender.USERSREPOSITORY.layout=org.apache.log4j.PatternLayout
log4j.appender.USERSREPOSITORY.layout.ConversionPattern=%-5p 
%d{HH:mm:ss,SSS} | %c | %m%n


log4j.appender.FETCHMAIL=org.apache.log4j.DailyRollingFileAppender
log4j.appender.FETCHMAIL.File=../log/fetchmail.log
log4j.appender.FETCHMAIL.DatePattern='.'-MM-dd
log4j.appender.FETCHMAIL.layout=org.apache.log4j.PatternLayout
log4j.appender.FETCHMAIL.layout.ConversionPattern=%-5p 

Re: DKIM With Virtual Hosting

2020-03-17 Thread Jerry Malcolm

David,

I'm happy to know a knowledgeable person related to DKIM.  From what I 
can tell, the current james dkim mailet is only usable for non-virtual 
hosting servers, where the server rdns is the same as the 'from' domain 
in the email.  The james dkim mailet is going to need some modifications 
to support virtual hosting.  But until recently, it was not clear to me 
that I needed to sign using each virtual host 'from' domain instead of 
the smtp server domain.


I am hosting all of my domains on Amazon Web Services.  AWS offers a 
gateway that can serve as a james proxy.  I'm not thrilled to have to do 
it, but I'm now 'laundering' all of my outbound mail through the AWS 
gateway.  Receiving servers see AWS, not my james server.  I analyzed 
how the AWS gateway modifies the mail.  The AWS gateway adds a DKIM 
record for the actual 'from' domain as you explained is required.  It 
also adds a DKIM record for the AWS server domain itself.  Is that 
overkill?  Or should there always be an smtp server dkim record as well 
as a 'from' domain dkim record?  At least now, gmail and other recipient 
servers are no longer flagging/bouncing my outbound mail.  I'd really 
like to be able to get the same result without laundering the mail 
through the gateway.  But until I can update the dkim mailet to support 
a bunch of virtual hosts, I'm just going to stick with the duct-taped 
process with the gateway that works.


Thanks so much for the info.  I may come back to you with more dkim 
questions.


Jerry

On 3/17/2020 9:31 AM, m...@dmatthews.org.INVALID wrote:

Sorry for belated reply - I'm new to James, but not DKIM, which is pretty much 
essential these days if you want the mega providers to not put your email in 
spam boxes.

Firstly, DKIM is a per domain thing. You cannot put a single DKIM TXT record in 
your server's DNS and expect that will work for all the domains you have on 
that server.

I've got it working fine, admittedly for a single domain only and I've included 
how to do this in a write up on line (mainly so I remember how to do it 
myself!). I *think* you can probably extrapolate from what I've done to make it 
work with multiple domains on a single James smtp instance. My nameservers use 
tinyDNS which has it's own way of doing things so you may well need to do some 
more hunting around to get the correct format for the TXT record to suit 
whatever nameserver service you use.

While you're at it, you also need to put up SPF and DMARC records, but they are 
easier, being purely DNS TXT record things as opposed to DKIM, which has two 
parts:-

1)james is set up to sign outgoing email for your domain(s) with private key(s)

https://dmatthews.org/java_email.html

2)the remote server uses the corresponding public key in your domain's TXT 
record to make sure the mail came from your domain and has not been tampered 
with in transit

https://dmatthews.org/email_auth.html#dkim

Finally if your mail is actually being bounced rather than just silently being 
put into spam boxes, I would worry that your ip address has gotten onto a DNSBL.

--
David Matthews
m...@dmatthews.org


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



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



Re: Version 3.4.0 Fails to store mail messages

2020-03-16 Thread Jerry Malcolm
I believe the official 3.4 release till had the problems with the case 
of the sender/recipient vs the case of the user name. Scrounging around 
the database, I found hundreds of emails put in inboxes that had 
different cases in their senders/recipients.  Not sure if this is your 
problem.  But this situation manifests itself as lost email.


Jerry


On 3/16/2020 10:52 AM, m...@dmatthews.org.INVALID wrote:

Hi Joe, this is weird, which product did you use? (distributed James,
Spring James, ...) ?

This looks like the same problem that I and another couple of people mentioned 
here. I was using

https://downloads.apache.org/james/server/3.4.0/james-server-app-3.4.0-app.zip


Are you sending or receiving message? Could you put some logs, even they
are debugs, looking at the mailet processing pipeline might give us some
ideas


What I found was that if you sent a mail the logs reported it as being spooled, 
but it was never delivered to the inbox. No error message and the same failure 
if mail was sent from a local or remote user. I now have version 3.3.0 running  
and mail is sent and delivered reliably.

--
David Matthews
m...@dmatthews.org


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



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



Re: DKIM With Virtual Hosting

2019-12-28 Thread Jerry Malcolm



On 12/28/2019 9:49 AM, Garry Hurley wrote:

I wonder if the problem is not with your setup but with the spam filters on 
your recipients’ machines. You might remember that AOL used to be notorious for 
marking messages from certain domains as ‘untrusted’ and ‘possible spam’ even 
though a large percentage of the spam on the Internet originated from or passed 
through relays at AOL. Something similar might be happening to you, since AWS 
is a widely used hosting platform and they don’t check up on their clients’ 
instances to see if those machines are compromised or are compromising other 
systems. They simply lack the resources to do so.

Sent from my iPhone


Garry,

Thanks for the info.  But that still begs the question why 'my' question 
on the forum was flagged by Peter's gmail and no other posts from the 
apache server were flagged.


My overriding problem still exists with having some mail bounced.  But 
I'd like to circle back to the original question on this thread about 
how DKIM should be configured in JAMES when sending for virtual 
domains.  Should I have a DKIM signature for the virtual host domain 
sending the email as well as a DKIM signature for my smtp server's 
domain the way AWS's email service does?  If so, how is that done in JAMES?


Thx.





On Dec 28, 2019, at 8:16 AM, Peter Henderson  
wrote:

Hi Jerry,

Your original message was the only one I've seen which was flagged
suspicious. All other posts on the james user list are received without
suspicion.
For completeness, your reply to my feedback was not flagged.

HTH

Peter.





On Sat, 28 Dec 2019 at 01:07, Jerry Malcolm  wrote:

Hi Peter,

Actually this tells me a lot.  The message that I posted that you
received and gmail flagged did not come directly from my james server.
My post went to the Apache JAMES forum, and the forum server re-sent it
out to you and other subscribers.   Anything related to my JAMES server,
my ip address, DKIM, spf, etc would have been scrubbed from the message
before the forum server redistributed it.  So if gmail flagged it, it
must have been something related to the content in the message itself or
something related to Apache's James Forum server.  Do you get other
posts to this forum that are flagged as suspicious, or was it only
mine?  I'm sure gmail is not going to be much help in informing what it
found that made it suspicious.

Thx

Jerry


On 12/27/2019 5:45 PM, Peter Henderson wrote:
On Fri, 27 Dec 2019 at 16:50, Jerry Malcolm 

wrote:

I know just enough about DKIM to be very dangerous... so bear with me
here...

I am still struggling with mail I send being bounced.  In the interim to
protect my clients, I configured some of my tomcat apps to use Amazon's
SES (SMTP) service bypassing my JAMES server.  I analyzed the mail sent
via AWS just to see what might be different.  One thing I see is TWO
DKIM signatures... one for the "from" domain of the email and another
for the sending host domain "amazonaws.com".

I have had JAMES configured with DKIM for years. But all I have is a
DKIM signature for my main server domain and not for each individual
sending domain.  mail-tester.com hasn't complained. But again, mail is
bouncing from some domains like icloud.com, outlook.com, etc.  So
"something" is still wrong Everything is on the table as possibly
flawed right now.

So what is the 'right' way to do DKIM?  I am going to assume that if AWS
is signing for both the virtual domain and the sending server domain,
that's probably a good thing.  But I don't see a way in the JAMES DKIM
mailet to add a second signature for the sending virtual host domain.

Am I missing something?  Is my DKIM fine with only signing the basic
server?  Should I continue to look elsewhere for my problems?  Or should
I do additional work to start signing the virtual sending domain as

well?

Thx

Jerry


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



FYI
My gmail client, RED flagged your message as suspicious.
So I diligently read the content, then clicked the "it's safe" button.

Otherwise I can't help.

HTH
Peter.








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



--
Peter Henderson

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



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



Re: DKIM With Virtual Hosting

2019-12-27 Thread Jerry Malcolm

Hi Peter,

Actually this tells me a lot.  The message that I posted that you 
received and gmail flagged did not come directly from my james server.  
My post went to the Apache JAMES forum, and the forum server re-sent it 
out to you and other subscribers.   Anything related to my JAMES server, 
my ip address, DKIM, spf, etc would have been scrubbed from the message 
before the forum server redistributed it.  So if gmail flagged it, it 
must have been something related to the content in the message itself or 
something related to Apache's James Forum server.  Do you get other 
posts to this forum that are flagged as suspicious, or was it only 
mine?  I'm sure gmail is not going to be much help in informing what it 
found that made it suspicious.


Thx

Jerry

On 12/27/2019 5:45 PM, Peter Henderson wrote:

On Fri, 27 Dec 2019 at 16:50, Jerry Malcolm  wrote:


I know just enough about DKIM to be very dangerous... so bear with me
here...

I am still struggling with mail I send being bounced.  In the interim to
protect my clients, I configured some of my tomcat apps to use Amazon's
SES (SMTP) service bypassing my JAMES server.  I analyzed the mail sent
via AWS just to see what might be different.  One thing I see is TWO
DKIM signatures... one for the "from" domain of the email and another
for the sending host domain "amazonaws.com".

I have had JAMES configured with DKIM for years. But all I have is a
DKIM signature for my main server domain and not for each individual
sending domain.  mail-tester.com hasn't complained. But again, mail is
bouncing from some domains like icloud.com, outlook.com, etc.  So
"something" is still wrong Everything is on the table as possibly
flawed right now.

So what is the 'right' way to do DKIM?  I am going to assume that if AWS
is signing for both the virtual domain and the sending server domain,
that's probably a good thing.  But I don't see a way in the JAMES DKIM
mailet to add a second signature for the sending virtual host domain.

Am I missing something?  Is my DKIM fine with only signing the basic
server?  Should I continue to look elsewhere for my problems?  Or should
I do additional work to start signing the virtual sending domain as well?

Thx

Jerry


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



FYI
My gmail client, RED flagged your message as suspicious.
So I diligently read the content, then clicked the "it's safe" button.

Otherwise I can't help.

HTH
Peter.









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



DKIM With Virtual Hosting

2019-12-27 Thread Jerry Malcolm
I know just enough about DKIM to be very dangerous... so bear with me 
here...


I am still struggling with mail I send being bounced.  In the interim to 
protect my clients, I configured some of my tomcat apps to use Amazon's 
SES (SMTP) service bypassing my JAMES server.  I analyzed the mail sent 
via AWS just to see what might be different.  One thing I see is TWO 
DKIM signatures... one for the "from" domain of the email and another 
for the sending host domain "amazonaws.com".


I have had JAMES configured with DKIM for years. But all I have is a 
DKIM signature for my main server domain and not for each individual 
sending domain.  mail-tester.com hasn't complained. But again, mail is 
bouncing from some domains like icloud.com, outlook.com, etc.  So 
"something" is still wrong Everything is on the table as possibly 
flawed right now.


So what is the 'right' way to do DKIM?  I am going to assume that if AWS 
is signing for both the virtual domain and the sending server domain, 
that's probably a good thing.  But I don't see a way in the JAMES DKIM 
mailet to add a second signature for the sending virtual host domain.


Am I missing something?  Is my DKIM fine with only signing the basic 
server?  Should I continue to look elsewhere for my problems?  Or should 
I do additional work to start signing the virtual sending domain as well?


Thx

Jerry


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



Debugging 554 Responses

2019-12-20 Thread Jerry Malcolm
Since my migration to AWS and to James 3.4.x, I'm getting several '554' 
bounce responses from certain recipient servers.  I know this is a long 
shot on this question.  But any advice will be greatly appreciated.


I've sent mail to mail-tester.com which has been incredibly useful in 
resolving configuration issues in the past.  My mail is receiving a 10 
out of 10 perfect score.  This means rDNS, SPF, DKIM, SpamAssassin, 
blacklists, etc all are happy with my email. I even went so far as 
requesting 2 additional IP addresses from AWS.  I reconfigured JAMES 
several times to use the different IP addresses (and their equivalent 
rDNS names) in the transport mailet.  Each time, I rechecked with 
mail-tester.com and still got 10/10 with each different IP address.  
Yet, certain receiving domains are still bouncing with a 554.  It's hard 
to believe that three different IP addresses I received from AWS are all 
blacklisted on some DNSBL site.  But I'm definitely not the one causing 
a blacklisting.  The first emails I sent after changing to the 2nd and 
3rd IP addresses bounced with the 554.


I completely understand that a recipient server can bounce an email for 
any random reason.  It's just frustrating that they don't include any 
reason at all other than generic 554 which pretty much means nothing 
more than "you ain't gettin' in"


One instance of this problem is from a local school district domain.  
I'm trying to locate the IT support person to try get more info on the 
bounce.  But in the meantime, has anybody else had experiences like this 
and might have an idea of what I might still be doing wrong that is so 
offensive to these receiving server(s)?


Thanks.

Jerry


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



Re: port 25 & 587 & 465 and keystore password.

2019-11-05 Thread Jerry Malcolm
Just a quick, but huge "Thank You" to Mark for this information. I 
copied and customized your statements below for my domain, and SSL 
worked the first time after reboot.  Another checkmark on my list of 
todo items


Jerry

On 10/28/2019 10:06 AM, Mark Gordon wrote:

What I found was that the type of store was causing my problem.  I noticed
that using the bouncy castle provider was causing the problem.
The store I had created worked fine on 3.3.  When I added the bouncy castle
jars to 3.3 (to get DKIM going) I started getting the same "incorrect
password" error.

The examples I found for converting a LETSENCRYPT ssl cert into a java
keystore said to change the keystore to the non-proprietary type pkcs12.  I
found that the keystores that worked were of the JKS which seems to be the
default type.  If you list out a keystore of this type it will recommend
you convert it to pkcs12 but then you have the "incorrect password"
error.

After creating the cert with certbot (this creates letsencrypt
certificates) then you run these two commands:

This got me past the incorrect password problem.

I don't feel qualified to add to the wiki as I don't know why the other
style does not work with bouncy castle.  This was just brute force trial
and error.

openssl pkcs12 -export \
  -in /etc/letsencrypt/live/mail1.example.com/cert.pem \
  -inkey /etc/letsencrypt/live/mail1.example.com/privkey.pem \
  -out /tmp/mail1.example.com.p12 \
  -name james \
  -CAfile /etc/letsencrypt/live/mail1.example.com/fullchain.pem \
  -caname "Let's Encrypt Authority X3" \
  -password pass:changeit

/home/orderpt/software/jdk1.8.0_231/bin/keytool -importkeystore \
 -deststorepass changeit \
 -destkeypass changeit \
 -deststoretype jks \  THIS IS THE IMPORTANT LINE
 -srckeystore /tmp/mail1.example.com.p12 \
 -srcstoretype PKCS12 \
 -srcstorepass changeit \
 -destkeystore
/home/orderpt/software/james-server-app-3.4.0/var/mail1.example.com.keystore
\
 -alias james

-Mark


On Mon, Oct 28, 2019 at 4:21 AM Tellier Benoit  wrote:


Hello Mark,

Was http://james.apache.org/server/config-ssl-tls.html to answer your
concerns?

Please contribute to [1] if you think you can enhance it!

[1]

https://github.com/apache/james-project/blob/master/src/site/xdoc/server/config-ssl-tls.xml

Regards,

Benoit

On 28/10/2019 00:41, Mark Gordon wrote:

Hey James thanks for the info on the multiple SMTP servers.

I got past the ssl cert problem.  I had to do with the type of

keystore.  I

will send you the scripts I used.  I am using letsencrypt ssl certs and
they seem to be working correctly.


On Sat, Oct 26, 2019, 9:46 PM Jerry Malcolm 

wrote:

Mark,

I hit the same problem you are seeing about a month ago and reported it
on the forum, but got no response. I was not using SSL on my previous
version.  I planned to move to SSL as part of my migration.  I just
figured the proble was due to lack of knowledge on my part and pushed it
to the back burner.  But since you had something working that no longer
works, that gives me a different perspective on the problem.  I'll
probably start digging into the problem sometime this week.  If anyone
else already understands this problem, you won't hurt my feelings if you
find the problem and report a fix before I have a chance to begin
debugging it. :-)

As far as ports go, you can have as many imap and smtp servers defined
as you want.  You can have an smtp server with no SSL running on 25 and
completely different smtp server running on 587 with TLS.  For every
port you want to have an SMTP server, just replicate the 
block inside  in conf/smtpserver.xml and make the obvious
modifications to the new block.  Also make sure you have a bind
statement (0.0.0.0:465) in each block, and add the 
block to the smtpservers that you want to have ssl/tls on.  I've run two
smtp servers for years, one on port 25 and one on port 2025 that I tell
my clients to use to get around isp blockading port 25 to prevent

spamming.

Jerry

On 10/26/2019 5:17 PM, Mark Gordon wrote:

I have spent some time trying to get James 3.4 to work I have gotten

past a

few problems.  The latest is that I am getting a "keystore password
incorrect" and If I use the same keystore and config in 3.3 it works

fine.

Any ideas?

For inbound mail, can you only have port 587 open with START TLS?  and

not

have anything running on port 25?.

With James can you have port 587 and 465 using ssl/tls and have 25 not?

If

so how would one do this?

Thanks,
Mark




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



-
To unsubscribe, e-mail: server-user-unsubscr...@james.

Re: Setting "administratorid"?

2019-11-04 Thread Jerry Malcolm
Yes, I will definitely contribute to this.  A whole section on how to 
use delegation will be very helpful to other users.


On 11/4/2019 3:38 AM, Tellier Benoit wrote:

I just created an issue regarding this.

https://issues.apache.org/jira/browse/JAMES-2963

Jerry, would you have time to contribute this missing documentation?

Regards,

Benoit

On 04/11/2019 16:27, Tellier Benoit wrote:

Answers inlined,

Regards,

Benoit

On 30/10/2019 11:37, Jerry Malcolm wrote:

"enableVirtualHosting" is another config parameter that's set in this
same method.  So I decided to search around and see where that is set.
I found it, and just taking a wild guess, is this correct?

Maybe we need to further explain this.

When virtual hosting is enabled, usernames are composed of a local part
and a domain part. al...@domain.tld and al...@company.org are two
distinct users, with different login and distinct mailboxes. Creating a
user without domain part is forbidden.


When virtual hosting is turned of, usernames are only composed of a
local part. All domains handled by James (check domain list) can be used
as domain part of their mail address. al...@domain.tld and
al...@company.org are two mail address belonging to a same "alice" user,
with same login and mailboxes. Creating users with domain parts is
forbidden.

I will add the following indication within the documentation as it might
get really useful to understand this. Thanks for highlighting this weak
point!



     MD5

Try more secure algorithms, you should give a go to SHA-512.

We should update default configuration accordingly as MD5 hashing is not
acceptable.


     true
ad...@myhost.com


This took a whole lot of digging to figure out.  I really think the
default usersrepository.xml should have at least commented-out lines
defining where/how to set the administrator id.

I would be glad to have you contribute this!


I'll add it to my list if this is indeed the correct implementation.

Jerry


On 10/29/2019 11:27 PM, Jerry Malcolm wrote:

I see in AbstractUsersRepository where "adminstratorid" is pulled from
somewhere in the configuration:

     administratorId =
Optional.ofNullable(configuration.getString("administratorId"));

But I can't find any place to set it in the shipped configuration
files.  Where is the administrator id supposed to be defined, and what
is the correct syntax to define it?

Thx

Jerry


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


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


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



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



Re: AdministratorId Documentation

2019-11-04 Thread Jerry Malcolm
This is a followup to an earlier discussion.  I have a very large number 
of imap utilities that I use to maintain my clients' accounts and 
mailboxes.  They were all written using javax.mail's version of the IMAP 
interface.   Your code reference below was very helpful.  But I realized 
I would have to change all of my javax.mail code to commons.net.  It was 
going to be worth it if I could get the delegate function.  But I still 
was dreading the amount of migration/testing work.


So I did a bit of playing around looking at what was really 
happening to send the admin id, admin pw, and target account in the 
login.  Turns out in the javax.mail package, if you use:


      store.connect(host, port, user + "\0" + adminId, adminPW);

it logs in correctly with delegation.  So as much as I appreciate your 
code :-),  a one-line change to my javax.mail login code won out over 
almost a full rewrite of all my utilities.


Jerry


On 9/12/2019 11:01 PM, Tellier Benoit wrote:

If you are using commons-net, I succeeded to write:

https://gist.github.com/chibenwa/abd12fd6c0b06cadd1de591e3ac792b9

That should be helping you!

On 13/09/2019 10:40, Tellier Benoit wrote:

Wich library are you using?

On 13/09/2019 10:33, Jerry Malcolm wrote:

Thanks for the info, Tellier.  I kinda lost you on the mpt tests... I
was looking for how to change the following code to include an
administrator id.  I only have one field in the store.connect() method
for a user id, but I have an administrator id and the userid for the
target mailbox.  How do I pass in both?

    try
    {
   session = Session.getInstance(props, null);
   session.setDebug(debug);
   store = session.getStore(protocol);
   store.connect(host, port, user, password);
    }
    catch( Exception e)
    {
   log( "IMAPClient.connect() exception: " + e );
   throw(e);
    }

On 9/12/2019 10:10 PM, Tellier Benoit wrote:

Hello Jerry,

With the `administratorId`, you are able to use IMAP impersonation.

IE to log in as another user.

You should define it within usersrepository.xml. To see related "reading
config" code: AbstractUsersRepository is the way to go.

Agree that this needs example and documentation. I will do it straight
away.

For your IMAP call, MPT tests are going to be a gold mine, presenting
you the exact syntax.
mpt/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/AuthenticatePlain.test


Contains:

C: 0007 AUTHENTICATE "PLAIN" {36+}
# delegate\0imapuser\0password
C: ZGVsZWdhdGUAaW1hcHVzZXIAcGFzc3dvcmQ=
S: 0007 OK AUTHENTICATE completed.

# Ensure we are delegate
C: 0008 SELECT delegate
SUB {
S: \* FLAGS .*
S: \* .* EXISTS
S: \* .* RECENT
S: \* OK \[UIDVALIDITY .*\] UIDs valid
S: \* OK \[PERMANENTFLAGS .*\] Limited
S: \* OK \[HIGHESTMODSEQ .*\] Highest
S: \* OK \[UIDNEXT .*\] Predicted next UID
}
S: 0008 OK \[READ-WRITE\] SELECT completed\.

Regarding your development issues, I'm really sorry. My environment is
based on IntelliJ, and I encounter no issue.

To be able to compile, I use maven 3.6.2 with JDK 11.

Best regards,

Benoit Tellier


On 13/09/2019 09:53, Jerry Malcolm wrote:

Since it appears I'm not going to be able to build James 3.3.0 in the
foreseeable future, I'm now moving to plan d, e, f, or whatever... .I've
lost count.

My goal now is to assess my possibilities of using James 3.3.0 binaries
as-is and discarding the functionality I had hoped to re-add to 3.3.0
from 30b5 or moving the functionality to mailets that I can compile
outside of doing a full James build.

One thing I had added to beta5 was the ability to have a super-user,
master-key id that could be used in my custom external imap mailbox
maintenance utilities.  I've spent several hours digging through the
3.3.0 source code, and I see code referencing "administratorId".  From
what I can deduce from the code, the Authenticator and Authorizator
classes seem to accept this administrator id as the equivalent of the
master key I added to b5.  So can I access UserABC's mailbox through
imap but use my administratorId and password?  If that's the case, then
that's exactly what I need.  The problem is I can't find any
documentation on how to use administratorId.  Where do I define it?  And
how do I pass it on imap calls using the javax.mail.Store and other
classes in javax.mail that I use to access imap?

Jerry


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


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


-
To unsubscribe, e-mail: server-user-unsubscr..

Re: Setting "administratorid"?

2019-11-04 Thread Jerry Malcolm

Hi Benoit,

I wasn't actually questioning enableVirtualHosting.  I was simply trying 
to figure out where to put the admin id.  I noticed that the adminId was 
pulled from the configuration in the next line after the 
enableVirtualHosting flag was pulled.  So I was just deducing that 
perhaps they should be side by side in the same config file.  I tried 
that, and it worked.


My only recommendation was that we add a 'dummy' commented-only 
 line to the default config file, so others can easily 
find where to set it.


Jerry

On 11/4/2019 3:27 AM, Tellier Benoit wrote:

Answers inlined,

Regards,

Benoit

On 30/10/2019 11:37, Jerry Malcolm wrote:

"enableVirtualHosting" is another config parameter that's set in this
same method.  So I decided to search around and see where that is set.
I found it, and just taking a wild guess, is this correct?

Maybe we need to further explain this.

When virtual hosting is enabled, usernames are composed of a local part
and a domain part. al...@domain.tld and al...@company.org are two
distinct users, with different login and distinct mailboxes. Creating a
user without domain part is forbidden.


When virtual hosting is turned of, usernames are only composed of a
local part. All domains handled by James (check domain list) can be used
as domain part of their mail address. al...@domain.tld and
al...@company.org are two mail address belonging to a same "alice" user,
with same login and mailboxes. Creating users with domain parts is
forbidden.

I will add the following indication within the documentation as it might
get really useful to understand this. Thanks for highlighting this weak
point!



     MD5

Try more secure algorithms, you should give a go to SHA-512.

We should update default configuration accordingly as MD5 hashing is not
acceptable.


     true
ad...@myhost.com


This took a whole lot of digging to figure out.  I really think the
default usersrepository.xml should have at least commented-out lines
defining where/how to set the administrator id.

I would be glad to have you contribute this!


I'll add it to my list if this is indeed the correct implementation.

Jerry


On 10/29/2019 11:27 PM, Jerry Malcolm wrote:

I see in AbstractUsersRepository where "adminstratorid" is pulled from
somewhere in the configuration:

     administratorId =
Optional.ofNullable(configuration.getString("administratorId"));

But I can't find any place to set it in the shipped configuration
files.  Where is the administrator id supposed to be defined, and what
is the correct syntax to define it?

Thx

Jerry


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


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


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



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



(Resolved): Moving Servers Wipes Out iPhone's Mail Accounts

2019-11-04 Thread Jerry Malcolm
Finally, after 2 weeks, iPhones have all of their mail.  The problem was 
that my Lucene index was corrupted. Or to be more precise, only emails 
from the last two weeks since I first started up James on the new 
environment were indexed. Even after renaming (effectively removing) the 
/var/store/lucene folder, the index would not fully rebuild.  Same 
problem... but worse now... now it showed only mail that came in over 
the last 10 minutes since I cleaned the lucene index folder and lost the 
last 2 weeks' mail that actually was indexed.  On a whim, I changed 
indexer.xml to use lazyIndex instead of luceneIndex... voila all of 
the folders were fully indexed, and iPhone has all of the mail for each 
folder.  Couldn't find much documentation on lazyIndex vs. luceneIndex.  
But at this point, I think I'll take having mail back on my client's 
iPhones over any downside to using lazyIndex. But educate me if 
there are serious downsides to using lazyIndex.


Thunderbird populates folders using a different imap command which, 
apparently, goes straight to the JPA database instead of using the 
Lucene index.  So that's why the problem didn't appear in TBird.


I'm going to start another thread in the dev group specifically to 
discuss the Lucene issue.


Jerry

On 10/31/2019 12:35 PM, Jerry Malcolm wrote:
(I'm moving this thread to the dev forum since it appears now to not 
be a user problem)


More data now... Since iPhone doesn't load the correct email list and 
TBird does, I traced the precise same scenario with the same email 
account with TBird as the previous iPhone trace in the post below.  As 
I suspected, in order to do an initial full sync on a folder, TBird is 
asking for the list of UIDs in a different way. Note from the two traces:


TBird: UID fetch 1:* (FLAGS)
    Response: 1 FETCH (FLAGS (\\Seen) UID 5801)  (...followed by many 
other UIDs including the ones in iPhone search below)

---
iPhone: UID SEARCH RETURN (COUNT) 1:* NOT DELETED
 Response: ESEARCH (TAG "39") UID ALL 7776,7955:7970,7975:8033

The two queries above are for the same email account/folder. Again, 
I'm not an IMAP expert.  But it appears that both should return the 
same list of UIDs even though they ask for it differently.


Summary... the TBird query gets all UIDs for the folder starting at 
5801 as expected.  The iPhone query gets a subset of UIDs starting at 
7776.  This continues to support my current theory that the code that 
processes UID SEARCH RETURN (COUNT) 1:* is not correct.


If someone knows what class processes these imap queries, please let 
me know.  I'm going to dig into the code now.  But a few pointers to 
the package/classes would be helpful.


Thunderbird trace:

127 Request: 19 select "INBOX"
129,Response: * FLAGS (\\Answered \\Deleted \\Draft \\Flagged \\Seen 
"MailFlagBit1 "MailFlagBit0 NonJunk "label3 "label1 "Forwarded)

130,Response: 19 OK [READ-WRITE] SELECT completed.
132 Request: 20 getquotaroot "INBOX"
134 Response: * QUOTAROOT "INBOX" #private@malcolms.com
135,Response: 20 OK GETQUOTAROOT completed.
137,Request: 21 UID fetch 1:* (FLAGS)
139,Response: * 1 FETCH (FLAGS (\\Seen) UID 5801)
140,Response: * 2 FETCH (FLAGS (\\Seen) UID 5802)
141,Response: * 4 FETCH (FLAGS (\\Seen) UID 5804)

On 10/29/2019 3:12 PM, Jerry Malcolm wrote:
Ok, I need an IMAP expert Below is a very brief trace of the 
communications between iPhone mail and JAMES (3.4).  I completely 
deleted an account on my iPhone, then recreated it while in airplane 
mode to make sure I didn't miss any communications in my trace.  I 
started the trace, exited airplane mode and let the iPhone do an 
initial sync with the account.  The inbox folder in this account has 
over 1000 emails going back to early 2019.


I'm not an expert in IMAP.  But it appears that the iPhone mail app 
requests all of the emails 1:* (see line 812), but JAMES returns a 
single id plus two ranges (line 813).  But the total count JAMES 
reports is nowhere near the full 1000.  Subsequently (line 822), 
iPhone requests the emails JAMES told it about in line 813.  From 
what I can tell, the problem is in line 813. JAMES did not report all 
of the actual mail that is in the INBOX, which is exactly what I'm 
seeing on the phone.  Shouldn't JAMES return all 1000+ email ids that 
exist in INBOX?  Or am I reading the IMAP trace incorrectly?


Note that the only emails JAMES reports came in AFTER I migrated to 
the new server and to the James 3.4 from v3b5.  It appears that there 
is something different about pre-existing emails in the mailbox 
folder that is causing JAMES not to recognize them. But this problem 
ONLY exists on the iPhone mail app. Thunderbird gets all of the mail 
for the inbox.  So is iPhone must be sending a slightly different 
request command syntax than other clients do (??)  Just speculating


 798 IMAP Request: 37 SELECT INBOX
 802 IMAP Response: 37 OK [READ

Re: Moving Servers Wipes Out iPhone's Mail Accounts (IMAP Trace attached)

2019-10-31 Thread Jerry Malcolm
(I'm moving this thread to the dev forum since it appears now to not be 
a user problem)


More data now... Since iPhone doesn't load the correct email list and 
TBird does, I traced the precise same scenario with the same email 
account with TBird as the previous iPhone trace in the post below.  As I 
suspected, in order to do an initial full sync on a folder, TBird is 
asking for the list of UIDs in a different way. Note from the two traces:


TBird: UID fetch 1:* (FLAGS)
    Response: 1 FETCH (FLAGS (\\Seen) UID 5801)  (...followed by many 
other UIDs including the ones in iPhone search below)

---
iPhone: UID SEARCH RETURN (COUNT) 1:* NOT DELETED
 Response: ESEARCH (TAG "39") UID ALL 7776,7955:7970,7975:8033

The two queries above are for the same email account/folder. Again, I'm 
not an IMAP expert.  But it appears that both should return the same 
list of UIDs even though they ask for it differently.


Summary... the TBird query gets all UIDs for the folder starting at 5801 
as expected.  The iPhone query gets a subset of UIDs starting at 7776.  
This continues to support my current theory that the code that processes 
UID SEARCH RETURN (COUNT) 1:* is not correct.


If someone knows what class processes these imap queries, please let me 
know.  I'm going to dig into the code now.  But a few pointers to the 
package/classes would be helpful.


Thunderbird trace:

127 Request: 19 select "INBOX"
129,Response: * FLAGS (\\Answered \\Deleted \\Draft \\Flagged \\Seen 
"MailFlagBit1 "MailFlagBit0 NonJunk "label3 "label1 "Forwarded)

130,Response: 19 OK [READ-WRITE] SELECT completed.
132 Request: 20 getquotaroot "INBOX"
134 Response: * QUOTAROOT "INBOX" #private@malcolms.com
135,Response: 20 OK GETQUOTAROOT completed.
137,Request: 21 UID fetch 1:* (FLAGS)
139,Response: * 1 FETCH (FLAGS (\\Seen) UID 5801)
140,Response: * 2 FETCH (FLAGS (\\Seen) UID 5802)
141,Response: * 4 FETCH (FLAGS (\\Seen) UID 5804)

On 10/29/2019 3:12 PM, Jerry Malcolm wrote:
Ok, I need an IMAP expert Below is a very brief trace of the 
communications between iPhone mail and JAMES (3.4).  I completely 
deleted an account on my iPhone, then recreated it while in airplane 
mode to make sure I didn't miss any communications in my trace.  I 
started the trace, exited airplane mode and let the iPhone do an 
initial sync with the account.  The inbox folder in this account has 
over 1000 emails going back to early 2019.


I'm not an expert in IMAP.  But it appears that the iPhone mail app 
requests all of the emails 1:* (see line 812), but JAMES returns a 
single id plus two ranges (line 813).  But the total count JAMES 
reports is nowhere near the full 1000.  Subsequently (line 822), 
iPhone requests the emails JAMES told it about in line 813.  From what 
I can tell, the problem is in line 813.  JAMES did not report all of 
the actual mail that is in the INBOX, which is exactly what I'm seeing 
on the phone.  Shouldn't JAMES return all 1000+ email ids that exist 
in INBOX?  Or am I reading the IMAP trace incorrectly?


Note that the only emails JAMES reports came in AFTER I migrated to 
the new server and to the James 3.4 from v3b5.  It appears that there 
is something different about pre-existing emails in the mailbox folder 
that is causing JAMES not to recognize them.  But this problem ONLY 
exists on the iPhone mail app.  Thunderbird gets all of the mail for 
the inbox.  So is iPhone must be sending a slightly different request 
command syntax than other clients do (??)  Just speculating


 798 IMAP Request: 37 SELECT INBOX
 802 IMAP Response: 37 OK [READ-WRITE] SELECT completed.
 806 IMAP Request: 38 UID SEARCH RETURN (COUNT) 1:* NOT DELETED
 808 IMAP Response: * ESEARCH (TAG "38") UID COUNT 76
 809 IMAP Response: 38 OK SEARCH completed.
 812 IMAP Request: 39 UID SEARCH RETURN (ALL) 1:* NOT DELETED
 813 IMAP Response: * ESEARCH (TAG "39") UID ALL 7776,7955:7970,7975:8033
 814 IMAP Response: 39 OK SEARCH completed.
 817 IMAP Request: 40 UID SEARCH RETURN (ALL) 929:* NOT DELETED
 818 IMAP Response: * ESEARCH (TAG "40") UID ALL 7955:7970,7975:8033
 819 IMAP Response: 40 OK SEARCH completed.
 822 IMAP Request: 41 UID FETCH 7955:7970,7975:8033 (INTERNALDATE UID 
RFC822.SIZE FLAGS BODY.PEEK[HEADER.FIELDS (date subject from 
content-type to cc bcc message-id in-reply-to references list-id 
x-universally-unique-identifier)])


On 10/22/2019 3:07 AM, Matthieu Baechler wrote:

Hi Jerry,

I don't think trying to guess what happen will help you much. I would
rather try to capture the IMAP session.

I see two ways to do that:

1. you write a IMAP session logger in James (it should be really easy,
I don't know why it's not already there)

2. you disable SSL on the phone and do a tcpdump on the server

Once you'll have the IMAP session capture, it will be easier to
diagnose your problem.

Cheers,



---

Re: Setting "administratorid"?

2019-10-29 Thread Jerry Malcolm
"enableVirtualHosting" is another config parameter that's set in this 
same method.  So I decided to search around and see where that is set.  
I found it, and just taking a wild guess, is this correct?


class="org.apache.james.user.jpa.JPAUsersRepository">

    MD5
    true
ad...@myhost.com


This took a whole lot of digging to figure out.  I really think the 
default usersrepository.xml should have at least commented-out lines 
defining where/how to set the administrator id.


I'll add it to my list if this is indeed the correct implementation.

Jerry


On 10/29/2019 11:27 PM, Jerry Malcolm wrote:
I see in AbstractUsersRepository where "adminstratorid" is pulled from 
somewhere in the configuration:


    administratorId = 
Optional.ofNullable(configuration.getString("administratorId"));


But I can't find any place to set it in the shipped configuration 
files.  Where is the administrator id supposed to be defined, and what 
is the correct syntax to define it?


Thx

Jerry


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



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



Setting "administratorid"?

2019-10-29 Thread Jerry Malcolm
I see in AbstractUsersRepository where "adminstratorid" is pulled from 
somewhere in the configuration:


    administratorId = 
Optional.ofNullable(configuration.getString("administratorId"));


But I can't find any place to set it in the shipped configuration 
files.  Where is the administrator id supposed to be defined, and what 
is the correct syntax to define it?


Thx

Jerry


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



Re: Moving Servers Wipes Out iPhone's Mail Accounts (IMAP Trace attached)

2019-10-29 Thread Jerry Malcolm
Ok, I need an IMAP expert Below is a very brief trace of the 
communications between iPhone mail and JAMES (3.4).  I completely 
deleted an account on my iPhone, then recreated it while in airplane 
mode to make sure I didn't miss any communications in my trace.  I 
started the trace, exited airplane mode and let the iPhone do an initial 
sync with the account.  The inbox folder in this account has over 1000 
emails going back to early 2019.


I'm not an expert in IMAP.  But it appears that the iPhone mail app 
requests all of the emails 1:* (see line 812), but JAMES returns a 
single id plus two ranges (line 813).  But the total count JAMES reports 
is nowhere near the full 1000.  Subsequently (line 822), iPhone requests 
the emails JAMES told it about in line 813.  From what I can tell, the 
problem is in line 813.  JAMES did not report all of the actual mail 
that is in the INBOX, which is exactly what I'm seeing on the phone.  
Shouldn't JAMES return all 1000+ email ids that exist in INBOX?  Or am I 
reading the IMAP trace incorrectly?


Note that the only emails JAMES reports came in AFTER I migrated to the 
new server and to the James 3.4 from v3b5.  It appears that there is 
something different about pre-existing emails in the mailbox folder that 
is causing JAMES not to recognize them.  But this problem ONLY exists on 
the iPhone mail app.  Thunderbird gets all of the mail for the inbox.  
So is iPhone must be sending a slightly different request command syntax 
than other clients do (??)  Just speculating


 798 IMAP Request: 37 SELECT INBOX
 802 IMAP Response: 37 OK [READ-WRITE] SELECT completed.
 806 IMAP Request: 38 UID SEARCH RETURN (COUNT) 1:* NOT DELETED
 808 IMAP Response: * ESEARCH (TAG "38") UID COUNT 76
 809 IMAP Response: 38 OK SEARCH completed.
 812 IMAP Request: 39 UID SEARCH RETURN (ALL) 1:* NOT DELETED
 813 IMAP Response: * ESEARCH (TAG "39") UID ALL 7776,7955:7970,7975:8033
 814 IMAP Response: 39 OK SEARCH completed.
 817 IMAP Request: 40 UID SEARCH RETURN (ALL) 929:* NOT DELETED
 818 IMAP Response: * ESEARCH (TAG "40") UID ALL 7955:7970,7975:8033
 819 IMAP Response: 40 OK SEARCH completed.
 822 IMAP Request: 41 UID FETCH 7955:7970,7975:8033 (INTERNALDATE UID 
RFC822.SIZE FLAGS BODY.PEEK[HEADER.FIELDS (date subject from 
content-type to cc bcc message-id in-reply-to references list-id 
x-universally-unique-identifier)])


On 10/22/2019 3:07 AM, Matthieu Baechler wrote:

Hi Jerry,

I don't think trying to guess what happen will help you much. I would
rather try to capture the IMAP session.

I see two ways to do that:

1. you write a IMAP session logger in James (it should be really easy,
I don't know why it's not already there)

2. you disable SSL on the phone and do a tcpdump on the server

Once you'll have the IMAP session capture, it will be easier to
diagnose your problem.

Cheers,



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



Re: port 25 & 587 & 465 and keystore password.

2019-10-26 Thread Jerry Malcolm

Mark,

I hit the same problem you are seeing about a month ago and reported it 
on the forum, but got no response. I was not using SSL on my previous 
version.  I planned to move to SSL as part of my migration.  I just 
figured the proble was due to lack of knowledge on my part and pushed it 
to the back burner.  But since you had something working that no longer 
works, that gives me a different perspective on the problem.  I'll 
probably start digging into the problem sometime this week.  If anyone 
else already understands this problem, you won't hurt my feelings if you 
find the problem and report a fix before I have a chance to begin 
debugging it. :-)


As far as ports go, you can have as many imap and smtp servers defined 
as you want.  You can have an smtp server with no SSL running on 25 and 
completely different smtp server running on 587 with TLS.  For every 
port you want to have an SMTP server, just replicate the  
block inside  in conf/smtpserver.xml and make the obvious 
modifications to the new block.  Also make sure you have a bind 
statement (0.0.0.0:465) in each block, and add the  
block to the smtpservers that you want to have ssl/tls on.  I've run two 
smtp servers for years, one on port 25 and one on port 2025 that I tell 
my clients to use to get around isp blockading port 25 to prevent spamming.


Jerry

On 10/26/2019 5:17 PM, Mark Gordon wrote:

I have spent some time trying to get James 3.4 to work I have gotten past a
few problems.  The latest is that I am getting a "keystore password
incorrect" and If I use the same keystore and config in 3.3 it works fine.
Any ideas?

For inbound mail, can you only have port 587 open with START TLS?  and not
have anything running on port 25?.

With James can you have port 587 and 465 using ssl/tls and have 25 not?  If
so how would one do this?

Thanks,
Mark





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



Re: Apache James 3.4 install

2019-10-25 Thread Jerry Malcolm

Mark,

Once you get the build working, there are a couple of logging 
enhancements I STRONGLY recommend you make.


1) 
mailet\base\src\main\java\org\apache\mailet\base\MailetPipelineLogging.java


    This class is called around the invocation of all mailets. It has a 
"logBegin..." and a "logEnd..." method for each mailet. The problem is 
that it tells you that you (for example) "entered the SpamAssassin" 
mailet, and the later that you "ended the SpamAssassin mailet".  The 
problem is that if you get a hundred emails every few minutes, you have 
a hundred log entries telling you that one of those 100 entered and 
exited the mailet... not "WHICH" email entered/exited.  In order to do 
any sort of significant debug, you need to be able to follow a 
particular email through the pipeline.  Easy change add 
mail.getName() to both the bgn/end log entries (plus the additional "{}" 
to the first parameter as well):


    public static void logBeginOfMailetProcess(Mailet mailet, Mail mail) {
    LOGGER.debug("Mail: {} Entering mailet: {} ({})", 
mail.getState(), getMailetInfo(mailet), mail.getName());

    }
    public static void logEndOfMailetProcess(Mailet mailet, Mail mail) {
    LOGGER.debug("Mail: {} End of mailet: {} ({})", 
mail.getState(), getMailetInfo(mailet), mail.getName());

    }

Note: these mailet log entries were not showing up anywhere until I 
added another line which had been omitted in log4j.properties in the 
version I had:


    log4j.logger.org.apache.mailet.base=DEBUG, MAILETCONTAINER

Now, you can grep the mailetcontainer log for mail "name" which is a 
unique id string and now easily trace the path of a particular email 
through the pipeline and see where it ended up or where it came to an 
unexpected abrupt end.


2) Second change I recommend:  I was having problems with mail not 
showing up in folders.  I found it has to do with the 'email storing' 
mailets not always obtaining the correct account name. There are three 
mailets in question: ToSenderFolder, ToRecipientFolder, and 
LocalDelivery.  They are almost identical. But the problem was occurring 
for me in all three.  I'll explain what I did for the 
ToSenderFolder.java class.  Propagate to others...


    Open--- 
server\mailet\mailets\src\main\java\org\apache\james\transport\mailets\ToSenderFolder.java. 
  You'll see a line:


      LOGGER.error("Local delivery with ToSenderFolder mailet 
for mail {} with sender {} in folder {}", mail.getName(), sender, folder);
    First, but not critical.. that should not be LOGGER.error.  It 
should be LOGGER.info or LOGGER.debug.  It's not an error condition.


    a) move or copy that line ABOVE the mailboxAppender line since if 
there's a failure, you'll never get to the logger line.


    b) add output of the account (username) it derived to the log 
statement:


    LOGGER.info("Local delivery with ToSenderFolder mailet for 
mail {} with sender {}; username {} in folder {}", mail.getName(), 
sender, username, folder);


    Now you have a fighting chance at figuring out what might be 
happening to your email.  In my case, I found that the username it was 
deriving often had random capital letters in it which makes it not match 
my all-lowercase JAMES_USER account name. This may not have a thing to 
do with your original problem.  But this was definitely a problem for 
me.  My fix was to simply always lowercase the username.  Works for me 
since I can enforce all lowercase usernames.  But not the correct fix 
for the product.


Logging is everything... I'm convinced that to quickly isolate problems 
it is imperative to have the necessary log data.  So I'm on a mission to 
enhance all of the JAMES logging.  I'm going to be opening a 
contribution to JAMES for these soon.  But until then, they are pretty 
trivial changes to make (assuming, of course, we get your build  issues 
resolved...)


Jerry


On 10/25/2019 1:30 PM, Jerry Malcolm wrote:

Is this with the 'master' branch?  Or did you go back to 3.3?

It looks like a java compiler error.  But it looks like it never got 
into a compile.  The error "invalid flag: --release" seems to be a 
compiler invocation error.  One thing... if you are on master, I 
believe I saw a discussion that master now REQUIRES Java 11 to 
compile, but Java 8 to run... But posts today seem to point to Java 11 
being required to run as well soon.   If you are building master but 
not compiling with Java 11, that could be the issue.  3.3 does not 
require Java 11.  And for all intents and purposes, I think 3.3 would 
suffice for your needs, at least for startup.   I suspect it'll be 
much easier to move to 3.4+ (i.e. master) after all of the initial 
startup issues are resolved.



On 10/25/2019 1:10 PM, Mark Gordon wrote:

Thanks for all your replies.

I cloned the repository and I get this error when I try t

Re: Apache James 3.4 install

2019-10-25 Thread Jerry Malcolm

Is this with the 'master' branch?  Or did you go back to 3.3?

It looks like a java compiler error.  But it looks like it never got 
into a compile.  The error "invalid flag: --release" seems to be a 
compiler invocation error.  One thing... if you are on master, I believe 
I saw a discussion that master now REQUIRES Java 11 to compile, but Java 
8 to run... But posts today seem to point to Java 11 being required to 
run as well soon.   If you are building master but not compiling with 
Java 11, that could be the issue.  3.3 does not require Java 11.  And 
for all intents and purposes, I think 3.3 would suffice for your needs, 
at least for startup.   I suspect it'll be much easier to move to 3.4+ 
(i.e. master) after all of the initial startup issues are resolved.



On 10/25/2019 1:10 PM, Mark Gordon wrote:

Thanks for all your replies.

I cloned the repository and I get this error when I try to compile.
https://james.apache.org/server/3/dev-build.html

In the JAMES_SRC_HOME top level directory (where the parent pom.xml
resides), invoke maven with 'mvn' with any of the following command line
arguments:

- clean - deletes the target directory, making the system ready for a
clean build.
- compile - compiles the source code.
- test - run unit tests for James.
- *package - generates all the James distributions, packed. From the
root directory, cd to 'server/container/spring/target' to have the build
distribution. Notice, for the latest trunk(revision 1430655+), a specific
profile argument need to be set: '-Pwith-assembly'. The location of final
distributions is also changed to 'JAMES_SRC_HOME/server/app/target'.*
- javadocs:javadocs - builds the James javadocs.
- site - builds the entirety of the James website.


I did:

clone
mvn clean
mvn compile


[INFO] Apache James :: Server :: Web Admin server integration tests SKIPPED
[INFO]

[INFO] BUILD FAILURE
[INFO]

[INFO] Total time:  16.635 s
[INFO] Finished at: 2019-10-25T18:04:55Z
[INFO]

[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile
(default-compile) on project james-server-util: Fatal error compiling:
invalid flag: --release -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions,
please read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the
command
[ERROR]   mvn  -rf :james-server-util

On Fri, Oct 25, 2019 at 10:11 AM Jerry Malcolm 
wrote:


Mark,

I originally cloned 3.3 branch when I started my migration back in
July.  Then I saw official 3.4 was released.  I was surprised that there
wasn't an official 3.4 branch in git.  But when I asked, I was told that
'master' branch was the one to use.   I haven't checked recently.  But
from what you are saying, I gather that there is still no 3.4 branch in
git (??).  Master will give you the latest code.  But the way I
understand it, master changes every few days as new commits are
finalized, which is going to be a bear to try to replicate problems.  It
appears that the last 'official' version in git is the 3.3 branch.
Might be best if you went back to 3.3 for now.

I have been a JAMES user for about 16-17 years.  I have done a few
migrations over that period.  My migration from ver 3.0.0beta5 (circa
2014) to the latest version has been painful at best.  You can read the
'diary' of my migration saga in this users group and the server-dev
group starting 3 months ago.  I have encountered several 'out of the
box' problems during my migration attempt which have cost me many days.
Until now, I have been the lone voice in the wilderness pointing this
out.  I don't want to scare you... but I started playing with migration
in late July.  I went live with the updated JAMES this past Monday
evening.  Even after going live, I found and reported a problem with the
three mailets that put mail in folders a couple of days ago.  I don't
know if I'm an isolated special case that causes this particular problem
or not.  But mail was periodically being discarded, sometimes with an
exception in the logs and sometimes with no exception.  I hacked the
code to get it to work with my situation.  But it needs to be addressed
by someone who understands the 'right' way to do it.

All this to say, I feel your pain.  I love JAMES.  But if I wasn't
simply bullheaded enough to remain, I would have abandoned JAMES after a
few weeks of trying to get this migration to work last summer.  I know
just

Re: Apache James 3.4 install

2019-10-25 Thread Jerry Malcolm

Mark,

I originally cloned 3.3 branch when I started my migration back in 
July.  Then I saw official 3.4 was released.  I was surprised that there 
wasn't an official 3.4 branch in git.  But when I asked, I was told that 
'master' branch was the one to use.   I haven't checked recently.  But 
from what you are saying, I gather that there is still no 3.4 branch in 
git (??).  Master will give you the latest code.  But the way I 
understand it, master changes every few days as new commits are 
finalized, which is going to be a bear to try to replicate problems.  It 
appears that the last 'official' version in git is the 3.3 branch.  
Might be best if you went back to 3.3 for now.


I have been a JAMES user for about 16-17 years.  I have done a few 
migrations over that period.  My migration from ver 3.0.0beta5 (circa 
2014) to the latest version has been painful at best.  You can read the 
'diary' of my migration saga in this users group and the server-dev 
group starting 3 months ago.  I have encountered several 'out of the 
box' problems during my migration attempt which have cost me many days.  
Until now, I have been the lone voice in the wilderness pointing this 
out.  I don't want to scare you... but I started playing with migration 
in late July.  I went live with the updated JAMES this past Monday 
evening.  Even after going live, I found and reported a problem with the 
three mailets that put mail in folders a couple of days ago.  I don't 
know if I'm an isolated special case that causes this particular problem 
or not.  But mail was periodically being discarded, sometimes with an 
exception in the logs and sometimes with no exception.  I hacked the 
code to get it to work with my situation.  But it needs to be addressed 
by someone who understands the 'right' way to do it.


All this to say, I feel your pain.  I love JAMES.  But if I wasn't 
simply bullheaded enough to remain, I would have abandoned JAMES after a 
few weeks of trying to get this migration to work last summer.  I know 
just enough about the internal workings of JAMES to be dangerous.  I've 
found a few problems. I've used duct-tape and baling wire and now have 
everything working.   But I don't know the right way to fix them.  I 
love the fact that the JAMES team is diligently working on new 
enhancements (I've got a few requests in myself...).  But you are now a 
2nd situation approaching abandoning JAMES because you can't get it to 
work out of the box.  I believe any 'out of the box' problem should be 
viewed as category-1 crit-sit ahead of any enhancement work. That's 
where you gain or lose a user.


With what I have learned during my trek, I'm convinced that I can help 
you get up and running.  But if we could get one other person from the 
JAMES development team that really understands the inner workings to 
join me and agree to be a quick-response when out-of-the-box problems 
are reported.  I believe it could avoid having people abandon JAMES as a 
solution.  We MUST get out-of-the-box to be a good experience for everyone.


So, I'm willing to work with you.  All of this is very fresh in my 
mind.  Let me know more details about what you are seeing, and we'll get 
you up and running.


Jerry

On 10/25/2019 4:55 AM, Mark Gordon wrote:

Jerry,

Where are you getting the updated 3.4 source or binary?
I cloned the git repository.  That seems like it is 3.5 (the next version)
I did not see an active branch for 3.4 with bug fixes.

I have used james in the past and I don't remember having this much trouble
getting it going. I tasked one of my employees with getting james going and
he told me it did not work and reverted to using postfix. I wanted to use
james because we are a java shop and will need to write maillets for
processing the email. I wasted a full day messing around with this and got
nowhere.

-Mark





On Thu, Oct 24, 2019 at 10:46 PM Jerry Malcolm 
wrote:


Mark,

I'm running 3.4 (+plus a few fixes/tweaks I've had to add...). I'm going
to be really uneducated here If I am running ActiveMQ or RabbitMQ,
it's totally under the covers.  I'm not even sure what it used for,
unless it's for internal passing of the email.   I have done nothing to
configure it.  I assume I've had no problems with it either.  Basically
no clue about anything related to ActiveMQ.  Do you have a special
requirement to get involved with configuring ActiveMQ?

I'm not using POP.  Just IMAP and SMTP.

If all of the logs are set to debug AND if all of the object paths that
are writing logs have a definition in log4j.properties, you should have
a pretty good trace of the mail all the way from entering the pipeline
until JAMES is 'done' with it.  Most of this should be in
mailetcontainer.log.  If you are not seeing a detailed trace of
entering/exiting each mailet through the pipeline, we need to start
there.  Without some log/trace info, it's going to too much conjecture
as to what is happening with the mail item in the pipeline.

Are you

Re: Apache James 3.4 install

2019-10-24 Thread Jerry Malcolm

Mark,

I'm running 3.4 (+plus a few fixes/tweaks I've had to add...). I'm going 
to be really uneducated here If I am running ActiveMQ or RabbitMQ, 
it's totally under the covers.  I'm not even sure what it used for, 
unless it's for internal passing of the email.   I have done nothing to 
configure it.  I assume I've had no problems with it either.  Basically 
no clue about anything related to ActiveMQ.  Do you have a special 
requirement to get involved with configuring ActiveMQ?


I'm not using POP.  Just IMAP and SMTP.

If all of the logs are set to debug AND if all of the object paths that 
are writing logs have a definition in log4j.properties, you should have 
a pretty good trace of the mail all the way from entering the pipeline 
until JAMES is 'done' with it.  Most of this should be in 
mailetcontainer.log.  If you are not seeing a detailed trace of 
entering/exiting each mailet through the pipeline, we need to start 
there.  Without some log/trace info, it's going to too much conjecture 
as to what is happening with the mail item in the pipeline.


Are you familiar with the matcher/mailet philosophy and the 
mailetcontainer.xml pipeline definition?  I can bring you up to speed 
quickly on that if necessary.  Knowing that will help determine the problem.


Can you give me a bit more detail defining mail 'getting lost'? Is this 
only on outbound, only on inbound, or both?  And if outbound, 
should/does the email get written to the sent folder by James (as 
opposed to Thunderbird writing a 'copy')?  Does the email not get 
delivered externally?  If inbound, do you see the mail coming in (in the 
logs), but it just doesn't show up in a destination folder?


Jerry

On 10/24/2019 7:15 PM, Mark Gordon wrote:

James,

Are you running 3.4?  I don;t think the DNS issue is the problem.  It  is
just really odd.  The log looks correct.  Even when I kick it up to TRACE
for most packages.  THe email just disappears,

Pop and iMAP seem to be working.  SMTP accept the email but then it just
disappears.

I just checked out the GIT repository for the project.  I am going to try
to build. the package.

If you are not using ActiveMQ are you using RabbitMQ?   how is that
configured?

Thanks
Mark





On Thu, Oct 24, 2019 at 4:32 PM Jerry Malcolm 
wrote:


I'm not using ActiveMQ.  So I can't make a recommendation there. I
haven't had any problems with DNS.  What do the error messages say?

On 10/24/2019 5:42 PM, Mark Gordon wrote:

Thanks for the response James.

Should I revert back to a previous version?
Is this the first version using ActiveMQ?   SHould I be using an
alternative to ActiveMQ?

I am getting DNS errors when it is trying to resolve localhost.   Looks
like it is also struggling with the hostname.

-Mark












On Thu, Oct 24, 2019 at 2:50 PM Jerry Malcolm 
wrote:


Mark,

I'm right with you It turns out that log4j.properties has several
omissions.  Several were fixed a month or so ago.  Not sure if your
version picked up the changes.  But I've added even more additions to
get the logging info I have needed in my migration journey.

Here is my list of logger control lines from my current
conf/log4j.properties.  Change all of the INFOs to DEBUGs.  There might
be even more log data if you change everything to TRACE instead of
DEBUG.  Just don't run it too long in that state unless you have a huge
harddrive.

Look for mailet log entries in mailetcontainer.log, specifically from
ToSenderFolder, ToRecipientFolder, and LocalDelivery mailets.  Hopefully
with the heavy logging, it'll show you the folder it puts mail into.

One thing... if you find ANY exception dumps in the logs with the
ReadOnly exception on folders, let's talk.  I've learned a lot about
that problem in the past couple of days.  And if you get that exception
your mail will NOT be stored anywhere.  But I think I've found a fix for
that if you are getting it.

Let me know.

--Jerry

Log4j.properties (not the entire file... just the bottom part of the

file)

log4j.logger.etm.core.monitor.EtmMonitor= INFO, CONS, FILE
log4j.logger.org.apache.james.dnsservice=INFO, DNSSERVICE
log4j.logger.org.apache.james.domainlist=INFO, DOMAINLIST
log4j.logger.org.apache.james.fetchmail=INFO, FETCHMAIL
log4j.logger.org.apache.james.imapserver=INFO, IMAPSERVER
log4j.logger.org.apache.james.lmtpserver=INFO, LMTPSERVER
log4j.logger.org.apache.james.mailboxmanager=INFO, MAILBOXMANAGER
log4j.logger.org.apache.james.mailetcontainer=INFO, MAILETCONTAINER
log4j.logger.org.apache.james.mailetcontext=INFO, MAILETCONTAINER
log4j.logger.org.apache.james.mailprocessor=INFO, MAILETCONTAINER
log4j.logger.org.apache.james.mailqueuefactory=INFO, MAILQUEUEFACTORY
log4j.logger.org.apache.james.mailrepositorystore=INFO,

MAILREPOSITORYSTORE

log4j.logger.org.apache.james.mailspooler=INFO, MAILETCONTAINER
log4j.logger.org.apache.james.pop3server=INFO, POP3SERVER
log4j.logger.org.apache.james.protocols.api=INFO, SMTPSERVER
log4j.logger.org.apache.james.protocols.imap=INFO

Re: Apache James 3.4 install

2019-10-24 Thread Jerry Malcolm
I'm not using ActiveMQ.  So I can't make a recommendation there. I 
haven't had any problems with DNS.  What do the error messages say?


On 10/24/2019 5:42 PM, Mark Gordon wrote:

Thanks for the response James.

Should I revert back to a previous version?
Is this the first version using ActiveMQ?   SHould I be using an
alternative to ActiveMQ?

I am getting DNS errors when it is trying to resolve localhost.   Looks
like it is also struggling with the hostname.

-Mark












On Thu, Oct 24, 2019 at 2:50 PM Jerry Malcolm 
wrote:


Mark,

I'm right with you It turns out that log4j.properties has several
omissions.  Several were fixed a month or so ago.  Not sure if your
version picked up the changes.  But I've added even more additions to
get the logging info I have needed in my migration journey.

Here is my list of logger control lines from my current
conf/log4j.properties.  Change all of the INFOs to DEBUGs.  There might
be even more log data if you change everything to TRACE instead of
DEBUG.  Just don't run it too long in that state unless you have a huge
harddrive.

Look for mailet log entries in mailetcontainer.log, specifically from
ToSenderFolder, ToRecipientFolder, and LocalDelivery mailets.  Hopefully
with the heavy logging, it'll show you the folder it puts mail into.

One thing... if you find ANY exception dumps in the logs with the
ReadOnly exception on folders, let's talk.  I've learned a lot about
that problem in the past couple of days.  And if you get that exception
your mail will NOT be stored anywhere.  But I think I've found a fix for
that if you are getting it.

Let me know.

--Jerry

Log4j.properties (not the entire file... just the bottom part of the file)

log4j.logger.etm.core.monitor.EtmMonitor= INFO, CONS, FILE
log4j.logger.org.apache.james.dnsservice=INFO, DNSSERVICE
log4j.logger.org.apache.james.domainlist=INFO, DOMAINLIST
log4j.logger.org.apache.james.fetchmail=INFO, FETCHMAIL
log4j.logger.org.apache.james.imapserver=INFO, IMAPSERVER
log4j.logger.org.apache.james.lmtpserver=INFO, LMTPSERVER
log4j.logger.org.apache.james.mailboxmanager=INFO, MAILBOXMANAGER
log4j.logger.org.apache.james.mailetcontainer=INFO, MAILETCONTAINER
log4j.logger.org.apache.james.mailetcontext=INFO, MAILETCONTAINER
log4j.logger.org.apache.james.mailprocessor=INFO, MAILETCONTAINER
log4j.logger.org.apache.james.mailqueuefactory=INFO, MAILQUEUEFACTORY
log4j.logger.org.apache.james.mailrepositorystore=INFO, MAILREPOSITORYSTORE
log4j.logger.org.apache.james.mailspooler=INFO, MAILETCONTAINER
log4j.logger.org.apache.james.pop3server=INFO, POP3SERVER
log4j.logger.org.apache.james.protocols.api=INFO, SMTPSERVER
log4j.logger.org.apache.james.protocols.imap=INFO, IMAPSERVER
log4j.logger.org.apache.james.protocols.smtp=INFO, SMTPSERVER
log4j.logger.org.apache.james.smtpserver=INFO, SMTPSERVER
log4j.logger.org.apache.james.spamassassin=INFO, MAILETCONTAINER
log4j.logger.org.apache.james.transport=INFO, MAILETCONTAINER
log4j.logger.org.apache.james.usersrepository=INFO, USERSREPOSITORY
log4j.logger.org.apache.james.virtualusertable=INFO, VIRTUALUSERTABLE
log4j.logger.org.apache.mailet.base=INFO, MAILETCONTAINER

On 10/24/2019 4:16 PM, Mark Gordon wrote:

I have a virtual ubuntu 18.04 install with postgres 10.  I am trying to

get

apache james 3.4 to work as a simple smtp server and pop3 server.

I unzip'ed the install and edited the james.

I was getting an error on startup so I did this:

mailetcontainer.xml

Was:
  
  8
  
Changed:
  
  8
  



I am running smtp on two ports
smtpserver.xml

   0.0.0.0:25,0.0.0.0:27

SEtting auth required to true
  true

My ISP is blocking 25 so I am sending on port 27.

I am adding my domain via james-cli.

  


I used james-cli to add a domain and user with a password.  I checked the
derby database and both were added correctly.

I have my mx record set at my DNS provider.   I am using thunderbird and

I

have my smtp server set to this system

I send an email from gmail to the user on this system.

INFO  21:06:39,470 | org.apache.james.smtpserver.SendMailHandler |
Successfully spooled mail
Mail1571951199365-0550fcd4-2530-4595-a4bd-8e2900e90728 from
MaybeSender{mailAddress=Optional[m...@yyy.com]} on
mail-vs1-f46.google.com/209.85.217.46 for [m...@.com]

X and Y are changed...

I then pop my mail from thunderbird and it connects OK I know this

because

if I enter the wrong password I get an error.  and POP always says that

no

new emails.

it is the same when i send from thunderbird to a gmail account using

james

as my smtp server.I get this in the log:

INFO  21:12:10,931 | org.apache.james.domainlist.lib.AbstractDomainList |
Local host is: email.
INFO  21:12:11,071 | org.apache.james.smtpserver.SendMailHandler |
Successfully spooled mail
Mail1571951531021-8f8e30e7-ed3d-4520-8649-b4203ce5b408 from
MaybeSender{mailAddress=Optional[m...@x.com]} on
63.228.129.34

Re: Apache James 3.4 install

2019-10-24 Thread Jerry Malcolm

Mark,

I'm right with you It turns out that log4j.properties has several 
omissions.  Several were fixed a month or so ago.  Not sure if your 
version picked up the changes.  But I've added even more additions to 
get the logging info I have needed in my migration journey.


Here is my list of logger control lines from my current 
conf/log4j.properties.  Change all of the INFOs to DEBUGs.  There might 
be even more log data if you change everything to TRACE instead of 
DEBUG.  Just don't run it too long in that state unless you have a huge 
harddrive.


Look for mailet log entries in mailetcontainer.log, specifically from 
ToSenderFolder, ToRecipientFolder, and LocalDelivery mailets.  Hopefully 
with the heavy logging, it'll show you the folder it puts mail into.


One thing... if you find ANY exception dumps in the logs with the 
ReadOnly exception on folders, let's talk.  I've learned a lot about 
that problem in the past couple of days.  And if you get that exception 
your mail will NOT be stored anywhere.  But I think I've found a fix for 
that if you are getting it.


Let me know.

--Jerry

Log4j.properties (not the entire file... just the bottom part of the file)

log4j.logger.etm.core.monitor.EtmMonitor= INFO, CONS, FILE
log4j.logger.org.apache.james.dnsservice=INFO, DNSSERVICE
log4j.logger.org.apache.james.domainlist=INFO, DOMAINLIST
log4j.logger.org.apache.james.fetchmail=INFO, FETCHMAIL
log4j.logger.org.apache.james.imapserver=INFO, IMAPSERVER
log4j.logger.org.apache.james.lmtpserver=INFO, LMTPSERVER
log4j.logger.org.apache.james.mailboxmanager=INFO, MAILBOXMANAGER
log4j.logger.org.apache.james.mailetcontainer=INFO, MAILETCONTAINER
log4j.logger.org.apache.james.mailetcontext=INFO, MAILETCONTAINER
log4j.logger.org.apache.james.mailprocessor=INFO, MAILETCONTAINER
log4j.logger.org.apache.james.mailqueuefactory=INFO, MAILQUEUEFACTORY
log4j.logger.org.apache.james.mailrepositorystore=INFO, MAILREPOSITORYSTORE
log4j.logger.org.apache.james.mailspooler=INFO, MAILETCONTAINER
log4j.logger.org.apache.james.pop3server=INFO, POP3SERVER
log4j.logger.org.apache.james.protocols.api=INFO, SMTPSERVER
log4j.logger.org.apache.james.protocols.imap=INFO, IMAPSERVER
log4j.logger.org.apache.james.protocols.smtp=INFO, SMTPSERVER
log4j.logger.org.apache.james.smtpserver=INFO, SMTPSERVER
log4j.logger.org.apache.james.spamassassin=INFO, MAILETCONTAINER
log4j.logger.org.apache.james.transport=INFO, MAILETCONTAINER
log4j.logger.org.apache.james.usersrepository=INFO, USERSREPOSITORY
log4j.logger.org.apache.james.virtualusertable=INFO, VIRTUALUSERTABLE
log4j.logger.org.apache.mailet.base=INFO, MAILETCONTAINER

On 10/24/2019 4:16 PM, Mark Gordon wrote:

I have a virtual ubuntu 18.04 install with postgres 10.  I am trying to get
apache james 3.4 to work as a simple smtp server and pop3 server.

I unzip'ed the install and edited the james.

I was getting an error on startup so I did this:

mailetcontainer.xml

Was:
 
 8
 
Changed:
 
 8
 



I am running smtp on two ports
smtpserver.xml

  0.0.0.0:25,0.0.0.0:27

SEtting auth required to true
 true

My ISP is blocking 25 so I am sending on port 27.

I am adding my domain via james-cli.

 


I used james-cli to add a domain and user with a password.  I checked the
derby database and both were added correctly.

I have my mx record set at my DNS provider.   I am using thunderbird and I
have my smtp server set to this system

I send an email from gmail to the user on this system.

INFO  21:06:39,470 | org.apache.james.smtpserver.SendMailHandler |
Successfully spooled mail
Mail1571951199365-0550fcd4-2530-4595-a4bd-8e2900e90728 from
MaybeSender{mailAddress=Optional[m...@yyy.com]} on
mail-vs1-f46.google.com/209.85.217.46 for [m...@.com]

X and Y are changed...

I then pop my mail from thunderbird and it connects OK I know this because
if I enter the wrong password I get an error.  and POP always says that no
new emails.

it is the same when i send from thunderbird to a gmail account using james
as my smtp server.I get this in the log:

INFO  21:12:10,931 | org.apache.james.domainlist.lib.AbstractDomainList |
Local host is: email.
INFO  21:12:11,071 | org.apache.james.smtpserver.SendMailHandler |
Successfully spooled mail
Mail1571951531021-8f8e30e7-ed3d-4520-8649-b4203ce5b408 from
MaybeSender{mailAddress=Optional[m...@x.com]} on
63.228.129.34/63.228.129.34 for [m...@yy.com]

but I never get the email.

Where can I go see the spooled email?  I changed the logging to DEBUG but I
am still not getting much.  POP is not showing much of anything
actually nothing.

HELP

Thanks,
Mark





























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



Re: Moving Servers Wipes Out iPhone's Mail Accounts

2019-10-22 Thread Jerry Malcolm

Hi Matthieu,

I can add some log/trace statements into the low-level imap processing.  
I tried digging into the source, but got pretty bogged down.  If you can 
point me to the best java class to put the logging code, I can make that 
happen.


In the meantime, to try to keep moving on the problem, I just did a 
tcpdump on my phone's ip address.   Not quite as clean as a formatted 
imap trace.  But the info is there.   Hopefully someone knows what to 
look for in the trace.  It was too large to include inline.  It's at 
https://jwmhosting.com/imaptrace.txt


Let me know where to insert the imap trace in the code, and I'll try to 
get a cleaner trace tomorrow.


Thanks.

Jerry


On 10/22/2019 3:07 AM, Matthieu Baechler wrote:

Hi Jerry,

I don't think trying to guess what happen will help you much. I would
rather try to capture the IMAP session.

I see two ways to do that:

1. you write a IMAP session logger in James (it should be really easy,
I don't know why it's not already there)

2. you disable SSL on the phone and do a tcpdump on the server

Once you'll have the IMAP session capture, it will be easier to
diagnose your problem.

Cheers,



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



Re: Moving Servers Wipes Out iPhone's Mail Accounts

2019-10-22 Thread Jerry Malcolm

Tellier,

I simply stopped the old JAMES instance, copied the entire database, 
started the new JAMES instance, and changed the DNS record for the mail 
server IP to point to the new instance.  I'm not deep enough into mail 
RFCs to know anything about a UID VALIDITY.  Would the steps I performed 
have changed the UID VALIDITY?    It appears the iPhone is doing the 
reverse of what you described.  It's like it automatically reset the 
'start' of all folders to a few hours ago when the ip address changed, 
and it removed any mail earlier than that from the folder.  I honestly 
can't think of a rational reason why that would a reasonable behavior.  
And there is absolutely no way to tell the folders to go back to the 
'real' start date of the folder not even by deleting the entire 
email account and recreating it from scratch. That new folder start 
timestamp is set in concrete now


So far, only one client (and me) have seen the problem (it's evening 
here, it'll hit the fan tomorrow AM).  I'm not aware of any way to 
delete the cache on the iPhone (hopefully I have just missed it... 
education welcome..).  I'm not as concerned about the time it takes to 
refresh the entire mailbox as I am about the fact that right now, I 
can't figure out a way to even see more than the last few hours mail 
from the mailbox on the phone.   Again, this ONLY iPhone TBird is 
showing everything just fine.  (Don't know about Android)


Is there anything I can do on the database (i.e. with this UID 
VALIDATION stuff) to simply say "all bets are off..." and just force all 
clients to just re-download the entire folder contents? I'd rather have 
that than lose access to years of email on the phone.


Thx as always.

Jerry

On 10/22/2019 1:03 AM, Tellier Benoit wrote:

Hi Jerry,

What is the UID VALIDITY associated with a given mailbox name before and
after your migration?

If the UID VALIDITY is different, then the IMAP client will assume the
two mailboxes are different and will attempt a whole download once
again, which is a really lengthy process, and implies dropping all the
emails downloaded before.

This is due to an historical lack of truely immutable identifiers in
IMAP, a point that this RFC addresses:

  - RFC-8474 IMAP Extension for Object Identifiers

MAILBOXID: a unique identifier for a mailbox, stands for the mailbox
name + UID validity pair

EMAILID: unique identifier for an email

If I'm right a good way to mitigate your production issue is to enforce
the UID validity is the same before & after the migration, and hope your
client apps did not all drop their cache.

Cheers,

Benoit

On 22/10/2019 05:25, Jerry Malcolm wrote:

Deleting the iPhone email account and recreating does nothing. It says
'all account data will be deleted.'  Nope.  After recreating the
account, it loads only the two emails that came in since switching IP
addresses and ignores the 1000+ other emails in the mailbox.

Hopefully somebody has a workaround for this.


On 10/21/2019 9:55 PM, Jerry Malcolm wrote:

I threw the switch this evening to fully move to my new upgraded 3.4
server.  Basically, I just changed the IP address of the domain name
for my mail server.   I did a bunch of testing on several accounts
using Thunderbird.  Everything seems to be working.  But then I get a
phone call from a client that says all of his mail disappeared from
his iPhone.  I checked my iPhone and, yep, it's all gone from my
iPhone on all of my different accounts except the new mail that has
come in during the last few hours since moving to the new server.  No
errors or messages.  Just when I go to a folder it briefly shows the
email list, which then disappears and is replaced with a "No Mail"
message.  Fortunately, it's not deleting it from the server.  All mail
is still there when I go to Tbird.

Is this some kind of 'security' thing that Apple has created to remove
all mail from the app if the server IP address changes?  If so, I'm
not impressed with their thought process.  I figure I'm going to start
hearing it from other clients tomorrow.  I'm about to delete an
account on my iPhone and recreate it and see if loads all of the mail.

Just wondering if anyone else has encountered this and if there is
anything to tell clients.

Thx

Jerry


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


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


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



-
To unsubscr

Re: Moving Servers Wipes Out iPhone's Mail Accounts

2019-10-21 Thread Jerry Malcolm
Deleting the iPhone email account and recreating does nothing. It says 
'all account data will be deleted.'  Nope.  After recreating the 
account, it loads only the two emails that came in since switching IP 
addresses and ignores the 1000+ other emails in the mailbox.


Hopefully somebody has a workaround for this.


On 10/21/2019 9:55 PM, Jerry Malcolm wrote:
I threw the switch this evening to fully move to my new upgraded 3.4 
server.  Basically, I just changed the IP address of the domain name 
for my mail server.   I did a bunch of testing on several accounts 
using Thunderbird.  Everything seems to be working.  But then I get a 
phone call from a client that says all of his mail disappeared from 
his iPhone.  I checked my iPhone and, yep, it's all gone from my 
iPhone on all of my different accounts except the new mail that has 
come in during the last few hours since moving to the new server.  No 
errors or messages.  Just when I go to a folder it briefly shows the 
email list, which then disappears and is replaced with a "No Mail" 
message.  Fortunately, it's not deleting it from the server.  All mail 
is still there when I go to Tbird.


Is this some kind of 'security' thing that Apple has created to remove 
all mail from the app if the server IP address changes?  If so, I'm 
not impressed with their thought process.  I figure I'm going to start 
hearing it from other clients tomorrow.  I'm about to delete an 
account on my iPhone and recreate it and see if loads all of the mail.


Just wondering if anyone else has encountered this and if there is 
anything to tell clients.


Thx

Jerry


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



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



Moving Servers Wipes Out iPhone's Mail Accounts

2019-10-21 Thread Jerry Malcolm
I threw the switch this evening to fully move to my new upgraded 3.4 
server.  Basically, I just changed the IP address of the domain name for 
my mail server.   I did a bunch of testing on several accounts using 
Thunderbird.  Everything seems to be working.  But then I get a phone 
call from a client that says all of his mail disappeared from his 
iPhone.  I checked my iPhone and, yep, it's all gone from my iPhone on 
all of my different accounts except the new mail that has come in during 
the last few hours since moving to the new server.  No errors or 
messages.  Just when I go to a folder it briefly shows the email list, 
which then disappears and is replaced with a "No Mail" message.  
Fortunately, it's not deleting it from the server.  All mail is still 
there when I go to Tbird.


Is this some kind of 'security' thing that Apple has created to remove 
all mail from the app if the server IP address changes?  If so, I'm not 
impressed with their thought process.  I figure I'm going to start 
hearing it from other clients tomorrow.  I'm about to delete an account 
on my iPhone and recreate it and see if loads all of the mail.


Just wondering if anyone else has encountered this and if there is 
anything to tell clients.


Thx

Jerry


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



Architectural Implementation Combinations / Criteria?

2019-10-05 Thread Jerry Malcolm
Back in v3b5, I used James with Spring and with JDBC/mySQL. I realize 
that several new implementation combinations have been added.  I've read 
articles about Guice, Cassandra, Spring, JPA, Docker.  I understand 
basically where each one fits into the world of James. And looking at 
the JAMES package download options, I see that I've got a lot of choices 
with various combinations of these.  What I am having trouble finding 
are details about why I would want one over the other and what the 
advantages/disadvantages are of one over the other.


It appears that there is an choice of Cassandra vs JPA vs JDBC/(MySQL).  
Then there is a choice of Spring vs. Guice.  And also there is a choice 
of Docker vs. non-Docker. I'm setting up my new configuration on AWS.  
My goal is to make it the most 'strategic' implementation for James.  
But I don't know which choices are the right 'strategic' answers, and if 
the 'right' answer depends on certain criteria, I would like to 
understand the criteria.


If someone could take a few minutes to provide some decision criteria 
for a) Cassandra/JPA/JDBC; b) Spring/Guice; c) Docker/non-Docker


    -- What are architectural advantages of one choice over the others
    -- Are any of the options going to be deprecated soon?
    -- When would I want to choose one over the other (or NOT 
choose one over the other)?
    -- If I have an 'old' Spring/JDBC implmentation with a huge 
existing database, does that affect choices? (possibly requiring a 
massive db migration)
    -- If I have custom matchers/mailets (some of which use JDBC), 
will I have to rewrite those if I choose certain implmentations?
    -- Are there required fixed combinations (e.g. if you select 
Cassandra, you have to use Docker, etc)?


Not a showstopper for me.  My first goal is to just get my old 
Spring/JDBC version running on 3.3.  But after that, I'd really like to 
look into moving to the strategic implementation.


Thanks.

Jerry


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



3.4.0 AWS S3 Storage

2019-09-27 Thread Jerry Malcolm
I moved to 3.4.0 today with no major hurdles.  I'm thrilled with the 
announcement about using AWS S3 for blob storage.  This is huge for me.  
I figure it'll reduce my 80+gB SQL database by about 95%.  That will 
help with storage cost as well as migration, backup, and just about 
everything dealing with mail.


I need to be fully up and running with my current configuration before I 
start attempting anything new. But I'd really like to start reading 
about it and figuring out a path to get there.  I know it was just 
announced today.  So if docs are still thin, I understand.  But  I 
couldn't find a link to documentation on how to setup/configure/use the 
S3 function.  Sorry if I overlooked it. Just wanted to know if there is 
a document, a sample, or anything that'll help my education process on this?


Thanks for adding this.  It's huge!

Jerry


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



Re: log4j Configuration

2019-09-26 Thread Jerry Malcolm
Thank you so much.  This new log4j.properties file did solve the problem 
that the logs were not getting written.   When I finally saw the mailet 
log, I realized that this wasn't the real problem. Even though there was 
some mailet logging data now written to the log file, my own mailet 
log(..) output was still missing.  But the good news is that I figured 
out what was happening.  I decided to start researching up the mailet 
class hierarchy.   I found the log(..) methods in GenericMailet.   Both 
variations of log(...) were flagged as "@deprecated Prefer using SLF4J 
LoggingFactory to get a Logger in each class"  (actually it should say 
LoggerFactory, not LoggingFactory... but that's not a big deal). So I 
cloned the SLF4J code from GenericMailet to one my mailets, and viola... 
I got my mailet log output.  Not sure why the GenericMailet logger was 
eating all of the output.  I tried adding a line to log4j: 
log4j.logger.org.apache.james.mailet.base=DEBUG, MAILETCONTAINER.  But 
that didn't seem to make a difference.


But the GenericMailet's log(..) problem is not critical to me anymore 
assuming that the SLF4J updates to all of my mailets work as the test did.


Thanks.

Jerry

On 9/26/2019 2:53 AM, Tellier Benoit wrote:

Check https://github.com/linagora/james-project/pull/2718

This should solve your issue.

On 20/09/2019 09:18, Jerry Malcolm wrote:

Any chance I could get someone to take a look at this problem? There's
no way for me to move forward until I can see my mailet logs.  I tried
to dig into slf4j and log4j.  But I just don't have enough background in
that to figure out what is happening.  And since I don't have a full
james set up on an IDE where I can set breakpoints, I have no way to
figure out why all log data is just being discarded regardless of the
log4j.properties settings.  With the appropriate tools it seems like
it'd be pretty easy to see why log4j is not writing any data.  But I
just don't have the tools. Can somebody in James development please take
a few minutes and see if they figure it out?  I'm sure it's probably
something trivial as properties file settings.  But without some
guidance, I'm shooting in the dark.

Help, please?

Jerry

On 9/18/2019 10:18 AM, Jerry Malcolm wrote:

Without a way to see my mailet log data, I have no way of knowing if
my mailets were even called, if they succeeded, if they failed. Right
now, all I know is they went into a processor and disappeared.  This
is a serious problem for me.  I really need to have a way to see this
data.  If it's a log4j.properties change, I just need to know what to
change.  I'm dead in the water.


On 9/17/2019 11:08 PM, Jerry Malcolm wrote:

I added the transport line as you suggested and sent a test email
inbound.  The console showed it coming in, as does james-server.log.
But still, the only log file in the logs directory that is not empty
is james-server. Nothing is going to any of these files.

On 9/17/2019 10:49 PM, Tellier Benoit wrote:

I inlined my answers...

Regards,

On 18/09/2019 10:32, Jerry Malcolm wrote:

Thanks for the reply.  But I did not use my old log4j.properties.  I
copied the one from the downloaded 3.3.0 zip file. Although, it looks
almost identical to the beta5 one.  Any chance the wrong one is
included
in the package?

I think the default log4j file was never updated.

Contribution welcomed BTW...


I'm fine with logger-per-mailet. However, I'm hoping there's a way to
see the flow for an email item.  It's just as important at times to
see
that various matchers passed or didn't pass on an item as it goes
through the flow.  Is there still a logger that shows the flow?

The approach regarding this is to use the MDC for doing some
contextualized logging (SLF4J API)

Within James guice application, we rely on logback, and a
"ElasticSearch" appender. Logs can then be filtered by 'mail' property.

You will then see all of the logs related to the processing of that
very
email.

I'm not a log4j expert but there should be a way of doing something
somehow similar...


Bottom line, though, I don't know what to put in the log4j file to
make
the mailet logs show up.  Do you have a link handy to the correct
log4j
in github?

I don't think we have...

I'm not an expert here but let's play a bit:

In log4j.properties I would replace line 124

log4j.logger.org.apache.james.mailprocessor=INFO, MAILETCONTAINER

By

log4j.logger.org.apache.james.mailprocessor=INFO, MAILETCONTAINER
log4j.logger.org.apache.james.transport=INFO, MAILETCONTAINER

(Rationals: all mailets are located within the
"org.apache.james.transport.mailets" &
"org.apache.james.transport.matchers" packages...


Thx


On 9/17/2019 10:23 PM, Tellier Benoit wrote:

Maybe I could help on that one:

The mailet logging had been migrated to a standard SLF4J approach.

Before that, all mailet logs went though a single logger, exposed as
part of the MailetContext object.

Before 3.0.0 release we altered tha

Re: JMX Access?

2019-09-26 Thread Jerry Malcolm
The way I understand tunneling, with SSH tunneling, I am technically 
connecting locally.   I use PuTTY on my local machine.  But I set up a 
secure tunnel to port  on the remote host.  When I connect to 
localhost: on my machine it's the same as connecting to 
localhost: on the target machine.  As long as the tunnel is secure 
(SSL), there's no outside access to JMX.   At least that's the way the 
videos explain it for accessing remote Tomcat via a PuTTY tunnel.  And 
Tomcat access works.   Is the exception in James startup log stating 
that the connection is refused ok to ignore.  Seems that's not a good 
thing.


On 9/26/2019 12:40 AM, Tellier Benoit wrote:

Hi Jerry,

You need to be aware James restrict JMX access to localhost.

As you know, the James command line is currently using JMX.

JMX is known-to-be unsecure: read
https://www.cvedetails.com/cve/CVE-2017-12628/ for instance. Exposing
JMX only to localHost is a mitigation.

Could this be the root of your JMX problem?

On 26/09/2019 12:03, Jerry Malcolm wrote:

[...]> So I decided to use JMX to see if there were any
MBeans exposed that might help me figure out why there is no logging.
And, of course with the way everything else has gone, I can't connect to
James JMX.  JConsole will not connect.  It works fine accessing Tomcat
using the same approach. But nothing with James.  I'm using a PuTTY
tunnel directly to the Amazon EC2 instance.

I went back to an absolute pristine install of JAMES 3.3.0 right out of
the downloaded zip file.  I made absolutely zero changes to the
install/config.  Just unpack and run.  No JMX access with out-of-the-box
James either.  JConsole hangs for about a minute, and gives me an error
that it can't connect.

Then I made one change to log4j.properties and bumped everything to
DEBUG.  Thankfully, the one log file that actually works in this release
is James-server.log.  I see the following error when James is apparently
starting up JMX.  The 172.31 IP address it's failing on is my EC2
public IP.  But the jmx.properties file says to connect to
127.0.0.1:.  I never explicitly configured the 172.31... address
anywhere in James.

What's causing this:

INFO  04:29:47,638 |
org.springframework.remoting.rmi.RmiRegistryFactoryBean | Looking for
RMI registry at port '', using custom socket factory
DEBUG 04:29:47,642 |
org.springframework.remoting.rmi.RmiRegistryFactoryBean | RMI registry
access threw exception
java.rmi.ConnectException: Connection refused to host: 172.31.32.236;
nested exception is:
     java.net.ConnectException: Connection refused (Connection refused)
     at
sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:619)
     at
sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216)
     at
sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
     at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:338)
     at
sun.rmi.registry.RegistryImpl_Stub.list(RegistryImpl_Stub.java:85)
     at
org.springframework.remoting.rmi.RmiRegistryFactoryBean.testRegistry(RmiRegistryFactoryBean.java:281)

     at
org.springframework.remoting.rmi.RmiRegistryFactoryBean.getRegistry(RmiRegistryFactoryBean.java:222)

     at
org.springframework.remoting.rmi.RmiRegistryFactoryBean.getRegistry(RmiRegistryFactoryBean.java:193)

     at
org.springframework.remoting.rmi.RmiRegistryFactoryBean.afterPropertiesSet(RmiRegistryFactoryBean.java:164)

     at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1573)

     at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1511)

     at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)

     at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)

     at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)

     at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)

     at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)

     at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)

     at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:283)

     at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)

     at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:

Re: JMX Access?

2019-09-26 Thread Jerry Malcolm
I apologize that my posts have appeared course. I'm very frustrated and 
nervous about my client base.  I committed my business to James around 
2004, I believe.  I upgraded from v2 to v3b5 in 2014 with relatively 
minor issues.  When I started what I thought would be an even less 
stressful migration in early August to 3.3.0, I was not prepared for 
nearly 2 months of effort and still no way of knowing how to get 3.3.0 
to work.  The date is fast approaching that my current server is going 
away.  And if I don't have 3.3.0 up and running, I get to tell a whole 
lot of people that they're not going to be getting mail and my business 
folds. This is pretty scary.  I completely understand this is 
voluntary.  I simply would like some people more knowledgeable about 
James than me to dialog about whether problems are actually release 
content problems or user error.  I can handle user errors.  I am far 
from knowledgeable about everything in James, and I make mistakes.  But 
when I open the zip and set all log levels to DEBUG and all the log 
files are empty, I would hope someone on the developer/contributor team 
would be willing to take a look and see if I'm right.  If I'm right, 
then a suggested workaround would be huge.  If I'm wrong, someone set me 
straight. Again, I'm sorry for the frustrated posts.  It's the total 
silence that is difficult when my source of income is on the line.


I'm willing to pay for support.  Please contact me privately and let me 
know the cost would be to find out why I can't see any log output for 
any loggers other than james-server.


On 9/26/2019 12:35 AM, Tellier Benoit wrote:

Hi Jerry
Well,

  1. You are asking sometime hard questions that people can't answers
without significant work overhead.

  2. This is OpenSource. This is Free. This is 'best effort' given a
limited time range.

Please read again carefully the Apache foundation mailing list guide
lines: https://www.apache.org/foundation/policies/conduct.html

I personally do not find the style of your previous email being
'friendly' with the work contributors do. And you are also not patient
with the answers the community provides you for free.

I'd like to mention that some community member will by the way be very
happy to offer a paid support (for example me as part of Linagora
company) might you be unhappy with the support provided as part of the
community.

And for your information, yes, we are using James 3.3.0.

I will answer your JMX question in an other email.

Best regards

On 26/09/2019 12:03, Jerry Malcolm wrote:

I figure if I keep asking questions, sooner or later I'm going to hit
one that SOMEBODY can help me withThe issues keep backing up.  And
my deadline is way too close Is anyone using James 3.3.0?  Yet I'm
the only one having these out-of-the-box problems?  This migration has
been an absolute nightmare.

I still have absolutely NO way to see any logging data for the mailets,
smtp, imap, etc logs.   So I decided to use JMX to see if there were any
MBeans exposed that might help me figure out why there is no logging.
And, of course with the way everything else has gone, I can't connect to
James JMX.  JConsole will not connect.  It works fine accessing Tomcat
using the same approach. But nothing with James.  I'm using a PuTTY
tunnel directly to the Amazon EC2 instance.

I went back to an absolute pristine install of JAMES 3.3.0 right out of
the downloaded zip file.  I made absolutely zero changes to the
install/config.  Just unpack and run.  No JMX access with out-of-the-box
James either.  JConsole hangs for about a minute, and gives me an error
that it can't connect.

Then I made one change to log4j.properties and bumped everything to
DEBUG.  Thankfully, the one log file that actually works in this release
is James-server.log.  I see the following error when James is apparently
starting up JMX.  The 172.31 IP address it's failing on is my EC2
public IP.  But the jmx.properties file says to connect to
127.0.0.1:.  I never explicitly configured the 172.31... address
anywhere in James.

What's causing this:

INFO  04:29:47,638 |
org.springframework.remoting.rmi.RmiRegistryFactoryBean | Looking for
RMI registry at port '', using custom socket factory
DEBUG 04:29:47,642 |
org.springframework.remoting.rmi.RmiRegistryFactoryBean | RMI registry
access threw exception
java.rmi.ConnectException: Connection refused to host: 172.31.32.236;
nested exception is:
     java.net.ConnectException: Connection refused (Connection refused)
     at
sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:619)
     at
sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216)
     at
sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
     at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:338)
     at
sun.rmi.registry.RegistryImpl_Stub.list(RegistryImpl_Stub.java:85

Re: JMX Access?

2019-09-25 Thread Jerry Malcolm

Sai,

Thanks for the quick response.  But in the latest 3.3.0 download, there 
is not a james.sh file.  I've been using run.sh.  There is a 
james-cli.sh.  But I have not been using it.  But both the run.sh and 
james-cli.sh files have those two parameters already specified in the 
JAVA command.  So I don't think that could be what's wrong.


Any idea what is causing the exception?

And just out of curiosity, if you are on James 3.3.0, do any of the log 
files in the logs directory have any data in them?  Even out of the box, 
with every log level set to DEBUG, for me the only file that doesn't 
have zero bytes is james-server-log.  My bigger problem than JMX is that 
all of the logging data is being discarded.


Jerry

On 9/26/2019 12:21 AM, Saibabu Vallurupalli wrote:

Hi Jerry,

you need to add JVM options before starting the James server. See the
two parameters below:
Edit james.sh in vi editor or whichever you are comfortable with and
then add  "-Dcom.sun.management.jmxremote=true" and
"-Dcom.sun.management.jmxremote.authenticate=false", see below the way
how I did.

case "$1" in
 start)
 echo Starting James
 nohup java -classpath
"james-server-jpa-guice.jar:james-server-jpa-guice.lib/*:james-server-jpa-guice.lib"
-javaagent:james-server-jpa-guice.lib/openjpa-3.0.0.jar
-Dcom.sun.management.jmxremote=true
-Dcom.sun.management.jmxremote.authenticate=false
-Dlogback.configurationFile=conf/logback.xml -Dworking.directory=.
org.apache.james.JPAJamesServerMain > /dev/null 2>&1  &

Do the same for restart) option too just in case if you restart you
may loose JMX option.

Then the JMX gets enabled. The script has issues, these parameters
should be available by default.

Hope this helps and you can meet your deadline now :-)

Let me know how it goes.

Thanks,
Sai

On Thu, Sep 26, 2019 at 1:11 AM Jerry Malcolm  wrote:

I figure if I keep asking questions, sooner or later I'm going to hit
one that SOMEBODY can help me with  The issues keep backing up.  And
my deadline is way too close Is anyone using James 3.3.0?  Yet I'm
the only one having these out-of-the-box problems?  This migration has
been an absolute nightmare.

I still have absolutely NO way to see any logging data for the mailets,
smtp, imap, etc logs.   So I decided to use JMX to see if there were any
MBeans exposed that might help me figure out why there is no logging.
And, of course with the way everything else has gone, I can't connect to
James JMX.  JConsole will not connect.  It works fine accessing Tomcat
using the same approach. But nothing with James.  I'm using a PuTTY
tunnel directly to the Amazon EC2 instance.

I went back to an absolute pristine install of JAMES 3.3.0 right out of
the downloaded zip file.  I made absolutely zero changes to the
install/config.  Just unpack and run.  No JMX access with out-of-the-box
James either.  JConsole hangs for about a minute, and gives me an error
that it can't connect.

Then I made one change to log4j.properties and bumped everything to
DEBUG.  Thankfully, the one log file that actually works in this release
is James-server.log.  I see the following error when James is apparently
starting up JMX.  The 172.31 IP address it's failing on is my EC2
public IP.  But the jmx.properties file says to connect to
127.0.0.1:.  I never explicitly configured the 172.31... address
anywhere in James.

What's causing this:

INFO  04:29:47,638 |
org.springframework.remoting.rmi.RmiRegistryFactoryBean | Looking for
RMI registry at port '', using custom socket factory
DEBUG 04:29:47,642 |
org.springframework.remoting.rmi.RmiRegistryFactoryBean | RMI registry
access threw exception
java.rmi.ConnectException: Connection refused to host: 172.31.32.236;
nested exception is:
  java.net.ConnectException: Connection refused (Connection refused)
  at
sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:619)
  at
sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216)
  at
sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
  at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:338)
  at
sun.rmi.registry.RegistryImpl_Stub.list(RegistryImpl_Stub.java:85)
  at
org.springframework.remoting.rmi.RmiRegistryFactoryBean.testRegistry(RmiRegistryFactoryBean.java:281)
  at
org.springframework.remoting.rmi.RmiRegistryFactoryBean.getRegistry(RmiRegistryFactoryBean.java:222)
  at
org.springframework.remoting.rmi.RmiRegistryFactoryBean.getRegistry(RmiRegistryFactoryBean.java:193)
  at
org.springframework.remoting.rmi.RmiRegistryFactoryBean.afterPropertiesSet(RmiRegistryFactoryBean.java:164)
  at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1573)
  at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.

JMX Access?

2019-09-25 Thread Jerry Malcolm
I figure if I keep asking questions, sooner or later I'm going to hit 
one that SOMEBODY can help me with  The issues keep backing up.  And 
my deadline is way too close Is anyone using James 3.3.0?  Yet I'm 
the only one having these out-of-the-box problems?  This migration has 
been an absolute nightmare.


I still have absolutely NO way to see any logging data for the mailets, 
smtp, imap, etc logs.   So I decided to use JMX to see if there were any 
MBeans exposed that might help me figure out why there is no logging.   
And, of course with the way everything else has gone, I can't connect to 
James JMX.  JConsole will not connect.  It works fine accessing Tomcat 
using the same approach. But nothing with James.  I'm using a PuTTY 
tunnel directly to the Amazon EC2 instance.


I went back to an absolute pristine install of JAMES 3.3.0 right out of 
the downloaded zip file.  I made absolutely zero changes to the 
install/config.  Just unpack and run.  No JMX access with out-of-the-box 
James either.  JConsole hangs for about a minute, and gives me an error 
that it can't connect.


Then I made one change to log4j.properties and bumped everything to 
DEBUG.  Thankfully, the one log file that actually works in this release 
is James-server.log.  I see the following error when James is apparently 
starting up JMX.  The 172.31 IP address it's failing on is my EC2 
public IP.  But the jmx.properties file says to connect to 
127.0.0.1:.  I never explicitly configured the 172.31... address 
anywhere in James.


What's causing this:

INFO  04:29:47,638 | 
org.springframework.remoting.rmi.RmiRegistryFactoryBean | Looking for 
RMI registry at port '', using custom socket factory
DEBUG 04:29:47,642 | 
org.springframework.remoting.rmi.RmiRegistryFactoryBean | RMI registry 
access threw exception
java.rmi.ConnectException: Connection refused to host: 172.31.32.236; 
nested exception is:

    java.net.ConnectException: Connection refused (Connection refused)
    at 
sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:619)
    at 
sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216)
    at 
sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)

    at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:338)
    at 
sun.rmi.registry.RegistryImpl_Stub.list(RegistryImpl_Stub.java:85)
    at 
org.springframework.remoting.rmi.RmiRegistryFactoryBean.testRegistry(RmiRegistryFactoryBean.java:281)
    at 
org.springframework.remoting.rmi.RmiRegistryFactoryBean.getRegistry(RmiRegistryFactoryBean.java:222)
    at 
org.springframework.remoting.rmi.RmiRegistryFactoryBean.getRegistry(RmiRegistryFactoryBean.java:193)
    at 
org.springframework.remoting.rmi.RmiRegistryFactoryBean.afterPropertiesSet(RmiRegistryFactoryBean.java:164)
    at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1573)
    at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1511)
    at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
    at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
    at 
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
    at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
    at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
    at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)
    at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:283)
    at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)
    at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:620)
    at 
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:942)
    at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
    at 
org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:139)
    at 
org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:93)
    at 
org.apache.james.container.spring.context.JamesServerApplicationContext.(JamesServerApplicationContext.java:40)
    at 

LetsEncrypt Certificates Not Trusted

2019-09-25 Thread Jerry Malcolm
Still nothing on making the logs work...  While waiting on that, I'm 
moving to SSL.  I was not using SSL on beta5.  So this is likely a 
generic SSL question not specific to 3.3.0.  See the setup and 
configuration info below.  When I try to create an account in 
Thunderbird and also in an iPhone, both Tbird and iPhone say the 
certificate is not trusted.  Any idea what I did wrong?


I have a domain certificate/chain issued by LetsEncrypt that works in 
httpd.  I issued the following three commands per the James SSL setup page:


 keytool -genkeypair -alias simple-cert -keyalg RSA -keysize 2048 
-keystore imapJwmHosting.jks -dname CN=imap1.jwmhosting.com
 keytool -import -alias root  -keystore 
/etc/letsencrypt/live/imap1.jwmhosting.com/imapJwmHosting.jks 
-trustcacerts -file /etc/letsencrypt/live/imap1.jwmhosting.com/chain.pem
 keytool -import -alias james -keystore 
/etc/letsencrypt/live/imap1.jwmhosting.com/imapJwmHosting.jks 
-trustcacerts -file /etc/letsencrypt/live/imap1.jwmhosting.com/cert.pem


In imapserver.xml:

  
file://conf/keystore/imap1.jwmhosting.com/imapJwmHosting.jks
    
org.bouncycastle.jce.provider.BouncyCastleProvider
  

Same process for the smtp side.



Re: log4j Configuration

2019-09-19 Thread Jerry Malcolm
Any chance I could get someone to take a look at this problem? There's 
no way for me to move forward until I can see my mailet logs.  I tried 
to dig into slf4j and log4j.  But I just don't have enough background in 
that to figure out what is happening.  And since I don't have a full 
james set up on an IDE where I can set breakpoints, I have no way to 
figure out why all log data is just being discarded regardless of the 
log4j.properties settings.  With the appropriate tools it seems like 
it'd be pretty easy to see why log4j is not writing any data.  But I 
just don't have the tools. Can somebody in James development please take 
a few minutes and see if they figure it out?  I'm sure it's probably 
something trivial as properties file settings.  But without some 
guidance, I'm shooting in the dark.


Help, please?

Jerry

On 9/18/2019 10:18 AM, Jerry Malcolm wrote:
Without a way to see my mailet log data, I have no way of knowing if 
my mailets were even called, if they succeeded, if they failed. Right 
now, all I know is they went into a processor and disappeared.  This 
is a serious problem for me.  I really need to have a way to see this 
data.  If it's a log4j.properties change, I just need to know what to 
change.  I'm dead in the water.



On 9/17/2019 11:08 PM, Jerry Malcolm wrote:
I added the transport line as you suggested and sent a test email 
inbound.  The console showed it coming in, as does james-server.log.  
But still, the only log file in the logs directory that is not empty 
is james-server. Nothing is going to any of these files.


On 9/17/2019 10:49 PM, Tellier Benoit wrote:

I inlined my answers...

Regards,

On 18/09/2019 10:32, Jerry Malcolm wrote:

Thanks for the reply.  But I did not use my old log4j.properties.  I
copied the one from the downloaded 3.3.0 zip file. Although, it looks
almost identical to the beta5 one.  Any chance the wrong one is 
included

in the package?

I think the default log4j file was never updated.

Contribution welcomed BTW...


I'm fine with logger-per-mailet. However, I'm hoping there's a way to
see the flow for an email item.  It's just as important at times to 
see

that various matchers passed or didn't pass on an item as it goes
through the flow.  Is there still a logger that shows the flow?

The approach regarding this is to use the MDC for doing some
contextualized logging (SLF4J API)

Within James guice application, we rely on logback, and a
"ElasticSearch" appender. Logs can then be filtered by 'mail' property.

You will then see all of the logs related to the processing of that 
very

email.

I'm not a log4j expert but there should be a way of doing something
somehow similar...

Bottom line, though, I don't know what to put in the log4j file to 
make
the mailet logs show up.  Do you have a link handy to the correct 
log4j

in github?

I don't think we have...

I'm not an expert here but let's play a bit:

In log4j.properties I would replace line 124

log4j.logger.org.apache.james.mailprocessor=INFO, MAILETCONTAINER

By

log4j.logger.org.apache.james.mailprocessor=INFO, MAILETCONTAINER
log4j.logger.org.apache.james.transport=INFO, MAILETCONTAINER

(Rationals: all mailets are located within the
"org.apache.james.transport.mailets" &
"org.apache.james.transport.matchers" packages...


Thx


On 9/17/2019 10:23 PM, Tellier Benoit wrote:

Maybe I could help on that one:

The mailet logging had been migrated to a standard SLF4J approach.

Before that, all mailet logs went though a single logger, exposed as
part of the MailetContext object.

Before 3.0.0 release we altered that behavior, and create one 
logger per

mailet class for bundled mailets.

In the end, this enabled simpler logging filtering - on a per mailet
basis, got rid of the imperfect logging facade exposed in the 
mailet API

(no placeholder for instance), and also killed some "debug"
configuration parameters.

I believe that your log4j configuration file inherited from beta5 
needs

to be revisited to adapt these changes.

Hope it helps.

Benoit

On 18/09/2019 09:10, Jerry Malcolm wrote:
Not good news for me, however.  My mailet flow that worked in 
v3b5 is
crashing now, and none of the log output I'm writing from my 
mailets is
showing up anywhere.  I've GOT to see that log info some place in 
order
to debug both my mailets as well as my mailet flow that is 
somehow no
longer compatible.  All I get is a 'mail received' message, and 
an error
saying it can't launch one of my mailets because there is a 
recursive
loop in my flow (there is not, or at least there was not when it 
running

in v3b5).

There's got to be a way to see mailet log data. Tellier?


On 9/17/2019 9:02 PM, Garry Hurley wrote:
It’s not you. I have the same issue. I think those other log 
files are
just there for backwards compatibility to make users feel good, 
since
they never seem to be written to. “No news is good news” as the 
saying

goes.

Sent from my iPhone

Re: log4j Configuration

2019-09-18 Thread Jerry Malcolm
Without a way to see my mailet log data, I have no way of knowing if my 
mailets were even called, if they succeeded, if they failed.  Right now, 
all I know is they went into a processor and disappeared.  This is a 
serious problem for me.  I really need to have a way to see this data.  
If it's a log4j.properties change, I just need to know what to change.  
I'm dead in the water.



On 9/17/2019 11:08 PM, Jerry Malcolm wrote:
I added the transport line as you suggested and sent a test email 
inbound.  The console showed it coming in, as does james-server.log.  
But still, the only log file in the logs directory that is not empty 
is james-server.  Nothing is going to any of these files.


On 9/17/2019 10:49 PM, Tellier Benoit wrote:

I inlined my answers...

Regards,

On 18/09/2019 10:32, Jerry Malcolm wrote:

Thanks for the reply.  But I did not use my old log4j.properties.  I
copied the one from the downloaded 3.3.0 zip file.  Although, it looks
almost identical to the beta5 one.  Any chance the wrong one is 
included

in the package?

I think the default log4j file was never updated.

Contribution welcomed BTW...


I'm fine with logger-per-mailet. However, I'm hoping there's a way to
see the flow for an email item.  It's just as important at times to see
that various matchers passed or didn't pass on an item as it goes
through the flow.  Is there still a logger that shows the flow?

The approach regarding this is to use the MDC for doing some
contextualized logging (SLF4J API)

Within James guice application, we rely on logback, and a
"ElasticSearch" appender. Logs can then be filtered by 'mail' property.

You will then see all of the logs related to the processing of that very
email.

I'm not a log4j expert but there should be a way of doing something
somehow similar...


Bottom line, though, I don't know what to put in the log4j file to make
the mailet logs show up.  Do you have a link handy to the correct log4j
in github?

I don't think we have...

I'm not an expert here but let's play a bit:

In log4j.properties I would replace line 124

log4j.logger.org.apache.james.mailprocessor=INFO, MAILETCONTAINER

By

log4j.logger.org.apache.james.mailprocessor=INFO, MAILETCONTAINER
log4j.logger.org.apache.james.transport=INFO, MAILETCONTAINER

(Rationals: all mailets are located within the
"org.apache.james.transport.mailets" &
"org.apache.james.transport.matchers" packages...


Thx


On 9/17/2019 10:23 PM, Tellier Benoit wrote:

Maybe I could help on that one:

The mailet logging had been migrated to a standard SLF4J approach.

Before that, all mailet logs went though a single logger, exposed as
part of the MailetContext object.

Before 3.0.0 release we altered that behavior, and create one 
logger per

mailet class for bundled mailets.

In the end, this enabled simpler logging filtering - on a per mailet
basis, got rid of the imperfect logging facade exposed in the 
mailet API

(no placeholder for instance), and also killed some "debug"
configuration parameters.

I believe that your log4j configuration file inherited from beta5 
needs

to be revisited to adapt these changes.

Hope it helps.

Benoit

On 18/09/2019 09:10, Jerry Malcolm wrote:

Not good news for me, however.  My mailet flow that worked in v3b5 is
crashing now, and none of the log output I'm writing from my 
mailets is
showing up anywhere.  I've GOT to see that log info some place in 
order

to debug both my mailets as well as my mailet flow that is somehow no
longer compatible.  All I get is a 'mail received' message, and an 
error

saying it can't launch one of my mailets because there is a recursive
loop in my flow (there is not, or at least there was not when it 
running

in v3b5).

There's got to be a way to see mailet log data.  Tellier?


On 9/17/2019 9:02 PM, Garry Hurley wrote:
It’s not you. I have the same issue. I think those other log 
files are
just there for backwards compatibility to make users feel good, 
since
they never seem to be written to. “No news is good news” as the 
saying

goes.

Sent from my iPhone


On Sep 17, 2019, at 4:34 PM, Jerry Malcolm 
wrote:

For the problem du jour when I start JAMES, all of the expected
log files get created.  The main log output  goes to the console 
and
to the james-server.log file as expected.  No problem there.  
But the

remainder of the log files never get touched.  No matter what
happens, every file in the log folder other than 
james-server.log is

empty.  I've tried changing log4j.properties and setting everything
to DEBUG level.  The console log dumps a bunch more info while in
DEBUG mode (which confirms I'm changing the correct log4j 
file).  But
every other log file is still empty.  I used to see my mailet 
output

in the main console and james-server.log in b5.  I'm not seeing any
of that anywhere. Again, I've played around with 
log4j.properties (I

made sure I was using the latest 3.3.0 log4j.properties file).
Nothing.  Wh

Re: log4j Configuration

2019-09-17 Thread Jerry Malcolm
I added the transport line as you suggested and sent a test email 
inbound.  The console showed it coming in, as does james-server.log.  
But still, the only log file in the logs directory that is not empty is 
james-server.  Nothing is going to any of these files.


On 9/17/2019 10:49 PM, Tellier Benoit wrote:

I inlined my answers...

Regards,

On 18/09/2019 10:32, Jerry Malcolm wrote:

Thanks for the reply.  But I did not use my old log4j.properties.  I
copied the one from the downloaded 3.3.0 zip file.  Although, it looks
almost identical to the beta5 one.  Any chance the wrong one is included
in the package?

I think the default log4j file was never updated.

Contribution welcomed BTW...


I'm fine with logger-per-mailet.  However, I'm hoping there's a way to
see the flow for an email item.  It's just as important at times to see
that various matchers passed or didn't pass on an item as it goes
through the flow.  Is there still a logger that shows the flow?

The approach regarding this is to use the MDC for doing some
contextualized logging (SLF4J API)

Within James guice application, we rely on logback, and a
"ElasticSearch" appender. Logs can then be filtered by 'mail' property.

You will then see all of the logs related to the processing of that very
email.

I'm not a log4j expert but there should be a way of doing something
somehow similar...


Bottom line, though, I don't know what to put in the log4j file to make
the mailet logs show up.  Do you have a link handy to the correct log4j
in github?

I don't think we have...

I'm not an expert here but let's play a bit:

In log4j.properties I would replace line 124

log4j.logger.org.apache.james.mailprocessor=INFO, MAILETCONTAINER

By

log4j.logger.org.apache.james.mailprocessor=INFO, MAILETCONTAINER
log4j.logger.org.apache.james.transport=INFO, MAILETCONTAINER

(Rationals: all mailets are located within the
"org.apache.james.transport.mailets" &
"org.apache.james.transport.matchers" packages...


Thx


On 9/17/2019 10:23 PM, Tellier Benoit wrote:

Maybe I could help on that one:

The mailet logging had been migrated to a standard SLF4J approach.

Before that, all mailet logs went though a single logger, exposed as
part of the MailetContext object.

Before 3.0.0 release we altered that behavior, and create one logger per
mailet class for bundled mailets.

In the end, this enabled simpler logging filtering - on a per mailet
basis, got rid of the imperfect logging facade exposed in the mailet API
(no placeholder for instance), and also killed some "debug"
configuration parameters.

I believe that your log4j configuration file inherited from beta5 needs
to be revisited to adapt these changes.

Hope it helps.

Benoit

On 18/09/2019 09:10, Jerry Malcolm wrote:

Not good news for me, however.  My mailet flow that worked in v3b5 is
crashing now, and none of the log output I'm writing from my mailets is
showing up anywhere.  I've GOT to see that log info some place in order
to debug both my mailets as well as my mailet flow that is somehow no
longer compatible.  All I get is a 'mail received' message, and an error
saying it can't launch one of my mailets because there is a recursive
loop in my flow (there is not, or at least there was not when it running
in v3b5).

There's got to be a way to see mailet log data.  Tellier?


On 9/17/2019 9:02 PM, Garry Hurley wrote:

It’s not you. I have the same issue. I think those other log files are
just there for backwards compatibility to make users feel good, since
they never seem to be written to. “No news is good news” as the saying
goes.

Sent from my iPhone


On Sep 17, 2019, at 4:34 PM, Jerry Malcolm 
wrote:

For the problem du jour when I start JAMES, all of the expected
log files get created.  The main log output  goes to the console and
to the james-server.log file as expected.  No problem there.  But the
remainder of the log files never get touched.  No matter what
happens, every file in the log folder other than james-server.log is
empty.  I've tried changing log4j.properties and setting everything
to DEBUG level.  The console log dumps a bunch more info while in
DEBUG mode (which confirms I'm changing the correct log4j file).  But
every other log file is still empty.  I used to see my mailet output
in the main console and james-server.log in b5.  I'm not seeing any
of that anywhere. Again, I've played around with log4j.properties (I
made sure I was using the latest 3.3.0 log4j.properties file).
Nothing.  What am I doing wrong?  How can I get log data to start
going into those other files?


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


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

Re: log4j Configuration

2019-09-17 Thread Jerry Malcolm
I'll try that shortly.  But that doesn't explain why all of the logger 
output files are empty, no matter what the log4j settings are.  This was 
after 30 minutes of running with every log level throughout 
log4j.properties set to DEBUG.  Shouldn't at least some of these have 
some sort of log data, such as imapserver.log, smtpserver.log, etc?


 9/17/2019  21:33   0  dnsservice.log
 9/17/2019  21:33   0  domainlist.log
 9/17/2019  21:33   0  fetchmail.log
 9/17/2019  21:33   0  imapserver.log
 9/17/2019  21:33   0  lmtpserver.log
 9/17/2019  21:33   0  mailboxmanager.log
 9/17/2019  21:33   0  mailetcontainer.log
 9/17/2019  21:33   0  mailqueuefactory.log
 9/17/2019  21:33   0  mailrepositorystore.log
 9/17/2019  21:33   0  pop3server.log
 9/17/2019  21:33   0  usersrepository.log
 9/17/2019  21:33   0  virtualusertable.log

On 9/17/2019 10:49 PM, Tellier Benoit wrote:

I inlined my answers...

Regards,

On 18/09/2019 10:32, Jerry Malcolm wrote:

Thanks for the reply.  But I did not use my old log4j.properties.  I
copied the one from the downloaded 3.3.0 zip file.  Although, it looks
almost identical to the beta5 one.  Any chance the wrong one is included
in the package?

I think the default log4j file was never updated.

Contribution welcomed BTW...


I'm fine with logger-per-mailet.  However, I'm hoping there's a way to
see the flow for an email item.  It's just as important at times to see
that various matchers passed or didn't pass on an item as it goes
through the flow.  Is there still a logger that shows the flow?

The approach regarding this is to use the MDC for doing some
contextualized logging (SLF4J API)

Within James guice application, we rely on logback, and a
"ElasticSearch" appender. Logs can then be filtered by 'mail' property.

You will then see all of the logs related to the processing of that very
email.

I'm not a log4j expert but there should be a way of doing something
somehow similar...


Bottom line, though, I don't know what to put in the log4j file to make
the mailet logs show up.  Do you have a link handy to the correct log4j
in github?

I don't think we have...

I'm not an expert here but let's play a bit:

In log4j.properties I would replace line 124

log4j.logger.org.apache.james.mailprocessor=INFO, MAILETCONTAINER

By

log4j.logger.org.apache.james.mailprocessor=INFO, MAILETCONTAINER
log4j.logger.org.apache.james.transport=INFO, MAILETCONTAINER

(Rationals: all mailets are located within the
"org.apache.james.transport.mailets" &
"org.apache.james.transport.matchers" packages...


Thx


On 9/17/2019 10:23 PM, Tellier Benoit wrote:

Maybe I could help on that one:

The mailet logging had been migrated to a standard SLF4J approach.

Before that, all mailet logs went though a single logger, exposed as
part of the MailetContext object.

Before 3.0.0 release we altered that behavior, and create one logger per
mailet class for bundled mailets.

In the end, this enabled simpler logging filtering - on a per mailet
basis, got rid of the imperfect logging facade exposed in the mailet API
(no placeholder for instance), and also killed some "debug"
configuration parameters.

I believe that your log4j configuration file inherited from beta5 needs
to be revisited to adapt these changes.

Hope it helps.

Benoit

On 18/09/2019 09:10, Jerry Malcolm wrote:

Not good news for me, however.  My mailet flow that worked in v3b5 is
crashing now, and none of the log output I'm writing from my mailets is
showing up anywhere.  I've GOT to see that log info some place in order
to debug both my mailets as well as my mailet flow that is somehow no
longer compatible.  All I get is a 'mail received' message, and an error
saying it can't launch one of my mailets because there is a recursive
loop in my flow (there is not, or at least there was not when it running
in v3b5).

There's got to be a way to see mailet log data.  Tellier?


On 9/17/2019 9:02 PM, Garry Hurley wrote:

It’s not you. I have the same issue. I think those other log files are
just there for backwards compatibility to make users feel good, since
they never seem to be written to. “No news is good news” as the saying
goes.

Sent from my iPhone


On Sep 17, 2019, at 4:34 PM, Jerry Malcolm 
wrote:

For the problem du jour when I start JAMES, all of the expected
log files get created.  The main log output  goes to the console and
to the james-server.log file as expected.  No problem there.  But the
remainder of the log files never get touched.  No matter what
happens, every file in the log folder other than james-server.log is
empty.  I've tried changing log4j.properties and setting everything
to DEBUG level.  The console log dumps a bunch more info while in
DEBUG mode (which confirms I'm changing the correct log4j file).  But
every other log file is 

Re: log4j Configuration

2019-09-17 Thread Jerry Malcolm
Thanks for the reply.  But I did not use my old log4j.properties.  I 
copied the one from the downloaded 3.3.0 zip file.  Although, it looks 
almost identical to the beta5 one.  Any chance the wrong one is included 
in the package?


I'm fine with logger-per-mailet.  However, I'm hoping there's a way to 
see the flow for an email item.  It's just as important at times to see 
that various matchers passed or didn't pass on an item as it goes 
through the flow.  Is there still a logger that shows the flow?


Bottom line, though, I don't know what to put in the log4j file to make 
the mailet logs show up.  Do you have a link handy to the correct log4j 
in github?


Thx


On 9/17/2019 10:23 PM, Tellier Benoit wrote:

Maybe I could help on that one:

The mailet logging had been migrated to a standard SLF4J approach.

Before that, all mailet logs went though a single logger, exposed as
part of the MailetContext object.

Before 3.0.0 release we altered that behavior, and create one logger per
mailet class for bundled mailets.

In the end, this enabled simpler logging filtering - on a per mailet
basis, got rid of the imperfect logging facade exposed in the mailet API
(no placeholder for instance), and also killed some "debug"
configuration parameters.

I believe that your log4j configuration file inherited from beta5 needs
to be revisited to adapt these changes.

Hope it helps.

Benoit

On 18/09/2019 09:10, Jerry Malcolm wrote:

Not good news for me, however.  My mailet flow that worked in v3b5 is
crashing now, and none of the log output I'm writing from my mailets is
showing up anywhere.  I've GOT to see that log info some place in order
to debug both my mailets as well as my mailet flow that is somehow no
longer compatible.  All I get is a 'mail received' message, and an error
saying it can't launch one of my mailets because there is a recursive
loop in my flow (there is not, or at least there was not when it running
in v3b5).

There's got to be a way to see mailet log data.  Tellier?


On 9/17/2019 9:02 PM, Garry Hurley wrote:

It’s not you. I have the same issue. I think those other log files are
just there for backwards compatibility to make users feel good, since
they never seem to be written to. “No news is good news” as the saying
goes.

Sent from my iPhone


On Sep 17, 2019, at 4:34 PM, Jerry Malcolm 
wrote:

For the problem du jour when I start JAMES, all of the expected
log files get created.  The main log output  goes to the console and
to the james-server.log file as expected.  No problem there.  But the
remainder of the log files never get touched.  No matter what
happens, every file in the log folder other than james-server.log is
empty.  I've tried changing log4j.properties and setting everything
to DEBUG level.  The console log dumps a bunch more info while in
DEBUG mode (which confirms I'm changing the correct log4j file).  But
every other log file is still empty.  I used to see my mailet output
in the main console and james-server.log in b5.  I'm not seeing any
of that anywhere. Again, I've played around with log4j.properties (I
made sure I was using the latest 3.3.0 log4j.properties file).
Nothing.  What am I doing wrong?  How can I get log data to start
going into those other files?


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


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


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


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



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



Re: log4j Configuration

2019-09-17 Thread Jerry Malcolm
Not good news for me, however.  My mailet flow that worked in v3b5 is 
crashing now, and none of the log output I'm writing from my mailets is 
showing up anywhere.  I've GOT to see that log info some place in order 
to debug both my mailets as well as my mailet flow that is somehow no 
longer compatible.  All I get is a 'mail received' message, and an error 
saying it can't launch one of my mailets because there is a recursive 
loop in my flow (there is not, or at least there was not when it running 
in v3b5).


There's got to be a way to see mailet log data.  Tellier?


On 9/17/2019 9:02 PM, Garry Hurley wrote:

It’s not you. I have the same issue. I think those other log files are just 
there for backwards compatibility to make users feel good, since they never 
seem to be written to. “No news is good news” as the saying goes.

Sent from my iPhone


On Sep 17, 2019, at 4:34 PM, Jerry Malcolm  wrote:

For the problem du jour when I start JAMES, all of the expected log files 
get created.  The main log output  goes to the console and to the 
james-server.log file as expected.  No problem there.  But the remainder of the 
log files never get touched.  No matter what happens, every file in the log 
folder other than james-server.log is empty.  I've tried changing 
log4j.properties and setting everything to DEBUG level.  The console log dumps 
a bunch more info while in DEBUG mode (which confirms I'm changing the correct 
log4j file).  But every other log file is still empty.  I used to see my mailet 
output in the main console and james-server.log in b5.  I'm not seeing any of 
that anywhere. Again, I've played around with log4j.properties (I made sure I 
was using the latest 3.3.0 log4j.properties file).  Nothing.  What am I doing 
wrong?  How can I get log data to start going into those other files?


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


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



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



log4j Configuration

2019-09-17 Thread Jerry Malcolm
For the problem du jour when I start JAMES, all of the expected log 
files get created.  The main log output  goes to the console and to the 
james-server.log file as expected.  No problem there.  But the remainder 
of the log files never get touched.  No matter what happens, every file 
in the log folder other than james-server.log is empty.  I've tried 
changing log4j.properties and setting everything to DEBUG level.  The 
console log dumps a bunch more info while in DEBUG mode (which confirms 
I'm changing the correct log4j file).  But every other log file is still 
empty.  I used to see my mailet output in the main console and 
james-server.log in b5.  I'm not seeing any of that anywhere. Again, 
I've played around with log4j.properties (I made sure I was using the 
latest 3.3.0 log4j.properties file).  Nothing.  What am I doing wrong?  
How can I get log data to start going into those other files?



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



Re: IMAP Error

2019-09-17 Thread Jerry Malcolm
Well this one wasn't as difficult as I expected.  Turns out during all 
of the transition and merging I ended up with the conf/META-INF folder 
from b5.  Since that folder contains all of the JPA stuff, 3.3.0 was not 
at all happy with v3b5 JPA files.


Just a note for continuing to document my adventures Once I swapped 
over the META-INF folder, things initially got much worse.  The JPA 
stuff is used to update all of the table schemas from 3.0 to 3.3 
version.  In the process of updating, it tries to add foreign keys to 
JAMES_MAIL_PROPERTY and JAMES_MAIL_USERFLAG tables.  Both of those 
failed miserably.  Digging into those database tables, I realized I had 
32 million (yup... 32 million) userFlag records with null MAIL_ID  and 
MAIL_UID fields that had no hope of matching up with fields in 
JAMES_MAIL.  And there were four records in JAMES_MAIL_PROPERTY that 
weren't null, but still didn't have a match in JAMES_MAIL.  So after 
finding and deleting those 4 as well as the 32 million null records, 
James was able to successfully complete the JPA startup stuff.  I guess 
this is a good thing that I'm forced to clean up problems with the 
current database.  This migration glacier is moving a millimeter at a 
time



On 9/17/2019 1:26 AM, Tellier Benoit wrote:

Hi Jerry,

To explain it shortly:

  1. In OpenJPA NamedQuery are directly attached to the POJO being
persited, here AbstractJPAMailboxMessage
  2. Using these annotations (named query) openjpa plugin enhance code
upon compilation
  3. Then the magic happens

Here because openjpa do not load correctly persisted objects, it then
fails at executing related queries.

Why OpenJPA fails loading related metadata? - the log is missing
explanation...

And of course...
  - What is the exact James version?
  - JDBC mysql driver version?
  - MySQL version?

This would enable us to be testing this locally, see if we can reproduce
it with basic setup...

Cheers,

Benoit

On 17/09/2019 10:36, Jerry Malcolm wrote:

Something that might be relevant to this problem, but the messages make
no more sense than the other one... A little earlier in the log, I have
a bunch of these messages:

174  James  INFO   [main] openjpa.Runtime - Starting OpenJPA 3.0.0
207  James  INFO   [main] openjpa.jdbc.JDBC - Using dictionary class
"org.apache.openjpa.jdbc.sql.MySQLDictionary".
552  James  INFO   [main] openjpa.jdbc.JDBC - Connected to MySQL version
5.5 using JDBC driver MySQL Connector Java version
mysql-connector-java-5.1.34 ( Revision:
jess.bal...@oracle.com-20141014163213-wqbwpf1ok2kvo1om ).
586  James  WARN   [main] openjpa.MetaData - The class
"org.apache.james.mailbox.jpa.mail.model.openjpa.JPAMessage" listed in
the openjpa.MetaDataFactory configuration property could not be loaded
by sun.misc.Launcher$AppClassLoader@764c12b6; ignoring.
587  James  WARN   [main] openjpa.MetaData - The class
"org.apache.james.mailbox.jpa.mail.model.openjpa.AbstractJPAMessage"
listed in the openjpa.MetaDataFactory configuration property could not
be loaded by sun.misc.Launcher$AppClassLoader@764c12b6; ignoring.
688  James  INFO   [main] openjpa.MetaData - The class
"org.apache.james.mailbox.jpa.mail.model.openjpa.JPAMessage" listed in
the openjpa.MetaDataFactory configuration property could not be loaded
by sun.misc.Launcher$AppClassLoader@764c12b6; ignoring.
689  James  INFO   [main] openjpa.MetaData - The class
"org.apache.james.mailbox.jpa.mail.model.openjpa.AbstractJPAMessage"
listed in the openjpa.MetaDataFactory configuration property could not
be loaded by sun.misc.Launcher$AppClassLoader@764c12b6; ignoring.
702  James  INFO   [main] openjpa.MetaData - The class
"org.apache.james.mailbox.jpa.mail.model.openjpa.JPAMessage" listed in
the openjpa.MetaDataFactory configuration property could not be loaded
by sun.misc.Launcher$AppClassLoader@764c12b6; ignoring.

On 9/16/2019 10:28 PM, Jerry Malcolm wrote:

The fun just keeps happening I was finally able to bring up the
new installation of James 3.3.0 with a sandbox copy of my real
database.  I created a new test email account in James and configured
it in my local Thunderbird instance.  So far, so good. But now every
time Thunderbird contacts James for an IMAP update, I get the error
below in the James log.  I'm not really familiar with jpa.  I searched
through the source and found quite a few places that the
"findMessagesInMailbox" name is referenced.  So not really sure why it
says it isn't defined.  Any ideas?  This is with the downloaded
binaries, not a re-built version.


org.apache.openjpa.persistence.ArgumentException:  There is no query
with the name "findMessagesInMailbox" defined for any of the known
persistent classes:
[org.apache.james.mailbox.jpa.mail.model.JPAMailbox,
org.apache.james.mailbox.jpa.mail.model.openjpa.JPAMessage,
org.apache.james.mailbox.jpa.mail.model.JPAUserFlag,
org.apache.james.mailbox.jpa.mail.m

Re: IMAP Error

2019-09-16 Thread Jerry Malcolm
Something that might be relevant to this problem, but the messages make 
no more sense than the other one... A little earlier in the log, I have 
a bunch of these messages:


174  James  INFO   [main] openjpa.Runtime - Starting OpenJPA 3.0.0
207  James  INFO   [main] openjpa.jdbc.JDBC - Using dictionary class 
"org.apache.openjpa.jdbc.sql.MySQLDictionary".
552  James  INFO   [main] openjpa.jdbc.JDBC - Connected to MySQL version 
5.5 using JDBC driver MySQL Connector Java version 
mysql-connector-java-5.1.34 ( Revision: 
jess.bal...@oracle.com-20141014163213-wqbwpf1ok2kvo1om ).
586  James  WARN   [main] openjpa.MetaData - The class 
"org.apache.james.mailbox.jpa.mail.model.openjpa.JPAMessage" listed in 
the openjpa.MetaDataFactory configuration property could not be loaded 
by sun.misc.Launcher$AppClassLoader@764c12b6; ignoring.
587  James  WARN   [main] openjpa.MetaData - The class 
"org.apache.james.mailbox.jpa.mail.model.openjpa.AbstractJPAMessage" 
listed in the openjpa.MetaDataFactory configuration property could not 
be loaded by sun.misc.Launcher$AppClassLoader@764c12b6; ignoring.
688  James  INFO   [main] openjpa.MetaData - The class 
"org.apache.james.mailbox.jpa.mail.model.openjpa.JPAMessage" listed in 
the openjpa.MetaDataFactory configuration property could not be loaded 
by sun.misc.Launcher$AppClassLoader@764c12b6; ignoring.
689  James  INFO   [main] openjpa.MetaData - The class 
"org.apache.james.mailbox.jpa.mail.model.openjpa.AbstractJPAMessage" 
listed in the openjpa.MetaDataFactory configuration property could not 
be loaded by sun.misc.Launcher$AppClassLoader@764c12b6; ignoring.
702  James  INFO   [main] openjpa.MetaData - The class 
"org.apache.james.mailbox.jpa.mail.model.openjpa.JPAMessage" listed in 
the openjpa.MetaDataFactory configuration property could not be loaded 
by sun.misc.Launcher$AppClassLoader@764c12b6; ignoring.


On 9/16/2019 10:28 PM, Jerry Malcolm wrote:
The fun just keeps happening I was finally able to bring up the 
new installation of James 3.3.0 with a sandbox copy of my real 
database.  I created a new test email account in James and configured 
it in my local Thunderbird instance.  So far, so good. But now every 
time Thunderbird contacts James for an IMAP update, I get the error 
below in the James log.  I'm not really familiar with jpa.  I searched 
through the source and found quite a few places that the 
"findMessagesInMailbox" name is referenced.  So not really sure why it 
says it isn't defined.  Any ideas?  This is with the downloaded 
binaries, not a re-built version.



org.apache.openjpa.persistence.ArgumentException:  There is no query
with the name "findMessagesInMailbox" defined for any of the known
persistent classes:
[org.apache.james.mailbox.jpa.mail.model.JPAMailbox,
org.apache.james.mailbox.jpa.mail.model.openjpa.JPAMessage,
org.apache.james.mailbox.jpa.mail.model.JPAUserFlag,
org.apache.james.mailbox.jpa.mail.model.openjpa.AbstractJPAMessage,
org.apache.james.domainlist.jpa.model.JPADomain,
org.apache.james.user.jpa.model.JPAUser,
org.apache.james.mailbox.jpa.mail.model.JPAProperty,
org.apache.james.mailbox.jpa.user.model.JPASubscription,
org.apache.james.rrt.jpa.model.JPARecipientRewrite].


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



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



IMAP Error

2019-09-16 Thread Jerry Malcolm
The fun just keeps happening I was finally able to bring up the new 
installation of James 3.3.0 with a sandbox copy of my real database.  I 
created a new test email account in James and configured it in my local 
Thunderbird instance.  So far, so good. But now every time Thunderbird 
contacts James for an IMAP update, I get the error below in the James 
log.  I'm not really familiar with jpa.  I searched through the source 
and found quite a few places that the "findMessagesInMailbox" name is 
referenced.  So not really sure why it says it isn't defined.  Any 
ideas?  This is with the downloaded binaries, not a re-built version.



org.apache.openjpa.persistence.ArgumentException:  There is no query
with the name "findMessagesInMailbox" defined for any of the known
persistent classes:
[org.apache.james.mailbox.jpa.mail.model.JPAMailbox,
org.apache.james.mailbox.jpa.mail.model.openjpa.JPAMessage,
org.apache.james.mailbox.jpa.mail.model.JPAUserFlag,
org.apache.james.mailbox.jpa.mail.model.openjpa.AbstractJPAMessage,
org.apache.james.domainlist.jpa.model.JPADomain,
org.apache.james.user.jpa.model.JPAUser,
org.apache.james.mailbox.jpa.mail.model.JPAProperty,
org.apache.james.mailbox.jpa.user.model.JPASubscription,
org.apache.james.rrt.jpa.model.JPARecipientRewrite].


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



Re: two datasources?

2019-09-16 Thread Jerry Malcolm
No the main mailet in question is 100% custom.  It is a mailet that 
decides what folder to put the mail item in.  I access a completely 
separate client database and determine if the sender is a client vs. a 
vendor vs. an employee and store the mail in a different folder based on 
the result.  The client database is completely unrelated to james.  It's 
just a lookup.  Since this mailet is pure custom, I really don't care to 
do any more integration into James other than mailet interface.  My main 
goal was simply to be able to store the database name, id/pw, url, etc 
in a database properties file and get it out of the mailet code and/or 
the mailet flow xml files.   Again, not a big deal.


On 9/16/2019 9:49 PM, Tellier Benoit wrote:

Hi Jerry,

Are you speaking of JDBC mailets (whiteList for instance)

These mailets are currently deprecated (or will be) as they hard code
their database, are not standard, not tested and not documented. Note
that they are considered as 'experimental' ( cf
http://james.apache.org/server/dev-provided-mailets.html ).

I would discourage their use (unless you really need these features) and
call for contribution:

  - Write a generic storage API for them
  - Rewrite these mailets on top of this storage API
  - Provide JPA storage for these storage APIs
  - Bind stuff in Guice/Spring

A bit of work, but if you really need it, I would be pleased to provide
such guidance.

On 17/09/2019 09:39, Jerry Malcolm wrote:

A couple of my mailets need to access a different database other than
the base james db.  I've got the main db set up in the
james-database.properties file.  Currently I'm just hardcoding the
database connection to the other db in the mailet.  Just curious if
there's a better architected process where I can define two datasources
in james-database.properties and reference the alternate datasource when
needed.  Couldn't see anything as to how to do that.   Not a big deal.
Just trying to clean up a few things as I migrate to the new version.


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


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



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



two datasources?

2019-09-16 Thread Jerry Malcolm
A couple of my mailets need to access a different database other than 
the base james db.  I've got the main db set up in the 
james-database.properties file.  Currently I'm just hardcoding the 
database connection to the other db in the mailet.  Just curious if 
there's a better architected process where I can define two datasources 
in james-database.properties and reference the alternate datasource when 
needed.  Couldn't see anything as to how to do that.   Not a big deal.  
Just trying to clean up a few things as I migrate to the new version.



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



Re: James Database Import

2019-09-16 Thread Jerry Malcolm

Absolutely... will do.  If I survive :-)

On 9/16/2019 9:24 PM, Tellier Benoit wrote:

Nice,

Thanks for the feedback!

I believe writing a short blog-post that we could then share with the
community, once you get this up and running will be really valuable.

Regards,

Benoit

On 17/09/2019 00:27, Jerry Malcolm wrote:

Thanks so much for all of the advice.  I think I've got a resolution.

1) First misassumption... mySQL makes no attempt to order tables based
on foreign key dependency.  I just assumed the tables would be ordered
correctly (bad habit assuming).  But due to possible cyclic
dependencies, mySQL just says "you're on your own".

2) This 'should' be no problem if I could force foreign-key checking off
during import.  But apparently it's turned back on somewhere in the dump
file, and I don't want to try to find/buy an editor that I can trust to
successfully edit an 80GB+ dump file. So this one will just have to
remain a mystery.

3) The idea of just removing the foreign key constraint before export
would be a solution.  However, I'm just trying to get a sandbox database
imported now so I can test the new installation. The old db is still
live.  And I'm a bit concerned about
removing/re-adding/removing/re-adding that constraint from the live
production database and/or taking that database completely offline to
export the sandbox and then again for the final transfer export.

4) I realize now that the reason the import worked on my Windows machine
is that I was reimporting to an existing database.  The import deletes a
table and rebuilds it.  But it deletes tables one at a time.  So when it
was rebuilding the mail table, the old version of the dependent mailbox
table still existed.  So the keys were found.  In a totally clean import
the mailbox table does not exist.  Hence the key errors.  So I exported
a separate file containing ONLY the mailbox table and imported it into
the new database.  That finally made the main import happy.  I didn't
modify the main dump file even though I no longer needed it to import
the mailbox table.  I just let it delete the mailbox table and rebuild
it again.

So... on to testing the AWS installation.  I'll be back

Jerry

On 9/16/2019 7:34 AM, Garry Hurley wrote:

Jerry

It looks like the export did not export the data in the proper order.
You are trying to put mail into the mail table that is assigned to
mailboxes that do not exist yet. Three options:
1, create ‘dummy mailboxes’ for those messages to fall into. This may
be the faster workaround for the import to work.
2, take your export script apart and import the mailboxes before the
messages. This has a problem if, for example, you had deleted
mailboxes in your old database and the mailbox id does not match the
previous one. That means the mail messages will be inappropriately
assigned.  You may have to go theough and reassign the mailbox ids in
the mail table.
3, Remove the delete cascade constraint until you have the data
imported, then put it back. I assume your AWS instance is not live in
production yet, so this may or may not be possible.

Sent from my iPhone


On Sep 15, 2019, at 10:07 PM, Tellier Benoit 
wrote:

Hi Jerry,

James is relying on an ORM (openjpa) for database persistance.

We do test things on top of a H2 database, and (a ltle bit) on top
of PostgresSQL & derby database.

SQL database compatibility is a tough topic, we had some issues in the
past with some reserved name, too long table name etc... on top of
Microsoft SQL server.

Not too mention that ORM is also a tricky piece of software:

- OpenJPA do not mention Apache RDS in their examples

Do you succeed to run a fresh James install on top of RDS?

Best regards,

Benoit Tellier


On 15/09/2019 10:46, Jerry Malcolm wrote:
This is a bit off-topic... more of a database question... but it IS
about the James database.  Hopefully somebody understands the James
schema details enough to recognize the errors below and explain why the
import is failing.  I posted this in the AWS RDS forum.  But no help
there so far I may have to write a best-selling novel about my saga
of getting James migrated to Amazon... if I ever actually succeed...
:-(

I have an 80GB mySQLDump file containing an Apache JAMES mail database.
I am currently on a Windows server (mySQL 5.7.21). The dump file was
generated from that server. Just to test the file, I round-tripped it
back into the same mysql server with no errors. But I've been trying
for
a week to get it loaded into an Amazon RDS. I've tried both mySQL and
aurora instances. I've tried small instances and large instances. I get
the same errors. Since the errors relate to foreign keys, I tried
turning off foreign key checking, and STILL got the errors. I'm
completely stuck. The fact that it reads successfully into a windows
mysql 5.7.21 and won't read into an RDS mysql 5.7.22 completely baffles
me. Here are a few lines from the output. It repeats this way until I
stop it:

Thx
Jer

Re: James Database Import

2019-09-16 Thread Jerry Malcolm

Thanks so much for all of the advice.  I think I've got a resolution.

1) First misassumption... mySQL makes no attempt to order tables based 
on foreign key dependency.  I just assumed the tables would be ordered 
correctly (bad habit assuming).  But due to possible cyclic 
dependencies, mySQL just says "you're on your own".


2) This 'should' be no problem if I could force foreign-key checking off 
during import.  But apparently it's turned back on somewhere in the dump 
file, and I don't want to try to find/buy an editor that I can trust to 
successfully edit an 80GB+ dump file. So this one will just have to 
remain a mystery.


3) The idea of just removing the foreign key constraint before export 
would be a solution.  However, I'm just trying to get a sandbox database 
imported now so I can test the new installation. The old db is still 
live.  And I'm a bit concerned about 
removing/re-adding/removing/re-adding that constraint from the live 
production database and/or taking that database completely offline to 
export the sandbox and then again for the final transfer export.


4) I realize now that the reason the import worked on my Windows machine 
is that I was reimporting to an existing database.  The import deletes a 
table and rebuilds it.  But it deletes tables one at a time.  So when it 
was rebuilding the mail table, the old version of the dependent mailbox 
table still existed.  So the keys were found.  In a totally clean import 
the mailbox table does not exist.  Hence the key errors.  So I exported 
a separate file containing ONLY the mailbox table and imported it into 
the new database.  That finally made the main import happy.  I didn't 
modify the main dump file even though I no longer needed it to import 
the mailbox table.  I just let it delete the mailbox table and rebuild 
it again.


So... on to testing the AWS installation.  I'll be back

Jerry

On 9/16/2019 7:34 AM, Garry Hurley wrote:

Jerry

It looks like the export did not export the data in the proper order. You are 
trying to put mail into the mail table that is assigned to mailboxes that do 
not exist yet. Three options:
1, create ‘dummy mailboxes’ for those messages to fall into. This may be the 
faster workaround for the import to work.
2, take your export script apart and import the mailboxes before the messages. 
This has a problem if, for example, you had deleted mailboxes in your old 
database and the mailbox id does not match the previous one. That means the 
mail messages will be inappropriately assigned.  You may have to go theough and 
reassign the mailbox ids in the mail table.
3, Remove the delete cascade constraint until you have the data imported, then 
put it back. I assume your AWS instance is not live in production yet, so this 
may or may not be possible.

Sent from my iPhone


On Sep 15, 2019, at 10:07 PM, Tellier Benoit  wrote:

Hi Jerry,

James is relying on an ORM (openjpa) for database persistance.

We do test things on top of a H2 database, and (a ltle bit) on top
of PostgresSQL & derby database.

SQL database compatibility is a tough topic, we had some issues in the
past with some reserved name, too long table name etc... on top of
Microsoft SQL server.

Not too mention that ORM is also a tricky piece of software:

- OpenJPA do not mention Apache RDS in their examples

Do you succeed to run a fresh James install on top of RDS?

Best regards,

Benoit Tellier


On 15/09/2019 10:46, Jerry Malcolm wrote:
This is a bit off-topic... more of a database question... but it IS
about the James database.  Hopefully somebody understands the James
schema details enough to recognize the errors below and explain why the
import is failing.  I posted this in the AWS RDS forum.  But no help
there so far I may have to write a best-selling novel about my saga
of getting James migrated to Amazon... if I ever actually succeed... :-(

I have an 80GB mySQLDump file containing an Apache JAMES mail database.
I am currently on a Windows server (mySQL 5.7.21). The dump file was
generated from that server. Just to test the file, I round-tripped it
back into the same mysql server with no errors. But I've been trying for
a week to get it loaded into an Amazon RDS. I've tried both mySQL and
aurora instances. I've tried small instances and large instances. I get
the same errors. Since the errors relate to foreign keys, I tried
turning off foreign key checking, and STILL got the errors. I'm
completely stuck. The fact that it reads successfully into a windows
mysql 5.7.21 and won't read into an RDS mysql 5.7.22 completely baffles
me. Here are a few lines from the output. It repeats this way until I
stop it:

Thx
Jerry

Log:
ERROR 1452 (23000): Cannot add or update a child row: a foreign key
constraint fails (`mail3x`.`james_mail`, CONSTRAINT `james_mail_ibfk_1`
FOREIGN KEY (`MAILBOX_ID`) REFERENCES `james_mailbox` (`MAILBOX_ID`) ON
DELETE CASCADE)
ERROR 2006 (HY000): MySQL server has gone away
No conn

James Database Import

2019-09-14 Thread Jerry Malcolm
This is a bit off-topic... more of a database question... but it IS 
about the James database.  Hopefully somebody understands the James 
schema details enough to recognize the errors below and explain why the 
import is failing.  I posted this in the AWS RDS forum.  But no help 
there so far I may have to write a best-selling novel about my saga 
of getting James migrated to Amazon... if I ever actually succeed... :-(


I have an 80GB mySQLDump file containing an Apache JAMES mail database. 
I am currently on a Windows server (mySQL 5.7.21). The dump file was 
generated from that server. Just to test the file, I round-tripped it 
back into the same mysql server with no errors. But I've been trying for 
a week to get it loaded into an Amazon RDS. I've tried both mySQL and 
aurora instances. I've tried small instances and large instances. I get 
the same errors. Since the errors relate to foreign keys, I tried 
turning off foreign key checking, and STILL got the errors. I'm 
completely stuck. The fact that it reads successfully into a windows 
mysql 5.7.21 and won't read into an RDS mysql 5.7.22 completely baffles 
me. Here are a few lines from the output. It repeats this way until I 
stop it:


Thx
Jerry

Log:
ERROR 1452 (23000): Cannot add or update a child row: a foreign key 
constraint fails (`mail3x`.`james_mail`, CONSTRAINT `james_mail_ibfk_1` 
FOREIGN KEY (`MAILBOX_ID`) REFERENCES `james_mailbox` (`MAILBOX_ID`) ON 
DELETE CASCADE)

ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id: 628
Current database: mail3x

ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id: 629
Current database: mail3x

ERROR 2006 (HY000): MySQL server has gone away
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id: 630
Current database: mail3x

ERROR 1452 (23000): Cannot add or update a child row: a foreign key 
constraint fails (`mail3x`.`james_mail`, CONSTRAINT `james_mail_ibfk_1` 
FOREIGN KEY (`MAILBOX_ID`) REFERENCES `james_mailbox` (`MAILBOX_ID`) ON 
DELETE CASCADE)
ERROR 1452 (23000): Cannot add or update a child row: a foreign key 
constraint fails (`mail3x`.`james_mail`, CONSTRAINT `james_mail_ibfk_1` 
FOREIGN KEY (`MAILBOX_ID`) REFERENCES `james_mailbox` (`MAILBOX_ID`) ON 
DELETE CASCADE)
ERROR 1452 (23000): Cannot add or update a child row: a foreign key 
constraint fails (`mail3x`.`james_mail`, CONSTRAINT `james_mail_ibfk_1` 
FOREIGN KEY (`MAILBOX_ID`) REFERENCES `james_mailbox` (`MAILBOX_ID`) ON 
DELETE CASCADE)
ERROR 1452 (23000): Cannot add or update a child row: a foreign key 
constraint fails (`mail3x`.`james_mail`, CONSTRAINT `james_mail_ibfk_1` 
FOREIGN KEY (`MAILBOX_ID`) REFERENCES `james_mailbox` (`MAILBOX_ID`) ON 
DELETE CASCADE)
ERROR 1452 (23000): Cannot add or update a child row: a foreign key 
constraint fails (`mail3x`.`james_mail`, CONSTRAINT `james_mail_ibfk_1` 
FOREIGN KEY (`MAILBOX_ID`) REFERENCES `james_mailbox` (`MAILBOX_ID`) ON 
DELETE CASCADE)
ERROR 1452 (23000): Cannot add or update a child row: a foreign key 
constraint fails (`mail3x`.`james_mail`, CONSTRAINT `james_mail_ibfk_1` 
FOREIGN KEY (`MAILBOX_ID`) REFERENCES `james_mailbox` (`MAILBOX_ID`) ON 
DELETE CASCADE)
ERROR 1452 (23000): Cannot add or update a child row: a foreign key 
constraint fails (`mail3x`.`james_mail`, CONSTRAINT `james_mail_ibfk_1` 
FOREIGN KEY (`MAILBOX_ID`) REFERENCES `james_mailbox` (`MAILBOX_ID`) ON 
DELETE CASCADE)
ERROR 1452 (23000): Cannot add or update a child row: a foreign key 
constraint fails (`mail3x`.`james_mail`, CONSTRAINT `james_mail_ibfk_1` 
FOREIGN KEY (`MAILBOX_ID`) REFERENCES `james_mailbox` (`MAILBOX_ID`) ON 
DELETE CASCADE)
ERROR 1452 (23000): Cannot add or update a child row: a foreign key 
constraint fails (`mail3x`.`james_mail`, CONSTRAINT `james_mail_ibfk_1` 
FOREIGN KEY (`MAILBOX_ID`) REFERENCES `james_mailbox` (`MAILBOX_ID`) ON 
DELETE CASCADE)
ERROR 1452 (23000): Cannot add or update a child row: a foreign key 
constraint fails (`mail3x`.`james_mail`, CONSTRAINT `james_mail_ibfk_1` 
FOREIGN KEY (`MAILBOX_ID`) REFERENCES `james_mailbox` (`MAILBOX_ID`) ON 
DELETE CASCADE)




Re: AdministratorId Documentation

2019-09-13 Thread Jerry Malcolm
Ignore my previous question.  I dug further and realized that your auth 
method is a lower-level replacement for the login method in the 
commons.net sample.  Still may have other questions... But I think I'm 
good on this one for now.


Thx


On 9/13/2019 12:43 PM, Jerry Malcolm wrote:

Tellier,

Sorry, I'm still missing something.  I downloaded the commons-net 
package and looked at the IMAPMail sample code.  It says to put the 
id/pw on the url: "Usage: IMAPMail 
imap[s]://username:password@server/");  I assume I would put my admin 
id:pw on the url.  But then where do I specify the userid for the 
actual inbox I want to access?


On 9/12/2019 11:01 PM, Tellier Benoit wrote:

If you are using commons-net, I succeeded to write:

https://gist.github.com/chibenwa/abd12fd6c0b06cadd1de591e3ac792b9

That should be helping you!

On 13/09/2019 10:40, Tellier Benoit wrote:

Wich library are you using?

On 13/09/2019 10:33, Jerry Malcolm wrote:

Thanks for the info, Tellier.  I kinda lost you on the mpt tests... I
was looking for how to change the following code to include an
administrator id.  I only have one field in the store.connect() method
for a user id, but I have an administrator id and the userid for the
target mailbox.  How do I pass in both?

    try
    {
   session = Session.getInstance(props, null);
   session.setDebug(debug);
   store = session.getStore(protocol);
   store.connect(host, port, user, password);
    }
    catch( Exception e)
    {
   log( "IMAPClient.connect() exception: " + e );
   throw(e);
    }

On 9/12/2019 10:10 PM, Tellier Benoit wrote:

Hello Jerry,

With the `administratorId`, you are able to use IMAP impersonation.

IE to log in as another user.

You should define it within usersrepository.xml. To see related 
"reading

config" code: AbstractUsersRepository is the way to go.

Agree that this needs example and documentation. I will do it 
straight

away.

For your IMAP call, MPT tests are going to be a gold mine, presenting
you the exact syntax.
mpt/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/AuthenticatePlain.test 




Contains:

C: 0007 AUTHENTICATE "PLAIN" {36+}
# delegate\0imapuser\0password
C: ZGVsZWdhdGUAaW1hcHVzZXIAcGFzc3dvcmQ=
S: 0007 OK AUTHENTICATE completed.

# Ensure we are delegate
C: 0008 SELECT delegate
SUB {
S: \* FLAGS .*
S: \* .* EXISTS
S: \* .* RECENT
S: \* OK \[UIDVALIDITY .*\] UIDs valid
S: \* OK \[PERMANENTFLAGS .*\] Limited
S: \* OK \[HIGHESTMODSEQ .*\] Highest
S: \* OK \[UIDNEXT .*\] Predicted next UID
}
S: 0008 OK \[READ-WRITE\] SELECT completed\.

Regarding your development issues, I'm really sorry. My 
environment is

based on IntelliJ, and I encounter no issue.

To be able to compile, I use maven 3.6.2 with JDK 11.

Best regards,

Benoit Tellier


On 13/09/2019 09:53, Jerry Malcolm wrote:
Since it appears I'm not going to be able to build James 3.3.0 in 
the
foreseeable future, I'm now moving to plan d, e, f, or 
whatever... .I've

lost count.

My goal now is to assess my possibilities of using James 3.3.0 
binaries
as-is and discarding the functionality I had hoped to re-add to 
3.3.0

from 30b5 or moving the functionality to mailets that I can compile
outside of doing a full James build.

One thing I had added to beta5 was the ability to have a super-user,
master-key id that could be used in my custom external imap mailbox
maintenance utilities.  I've spent several hours digging through the
3.3.0 source code, and I see code referencing "administratorId".  
From

what I can deduce from the code, the Authenticator and Authorizator
classes seem to accept this administrator id as the equivalent of 
the

master key I added to b5.  So can I access UserABC's mailbox through
imap but use my administratorId and password?  If that's the 
case, then

that's exactly what I need.  The problem is I can't find any
documentation on how to use administratorId.  Where do I define 
it?  And

how do I pass it on imap calls using the javax.mail.Store and other
classes in javax.mail that I use to access imap?

Jerry


- 


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


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


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


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

Re: AdministratorId Documentation

2019-09-13 Thread Jerry Malcolm

Tellier,

Sorry, I'm still missing something.  I downloaded the commons-net 
package and looked at the IMAPMail sample code.  It says to put the 
id/pw on the url: "Usage: IMAPMail 
imap[s]://username:password@server/");  I assume I would put my admin 
id:pw on the url.  But then where do I specify the userid for the actual 
inbox I want to access?


On 9/12/2019 11:01 PM, Tellier Benoit wrote:

If you are using commons-net, I succeeded to write:

https://gist.github.com/chibenwa/abd12fd6c0b06cadd1de591e3ac792b9

That should be helping you!

On 13/09/2019 10:40, Tellier Benoit wrote:

Wich library are you using?

On 13/09/2019 10:33, Jerry Malcolm wrote:

Thanks for the info, Tellier.  I kinda lost you on the mpt tests... I
was looking for how to change the following code to include an
administrator id.  I only have one field in the store.connect() method
for a user id, but I have an administrator id and the userid for the
target mailbox.  How do I pass in both?

    try
    {
   session = Session.getInstance(props, null);
   session.setDebug(debug);
   store = session.getStore(protocol);
   store.connect(host, port, user, password);
    }
    catch( Exception e)
    {
   log( "IMAPClient.connect() exception: " + e );
   throw(e);
    }

On 9/12/2019 10:10 PM, Tellier Benoit wrote:

Hello Jerry,

With the `administratorId`, you are able to use IMAP impersonation.

IE to log in as another user.

You should define it within usersrepository.xml. To see related "reading
config" code: AbstractUsersRepository is the way to go.

Agree that this needs example and documentation. I will do it straight
away.

For your IMAP call, MPT tests are going to be a gold mine, presenting
you the exact syntax.
mpt/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/AuthenticatePlain.test


Contains:

C: 0007 AUTHENTICATE "PLAIN" {36+}
# delegate\0imapuser\0password
C: ZGVsZWdhdGUAaW1hcHVzZXIAcGFzc3dvcmQ=
S: 0007 OK AUTHENTICATE completed.

# Ensure we are delegate
C: 0008 SELECT delegate
SUB {
S: \* FLAGS .*
S: \* .* EXISTS
S: \* .* RECENT
S: \* OK \[UIDVALIDITY .*\] UIDs valid
S: \* OK \[PERMANENTFLAGS .*\] Limited
S: \* OK \[HIGHESTMODSEQ .*\] Highest
S: \* OK \[UIDNEXT .*\] Predicted next UID
}
S: 0008 OK \[READ-WRITE\] SELECT completed\.

Regarding your development issues, I'm really sorry. My environment is
based on IntelliJ, and I encounter no issue.

To be able to compile, I use maven 3.6.2 with JDK 11.

Best regards,

Benoit Tellier


On 13/09/2019 09:53, Jerry Malcolm wrote:

Since it appears I'm not going to be able to build James 3.3.0 in the
foreseeable future, I'm now moving to plan d, e, f, or whatever... .I've
lost count.

My goal now is to assess my possibilities of using James 3.3.0 binaries
as-is and discarding the functionality I had hoped to re-add to 3.3.0
from 30b5 or moving the functionality to mailets that I can compile
outside of doing a full James build.

One thing I had added to beta5 was the ability to have a super-user,
master-key id that could be used in my custom external imap mailbox
maintenance utilities.  I've spent several hours digging through the
3.3.0 source code, and I see code referencing "administratorId".  From
what I can deduce from the code, the Authenticator and Authorizator
classes seem to accept this administrator id as the equivalent of the
master key I added to b5.  So can I access UserABC's mailbox through
imap but use my administratorId and password?  If that's the case, then
that's exactly what I need.  The problem is I can't find any
documentation on how to use administratorId.  Where do I define it?  And
how do I pass it on imap calls using the javax.mail.Store and other
classes in javax.mail that I use to access imap?

Jerry


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


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


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


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


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



-
To unsubscribe, e-mail: serve

Re: AdministratorId Documentation

2019-09-12 Thread Jerry Malcolm
I believe I'm just using the basic javax.mail.* that comes with JDK 
1.8.   Do I need to move to a later imap implementation package?



On 9/12/2019 10:40 PM, Tellier Benoit wrote:

Wich library are you using?

On 13/09/2019 10:33, Jerry Malcolm wrote:

Thanks for the info, Tellier.  I kinda lost you on the mpt tests... I
was looking for how to change the following code to include an
administrator id.  I only have one field in the store.connect() method
for a user id, but I have an administrator id and the userid for the
target mailbox.  How do I pass in both?

    try
    {
   session = Session.getInstance(props, null);
   session.setDebug(debug);
   store = session.getStore(protocol);
   store.connect(host, port, user, password);
    }
    catch( Exception e)
    {
   log( "IMAPClient.connect() exception: " + e );
   throw(e);
    }

On 9/12/2019 10:10 PM, Tellier Benoit wrote:

Hello Jerry,

With the `administratorId`, you are able to use IMAP impersonation.

IE to log in as another user.

You should define it within usersrepository.xml. To see related "reading
config" code: AbstractUsersRepository is the way to go.

Agree that this needs example and documentation. I will do it straight
away.

For your IMAP call, MPT tests are going to be a gold mine, presenting
you the exact syntax.
mpt/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/AuthenticatePlain.test


Contains:

C: 0007 AUTHENTICATE "PLAIN" {36+}
# delegate\0imapuser\0password
C: ZGVsZWdhdGUAaW1hcHVzZXIAcGFzc3dvcmQ=
S: 0007 OK AUTHENTICATE completed.

# Ensure we are delegate
C: 0008 SELECT delegate
SUB {
S: \* FLAGS .*
S: \* .* EXISTS
S: \* .* RECENT
S: \* OK \[UIDVALIDITY .*\] UIDs valid
S: \* OK \[PERMANENTFLAGS .*\] Limited
S: \* OK \[HIGHESTMODSEQ .*\] Highest
S: \* OK \[UIDNEXT .*\] Predicted next UID
}
S: 0008 OK \[READ-WRITE\] SELECT completed\.

Regarding your development issues, I'm really sorry. My environment is
based on IntelliJ, and I encounter no issue.

To be able to compile, I use maven 3.6.2 with JDK 11.

Best regards,

Benoit Tellier


On 13/09/2019 09:53, Jerry Malcolm wrote:

Since it appears I'm not going to be able to build James 3.3.0 in the
foreseeable future, I'm now moving to plan d, e, f, or whatever... .I've
lost count.

My goal now is to assess my possibilities of using James 3.3.0 binaries
as-is and discarding the functionality I had hoped to re-add to 3.3.0
from 30b5 or moving the functionality to mailets that I can compile
outside of doing a full James build.

One thing I had added to beta5 was the ability to have a super-user,
master-key id that could be used in my custom external imap mailbox
maintenance utilities.  I've spent several hours digging through the
3.3.0 source code, and I see code referencing "administratorId".  From
what I can deduce from the code, the Authenticator and Authorizator
classes seem to accept this administrator id as the equivalent of the
master key I added to b5.  So can I access UserABC's mailbox through
imap but use my administratorId and password?  If that's the case, then
that's exactly what I need.  The problem is I can't find any
documentation on how to use administratorId.  Where do I define it?  And
how do I pass it on imap calls using the javax.mail.Store and other
classes in javax.mail that I use to access imap?

Jerry


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


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


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


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



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



Intercepting delivery success/fail

2019-09-12 Thread Jerry Malcolm
Another mod I had made to v3b5 was to intercept the final result of 
success/fail of delivery.  I have a requirement to externally log the 
"mail was successfully transferred to " 
message and also after all of the retries are exhausted, the final 
'fail' message.


Back in v3b5 I cloned the RemoteDelivery mailet and located the 
appropriate locations where the successful handoff was logged and where 
the final fail was logged.  It looks like that RemoteDelivery mailet was 
totally rewritten somewhere between b5 and 3.3.  Mail is put on a queue 
in remoteDelivery, and all the work is now handled elsewhere.


My question is simply this: What is the easiest/best/correct way to hook 
in so that I can add my logging code on the successful handoff and also 
on the final retry fail?  If I can do this without requiring a full 
rebuild, that's desired considering my disaster at build attempts.  But 
if the only way to add this required functionality is to modify core 
code, sooner or later I'll have to figure out my build problems.  Either 
way, I need to know what you recommend for hooking these two points.


Thx



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



Re: AdministratorId Documentation

2019-09-12 Thread Jerry Malcolm
Thanks for the info, Tellier.  I kinda lost you on the mpt tests... I 
was looking for how to change the following code to include an 
administrator id.  I only have one field in the store.connect() method 
for a user id, but I have an administrator id and the userid for the 
target mailbox.  How do I pass in both?


   try
   {
  session = Session.getInstance(props, null);
  session.setDebug(debug);
  store = session.getStore(protocol);
  store.connect(host, port, user, password);
   }
   catch( Exception e)
   {
  log( "IMAPClient.connect() exception: " + e );
  throw(e);
   }

On 9/12/2019 10:10 PM, Tellier Benoit wrote:

Hello Jerry,

With the `administratorId`, you are able to use IMAP impersonation.

IE to log in as another user.

You should define it within usersrepository.xml. To see related "reading
config" code: AbstractUsersRepository is the way to go.

Agree that this needs example and documentation. I will do it straight away.

For your IMAP call, MPT tests are going to be a gold mine, presenting
you the exact syntax.
mpt/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/AuthenticatePlain.test

Contains:

C: 0007 AUTHENTICATE "PLAIN" {36+}
# delegate\0imapuser\0password
C: ZGVsZWdhdGUAaW1hcHVzZXIAcGFzc3dvcmQ=
S: 0007 OK AUTHENTICATE completed.

# Ensure we are delegate
C: 0008 SELECT delegate
SUB {
S: \* FLAGS .*
S: \* .* EXISTS
S: \* .* RECENT
S: \* OK \[UIDVALIDITY .*\] UIDs valid
S: \* OK \[PERMANENTFLAGS .*\] Limited
S: \* OK \[HIGHESTMODSEQ .*\] Highest
S: \* OK \[UIDNEXT .*\] Predicted next UID
}
S: 0008 OK \[READ-WRITE\] SELECT completed\.

Regarding your development issues, I'm really sorry. My environment is
based on IntelliJ, and I encounter no issue.

To be able to compile, I use maven 3.6.2 with JDK 11.

Best regards,

Benoit Tellier


On 13/09/2019 09:53, Jerry Malcolm wrote:

Since it appears I'm not going to be able to build James 3.3.0 in the
foreseeable future, I'm now moving to plan d, e, f, or whatever... .I've
lost count.

My goal now is to assess my possibilities of using James 3.3.0 binaries
as-is and discarding the functionality I had hoped to re-add to 3.3.0
from 30b5 or moving the functionality to mailets that I can compile
outside of doing a full James build.

One thing I had added to beta5 was the ability to have a super-user,
master-key id that could be used in my custom external imap mailbox
maintenance utilities.  I've spent several hours digging through the
3.3.0 source code, and I see code referencing "administratorId".  From
what I can deduce from the code, the Authenticator and Authorizator
classes seem to accept this administrator id as the equivalent of the
master key I added to b5.  So can I access UserABC's mailbox through
imap but use my administratorId and password?  If that's the case, then
that's exactly what I need.  The problem is I can't find any
documentation on how to use administratorId.  Where do I define it?  And
how do I pass it on imap calls using the javax.mail.Store and other
classes in javax.mail that I use to access imap?

Jerry


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


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



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



30b5 to 3.3.0 Database Changes?

2019-09-12 Thread Jerry Malcolm
Quick question... does 3.3.0 do any upward migration of an existing 
database that burns bridges for accessing it by 3.0.beta5?  In other 
words, if I start up 3.3.0 using my existing database and I find 
problems, can I successfully revert back to using beta5?  Or does 3.3.0 
do irreversible modifications to the database?



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



AdministratorId Documentation

2019-09-12 Thread Jerry Malcolm
Since it appears I'm not going to be able to build James 3.3.0 in the 
foreseeable future, I'm now moving to plan d, e, f, or whatever... .I've 
lost count.


My goal now is to assess my possibilities of using James 3.3.0 binaries 
as-is and discarding the functionality I had hoped to re-add to 3.3.0 
from 30b5 or moving the functionality to mailets that I can compile 
outside of doing a full James build.


One thing I had added to beta5 was the ability to have a super-user, 
master-key id that could be used in my custom external imap mailbox 
maintenance utilities.  I've spent several hours digging through the 
3.3.0 source code, and I see code referencing "administratorId".  From 
what I can deduce from the code, the Authenticator and Authorizator 
classes seem to accept this administrator id as the equivalent of the 
master key I added to b5.  So can I access UserABC's mailbox through 
imap but use my administratorId and password?  If that's the case, then 
that's exactly what I need.  The problem is I can't find any 
documentation on how to use administratorId.  Where do I define it?  And 
how do I pass it on imap calls using the javax.mail.Store and other 
classes in javax.mail that I use to access imap?


Jerry


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



Re: 3.0.0 on Linux

2019-09-09 Thread Jerry Malcolm

Garry,

A shorter explanation of what's happening trying to build 3.3... I 
decided to start totally from scratch on a new machine.  I installed JDK 
1.8. Next I installed the latest enterprise developers version of 
Eclipse.  Next I used the regular import-->git project, clone uri from 
https://github.com/apache/james-project.git.  I deselected all branches 
except 3.3.x and downloaded.  Finally I then did 
'import-->maven-->existing maven project and pointed it to the git 
download folder.  During the import it displayed 201 errors: "Plugin 
execution not covered by lifecycle configuration", 300+ warnings saying 
something about 'progress and finally did a popup about not finding mojo 
in the tools.jar file.


This takes about 5 minutes to reproduce.  If these steps are wrong to 
download and build 3.3, that should be obvious to someone.  If these 
steps are right, can someone try the same process and see if they get 
the same errors?  If they do, then someone who knows something is going 
to have to explain it.  I think it's just you and me on this forum now.  
But hopefully, somebody from JAMES development will come back and 
finally explain what's happening.



On 9/9/2019 11:38 AM, Jerry Malcolm wrote:

Garry,

I'm all for taking the shortest route to the latest code.  Here is my 
full saga from a previous post:


1) On a clean eclipse workspace, File-->Import-->Git --- I selected 
"clone URI" and entered the James GIT clone URI: 
https://github.com/apache/james-project.git


2) I selected the 3.3.x branch (I guess that's what I want... (??) ) 
and said to also clone submodules.  It downloaded to a folder. It 
created an eclipse project/package named james-server. But the project 
only had 3 files: model.di, model.notation, and model.uml.


3) On a whim, I decided to import again using "Maven existing project" 
and pointed to the extracted folder.  That seemed to work for the most 
part.


It initially gave me 10 errors saying "Plugin execution not covered by 
lifecycle configuration" and 16 more errors with "Project 
configuration not up to date with pom.xml".  All with varying pom.xml 
files.  I did a "quick fix" and it got rid of the 'not up to date' 
errors.  I googled the lifecycle error and it said to edit all of the 
pom.xml files and add  tags around the plugin tags.  
I tried in on a couple of the pom.xml files, and it did fix the errors 
(???).


I then did a build, and it added one more error, something about an 
invalid mojo tag in a pom descriptor.


Just for fun, I did a clean build, and that was a huge mistake. I now 
have 340 errors where it can't resolve DTOs in FlagsTest, 
EventSerializer in EventDispatcher, etc.  Apparently 'clean' wipes out 
source files as well.  Or it wipes out class files that are not part 
of the full build.


So that's where I am.  I can edit a bunch of pom.xml files and add 
tags.  I can hopefully figure out how to fix mojo.  And I can hope to 
remember to NEVER do a clean build again.  But this just doesn't seem 
right that I have to go in and modify a bunch of source files just to 
get a clean build from a ship-level source package.  I have zero 
confidence if I have to make all of these change that I really have an 
'official' 3.3.x James.


Suggestions?  Where did I stray from the correct path?  I'm beginning 
to feel like I belong in the class with the slow kids


On 9/9/2019 11:13 AM, Garry Hurley wrote:

Let's go to your James 3.3.0 problem.  I ran into some issues with James
early on, and that is why I signed up on this list.  What is the 
issue with

3.3.0?  What is the error you are getting?

On Sun, Sep 8, 2019 at 2:20 PM Jerry Malcolm  
wrote:



Hi Garry,

You missed my point.  I've been trying to get help on building 3.3.0 
for

over a week with no response (see my long list of posts). Since I can't
get anyone to respond to my 3.3.0 build problem, I had to look for an
alternative.  I currently have a 3.0.0 beta 5 install that has worked
for years on a Windows server.  My only alternative until I get my 
3.3.0

build problems resolved is to move that v3b5 to Linux since my windows
server is going away.  I have added custom code.  So I can't just
download the binaries.  I would love to move to 3.3.0.  But until I can
figure out my build problems and/or get someone to respond to my
questions, this is my only choice.  Now my current ancient v3b5 that
worked on Windows fails on Linux with OpenJPA issues (see prev post).

I realize this is a completely volunteer forum.  But I'm dying here.
I've got to get some version of james running on my AWS Linux box.  Can
someone please find time to help?  I'll take help on my 3.0.0 b5 
OpenJPA

issue and/or my 3.3.0 Eclipse build problems... just SOMETHING.

Thx

Jerry

On 9/8/2019 2:31 AM, Garry Hurley wrote:

3.0.0 is kinda old. In fact, IIRC, it never made it out of Beta stage.
3.3.0 works and is stable, so unless you have some

Re: 3.0.0 on Linux

2019-09-09 Thread Jerry Malcolm

Garry,

I'm all for taking the shortest route to the latest code.  Here is my 
full saga from a previous post:


1) On a clean eclipse workspace, File-->Import-->Git --- I selected 
"clone URI" and entered the James GIT clone URI: 
https://github.com/apache/james-project.git


2) I selected the 3.3.x branch (I guess that's what I want... (??) ) and 
said to also clone submodules.  It downloaded to a folder. It created an 
eclipse project/package named james-server. But the project only had 3 
files: model.di, model.notation, and model.uml.


3) On a whim, I decided to import again using "Maven existing project" 
and pointed to the extracted folder.  That seemed to work for the most 
part.


It initially gave me 10 errors saying "Plugin execution not covered by 
lifecycle configuration" and 16 more errors with "Project configuration 
not up to date with pom.xml".  All with varying pom.xml files.  I did a 
"quick fix" and it got rid of the 'not up to date' errors.  I googled 
the lifecycle error and it said to edit all of the pom.xml files and add 
 tags around the plugin tags.  I tried in on a couple 
of the pom.xml files, and it did fix the errors (???).


I then did a build, and it added one more error, something about an 
invalid mojo tag in a pom descriptor.


Just for fun, I did a clean build, and that was a huge mistake. I now 
have 340 errors where it can't resolve DTOs in FlagsTest, 
EventSerializer in EventDispatcher, etc.  Apparently 'clean' wipes out 
source files as well.  Or it wipes out class files that are not part of 
the full build.


So that's where I am.  I can edit a bunch of pom.xml files and add 
tags.  I can hopefully figure out how to fix mojo.  And I can hope to 
remember to NEVER do a clean build again.  But this just doesn't seem 
right that I have to go in and modify a bunch of source files just to 
get a clean build from a ship-level source package.  I have zero 
confidence if I have to make all of these change that I really have an 
'official' 3.3.x James.


Suggestions?  Where did I stray from the correct path?  I'm beginning to 
feel like I belong in the class with the slow kids


On 9/9/2019 11:13 AM, Garry Hurley wrote:

Let's go to your James 3.3.0 problem.  I ran into some issues with James
early on, and that is why I signed up on this list.  What is the issue with
3.3.0?  What is the error you are getting?

On Sun, Sep 8, 2019 at 2:20 PM Jerry Malcolm  wrote:


Hi Garry,

You missed my point.  I've been trying to get help on building 3.3.0 for
over a week with no response (see my long list of posts).  Since I can't
get anyone to respond to my 3.3.0 build problem, I had to look for an
alternative.  I currently have a 3.0.0 beta 5 install that has worked
for years on a Windows server.  My only alternative until I get my 3.3.0
build problems resolved is to move that v3b5 to Linux since my windows
server is going away.  I have added custom code.  So I can't just
download the binaries.  I would love to move to 3.3.0.  But until I can
figure out my build problems and/or get someone to respond to my
questions, this is my only choice.  Now my current ancient v3b5 that
worked on Windows fails on Linux with OpenJPA issues (see prev post).

I realize this is a completely volunteer forum.  But I'm dying here.
I've got to get some version of james running on my AWS Linux box.  Can
someone please find time to help?  I'll take help on my 3.0.0 b5 OpenJPA
issue and/or my 3.3.0 Eclipse build problems... just SOMETHING.

Thx

Jerry

On 9/8/2019 2:31 AM, Garry Hurley wrote:

3.0.0 is kinda old. In fact, IIRC, it never made it out of Beta stage.

3.3.0 works and is stable, so unless you have some reason to use an older
version, you should consider updating.

Sent from my iPhone


On Sep 8, 2019, at 12:07 AM, Jerry Malcolm 

wrote:

I'm still waiting and hoping somebody can please explain why I can't

build 3.3.0 on Eclipse.  (See my other thread).  But I'm on a deadline.  y
windows server is going away soon and I HAVE to get a mail solution onto
AWS.  (ANYBODY?? PLEASE HELP!)

So in meantime, plan-B is to copy my current ancient v3b5 installation

off of my Windows server to my AWS Linux instance. Since James is 100% java
(good ol' "write once -- run anywhere"..., right?) I figured I could just
copy the entire James installation folder and fix a couple of backslashes
in file paths in config files, and it should run perfectly.  Wrong-o.  I
literally copied the folder precisely, and changed to run.sh instead of
run.bat.  After a few expected startup messages, I get a bunch of OpenJPA
warnings, followed by a bunch of errors telling me foreign keys are missing
from my database, etc. (See log excerpt below).  I went back to the running
Windows instance. There is no reference anywhere in the Windows James log
to jpa. Since the conf and lib folders are identical (as far as I can tell)
between these two instances,

Re: 3.0.0 on Linux

2019-09-08 Thread Jerry Malcolm

Hi Garry,

You missed my point.  I've been trying to get help on building 3.3.0 for 
over a week with no response (see my long list of posts).  Since I can't 
get anyone to respond to my 3.3.0 build problem, I had to look for an 
alternative.  I currently have a 3.0.0 beta 5 install that has worked 
for years on a Windows server.  My only alternative until I get my 3.3.0 
build problems resolved is to move that v3b5 to Linux since my windows 
server is going away.  I have added custom code.  So I can't just 
download the binaries.  I would love to move to 3.3.0.  But until I can 
figure out my build problems and/or get someone to respond to my 
questions, this is my only choice.  Now my current ancient v3b5 that 
worked on Windows fails on Linux with OpenJPA issues (see prev post).


I realize this is a completely volunteer forum.  But I'm dying here.  
I've got to get some version of james running on my AWS Linux box.  Can 
someone please find time to help?  I'll take help on my 3.0.0 b5 OpenJPA 
issue and/or my 3.3.0 Eclipse build problems... just SOMETHING.


Thx

Jerry

On 9/8/2019 2:31 AM, Garry Hurley wrote:

3.0.0 is kinda old. In fact, IIRC, it never made it out of Beta stage. 3.3.0 
works and is stable, so unless you have some reason to use an older version, 
you should consider updating.

Sent from my iPhone


On Sep 8, 2019, at 12:07 AM, Jerry Malcolm  wrote:

I'm still waiting and hoping somebody can please explain why I can't build 
3.3.0 on Eclipse.  (See my other thread).  But I'm on a deadline.  My windows 
server is going away soon and I HAVE to get a mail solution onto AWS.  
(ANYBODY?? PLEASE HELP!)

So in meantime, plan-B is to copy my current ancient v3b5 installation off of my Windows 
server to my AWS Linux instance. Since James is 100% java (good ol' "write once -- 
run anywhere"..., right?) I figured I could just copy the entire James installation 
folder and fix a couple of backslashes in file paths in config files, and it should run 
perfectly.  Wrong-o.  I literally copied the folder precisely, and changed to run.sh 
instead of run.bat.  After a few expected startup messages, I get a bunch of OpenJPA 
warnings, followed by a bunch of errors telling me foreign keys are missing from my 
database, etc. (See log excerpt below).  I went back to the running Windows instance. 
There is no reference anywhere in the Windows James log to jpa. Since the conf and lib 
folders are identical (as far as I can tell) between these two instances, I'm baffled.  
Why is OpenJPA getting upset with the Linux install and not the Windows install. My first 
thought was something with case-sensitive file names. But I can't find any of those 
situations.  I'm not familiar with OpenJPA configuration.  So these errors mean nothing 
to me.  What did I do wrong? (BTW... both instances point to the same db... so I know the 
database is not corrupt).

Can anybody help with this problem (or better... help me with the 3.3.0 Eclipse 
disaster... I don't want to remain on v3b5 forever).

Thx.

Log entries:

INFO  02:35:01,219 | james.dnsservice | Adding autodiscovered search path 
ec2.internal.
INFO  02:35:01,220 | james.dnsservice | DNS Server is: 172.31.0.2
INFO  02:35:01,226 | james.dnsservice | Registered cache, resolver and search 
paths as DNSJava defaults
185  James  INFO   [main] openjpa.Runtime - Starting OpenJPA 2.2.1
215  James  INFO   [main] openjpa.jdbc.JDBC - Using dictionary class 
"org.apache.openjpa.jdbc.sql.MySQLDictionary".
630  James  WARN   [main] openjpa.MetaData - The class 
"org.apache.james.mailbox.jpa.mail.model.openjpa.JPAMessage" listed in the 
openjpa.MetaDataFactory configuration property could not be loaded by 
sun.misc.Launcher$AppClassLoader@764c12b6; ignoring.
631  James  WARN   [main] openjpa.MetaData - The class 
"org.apache.james.mailbox.jpa.mail.model.openjpa.AbstractJPAMessage" listed in 
the openjpa.MetaDataFactory configuration property could not be loaded by 
sun.misc.Launcher$AppClassLoader@764c12b6; ignoring.
723  James  INFO   [main] openjpa.MetaData - The class 
"org.apache.james.mailbox.jpa.mail.model.openjpa.JPAMessage" listed in the 
openjpa.MetaDataFactory configuration property could not be loaded by 
sun.misc.Launcher$AppClassLoader@764c12b6; ignoring.
723  James  INFO   [main] openjpa.MetaData - The class 
"org.apache.james.mailbox.jpa.mail.model.openjpa.AbstractJPAMessage" listed in 
the openjpa.MetaDataFactory configuration property could not be loaded by 
sun.misc.Launcher$AppClassLoader@764c12b6; ignoring.
735  James  INFO   [main] openjpa.MetaData - The class 
"org.apache.james.mailbox.jpa.mail.model.openjpa.JPAMessage" listed in the 
openjpa.MetaDataFactory configuration property could not be loaded by 
sun.misc.Launcher$AppClassLoader@764c12b6; ignoring.
735  James  INFO   [main] openjpa.MetaData - The class 
"org.apache.james.mailbox.jpa.mail.model.openjpa.AbstractJPAM

3.0.0 on Linux

2019-09-07 Thread Jerry Malcolm
I'm still waiting and hoping somebody can please explain why I can't 
build 3.3.0 on Eclipse.  (See my other thread).  But I'm on a deadline.  
My windows server is going away soon and I HAVE to get a mail solution 
onto AWS.  (ANYBODY?? PLEASE HELP!)


So in meantime, plan-B is to copy my current ancient v3b5 installation 
off of my Windows server to my AWS Linux instance. Since James is 100% 
java (good ol' "write once -- run anywhere"..., right?) I figured I 
could just copy the entire James installation folder and fix a couple of 
backslashes in file paths in config files, and it should run perfectly.  
Wrong-o.  I literally copied the folder precisely, and changed to run.sh 
instead of run.bat.  After a few expected startup messages, I get a 
bunch of OpenJPA warnings, followed by a bunch of errors telling me 
foreign keys are missing from my database, etc. (See log excerpt 
below).  I went back to the running Windows instance. There is no 
reference anywhere in the Windows James log to jpa. Since the conf and 
lib folders are identical (as far as I can tell) between these two 
instances, I'm baffled.  Why is OpenJPA getting upset with the Linux 
install and not the Windows install. My first thought was something with 
case-sensitive file names. But I can't find any of those situations.  
I'm not familiar with OpenJPA configuration.  So these errors mean 
nothing to me.  What did I do wrong? (BTW... both instances point to the 
same db... so I know the database is not corrupt).


Can anybody help with this problem (or better... help me with the 3.3.0 
Eclipse disaster... I don't want to remain on v3b5 forever).


Thx.

Log entries:

INFO  02:35:01,219 | james.dnsservice | Adding autodiscovered search 
path ec2.internal.

INFO  02:35:01,220 | james.dnsservice | DNS Server is: 172.31.0.2
INFO  02:35:01,226 | james.dnsservice | Registered cache, resolver and 
search paths as DNSJava defaults

185  James  INFO   [main] openjpa.Runtime - Starting OpenJPA 2.2.1
215  James  INFO   [main] openjpa.jdbc.JDBC - Using dictionary class 
"org.apache.openjpa.jdbc.sql.MySQLDictionary".
630  James  WARN   [main] openjpa.MetaData - The class 
"org.apache.james.mailbox.jpa.mail.model.openjpa.JPAMessage" listed in 
the openjpa.MetaDataFactory configuration property could not be loaded 
by sun.misc.Launcher$AppClassLoader@764c12b6; ignoring.
631  James  WARN   [main] openjpa.MetaData - The class 
"org.apache.james.mailbox.jpa.mail.model.openjpa.AbstractJPAMessage" 
listed in the openjpa.MetaDataFactory configuration property could not 
be loaded by sun.misc.Launcher$AppClassLoader@764c12b6; ignoring.
723  James  INFO   [main] openjpa.MetaData - The class 
"org.apache.james.mailbox.jpa.mail.model.openjpa.JPAMessage" listed in 
the openjpa.MetaDataFactory configuration property could not be loaded 
by sun.misc.Launcher$AppClassLoader@764c12b6; ignoring.
723  James  INFO   [main] openjpa.MetaData - The class 
"org.apache.james.mailbox.jpa.mail.model.openjpa.AbstractJPAMessage" 
listed in the openjpa.MetaDataFactory configuration property could not 
be loaded by sun.misc.Launcher$AppClassLoader@764c12b6; ignoring.
735  James  INFO   [main] openjpa.MetaData - The class 
"org.apache.james.mailbox.jpa.mail.model.openjpa.JPAMessage" listed in 
the openjpa.MetaDataFactory configuration property could not be loaded 
by sun.misc.Launcher$AppClassLoader@764c12b6; ignoring.
735  James  INFO   [main] openjpa.MetaData - The class 
"org.apache.james.mailbox.jpa.mail.model.openjpa.AbstractJPAMessage" 
listed in the openjpa.MetaDataFactory configuration property could not 
be loaded by sun.misc.Launcher$AppClassLoader@764c12b6; ignoring.
740  James  INFO   [main] openjpa.MetaData - The class 
"org.apache.james.mailbox.jpa.mail.model.openjpa.JPAMessage" listed in 
the openjpa.MetaDataFactory configuration property could not be loaded 
by sun.misc.Launcher$AppClassLoader@764c12b6; ignoring.
740  James  INFO   [main] openjpa.MetaData - The class 
"org.apache.james.mailbox.jpa.mail.model.openjpa.AbstractJPAMessage" 
listed in the openjpa.MetaDataFactory configuration property could not 
be loaded by sun.misc.Launcher$AppClassLoader@764c12b6; ignoring.
746  James  INFO   [main] openjpa.MetaData - The class 
"org.apache.james.mailbox.jpa.mail.model.openjpa.JPAMessage" listed in 
the openjpa.MetaDataFactory configuration property could not be loaded 
by sun.misc.Launcher$AppClassLoader@764c12b6; ignoring.

.

Caused by: org.springframework.beans.factory.BeanCreationException: 
Error creating bean with name 'domainlist': Initialization of bean 
failed; nested exception is 
org.springframework.beans.FatalBeanException: Unable to execute 
lifecycle method on beandomainlist; nested exception is 
 
org.apache.openjpa.persistence.PersistenceException: Table 
"JAMES_MAIL_PROPERTY" has a foreign key to table "james_mail" that has 
not been generated.  You must run the schema generator on all 
inter-related tables at once




Re: Building James 3.3.0 in Eclipse

2019-09-04 Thread Jerry Malcolm

Any help on this would be appreciated.  I'm dead in the water now on this.

Thx.

Jerry

On 9/2/2019 10:40 PM, Jerry Malcolm wrote:

Raphael,

Thanks for the guidance.  I'm closer now.  But still not there. After 
a full day of trial and error on this, I settled on the following steps:


1) On a clean eclipse workspace, File-->Import-->Git --- I selected 
"clone URI" and entered the James GIT clone URI: 
https://github.com/apache/james-project.git


2) I selected the 3.3.x branch (I guess that's what I want... (??) ) 
and said to also clone submodules.  It downloaded to a folder. It 
created an eclipse project/package named james-server. But the project 
only had 3 files: model.di, model.notation, and model.uml.


3) On a whim, I decided to import again using "Maven existing project" 
and pointed to the extracted folder.  That seemed to work for the most 
part.


It initially gave me 10 errors saying "Plugin execution not covered by 
lifecycle configuration" and 16 more errors with "Project 
configuration not up to date with pom.xml".  All with varying pom.xml 
files.  I did a "quick fix" and it got rid of the 'not up to date' 
errors.  I googled the lifecycle error and it said to edit all of the 
pom.xml files and add  tags around the plugin tags.  
I tried in on a couple of the pom.xml files, and it did fix the errors 
(???).


I then did a build, and it added one more error, something about an 
invalid mojo tag in a pom descriptor.


Just for fun, I did a clean build, and that was a huge mistake. I now 
have 340 errors where it can't resolve DTOs in FlagsTest, 
EventSerializer in EventDispatcher, etc.  Apparently 'clean' wipes out 
source files as well.  Or it wipes out class files that are not part 
of the full build.


So that's where I am.  I can edit a bunch of pom.xml files and add 
tags.  I can hopefully figure out how to fix mojo.  And I can hope to 
remember to NEVER do a clean build again.  But this just doesn't seem 
right that I have to go in and modify a bunch of source files just to 
get a clean build from a ship-level source package.  I have zero 
confidence if I have to make all of these change that I really have an 
'official' 3.3.x James.


Suggestions?  Where did I stray from the correct path?  I'm beginning 
to feel like I belong in the class with the slow kids


On 9/2/2019 6:04 PM, Jerry Malcolm wrote:


On 9/2/2019 2:55 AM, Raphael OUAZANA wrote:

Hi Jerry,

Don't worry, Eclipse is still supported as a development environment 
and currently used by some developers (even if we have some issues 
in incoming 3.4 regarding compatibility between Eclipse and some 
Scala code).


The usual workflow to work in a dev environment is the following:
- clone the git repository
- checkout the branch / tag you want to work on
- import the project in Eclipse

This workflow should work perfectly well.

The issue you are encountering is because as you are taking the 
sources directly from the released version, you don't have any .git 
repository as you would have if you had cloned the project. This is 
not a big harm, but it seems to make failing the git-commit-id-plugin.
So if you remove this plugin from the main pom.xml, I guess your 
problem would be solved.


Regards,
Raphaël.

Le 2019-09-01 06:16, Jerry Malcolm a écrit :

Thanks for the info, Garry.  But I'm still confused.  Are you saying
that it is no longer possible to build from the source on Eclipse?  I
realize the team may be pushing docker.  But there are still
non-docker binaries that got built someway.  I just want to recreate
those binaries with my code additions.  But first I want to just build
with the official source untouched and verify that works. Then I'll
add my changes and rebuild.

You said the .git files are from the .git repository.  I don't doubt
that.  But I'm not a git guru.  I'm still not sure how to fix the
errors I'm getting (~400+ of these):

org.apache.maven.plugin.MojoExecutionException: .git directory is not
found! Please specify a valid [dotGitDirectory] in your pom.xml

I do not know anything about pom syntax.  I have no clue how/where to
"specify a valid [dotGitDirectory] in your pom.xml" (times 400)
Does this error mean that there isn't a gitDirectory defined in the
pom.xml and there should be? Or does it mean that one is defined
somewhere and the specified directory doesn't exist on my file
system?  I guess it'd be too much to ask for this error message to
include the directory it found and which of the 400 pom.xml files the
error refers to. (Sorry... I'm just frustrated at less-than-useful
error messages).

Did I download an invalid source zip?  Is there a different zip (or
additional zips that contain the correct pom files? ) I simply went to
github and downloaded the latest source zip file.

Where do I start?  I really don't want to have to learn how to build
on Linux unless there's an official word that says Eclipse is no
longer

Re: Building James 3.3.0 in Eclipse

2019-09-02 Thread Jerry Malcolm

Raphael,

Thanks for the guidance.  I'm closer now.  But still not there. After a 
full day of trial and error on this, I settled on the following steps:


1) On a clean eclipse workspace, File-->Import-->Git --- I selected 
"clone URI" and entered the James GIT clone URI: 
https://github.com/apache/james-project.git


2) I selected the 3.3.x branch (I guess that's what I want... (??) ) and 
said to also clone submodules.  It downloaded to a folder.  It created 
an eclipse project/package named james-server. But the project only had 
3 files: model.di, model.notation, and model.uml.


3) On a whim, I decided to import again using "Maven existing project" 
and pointed to the extracted folder.  That seemed to work for the most part.


It initially gave me 10 errors saying "Plugin execution not covered by 
lifecycle configuration" and 16 more errors with "Project configuration 
not up to date with pom.xml".  All with varying pom.xml files.  I did a 
"quick fix" and it got rid of the 'not up to date' errors.  I googled 
the lifecycle error and it said to edit all of the pom.xml files and add 
 tags around the plugin tags.  I tried in on a couple 
of the pom.xml files, and it did fix the errors (???).


I then did a build, and it added one more error, something about an 
invalid mojo tag in a pom descriptor.


Just for fun, I did a clean build, and that was a huge mistake. I now 
have 340 errors where it can't resolve DTOs in FlagsTest, 
EventSerializer in EventDispatcher, etc.  Apparently 'clean' wipes out 
source files as well.  Or it wipes out class files that are not part of 
the full build.


So that's where I am.  I can edit a bunch of pom.xml files and add 
tags.  I can hopefully figure out how to fix mojo.  And I can hope to 
remember to NEVER do a clean build again.  But this just doesn't seem 
right that I have to go in and modify a bunch of source files just to 
get a clean build from a ship-level source package.  I have zero 
confidence if I have to make all of these change that I really have an 
'official' 3.3.x James.


Suggestions?  Where did I stray from the correct path?  I'm beginning to 
feel like I belong in the class with the slow kids


On 9/2/2019 6:04 PM, Jerry Malcolm wrote:


On 9/2/2019 2:55 AM, Raphael OUAZANA wrote:

Hi Jerry,

Don't worry, Eclipse is still supported as a development environment 
and currently used by some developers (even if we have some issues in 
incoming 3.4 regarding compatibility between Eclipse and some Scala 
code).


The usual workflow to work in a dev environment is the following:
- clone the git repository
- checkout the branch / tag you want to work on
- import the project in Eclipse

This workflow should work perfectly well.

The issue you are encountering is because as you are taking the 
sources directly from the released version, you don't have any .git 
repository as you would have if you had cloned the project. This is 
not a big harm, but it seems to make failing the git-commit-id-plugin.
So if you remove this plugin from the main pom.xml, I guess your 
problem would be solved.


Regards,
Raphaël.

Le 2019-09-01 06:16, Jerry Malcolm a écrit :

Thanks for the info, Garry.  But I'm still confused.  Are you saying
that it is no longer possible to build from the source on Eclipse?  I
realize the team may be pushing docker.  But there are still
non-docker binaries that got built someway.  I just want to recreate
those binaries with my code additions.  But first I want to just build
with the official source untouched and verify that works. Then I'll
add my changes and rebuild.

You said the .git files are from the .git repository.  I don't doubt
that.  But I'm not a git guru.  I'm still not sure how to fix the
errors I'm getting (~400+ of these):

org.apache.maven.plugin.MojoExecutionException: .git directory is not
found! Please specify a valid [dotGitDirectory] in your pom.xml

I do not know anything about pom syntax.  I have no clue how/where to
"specify a valid [dotGitDirectory] in your pom.xml" (times 400)
Does this error mean that there isn't a gitDirectory defined in the
pom.xml and there should be? Or does it mean that one is defined
somewhere and the specified directory doesn't exist on my file
system?  I guess it'd be too much to ask for this error message to
include the directory it found and which of the 400 pom.xml files the
error refers to. (Sorry... I'm just frustrated at less-than-useful
error messages).

Did I download an invalid source zip?  Is there a different zip (or
additional zips that contain the correct pom files? ) I simply went to
github and downloaded the latest source zip file.

Where do I start?  I really don't want to have to learn how to build
on Linux unless there's an official word that says Eclipse is no
longer supported as a build platform.  I need to use Eclipse to debug
my code.  I just want to download the correct source, import it in

Re: Building James 3.3.0 in Eclipse

2019-09-02 Thread Jerry Malcolm



On 9/2/2019 2:55 AM, Raphael OUAZANA wrote:

Hi Jerry,

Don't worry, Eclipse is still supported as a development environment 
and currently used by some developers (even if we have some issues in 
incoming 3.4 regarding compatibility between Eclipse and some Scala 
code).


The usual workflow to work in a dev environment is the following:
- clone the git repository
- checkout the branch / tag you want to work on
- import the project in Eclipse

This workflow should work perfectly well.

The issue you are encountering is because as you are taking the 
sources directly from the released version, you don't have any .git 
repository as you would have if you had cloned the project. This is 
not a big harm, but it seems to make failing the git-commit-id-plugin.
So if you remove this plugin from the main pom.xml, I guess your 
problem would be solved.


Regards,
Raphaël.

Le 2019-09-01 06:16, Jerry Malcolm a écrit :

Thanks for the info, Garry.  But I'm still confused.  Are you saying
that it is no longer possible to build from the source on Eclipse?  I
realize the team may be pushing docker.  But there are still
non-docker binaries that got built someway.  I just want to recreate
those binaries with my code additions.  But first I want to just build
with the official source untouched and verify that works.  Then I'll
add my changes and rebuild.

You said the .git files are from the .git repository.  I don't doubt
that.  But I'm not a git guru.  I'm still not sure how to fix the
errors I'm getting (~400+ of these):

org.apache.maven.plugin.MojoExecutionException: .git directory is not
found! Please specify a valid [dotGitDirectory] in your pom.xml

I do not know anything about pom syntax.  I have no clue how/where to
"specify a valid [dotGitDirectory] in your pom.xml" (times 400)
Does this error mean that there isn't a gitDirectory defined in the
pom.xml and there should be? Or does it mean that one is defined
somewhere and the specified directory doesn't exist on my file
system?  I guess it'd be too much to ask for this error message to
include the directory it found and which of the 400 pom.xml files the
error refers to. (Sorry... I'm just frustrated at less-than-useful
error messages).

Did I download an invalid source zip?  Is there a different zip (or
additional zips that contain the correct pom files? ) I simply went to
github and downloaded the latest source zip file.

Where do I start?  I really don't want to have to learn how to build
on Linux unless there's an official word that says Eclipse is no
longer supported as a build platform.  I need to use Eclipse to debug
my code.  I just want to download the correct source, import it into
Eclipse, and build it.  I just can't understand why I can't get
anywhere near a successful build.  What am I doing wrong?

Jerry

On 8/31/2019 5:25 PM, Garry Hurley wrote:
Jerry, I had to download the source, run configure and make on a 
Linux system. The problem is that the source is made to build onto a 
docker system on Windows. Those of us who choose not to run docker 
and run a real operating system often have issues. Those .git files 
are from the .git repository. If you did a git clone, create your 
workspace from the local git repo or import existing maven projects 
into eclipse from the repo. This serves two purposes. 1, it allows 
you to keep your project up to date and 2, it allows you to commit 
if you have any changes to the existing code you want to push up for 
others.


I haven’t built anything after 3.3.0 was finalizedbecause the 
government finally approved 3.3.0 for use (ironically, they had been 
insisting that 3.0.4beta was safe to use in production and I 
outright refused to put that in place).


Sent from my iPhone

On Aug 31, 2019, at 6:02 PM, Jerry Malcolm  
wrote:


Something else I just found... the link to a tutorial at 
http://blog.bonnydoonmedia.com/post.cfm/walkthrough-tutorials-compiling-apache-james-v3-with-eclipse 
in the Eclipse build section is dead.  No DNS entry.




On 8/31/2019 4:54 PM, Jerry Malcolm wrote:
Correction... the build instructions page link should be: 
https://james.apache.org/server/3/dev-build.html




On 8/31/2019 4:52 PM, Jerry Malcolm wrote:
I'm trying to build the latest stable James 3.3.0 in Eclipse.

-- The link to the 3.3.0 source zip on the downloads page is dead 
(https://www.apache.org/dyn/closer.lua/james/server/3.3.0/james-server-sources-3.3.0.zip)


-- I figured out the correct link: 
http://mirrors.gigenet.com/apache/james/server/3.3.0/james-project-3.3.0-src.zip 
and downloaded the zip.  But the zip contains ONLY the primary 
source files and no pom.xml, etc files.


-- I finally went to git and downloaded a zip that contained 
everything.


-- But the fun just kept happening... I tried to import the 
project into Eclipse, but got over 500 errors.   A large chunk of 
these errors was that every pom file has an invalid or missing a 
"dotGit" folder name.


-- Als

Re: Building James 3.3.0 in Eclipse

2019-08-31 Thread Jerry Malcolm
Thanks for the info, Garry.  But I'm still confused.  Are you saying 
that it is no longer possible to build from the source on Eclipse?  I 
realize the team may be pushing docker.  But there are still non-docker 
binaries that got built someway.  I just want to recreate those binaries 
with my code additions.  But first I want to just build with the 
official source untouched and verify that works.  Then I'll add my 
changes and rebuild.


You said the .git files are from the .git repository.  I don't doubt 
that.  But I'm not a git guru.  I'm still not sure how to fix the errors 
I'm getting (~400+ of these):


org.apache.maven.plugin.MojoExecutionException: .git directory is not 
found! Please specify a valid [dotGitDirectory] in your pom.xml


I do not know anything about pom syntax.  I have no clue how/where to 
"specify a valid [dotGitDirectory] in your pom.xml" (times 400)  
Does this error mean that there isn't a gitDirectory defined in the 
pom.xml and there should be? Or does it mean that one is defined 
somewhere and the specified directory doesn't exist on my file system?  
I guess it'd be too much to ask for this error message to include the 
directory it found and which of the 400 pom.xml files the error refers 
to. (Sorry... I'm just frustrated at less-than-useful error messages).


Did I download an invalid source zip?  Is there a different zip (or 
additional zips that contain the correct pom files? ) I simply went to 
github and downloaded the latest source zip file.


Where do I start?  I really don't want to have to learn how to build on 
Linux unless there's an official word that says Eclipse is no longer 
supported as a build platform.  I need to use Eclipse to debug my code.  
I just want to download the correct source, import it into Eclipse, and 
build it.  I just can't understand why I can't get anywhere near a 
successful build.  What am I doing wrong?


Jerry

On 8/31/2019 5:25 PM, Garry Hurley wrote:

Jerry, I had to download the source, run configure and make on a Linux system. 
The problem is that the source is made to build onto a docker system on 
Windows. Those of us who choose not to run docker and run a real operating 
system often have issues. Those .git files are from the .git repository. If you 
did a git clone, create your workspace from the local git repo or import 
existing maven projects into eclipse from the repo. This serves two purposes. 
1, it allows you to keep your project up to date and 2, it allows you to commit 
if you have any changes to the existing code you want to push up for others.

I haven’t built anything after 3.3.0 was finalizedbecause the government 
finally approved 3.3.0 for use (ironically, they had been insisting that 
3.0.4beta was safe to use in production and I outright refused to put that in 
place).

Sent from my iPhone


On Aug 31, 2019, at 6:02 PM, Jerry Malcolm  wrote:

Something else I just found... the link to a tutorial at 
http://blog.bonnydoonmedia.com/post.cfm/walkthrough-tutorials-compiling-apache-james-v3-with-eclipse
 in the Eclipse build section is dead.  No DNS entry.



On 8/31/2019 4:54 PM, Jerry Malcolm wrote:
Correction... the build instructions page link should be: 
https://james.apache.org/server/3/dev-build.html



On 8/31/2019 4:52 PM, Jerry Malcolm wrote:
I'm trying to build the latest stable James 3.3.0 in Eclipse.

-- The link to the 3.3.0 source zip on the downloads page is dead 
(https://www.apache.org/dyn/closer.lua/james/server/3.3.0/james-server-sources-3.3.0.zip)

-- I figured out the correct link: 
http://mirrors.gigenet.com/apache/james/server/3.3.0/james-project-3.3.0-src.zip
 and downloaded the zip.  But the zip contains ONLY the primary source files 
and no pom.xml, etc files.

-- I finally went to git and downloaded a zip that contained everything.

-- But the fun just kept happening... I tried to import the project into Eclipse, but got 
over 500 errors.   A large chunk of these errors was that every pom file has an invalid 
or missing a "dotGit" folder name.

-- Also, I tried following the instructions here: 
http://mirrors.gigenet.com/apache/james/server/3.3.0/james-project-3.3.0-src.zip -- In 
the section titled "prepare projects" it says to copy files from: 
server/container/spring/src/main/config/james and from 
server/container/src/main/config/james Apparently, the folder structures have completely 
changed since that was written. Neither of those folder exist, and it wasn't obvious 
where they moved to.

-- I know enough about eclipse to get by.  I know nothing about maven (and for 
now would like to keep it as close to that way as possible).  I just want to 
add a few tweaks to James 3.3 that I added back in v3b5 and get the latest 
james into production. I'm sure there's something missing or some setting wrong 
in Eclipse or in the Maven plug-in.  I did a complete clean install of Eclipse 
(Java EE version) and Maven on a different machine just to m

Re: Building James 3.3.0 in Eclipse

2019-08-31 Thread Jerry Malcolm
Something else I just found... the link to a tutorial at 
http://blog.bonnydoonmedia.com/post.cfm/walkthrough-tutorials-compiling-apache-james-v3-with-eclipse 
in the Eclipse build section is dead.  No DNS entry.



On 8/31/2019 4:54 PM, Jerry Malcolm wrote:
Correction... the build instructions page link should be: 
https://james.apache.org/server/3/dev-build.html



On 8/31/2019 4:52 PM, Jerry Malcolm wrote:

I'm trying to build the latest stable James 3.3.0 in Eclipse.

-- The link to the 3.3.0 source zip on the downloads page is dead 
(https://www.apache.org/dyn/closer.lua/james/server/3.3.0/james-server-sources-3.3.0.zip) 



-- I figured out the correct link: 
http://mirrors.gigenet.com/apache/james/server/3.3.0/james-project-3.3.0-src.zip 
and downloaded the zip.  But the zip contains ONLY the primary source 
files and no pom.xml, etc files.


-- I finally went to git and downloaded a zip that contained everything.

-- But the fun just kept happening... I tried to import the project 
into Eclipse, but got over 500 errors.   A large chunk of these 
errors was that every pom file has an invalid or missing a "dotGit" 
folder name.


-- Also, I tried following the instructions here: 
http://mirrors.gigenet.com/apache/james/server/3.3.0/james-project-3.3.0-src.zip 
-- In the section titled "prepare projects" it says to copy files 
from: server/container/spring/src/main/config/james and from 
server/container/src/main/config/james Apparently, the folder 
structures have completely changed since that was written. Neither of 
those folder exist, and it wasn't obvious where they moved to.


-- I know enough about eclipse to get by.  I know nothing about maven 
(and for now would like to keep it as close to that way as 
possible).  I just want to add a few tweaks to James 3.3 that I added 
back in v3b5 and get the latest james into production. I'm sure 
there's something missing or some setting wrong in Eclipse or in the 
Maven plug-in.  I did a complete clean install of Eclipse (Java EE 
version) and Maven on a different machine just to make sure there 
were no issues with my original Eclipse.  No change.


Any help on resolving the hundreds of import errors and where to find 
all of these files that have moved since the instructions were 
written will be appreciated.   I'm at a total loss.  I really just 
need to get this thing to build.


Thanks.

Jerry




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



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



Re: Building James 3.3.0 in Eclipse

2019-08-31 Thread Jerry Malcolm
Correction... the build instructions page link should be: 
https://james.apache.org/server/3/dev-build.html



On 8/31/2019 4:52 PM, Jerry Malcolm wrote:

I'm trying to build the latest stable James 3.3.0 in Eclipse.

-- The link to the 3.3.0 source zip on the downloads page is dead 
(https://www.apache.org/dyn/closer.lua/james/server/3.3.0/james-server-sources-3.3.0.zip) 



-- I figured out the correct link: 
http://mirrors.gigenet.com/apache/james/server/3.3.0/james-project-3.3.0-src.zip 
and downloaded the zip.  But the zip contains ONLY the primary source 
files and no pom.xml, etc files.


-- I finally went to git and downloaded a zip that contained everything.

-- But the fun just kept happening... I tried to import the project 
into Eclipse, but got over 500 errors.   A large chunk of these errors 
was that every pom file has an invalid or missing a "dotGit" folder name.


-- Also, I tried following the instructions here: 
http://mirrors.gigenet.com/apache/james/server/3.3.0/james-project-3.3.0-src.zip 
-- In the section titled "prepare projects" it says to copy files 
from: server/container/spring/src/main/config/james and from 
server/container/src/main/config/james Apparently, the folder 
structures have completely changed since that was written. Neither of 
those folder exist, and it wasn't obvious where they moved to.


-- I know enough about eclipse to get by.  I know nothing about maven 
(and for now would like to keep it as close to that way as possible).  
I just want to add a few tweaks to James 3.3 that I added back in v3b5 
and get the latest james into production.  I'm sure there's something 
missing or some setting wrong in Eclipse or in the Maven plug-in.  I 
did a complete clean install of Eclipse (Java EE version) and Maven on 
a different machine just to make sure there were no issues with my 
original Eclipse.  No change.


Any help on resolving the hundreds of import errors and where to find 
all of these files that have moved since the instructions were written 
will be appreciated.   I'm at a total loss.  I really just need to get 
this thing to build.


Thanks.

Jerry




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



Building James 3.3.0 in Eclipse

2019-08-31 Thread Jerry Malcolm

I'm trying to build the latest stable James 3.3.0 in Eclipse.

-- The link to the 3.3.0 source zip on the downloads page is dead 
(https://www.apache.org/dyn/closer.lua/james/server/3.3.0/james-server-sources-3.3.0.zip)


-- I figured out the correct link: 
http://mirrors.gigenet.com/apache/james/server/3.3.0/james-project-3.3.0-src.zip 
and downloaded the zip.  But the zip contains ONLY the primary source 
files and no pom.xml, etc files.


-- I finally went to git and downloaded a zip that contained everything.

-- But the fun just kept happening... I tried to import the project into 
Eclipse, but got over 500 errors.   A large chunk of these errors was 
that every pom file has an invalid or missing a "dotGit" folder name.


-- Also, I tried following the instructions here: 
http://mirrors.gigenet.com/apache/james/server/3.3.0/james-project-3.3.0-src.zip 
-- In the section titled "prepare projects" it says to copy files from: 
server/container/spring/src/main/config/james and from 
server/container/src/main/config/james Apparently, the folder structures 
have completely changed since that was written.  Neither of those folder 
exist, and it wasn't obvious where they moved to.


-- I know enough about eclipse to get by.  I know nothing about maven 
(and for now would like to keep it as close to that way as possible).  I 
just want to add a few tweaks to James 3.3 that I added back in v3b5 and 
get the latest james into production.  I'm sure there's something 
missing or some setting wrong in Eclipse or in the Maven plug-in.  I did 
a complete clean install of Eclipse (Java EE version) and Maven on a 
different machine just to make sure there were no issues with my 
original Eclipse.  No change.


Any help on resolving the hundreds of import errors and where to find 
all of these files that have moved since the instructions were written 
will be appreciated.   I'm at a total loss.  I really just need to get 
this thing to build.


Thanks.

Jerry



Re: "Getting Started" with JAMES using Docker

2019-08-31 Thread Jerry Malcolm

Hi Tellier,

Thanks for the response.  You're suggestion is a perfect solution.  Just 
add the option to the quick start: if you know docker, do this way.  If 
you want do it the traditional way, here's the steps.


Thanks.

Jerry

On 8/30/2019 12:04 AM, Tellier Benoit wrote:

Hi Jerry,

Yes thanks to your report, the image had been updated. Thanks!


Just an unsolicited opinion for the James folks...

there is an implied assumption that the user understands docker and

has it installed.  Nothing against docker. But it has not yet attained
ubiquity.

Well, thanks for the feedback.

IMO you see it the wrong way.

IF you have/are-familiar-with docker you can get a one
line try - which is awesome.

If you do not have it, you can follow one of the many non-docker tutorials.

CF: http://james.apache.org/server/install.html

Regarding "windows support" we are actively looking for some
contributors... Most of us don't have a license...

I'm not going to answer docker sysadmin related issues here.

Maybe the key output would be to enrich the **Get started with James**
section in order to also link "non-docker install options".

Would you agree with such a proposal?

Thanks again for your feedback, it's really helpful.

Best regards,

Benoit

On 30/08/2019 11:40, Jerry Malcolm wrote:

Hi, Aleksanda,

I really appreciate your information.  I believe that someone realized
the image wasn't there and quietly got it posted overnight.  When I
reran the command it worked, at least somewhat.

Just an unsolicited opinion for the James folks... I'm not sure that one
line command as the first thing a new user will see is quite ready for
prime-time.   As I mentioned in my first post yesterday, there is an
implied assumption that the user understands docker and has it
installed.  Nothing against docker. But it has not yet attained
ubiquity.  My guess is a lot of new James users will have no idea what
it is or where to get it, either for Linux or Windows. And if that's the
case, there's no alternative pointer on that home page for non-docker
install. Next, the docker install failed for me because port 25 was
already in use since aws ec2 Linux automatically installs sendmail and
starts it up.  Maybe all new James users will implicitly understand what
that error means and how to fix it.  Finally, docker got to the point of
creating the dummy user ids and locked up.  Had to kill my puTTY
session.  No idea how to try to start/stop the james service and see how
much, if any of it, is installed and runable.

I'm not trying to be negative.  That one line install is great if it
really works for the majority.  But if a user (even a veteran of JAMES
for ~15 years like me) has the problems I've encountered, I would
strongly suggest a detailed followup page to go to when the one line
install crashes and burns.  If I wasn't a seasoned user of James, and
rather a first-timer with this supposedly 'super easy' experience to
get it up and running, I might decide to go another direction for my MTA
needs.  I think we can head that off with a pointer to more info and
what to do if things don't go right on that one-line install.

Thx

Jerry


On 8/29/2019 2:53 AM, Aleksandar Stoisavljevic wrote:

Hi Jerry,

I'll try to be brief and not to come into many details of how Docker is
working.
For that, I suggest that you go through some video materials and/or to
find
some
really extensive documentation on Internet (blogs, posts, Docker
documentation, books, etc.)

In the meantime, I'll try to explain what happened in your case.

Obviously you've installed Docker correctly as we can see from command
response.

There are actually two concepts in Docker that you have to distinguish:
Docker Image and
Docker Container.
Docker Container is "running version" of Docker Image.

When you stated:

[ec2-user@ip-172-31-47-236 ~]$ docker run -p "25:25" -p "143:143"
linagora/james-jpa-sample:3.3.0

It actually means that it will try to run Docker Container, listening on
host ports 25 and 143, and Container should
be of a Docker Image "linagora/james-jpa-sample:3.3.0".

That image, "linagora/james-jpa-sample:3.3.0", should be availabe either
locally or placed somewhere on Internet, so
Docker can access it and grab it. For this kind of Docker Image store,
usually people use Docker Hub (https://hub.docker.com/),
but there are also other Docker Repositories (private or public).

As you don't have it locally, that Docker Image
("linagora/james-jpa-sample:3.3.0"), therefore you've got that
information
in reponse:
"Unable to find image 'linagora/james-jpa-sample:3.3.0' locally".

At that moment, Docker Engine will try to grab that image from Docker
Hub.

But unfortunately, I don't see that 3.3.0 version of that image exists.
You can go to URL
(https://hub.docker.com/r/linagora/james-jpa-sample/tags)
for yourself and make sure that it doesn't exists.

I don't know how did you get

Re: "Getting Started" with JAMES using Docker

2019-08-29 Thread Jerry Malcolm

Hi, Aleksanda,

I really appreciate your information.  I believe that someone realized 
the image wasn't there and quietly got it posted overnight.  When I 
reran the command it worked, at least somewhat.


Just an unsolicited opinion for the James folks... I'm not sure that one 
line command as the first thing a new user will see is quite ready for 
prime-time.   As I mentioned in my first post yesterday, there is an 
implied assumption that the user understands docker and has it 
installed.  Nothing against docker. But it has not yet attained 
ubiquity.  My guess is a lot of new James users will have no idea what 
it is or where to get it, either for Linux or Windows. And if that's the 
case, there's no alternative pointer on that home page for non-docker 
install. Next, the docker install failed for me because port 25 was 
already in use since aws ec2 Linux automatically installs sendmail and 
starts it up.  Maybe all new James users will implicitly understand what 
that error means and how to fix it.  Finally, docker got to the point of 
creating the dummy user ids and locked up.  Had to kill my puTTY 
session.  No idea how to try to start/stop the james service and see how 
much, if any of it, is installed and runable.


I'm not trying to be negative.  That one line install is great if it 
really works for the majority.  But if a user (even a veteran of JAMES 
for ~15 years like me) has the problems I've encountered, I would 
strongly suggest a detailed followup page to go to when the one line 
install crashes and burns.  If I wasn't a seasoned user of James, and 
rather a first-timer with this supposedly 'super easy' experience to 
get it up and running, I might decide to go another direction for my MTA 
needs.  I think we can head that off with a pointer to more info and 
what to do if things don't go right on that one-line install.


Thx

Jerry


On 8/29/2019 2:53 AM, Aleksandar Stoisavljevic wrote:

Hi Jerry,

I'll try to be brief and not to come into many details of how Docker is
working.
For that, I suggest that you go through some video materials and/or to find
some
really extensive documentation on Internet (blogs, posts, Docker
documentation, books, etc.)

In the meantime, I'll try to explain what happened in your case.

Obviously you've installed Docker correctly as we can see from command
response.

There are actually two concepts in Docker that you have to distinguish:
Docker Image and
Docker Container.
Docker Container is "running version" of Docker Image.

When you stated:

[ec2-user@ip-172-31-47-236 ~]$ docker run -p "25:25" -p "143:143"
linagora/james-jpa-sample:3.3.0

It actually means that it will try to run Docker Container, listening on
host ports 25 and 143, and Container should
be of a Docker Image "linagora/james-jpa-sample:3.3.0".

That image, "linagora/james-jpa-sample:3.3.0", should be availabe either
locally or placed somewhere on Internet, so
Docker can access it and grab it. For this kind of Docker Image store,
usually people use Docker Hub (https://hub.docker.com/),
but there are also other Docker Repositories (private or public).

As you don't have it locally, that Docker Image
("linagora/james-jpa-sample:3.3.0"), therefore you've got that information
in reponse:
"Unable to find image 'linagora/james-jpa-sample:3.3.0' locally".

At that moment, Docker Engine will try to grab that image from Docker Hub.

But unfortunately, I don't see that 3.3.0 version of that image exists.
You can go to URL (https://hub.docker.com/r/linagora/james-jpa-sample/tags)
for yourself and make sure that it doesn't exists.

I don't know how did you get that 3.3.0, maybe it is in some outdated
documentation, but I suggest that you try either with latest tag
(so the command would be  docker run -p "25:25" -p "143:143"
linagora/james-jpa-sample) or if you really have some reasons for 3.3.X
then I would try with docker run -p "25:25" -p "143:143"
linagora/james-jpa-sample:3.3.X

Let's try that and then just reply to this thread.


Than You



On Thu, Aug 29, 2019 at 5:18 AM Jerry Malcolm 
wrote:


I was preparing to do a trial run at getting James up and running on an
AWS EC2 instance.  I went to the James home page and saw there is a
1-line command to download and install it.  However, to use that one
line there is apparently an assumption of a full understanding of Docker
and a pre-existing installation of Docker.  Docker isn't automatically
installed with Amazon Linux in an EC2.  I was able to install it with
yum.  But when I entered the command from the JAMES getting started
page, this is what I got:

[ec2-user@ip-172-31-47-236 ~]$ docker run -p "25:25" -p "143:143"
linagora/james-jpa-sample:3.3.0
Unable to find image 'linagora/james-jpa-sample:3.3.0' locally
docker: Error response from daemon: manifest for
linagora/james-jpa-sample:3.3.0 not found.
See 'docker 

Re: "Getting Started" with JAMES using Docker

2019-08-29 Thread Jerry Malcolm
Thanks for the detailed info.  I have no real desire to get into Docker 
at this point (likely will at a later date).  I was just enticed by the 
statement on the James home page: (http://james.apache.org/index.html) 
that says I can download and install James in one statement:


*=
*

*STEPS YOU HAVE TO FOLLOW:*
Pull and run the James image with the following single command:

|docker run -p "25:25" -p "143:143" linagora/james-jpa-sample:3.3.0|

Then, connect this image with for instance, Thunderbird.



I just did what it said.  I'll try dropping off the 3.3.0. But I feel 
like we're just shooting in the dark trying to guess at the package name 
docker is looking for.  Is there a way to list the package names that 
docker is aware of?


Thx

Jerry

On 8/29/2019 2:53 AM, Aleksandar Stoisavljevic wrote:

Hi Jerry,

I'll try to be brief and not to come into many details of how Docker is
working.
For that, I suggest that you go through some video materials and/or to find
some
really extensive documentation on Internet (blogs, posts, Docker
documentation, books, etc.)

In the meantime, I'll try to explain what happened in your case.

Obviously you've installed Docker correctly as we can see from command
response.

There are actually two concepts in Docker that you have to distinguish:
Docker Image and
Docker Container.
Docker Container is "running version" of Docker Image.

When you stated:

[ec2-user@ip-172-31-47-236 ~]$ docker run -p "25:25" -p "143:143"
linagora/james-jpa-sample:3.3.0

It actually means that it will try to run Docker Container, listening on
host ports 25 and 143, and Container should
be of a Docker Image "linagora/james-jpa-sample:3.3.0".

That image, "linagora/james-jpa-sample:3.3.0", should be availabe either
locally or placed somewhere on Internet, so
Docker can access it and grab it. For this kind of Docker Image store,
usually people use Docker Hub (https://hub.docker.com/),
but there are also other Docker Repositories (private or public).

As you don't have it locally, that Docker Image
("linagora/james-jpa-sample:3.3.0"), therefore you've got that information
in reponse:
"Unable to find image 'linagora/james-jpa-sample:3.3.0' locally".

At that moment, Docker Engine will try to grab that image from Docker Hub.

But unfortunately, I don't see that 3.3.0 version of that image exists.
You can go to URL (https://hub.docker.com/r/linagora/james-jpa-sample/tags)
for yourself and make sure that it doesn't exists.

I don't know how did you get that 3.3.0, maybe it is in some outdated
documentation, but I suggest that you try either with latest tag
(so the command would be  docker run -p "25:25" -p "143:143"
linagora/james-jpa-sample) or if you really have some reasons for 3.3.X
then I would try with docker run -p "25:25" -p "143:143"
linagora/james-jpa-sample:3.3.X

Let's try that and then just reply to this thread.


Than You



On Thu, Aug 29, 2019 at 5:18 AM Jerry Malcolm 
wrote:


I was preparing to do a trial run at getting James up and running on an
AWS EC2 instance.  I went to the James home page and saw there is a
1-line command to download and install it.  However, to use that one
line there is apparently an assumption of a full understanding of Docker
and a pre-existing installation of Docker.  Docker isn't automatically
installed with Amazon Linux in an EC2.  I was able to install it with
yum.  But when I entered the command from the JAMES getting started
page, this is what I got:

[ec2-user@ip-172-31-47-236 ~]$ docker run -p "25:25" -p "143:143"
linagora/james-jpa-sample:3.3.0
Unable to find image 'linagora/james-jpa-sample:3.3.0' locally
docker: Error response from daemon: manifest for
linagora/james-jpa-sample:3.3.0 not found.
See 'docker run --help'.

Since there's no url to download james, I assume that the manifest that
it is saying that it can't find contains all of that useful info.  I
know nothing about how Docker works.  Where would I find the missing
manifest, and if it was expected to automatically come with Docker as
implied with the "1-line-download-install" statement, what did I do wrong?

Thx

Jerry


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




"Getting Started" with JAMES using Docker

2019-08-28 Thread Jerry Malcolm
I was preparing to do a trial run at getting James up and running on an 
AWS EC2 instance.  I went to the James home page and saw there is a 
1-line command to download and install it.  However, to use that one 
line there is apparently an assumption of a full understanding of Docker 
and a pre-existing installation of Docker.  Docker isn't automatically 
installed with Amazon Linux in an EC2.  I was able to install it with 
yum.  But when I entered the command from the JAMES getting started 
page, this is what I got:


[ec2-user@ip-172-31-47-236 ~]$ docker run -p "25:25" -p "143:143" 
linagora/james-jpa-sample:3.3.0

Unable to find image 'linagora/james-jpa-sample:3.3.0' locally
docker: Error response from daemon: manifest for 
linagora/james-jpa-sample:3.3.0 not found.

See 'docker run --help'.

Since there's no url to download james, I assume that the manifest that 
it is saying that it can't find contains all of that useful info.  I 
know nothing about how Docker works.  Where would I find the missing 
manifest, and if it was expected to automatically come with Docker as 
implied with the "1-line-download-install" statement, what did I do wrong?


Thx

Jerry


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



Re: James with AWS SES mail receiving

2019-08-20 Thread Jerry Malcolm
I'm using an EC2 with tomcat and jdbc with RDS with no problems. So that 
shouldn't be a problem.  My main concern was whether or not AWS blocks 
port 25.  At one time, goDaddy dedicated servers were forced to go 
through a goDaddy proxy for port 25.  The troll under the bridge would 
only send a certain number of emails each day, so emails would take 
several days to arrive if the limit was reached,  and they would charge 
outrageous fees if you sent too many emails out.  I can't afford any 
situation like that.  As long as AWS doesn't proxy port 25, I'm not 
worried. But not surprising that goDaddy didn't widely publicize their 
little proxy scam.  So just a bit paranoid Just wondering if anybody 
had first hand experience with James in AWS.


On 8/12/2019 11:39 PM, Tellier Benoit wrote:

If there is a JDBC driver for RDS then that is the way to go.

Am I missing something?

Cheers,

Benoit

On 05/08/2019 23:24, Jerry Malcolm wrote:

I'm looking at moving off of my dedicated server to AWS, which means
moving JAMES.  Interesting concepts in this thread below from a year or
so ago about using SES.  But all I want to do is get JAMES up and
running in an AWS EC2 with an RDS with as little rip up and effort as
possible.   Assuming I copy my current JAMES build to EC2, set up the
RDS, install SpamAssassin, and open the appropriate ports, are there any
gotchas lurking that I need to be aware of?  (Still just getting my feet
wet with AWS).

Somewhat off topic... what size EC2 is recommended?  Do I simply start
small and creep up until the EC2 no longer pegs the meter? Anybody have
an experience with what size EC2 to select?

Thanks.

Jerry

On 6/11/2018 8:16 AM, Jeremy T. Bouse wrote:

Benoit,

  Yes it can send to a SMTP endpoint but the FROM address has to be an
approved email address/domain for SES to be able to send it which means
having to modify the envelope headers. Further to that I'm looking at
the possibility of running James in containers on AWS ECS which would be
on a private subnet so it wouldn't be reachable directly without going
through a load-balancer.


On 6/11/2018 12:44 AM, Benoit Tellier wrote:

Hi Jeremy,

Can't AWS SES send these messages to a SMTP endpoint? This way it will
work without any further development.

That being said, I consider the feature you propose extremely
interesting, as it will provide alternatives to SMTP for applications
sending emails.

In my opinion, you would need to implement a new component in James
listening on AWS SNS, upon messages retrieving the mails, and then
enqueue them in James internal MailQueue.

Cheers,

Benoit Tellier

Le 11/06/2018 à 01:53, Jeremy T. Bouse a écrit :

  Has anyone thought about how to possibly make use of AWS SES email
receiving to accept inbound email and get it passed along into James?
With AWS SES email receiving you can have it save the actual message to
an S3 bucket and then fire off an SNS topic or Lambda function so the
question would really be how to trigger James to be able to process the
alert and ingest the message from S3. I've been thinking about it as a
possible email solution for myself and it seems like it should be
possible but I've not yet been able to determine if there's already an
easy method to do so or if it'll take some development to make it work.
Wanted to see if anyone else had thought about it.


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


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


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


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


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



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



Re: James with AWS SES mail receiving

2019-08-05 Thread Jerry Malcolm
I'm looking at moving off of my dedicated server to AWS, which means 
moving JAMES.  Interesting concepts in this thread below from a year or 
so ago about using SES.  But all I want to do is get JAMES up and 
running in an AWS EC2 with an RDS with as little rip up and effort as 
possible.   Assuming I copy my current JAMES build to EC2, set up the 
RDS, install SpamAssassin, and open the appropriate ports, are there any 
gotchas lurking that I need to be aware of?  (Still just getting my feet 
wet with AWS).


Somewhat off topic... what size EC2 is recommended?  Do I simply start 
small and creep up until the EC2 no longer pegs the meter? Anybody have 
an experience with what size EC2 to select?


Thanks.

Jerry

On 6/11/2018 8:16 AM, Jeremy T. Bouse wrote:

Benoit,

     Yes it can send to a SMTP endpoint but the FROM address has to be an
approved email address/domain for SES to be able to send it which means
having to modify the envelope headers. Further to that I'm looking at
the possibility of running James in containers on AWS ECS which would be
on a private subnet so it wouldn't be reachable directly without going
through a load-balancer.


On 6/11/2018 12:44 AM, Benoit Tellier wrote:

Hi Jeremy,

Can't AWS SES send these messages to a SMTP endpoint? This way it will
work without any further development.

That being said, I consider the feature you propose extremely
interesting, as it will provide alternatives to SMTP for applications
sending emails.

In my opinion, you would need to implement a new component in James
listening on AWS SNS, upon messages retrieving the mails, and then
enqueue them in James internal MailQueue.

Cheers,

Benoit Tellier

Le 11/06/2018 à 01:53, Jeremy T. Bouse a écrit :

     Has anyone thought about how to possibly make use of AWS SES email
receiving to accept inbound email and get it passed along into James?
With AWS SES email receiving you can have it save the actual message to
an S3 bucket and then fire off an SNS topic or Lambda function so the
question would really be how to trigger James to be able to process the
alert and ingest the message from S3. I've been thinking about it as a
possible email solution for myself and it seems like it should be
possible but I've not yet been able to determine if there's already an
easy method to do so or if it'll take some development to make it work.
Wanted to see if anyone else had thought about it.


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


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



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



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



Windows Service Problem

2019-08-02 Thread Jerry Malcolm
I have had James v3B5 running for several years on a WinServer16 box.  
In the last couple of weeks, the service has failed to start.  I can 
open a command prompt and run James with the 'run' bat file from there 
without any problem.  I've tried rebooting.  I uninstalled the service 
and reinstalled it.  No luck.  I haven't made any changes to the system 
other than the mandatory Windows updates.  But at this point, I can't 
get the service to start. The last two times I tried it, I got error 
messages that meant nothing.  The most recent one said it didn't have 
enough memory. I've got 16GB, and it's running about 45%.  Perhaps 
somebody can decipher the log below.  Not much recent info on google 
about the 'unable to allocate a console for the service' message.  The 
wrapper header output is: Java Service Wrapper Community Edition 64-bit 
3.5.24.


Anybody got any suggestions?  Thx.  Log:

C:\james-3.0.0-b5\log>type wrapper.log
STATUS | wrapper  | 2019/08/01 13:06:26 | --> Wrapper Started as Service
ERROR  | wrapper  | 2019/08/01 13:06:26 | ERROR: Unable to allocate a 
console for the service: The specified resource name cannot be found in 
the image file. (0x716)

STATUS | wrapper  | 2019/08/01 13:06:26 | <-- Wrapper Stopped
STATUS | wrapperm | 2019/08/02 19:06:58 | Apache James :: Server :: App 
service removed.
STATUS | wrapperm | 2019/08/02 19:07:12 | Apache James :: Server :: App 
service installed.

STATUS | wrapper  | 2019/08/02 19:07:26 | --> Wrapper Started as Service
ERROR  | wrapper  | 2019/08/02 19:07:26 | ERROR: Unable to allocate a 
console for the service: Not enough storage is available to process this 
command. (0x8)

STATUS | wrapper  | 2019/08/02 19:07:26 | <-- Wrapper Stopped



Blacklist site started flagging everything as spam this morning

2019-01-02 Thread Jerry Malcolm
I am running 3.0b5.  Everything has been running pretty much without a 
hitch for a couple of years now.  Around 5:30 this morning (11:30GMT) 
all inbound mail started being flagged as spam.  After digging through 
the logs and my conf files, I finally isolated it to the njabl.org 
site.  It was flagging all sender domains including gmail.com.  I 
commented the matcher block (below) out of my conf file, and finally 
everything is flowing again.



    spam
    550 Requested action not taken: rejected - see 
http://njabl.org/



Is anyone else seeing this?  This site is rating the sending domain/ip, 
and therefore shouldn't be rating anything to do with my domain, 
correct?  I'll just keep this commented out until I figure out what's 
happening.


Ideas?

Thanks,

Jerry


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



Re: New user, so far so good .. just one problem.

2018-12-27 Thread Jerry Malcolm
Gmail can be harsh... Any little thing wrong, and they chunk your 
mail.   Just a suggestion if you haven't already done so, go to 
http://www.mail-tester.com/ and then send an email to the address they 
give you.  They'll grade your email.  I've found if you don't get a 10 
out of 10, you'll have problems delivering to gmail.  If you get a 10 
score, then at least you can be confident that your problems aren't in 
that area.



On 12/27/2018 1:27 PM, John Dale wrote:

Greetings!

I'm just getting acquainted with James.

I have it up and running and listening.

I was able to send mail to james from gmail.

I fixed the relaying issue and added 1.1.1.1 as the james dns server.

My message back to gmail, though, gets spooled, but never is delivered.

I made sure my reverse DNS was correct for the mail server.

There are no ERROR level messages in the log files.

27/12/18 18:46:12 INFO  smtpserver: Successfully spooled mail
Mail1545936372121-1 from j...@mydomain.com on 75.76.161.194 for
[jcdw...@gmail.com]

Looking forward to hardening my installation if I can get this to work.

Thanks!

John

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



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



Multiple Databases?

2018-05-08 Thread Jerry Malcolm
I realize this is a completely off-the-wall question... but has there 
been any discussion about breaking the JAMES db into multiple 
databases?  I have a bunch of clients, each with a bunch of accounts.  
And they all want to archive all of their mail and be able to access it 
through the same mail client.  As the years go by, the db just keeps 
growing and growing.  This became acutely obvious when I was recently 
forced by my server provider to migrate to newer hardware, and I 
realized I had to have mail down for a long time while I transferred a 
60gB+ file across a slow connection to the new server.  The db size is 
also making daily backups a problem.


The reality is that 90% of the mail is archived into 'year' folders for 
each of the accounts which are basically "read-only" now.  Only a 
relatively small amount of mail is truly in dynamically updated 
folders.  If there was a way to store "/archives/2002" folders through 
"/archives/2017" folders in one db and all of the other folders in 
another db, it would make backup and migration a much simpler task.


Ok, I'm pretty sure that isn't in the immediate plan.  But just let me 
put my vote in.  Alternatively, is there any alternative to having one 
ever-growing mail db?  Is there some trick with the db server that can 
present one logical db from multiple db files?  (I know a lot about 
databases... but there's still a bunch I don't know).  Has anyone else 
faced/addressed this problem?  Or is the answer to just live with it?


Thanks.

Jerry


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



Java Update Disaster

2018-04-28 Thread Jerry Malcolm

James has been working for months untouched.=C2=A0 This morning I needed to=
=20
reboot the server for other reasons.=C2=A0 When it came back, James would n=
ot=20
start.=C2=A0 It was giving me errors saying camel xml file had syntax error=
s=20
and couldn't parse, etc.=C2=A0 This really blindsided me.=C2=A0 I hadn't do=
ne a=20
thing to change anything.=C2=A0=C2=A0 The root cause of the error was somet=
hing=20
like some jaxb exception class couldn't be found.=C2=A0=C2=A0 I did some go=
ogling=20
and found that jaxb is removed from java SE 9+ (and moved to EE).=C2=A0 I=
=20
checked my java paths, and they still show java 8.=C2=A0 So that "couldn't =
be=20
the problem" Then I remembered a week or so ago, java started=20
yelling at me that it was out of date.=C2=A0 I never auto upgrade if things=
=20
are working.=C2=A0 But when I thought I was dismissing the popup, it said=
=20
something about old files removed.=C2=A0 Bottom line is java apparently=20
upgraded me to java 9 inside the java 8 folder. Maybe not fully... but=20
in any case, jaxb was no longer there.=C2=A0 And it didn't show up until I=
=20
rebooted.

In the forum research someone said that the jaxb files are still there=20
in 9, but you have to call them out.=C2=A0 Add an additional argument:=20
"--add-modules java.xml.bind" on the java command makes them available.

So... I don't really know what the java update did under the covers.=C2=A0=
=20
But it broke james.=C2=A0 Finally, after adding the above arg to the java=
=20
command line, things started working again.=C2=A0 So if you are using Java9=
=20
or higher, or if java appears to have updated you against your wishes,=20
this java command line arg should fix james.


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



Re: Forwarding Mailet

2017-11-02 Thread Jerry Malcolm
If you host both domains on the same server, you can add records to the 
JAMES_Recipient_Rewrite table.  Also, there is a Resend mailet that you 
can use to send to outside domains.  Depending on you specific 
requirements you might need to write a subclass of it to customize it to 
your needs.



On 11/2/2017 4:09 PM, Mark Gordon wrote:

Is there a mailet already written that takes any inbound mail to:
x...@blabla.com and forwards it to x...@zzz.com?

That is it forwards to the same user at a different domain.  The use case
is that we use a domain that we send email out in the From address but this
domain has no real email addresses.  So the from address would be
x...@mail.example.com  so if the customer replied we would want the email to
be forwarded to x...@example.com

Thanks,
-Mark




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



james_mail_userflag not being managed

2017-10-08 Thread Jerry Malcolm
I'm running r3b5.  I have a reasonably large repository with ~1M mail 
records.  I just noticed that the james_mail_userflag table has 1.2 
BILLION records... approximately 1000 records for each email record.  I 
do use user flags a lot.  But I would expect a max of one user flag 
record for each email.  It appears that when email records are deleted, 
(e.g. spam cleanup), then associated userflag records are not being deleted.


Fortunately, I have an imap utility that can rebuild the flags. So I 
emptied out the user flag table. (it cut the database size in half) 
and let the utility rebuild the flags.  But obviously, this is not the 
correct process.


Is this a known issue?

Thanks.

Jerry


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



Re: Training SpamAssassin with JAMES

2017-07-06 Thread Jerry Malcolm
I moved to other problems for a while.  But my uncaught spam is getting 
worse by the day.  SpamAssassin states in its own docs that it going to 
be useless without training (i.e. SA-LEARN).  So I'm back again with 
same problem and question.  SA-LEARN can't interact with the JAMES db 
mail store.  It only deals with file system mail folders/files.  It 
baffles me that I cannot find a SINGLE JAMES user that is using 
SpamAssassin with JAMES.  Is that really the case, or are users just not 
getting around to responding?


Does ANYBODY know how to train the bayesian filter in SpamAssassin 
integrated with JAMES?  If anybody understands the SpamAssassin API 
(assuming there is one), I'll looking into writing a Mailet to do the 
work.  I and all my mail clients are drowning in uncaught spam right now.


By chance is there a utility that will dump a JAMES IMAP user folder 
into a file system MBOX folder?  I 'guess' I could copy a db folder into 
a file system folder, then run sa-learn on it, then erase it.  Sounds 
like duct tape and baling wire... But I HAVE to do SOMETHING.


Please give me some advice.

Thanks.

Jerry


On 8/18/2016 2:20 PM, Jerry Malcolm wrote:
I tried to get answers to this and other questions on the SpamAssassin 
forum.  They basically told me to pound sand and to get a 'real' MTA 
instead of JAMES.  I'm not throwing out everything just to be able to 
do better spam filtering.  But I'm back here looking for answers.  Is 
ANYBODY using SpamAssassin with JAMES?



On 8/14/2016 5:40 PM, Jerry Malcolm wrote:
I am using JAMES with a mySQL mail repository.  I would like to be 
able to train the Bayesian component of SpamAssassin using sa-learn 
or some equivalent. All the documentation I can find on sa-learn 
assumes MBox format files for the folders containing spam/ham.   To 
this point I can't find any documentation related to integrating 
sa-learn with JAMES using a mySQL repository.


Long ago before I was using SpamAssassin, I was using the 
BayesianAnalysisFeeder mailet.  But that is not for SpamAssassin, is 
it?  Is there an equivalent somewhere?  Or just in general, what is 
the typical way everyone who integrates SpamAssassin with JAMES going 
about the process of training SpamAssassin?


BTW... I'm using JAMES 3.0 B5.  But I'm assuming that the answer 
applies to all versions.


Thanks.

Jerry


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



-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2016.0.7752 / Virus Database: 4647/12832 - Release Date: 
08/18/16



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


---
This email has been checked for viruses by AVG.
http://www.avg.com




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



Meaning of "Got : ##" in IMapServer log?

2017-04-27 Thread Jerry Malcolm
Some of my users are getting timeouts periodically in Thunderbird and 
other mail clients when trying to access their mail folders. I enabled 
DEBUG on IMAP (James R3B5).  I'm seeing sessions lasting several minutes 
with an ongoing "tag" count.   I have a pretty good grasp of the IMAP 
API and have written some standalone apps that interface with IMAP.  But 
I don't really understand what Tbird is doing.Is this 'tag' just 
some ndx that Tbird keeps incrementing, and does Tbird just keep a 
session open forever? I've got to wait until the hang occurs again on 
Tbird for some client and then determine if the logs differ.  But until 
that time, I'd like a better grasp of what I'm seeing in the log below.  
Can someone explain what is flowing back and forth below? Also, is DEBUG 
the most granular I can go in JAMES log4j?  I'd love to see when each 
command completes and not just when it starts.


DEBUG 18:22:44,249 | james.imapserver | ID=27822739 Got : 21
DEBUG 18:22:44,249 | james.imapserver | ID=27822739 Got : IDLE
DEBUG 18:22:44,249 | james.imapserver | ID=27822739 Loaded mailbox 
#private:fred@f

DEBUG 18:24:44,359 | james.imapserver | ID=27822739 Got : 22
DEBUG 18:24:44,359 | james.imapserver | ID=27822739 Got : noop
DEBUG 18:24:44,359 | james.imapserver | ID=27822739 Loaded mailbox 
#private:fred@f

DEBUG 18:24:44,406 | james.imapserver | ID=27822739 Got : 23
DEBUG 18:24:44,406 | james.imapserver | ID=27822739 Got : UID
DEBUG 18:24:44,406 | james.imapserver | ID=27822739 Loaded mailbox 
#private:fred@f
DEBUG 18:24:44,406 | james.imapserver | ID=27822739 Loaded mailbox 
#private:fred@f

DEBUG 18:24:44,515 | james.imapserver | ID=27822739 Got : 24
DEBUG 18:24:44,515 | james.imapserver | ID=27822739 Got : IDLE
DEBUG 18:24:44,515 | james.imapserver | ID=27822739 Loaded mailbox 
#private:fred@f

DEBUG 18:25:42,569 | james.imapserver | ID=27822739 Got : 25
DEBUG 18:25:42,569 | james.imapserver | ID=27822739 Got : check
DEBUG 18:25:42,571 | james.imapserver | ID=27822739 Loaded mailbox 
#private:fred@f

DEBUG 18:25:42,619 | james.imapserver | ID=27822739 Got : 26
DEBUG 18:25:42,619 | james.imapserver | ID=27822739 Got : UID
DEBUG 18:25:42,621 | james.imapserver | ID=27822739 Loaded mailbox 
#private:fred@f
DEBUG 18:25:42,641 | james.imapserver | ID=27822739 Loaded mailbox 
#private:fred@f

DEBUG 18:25:42,735 | james.imapserver | ID=27822739 Got : 27
DEBUG 18:25:42,735 | james.imapserver | ID=27822739 Got : IDLE
DEBUG 18:25:42,735 | james.imapserver | ID=27822739 Loaded mailbox 
#private:fred@f

DEBUG 18:27:42,839 | james.imapserver | ID=27822739 Got : 28
DEBUG 18:27:42,839 | james.imapserver | ID=27822739 Got : noop
DEBUG 18:27:42,841 | james.imapserver | ID=27822739 Loaded mailbox 
#private:fred@f

DEBUG 18:27:42,888 | james.imapserver | ID=27822739 Got : 29
DEBUG 18:27:42,888 | james.imapserver | ID=27822739 Got : UID
DEBUG 18:27:42,890 | james.imapserver | ID=27822739 Loaded mailbox 
#private:fred@f
DEBUG 18:27:42,896 | james.imapserver | ID=27822739 Loaded mailbox 
#private:fred@f

DEBUG 18:27:43,003 | james.imapserver | ID=27822739 Got : 30
DEBUG 18:27:43,003 | james.imapserver | ID=27822739 Got : IDLE


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



Re: OOM on Specific Emails

2017-04-26 Thread Jerry Malcolm
I've decided to take this in steps.  My first objective is to just kill 
the email the first time it causes an OOM and at least stop it from 
going into an infinite loop trying to re-process it. My plan is to 
modify SetMimeHeader.java and add to to catch block.  But I need help on 
what I can do to kill the email.  Is there anything I can set in the 
Mail object or the MimeMessage object that will cause JAMES to just kill 
it or at least get it into a suspended state so JAMES won't restart it?


Thx.

BTW... my next step is to analyze the message in that same catch block 
before killing it and hopefully figure out the characteristic that is 
causing the OOM and simply kill it before the OOM can even occur.  But 
that's phase 2  Just want to stop the infinite loop first.



On 4/25/2017 11:39 AM, Jerry Malcolm wrote:

Benoit,

Thanks so much for the information.  This has definitely been a 
frustration.  I'm glad that there is some hope at getting around it.


You mentioned a SizeGreaterThan matcher.  Two questions

1) How can I determine the threshold/limit size?  I don't want to kill 
off good emails just because they are a bit large.  But I want to 
definitely get rid of the ones that are causing the problem.


2) If I do get a hit, what processor do I call that will discard the 
email and not risk further processing that might still cause the OOM?


Thanks again for the help.

Jerry


On 4/21/2017 11:57 PM, Benoit Tellier wrote:

Hi,

You are processing a too large email. SetMimeHeader mailet is modifying
your email, but fails allocating more resources.

This may be caused to a missing pre-allocation parameter in
ByteArrayOutputStream. This sounds from the stacktrace like a limitation
of the javax implementation. (You might get very long headers on this
mail, I guess)

We had some recent work with javax, and it might be interesting to know
if this limitation is still here.

You get the error on a recurrent bases as James is marking processing as
failed and will re-attend it. You might want to position a
"SizeGreaterThan" matcher to defend against this.

Hope this helps,

Thanks for the report,

Benoit

Le 22/04/2017 à 05:27, Jerry Malcolm a écrit :
I have James R3B5.  It's been working fine for over 2 years.  But in 
the

last few months I randomly start getting repeated OutOfMemory
exceptions.   The only fix I've found is to delete the var folder and
reboot.  The OOM entry in the log is always preceded by an error 
related

to one particular email.  The error and an OOM repeat continually for
that email until I delete the var folder.

Since it will sometimes go a week or two without an OOM and then for a
few days it will happen every few hours, I'm pretty certain is has 
to do
with some specific spam message coming in that JAMES is not 
handling.  I

don't know enough about the inner workings of JAMES to interpret this
stack trace.  I can make a patch and rebuild if I can just figure out
where to patch a workaround for this.  Can someone point me in the 
right

direction?

Log file: (this block is replicated 20-25+ times in the log file for 
the

same msg id;  Looks to me like the camel processor is in an infinite
loop until OOM occurs)

BTW... my heap is now set to 1024m.  I kept increasing it hoping for a
change.  But it looks like its going to fill up no matter what size I
make it.

ERROR 15:04:19,491 | org.apache.camel.processor.DefaultErrorHandler |
Failed delivery for (MessageId: ID-p3965917-56475-1492805025650-0-1 on
ExchangeId: ID-p3965917-56475-1492805025650-0-62). Exhausted after
delivery attempt: 1 caught: org.apache.camel.CamelExecutionException:
Exception occurred during execution on the exchange: Exchange[Message:
org.apache.james.core.MailImpl@bf4cc8]
org.apache.camel.CamelExecutionException: Exception occurred during
execution on the exchange: Exchange[Message:
org.apache.james.core.MailImpl@bf4cc8]
 at
org.apache.camel.util.ObjectHelper.wrapCamelExecutionException(ObjectHelper.java:1287) 



 at
org.apache.camel.impl.DefaultExchange.setException(DefaultExchange.java:282) 



 at
org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:64) 



 at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73) 



 at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99) 



 at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90) 



 at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73) 



 at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99) 



 at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90) 



 at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcess

Re: OOM on Specific Emails

2017-04-25 Thread Jerry Malcolm

Benoit,

Thanks so much for the information.  This has definitely been a 
frustration.  I'm glad that there is some hope at getting around it.


You mentioned a SizeGreaterThan matcher.  Two questions

1) How can I determine the threshold/limit size?  I don't want to kill 
off good emails just because they are a bit large.  But I want to 
definitely get rid of the ones that are causing the problem.


2) If I do get a hit, what processor do I call that will discard the 
email and not risk further processing that might still cause the OOM?


Thanks again for the help.

Jerry


On 4/21/2017 11:57 PM, Benoit Tellier wrote:

Hi,

You are processing a too large email. SetMimeHeader mailet is modifying
your email, but fails allocating more resources.

This may be caused to a missing pre-allocation parameter in
ByteArrayOutputStream. This sounds from the stacktrace like a limitation
of the javax implementation. (You might get very long headers on this
mail, I guess)

We had some recent work with javax, and it might be interesting to know
if this limitation is still here.

You get the error on a recurrent bases as James is marking processing as
failed and will re-attend it. You might want to position a
"SizeGreaterThan" matcher to defend against this.

Hope this helps,

Thanks for the report,

Benoit

Le 22/04/2017 à 05:27, Jerry Malcolm a écrit :

I have James R3B5.  It's been working fine for over 2 years.  But in the
last few months I randomly start getting repeated OutOfMemory
exceptions.   The only fix I've found is to delete the var folder and
reboot.  The OOM entry in the log is always preceded by an error related
to one particular email.  The error and an OOM repeat continually for
that email until I delete the var folder.

Since it will sometimes go a week or two without an OOM and then for a
few days it will happen every few hours, I'm pretty certain is has to do
with some specific spam message coming in that JAMES is not handling.  I
don't know enough about the inner workings of JAMES to interpret this
stack trace.  I can make a patch and rebuild if I can just figure out
where to patch a workaround for this.  Can someone point me in the right
direction?

Log file: (this block is replicated 20-25+ times in the log file for the
same msg id;  Looks to me like the camel processor is in an infinite
loop until OOM occurs)

BTW... my heap is now set to 1024m.  I kept increasing it hoping for a
change.  But it looks like its going to fill up no matter what size I
make it.

ERROR 15:04:19,491 | org.apache.camel.processor.DefaultErrorHandler |
Failed delivery for (MessageId: ID-p3965917-56475-1492805025650-0-1 on
ExchangeId: ID-p3965917-56475-1492805025650-0-62). Exhausted after
delivery attempt: 1 caught: org.apache.camel.CamelExecutionException:
Exception occurred during execution on the exchange: Exchange[Message:
org.apache.james.core.MailImpl@bf4cc8]
org.apache.camel.CamelExecutionException: Exception occurred during
execution on the exchange: Exchange[Message:
org.apache.james.core.MailImpl@bf4cc8]
 at
org.apache.camel.util.ObjectHelper.wrapCamelExecutionException(ObjectHelper.java:1287)

 at
org.apache.camel.impl.DefaultExchange.setException(DefaultExchange.java:282)

 at
org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:64)

 at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)

 at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)

 at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)

 at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)

 at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)

 at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)

 at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:73)

 at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)

 at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)

 at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)

 at
org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:91)

 at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)

 at
org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:334)

 at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:220)

 at
org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcess

OOM on Specific Emails

2017-04-21 Thread Jerry Malcolm
I have James R3B5.  It's been working fine for over 2 years.  But in the 
last few months I randomly start getting repeated OutOfMemory 
exceptions.   The only fix I've found is to delete the var folder and 
reboot.  The OOM entry in the log is always preceded by an error related 
to one particular email.  The error and an OOM repeat continually for 
that email until I delete the var folder.


Since it will sometimes go a week or two without an OOM and then for a 
few days it will happen every few hours, I'm pretty certain is has to do 
with some specific spam message coming in that JAMES is not handling.  I 
don't know enough about the inner workings of JAMES to interpret this 
stack trace.  I can make a patch and rebuild if I can just figure out 
where to patch a workaround for this.  Can someone point me in the right 
direction?


Log file: (this block is replicated 20-25+ times in the log file for the 
same msg id;  Looks to me like the camel processor is in an infinite 
loop until OOM occurs)


BTW... my heap is now set to 1024m.  I kept increasing it hoping for a 
change.  But it looks like its going to fill up no matter what size I 
make it.


ERROR 15:04:19,491 | org.apache.camel.processor.DefaultErrorHandler | 
Failed delivery for (MessageId: ID-p3965917-56475-1492805025650-0-1 on 
ExchangeId: ID-p3965917-56475-1492805025650-0-62). Exhausted after 
delivery attempt: 1 caught: org.apache.camel.CamelExecutionException: 
Exception occurred during execution on the exchange: Exchange[Message: 
org.apache.james.core.MailImpl@bf4cc8]
org.apache.camel.CamelExecutionException: Exception occurred during 
execution on the exchange: Exchange[Message: 
org.apache.james.core.MailImpl@bf4cc8]
at 
org.apache.camel.util.ObjectHelper.wrapCamelExecutionException(ObjectHelper.java:1287)
at 
org.apache.camel.impl.DefaultExchange.setException(DefaultExchange.java:282)
at 
org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:64)
at 
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
at 
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
at 
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
at 
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
at 
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
at 
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
at 
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:73)
at 
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
at 
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
at 
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
at 
org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:91)
at 
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
at 
org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:334)
at 
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:220)
at 
org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
at 
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
at 
org.apache.camel.processor.interceptor.DefaultChannel.process(DefaultChannel.java:303)
at 
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
at 
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
at 
org.apache.camel.processor.ChoiceProcessor.process(ChoiceProcessor.java:81)
at 
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
at 
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
at 
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
at 
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:73)
at 
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
at 
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
at 
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
at 
org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:91)
at 
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
at 

Re: Moving Archived Messages Out of Database

2017-03-27 Thread Jerry Malcolm

I'm using MySQL.

I'd love to get better performance on large folders.  However, I'd 
prefer to make clients move old archive folders completely off the 
server and store locally (the way POP3 does).  Since IMAP doesn't 
support doing that directly, I'm looking for suggestions on how to move 
hundreds of thousands of emails off the server completely.


Thanks.

Jerry

On 3/27/2017 2:37 AM, Matthieu Baechler wrote:

Hi,

I can confirm what Benoit said : making large mailboxes fast is not a 
easy task.


However, it's not impossible to do, it's just a matter of preparing 
the data for SELECT to being fast.


What mailbox backend are you using ?

Regards,




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



Ramifications of Deleting 'var' in James 3?

2016-12-27 Thread Jerry Malcolm
I've been on James 3 for nearly 3 years.  It's a rare occurrence, but 
there have been a few times that the var 'store' has become corrupted.  
Basically, JAMES siezes up, and nothing will get it going again.  I have 
found in these situations (basically through trial and error) that 
deleting the var directory fixes it.  Since deleting var causes JAMES to 
start functioning again, I'm going to assume that there was something 
corrupted in that folder.


After deleting var, I'm not observing any apparent repercussions.  But I 
gotta believe that there cannot be "zero" damage to killing a folder.


Today, it happened again.   From the log, it appears that mail was still 
coming in.  But IMAP was dead.  I tried bouncing JAMES and MySQL.  No 
change.  Tried rebooting the entire box.  Also, no change.  The errors 
below were showing up in the log.   I removed the var folder (actually 
just renamed it), and everything is back to running fine.


My one question what damage did I do?  Did I lose mail that might 
have come in during the several hours it froze before I noticed the 
problem?  BTW... it's James 3.0b5 running on WinServer2008 r2.


Log entries:

WARN  16:44:07,985 | org.apache.activemq.store.amq.AMQPersistenceAdapter 
| The ReferenceStore is not valid - recovering ...


... with several of these entries:

Caused by: java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Unknown Source)
at java.io.ByteArrayOutputStream.grow(Unknown Source)
at java.io.ByteArrayOutputStream.ensureCapacity(Unknown Source)
at java.io.ByteArrayOutputStream.write(Unknown Source)
at 
javax.mail.internet.MimeMultipart.readTillFirstBoundary(MimeMultipart.java:316)

..

ERROR 16:46:16,968 | james.mailspooler | Exception processing mail while 
spooling Unable to process mail 
Mail1482864159130-1b87a776-1f41-41d5-951b-ab7b2ed94d04 
(org.apache.camel.CamelExecutionException: Exception occurred during 
execution on the exchange: Exchange[Message: 
org.apache.james.core.MailImpl@c96e9e])
javax.mail.MessagingException: Unable to process mail 
Mail1482864159130-1b87a776-1f41-41d5-951b-ab7b2ed94d04 
(org.apache.camel.CamelExecutionException: Exception occurred during 
execution on the exchange: Exchange[Message: 
org.apache.james.core.MailImpl@c96e9e])
at 
org.apache.james.mailetcontainer.impl.camel.CamelMailetProcessor.service(CamelMailetProcessor.java:65)
at 
org.apache.james.mailetcontainer.lib.AbstractStateCompositeProcessor.service(AbstractStateCompositeProcessor.java:98)
at 
org.apache.james.mailetcontainer.impl.JamesMailSpooler$1.run(JamesMailSpooler.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown 
Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown 
Source)

at java.lang.Thread.run(Unknown Source)


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



Re: JAMES website?

2016-09-25 Thread Jerry Malcolm
I understand how spf works.  I need the javadoc to the jspf classes so I 
can program to them.



On 9/25/2016 1:20 PM, Luuk wrote:

On 25-09-16 19:52, Jerry Malcolm wrote:
Thanks for the info.  I'm curious, though, why the need to take the 
old site down before having the new site up.


I'm trying to find the documentation for using jspf.  Is there an 
alternate site that might have that documentation until the new james 
site is up?





not james specific, but specific to spf:
http://www.openspf.org/



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



-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2016.0.7797 / Virus Database: 4656/13081 - Release Date: 
09/25/16



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



Re: JAMES website?

2016-09-25 Thread Jerry Malcolm
Thanks for the info.  I'm curious, though, why the need to take the old 
site down before having the new site up.


I'm trying to find the documentation for using jspf.  Is there an 
alternate site that might have that documentation until the new james 
site is up?



On 9/25/2016 12:38 PM, Ioan Eugen Stan wrote:

I just read an email from Eric Charles. He moved the website to
gitpubsub and was working on publishing it.

Maybe this is the reason?


On 25.09.2016 19:39, Jerry Malcolm wrote:

Is the JAMES website getting some work done?  I get a 404 on
http://james.apache.org/


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


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



-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2016.0.7797 / Virus Database: 4656/13081 - Release Date: 09/25/16



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



  1   2   >