Re: How to monitor IMAP protocol?

Marc Chamberlin <[email protected]>
Newsgroups gmane.comp.jakarta.james.user
Message-ID <[email protected]>
Hello again Benoit,  I will intersperse my answers within your 
questions/suggestions below....


On 5/1/23 21:47, Benoit TELLIER wrote:
> Hello Marc,
>
> The Spring server is definitly not my cup of tea but I will try helping.
>
>  => Which James release are you running exactly?
Good question! I don't see any way to get the server to report it's 
exact version or other identification numbers. The cli does not document 
a query for retrieving it. So the best I can report is what the package 
descriptor says when I downloaded it. - james-server-app-3.4.0-SNAPSHOT
>
>  => Just in case provide a James thread dump when the issue arise 
> (jstack PID)...
I placed a copy of the output on paste.opensuse.org - 
https://paste.opensuse.org/pastes/5888be1d6c4d
>
> Also moder Spring versions uses Log4J 2 , whose configuration do not 
> follow the syntax shown here. CF 
> https://github.com/apache/james-project/blob/james-project-3.7.4/server/apps/spring-app/src/main/resources/log4j2.xml

Um I guess I am not following you, and am not sure what you are 
recommending me to do. Are you saying that the syntax I used in the 
log4j.properties file is wrong? I just took a "monkey see, monkey do" 
approach when I set up the log4j.properties file using the example that 
was given.

>
> Hope it helps...
It does, again thanks for helping me, much appreciated!    Marc...
>
> Best regards,
>
> Benoit TELLIER
>
> On 02/05/2023 11:15, Marc Chamberlin wrote:
>> Hi Benoit, and thanks a million for your reply.  Yes, I have used 
>> telnet to make a connection on both the imap and smtp ports that my 
>> Apache James email server is listening on. I have successfully 
>> simulated sending and receiving emails by manually typing in the 
>> appropriate commands with lots of joy! Seems to work OK when making 
>> telnet connections just fine.
>>
>> However, what I am seeing when using Thunderbird as an email client, 
>> is that when doing something multiple times, the connection and 
>> commands work for a little while then things freeze up. For example, 
>> when fetching emails from the imap service, I get a few emails and 
>> then it hangs up. Ditto for running filters, the filters run for a 
>> bit, move a few emails, then hangs up. I don't know what the magic 
>> is, for getting back on track reliably, either. Sometimes restarting 
>> James and/or Thunderbird does the trick, but more often it keeps on 
>> failing for awhile and when I come back later it is running OK again. 
>> (again for a little while) So I would like to see what is going on 
>> with the imap and smtp communication layer itself to see if I can get 
>> any ideas.
>>
>> I have looked at the Apache James log files also, of course, and no 
>> joy discovering anything useful yet. One thing I do note is that only 
>> the james-server.log and the wrapper.log files contain any 
>> information. There are other files created, such as an imapserver.log 
>> file, but it does not contain anything. I wonder if I have a 
>> misconfiguration somewhere that is not allowing logging info to be 
>> directed to these other files. I can't find any thing wrong with my 
>> configuration files either, so for now I have set that problem aside 
>> while I try to pursue the more serious problem of some kind of a 
>> spotty connection issue. Maybe getting those other log files working 
>> would provide me with the information I need to solve this?
>>
>> I also see in the two log files that do contain information, 
>> exception errors with walk-back stack traces, but those seem 
>> unrelated to what I am doing at the time. (I get a LOT of bots doing 
>> brute force attacks against my server and a lot of these exception 
>> errors seem to be related to those attacks.)
>>
>> I am using the Spring wiring for Apache James, and believe with log4j 
>> logging. I will show the relevant property setting from the 
>> log4j.properties files for the imap service. Why nothing is showing 
>> up in the imapserver.log file is above my pay grade to grok.
>>
>> log4j.appender.IMAPSERVER=org.apache.log4j.DailyRollingFileAppender
>> log4j.appender.IMAPSERVER.File=../log/imapserver.log
>> log4j.appender.IMAPSERVER.DatePattern='.'yyyy-MM-dd
>> log4j.appender.IMAPSERVER.layout=org.apache.log4j.PatternLayout
>> log4j.appender.IMAPSERVER.layout.ConversionPattern=%-5p 
>> %d{HH:mm:ss,SSS} | %c | %m%n
>> ... more stuff not shown here
>> log4j.logger.james=DEBUG, CONS, FILE
>> log4j.logger=DEBUG, CONS, FILE
>> ... more stuff not shown here
>> log4j.logger.james.imapserver=DEBUG, IMAPSERVER
>>
>> HTH...  Marc
>>
>>
>> On 5/1/23 08:14, Benoit TELLIER wrote:
>>> Hello Mark
>>>
>>>  -> James should output error logs. Be it logback for Guice or Log4J 
>>> for spring
>>>  -> Our arsenal also have awesome metrics integrated wit Prometheux 
>>> stack (guice only) or in logs
>>>
>>> For your case, have you tried some commands yourself in telnet? I 
>>> suspect a connection problem, for instance firewall...
>>>
>>> Best regards,
>>>
>>> Benoit
>>>
>>> On 01/05/2023 00:19, Marc Chamberlin wrote:
>>>> Hello, After doing a bit or reorganization of where the location of 
>>>> installation files for Apache James, and or some updates I received 
>>>> from Linux OpenSuSE 15.3 x64, something broke and I am now 
>>>> experiencing some behavioral issues with my Thunderbird client -
>>>>
>>>> Thunderbird - version 91.11.0 (64-bit)
>>>> Apache James - version 3.4
>>>>
>>>> For example, I cannot seem to move some emails out of my Inbox 
>>>> folder, and put them in another sub-folder. I don't see any error 
>>>> messages, either from Thunderbird itself, nor in any of the log 
>>>> files from the Apache James server. And the moved emails do 
>>>> disappears from the Inbox folder temporarily only to reappear back 
>>>> in the Inbox folder a little later. Another symptom that has show 
>>>> up is Thunderbird keeps reporting that it cannot save a copy of my 
>>>> draft emails while I am composing it.
>>>>
>>>> So my question is, what is the best way to monitor the IMAP 
>>>> protocol communication that is going on between my Thunderbird 
>>>> email client, and the Apache James server? Can I capture it via the 
>>>> log files for Apache James or must I learn how to use a low level 
>>>> network monitor such as Wireshark? If the latter, are there any 
>>>> gurus around to show me how to capture just the IMAP communication?
>>>>
>>>> As always, much appreciate any thoughts and advise and thanks for 
>>>> taking the time to help me!    Marc C
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [email protected]
>>> For additional commands, e-mail: [email protected]
>>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>

-- 
--...  ...-- .----. ...    -..  .    .--  .-  --...  .--.  -..-  .--     --  .-  .-.  -.-.
<b>Computers: the final frontier. These are the voyages of the user Marc.<br>
His mission: to explore strange new hardware. To seek out new software and new applications.<br>
To boldly go where no Marc has gone before!<br></b>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.