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: Problems connecting to Cassandra using Docker

2019-10-29 Thread David Leangen


Hi Benoit,

Thank you very much for your hints. That gives me some ideas of a few more 
things I can investigate.

Cheers,
=David




> On Oct 29, 2019, at 12:58, Tellier Benoit  wrote:
> 
> Hello David,
> 
> - 1. Does the `cassandra` DNS entry within the James container resolves
> to Cassandra? (this can be achieved with links or network).
> 
> - 2. A restarting Cassandra (with many data in the commitlog) might
> reject clients. Monitor Cassandra logs to check if this happens.
> 
> I also noticed you used an unoffical image for Cassandra. Could this be
> a cause for your issue? Are you sure cassandra is well started after
> your configuration modifications?
> 
> Cheers,
> 
> Benoit
> 
> On 28/10/2019 13:07, David Leangen wrote:
>> 
>> Hi!
>> 
>> I am sure the problem is due to my inexperience with Docker and Cassandra, 
>> and even more so networking between multiple Docker containers… but I have 
>> tried everything I can think of and would like to ask for some help. 
>> 
>> I am getting this error:
>> 
>> [root@e5cc3846b51c apache-james-3.3.0]# java 
>> -Dworking.directory=/opt/apache-james-3.3.0 -jar 
>> server/container/guice/cassandra-guice/target/james-server-cassandra-guice.jar
>> 2019-10-28 05:51:54,981 WARN  [main] - 
>> [org.apache.james.modules.mailbox.ResilientClusterProvider]- Error 
>> establishing Cassandra connection. Next retry scheduled in PT5S ms
>> com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) 
>> tried for query failed (tried: /172.17.0.2:9042 
>> (com.datastax.driver.core.exceptions.TransportException: [/172.17.0.2:9042] 
>> Cannot connect))
>> 
>> 
>> The error is shown when I try to run JAMES from within a Docker container.
>> 
>> Cassandra is up and running, and ought to be available via the IP address 
>> 172.17.0.2, on port 9042.
>> 
>> [root@james ~]# ip addr
>> 1: lo: 
>> 2: eth0: 
>> 3: eth1: 
>> 4: docker0:  mtu 1500 qdisc noqueue state 
>> UP group default 
>>link/ether 02:42:76:5f:17:bb brd ff:ff:ff:ff:ff:ff
>>inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
>>   valid_lft forever preferred_lft forever
>>inet6 fe80::42:76ff:fe5f:17bb/64 scope link 
>>   valid_lft forever preferred_lft forever
>> 10: veth81426b0@if9:  mtu 1500 qdisc 
>> noqueue master docker0 state UP group default 
>>link/ether 1a:70:e2:f3:7e:70 brd ff:ff:ff:ff:ff:ff link-netnsid 0
>>inet6 fe80::1870:e2ff:fef3:7e70/64 scope link 
>>   valid_lft forever preferred_lft forever
>> 12: vethc13d660@if11:  mtu 1500 qdisc 
>> noqueue master docker0 state UP group default 
>>link/ether 5a:fd:2d:ad:df:12 brd ff:ff:ff:ff:ff:ff link-netnsid 1
>>inet6 fe80::58fd:2dff:fead:df12/64 scope link 
>>   valid_lft forever preferred_lft forever
>> 
>> The two virtual ethernet ports are for the james and cassandra containers.
>> 
>> Here is the run command for cassandra:
>> 
>> docker run \
>>  -dit \
>>  -v /home/cassandra/conf:/opt/cassandra/latest/conf \
>>  -v /home/cassandra/data:/data \
>>  -v /home/cassandra/commitlog:/commitlog \
>>  -v /home/cassandra/saved_caches:/saved_caches \
>>  -v /home/cassandra/hints:/hints \
>>  -p 7000:7000 \
>>  -p 7001:7001 \
>>  -p 7199:7199 \
>>  -p 9042:9042 \
>>  -p 9160:9160 \
>>  --ulimit memlock=-1:-1 \
>>  --memory='1g' \
>>  --name=cassandra \
>>  dleangen/cassandra:3.11.4
>> 
>> 
>> Here is docker ps from the host:
>> 
>> [root@james ~]# docker ps
>> CONTAINER IDIMAGE   COMMAND CREATED  
>>STATUS  PORTS 
>>  NAMES
>> e5cc3846b51cdleangen/james:3.3.0"/bin/bash" 7 
>> minutes ago   Up 7 minutes   
>> 
>> youthful_pascal
>> 1fefe86df493dleangen/cassandra:3.11.4   "cassandra -f"  9 
>> minutes ago   Up 9 minutes0.0.0.0:7000-7001->7000-7001/tcp, 
>> 0.0.0.0:7199->7199/tcp, 0.0.0.0:9042->9042/tcp, 0.0.0.0:9160->9160/tcp   
>> cassandra
>> 
>> Here is the /etc/hosts file in the Cassandra container:
>> 
>> bash-4.2$ more /etc/hosts
>> 127.0.0.1localhost
>> ::1  localhost ip6-localhost ip6-loopback
>> fe00::0  ip6-localnet
>> ff00::0  ip6-mcastprefix
>> ff02::1  ip6-allnodes
>> ff02::2  ip6-allrouters
>> 172.17.0.2   1fefe86df493
>> 
>> 
>> Cassandra is up. I tested that it is indeed available from within the Docker 
>> container over 127.0.0.1.
>> 
>> So how the heck do I get my james container to be able to connect to it??
>> 
>> (I plan to use Docker Compose later… right now I’m trying to just connect my 
>> containers directly.)
>> 
>> 
>> Thank you in advance for your help!!! 
>> 
>> Cheers,
>> =David
>> 
>> 
> 
> -
> To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org
> For