Re: Help with "no domain found" error James 3.8.0
OK thanks Rene. I'm finding the logs a bit challenging, the main use for logs for our use is to track down deliverability issues, but in order to do this we need to turn on debug logging, for example: 16:36:59.492 [DEBUG] o.a.j.t.m.r.d.MailDelivrer - Temporary exception delivering mail (Mail1704386217842-49641a56-f7cf-43c3-911f-bf83b88a4fd4-to-aol.com). RemoteHost said: 421 4.7.0 [TSS04] Messages from 13.82.57.241 temporarily deferred due to unexpected volume or user complaints - 4.16.55.1; see https://postmaster.yahooinc.com/error-codes But this then generates 500+ Mb per day which is a lot to look through. Any tips on how to better manage this would be great. Thanks Matt On Wed, 13 Dec 2023 at 04:14, Rene Cordier wrote: > Hi Matt, > > No problem actually I think. Looking at the code: > > https://github.com/apache/james-project/blob/master/server/data/data-jpa/src/main/java/org/apache/james/domainlist/jpa/JPADomainList.java#L164 > > We can see that it's just a debug log saying it tried to look if the > domain existed internally or not, it didn't find it. James logged it > then as a debug log and then returns false (so no error). > > A bit verbose but my guess is also you are probably in a testing phase > with debug logs enabled? If you turn off the debug logs in logback > configuration file, you should not see them anymore I believe. But > nothing to be alarmed of I think :) > > Best regards, > > Rene. > > > On 12/13/23 10:34, Tung Tran wrote: > > It just a JPAQuery, the JamesDomain is an entity of table JAMES_DOMAIN. > > :name is a "dynamic marker" as you wrote. > > > > > https://github.com/apache/james-project/blob/d7a4f45fa4d248a4911612eb367cef72e56c5f8c/server/data/data-jpa/src/main/java/org/apache/james/domainlist/jpa/model/JPADomain.java#L33 > > > > > > > > On 12/12/2023 18:42, Matt Pryor wrote: > >> Hi all, I'm still seeing this error in the logs after setting the domain > >> using the webadmin: > >> > >> javax.persistence.NoResultException: Query "SELECT domain FROM > >> JamesDomain > >> domain WHERE domain.name=:name" selected no result, but expected unique > >> result. > >>at > >> > org.apache.openjpa.persistence.QueryImpl.getSingleResult(QueryImpl.java:346) > > >> > >>at > >> > org.apache.james.domainlist.jpa.JPADomainList.containsDomainInternal(JPADomainList.java:162) > > >> > >>at > >> > org.apache.james.domainlist.jpa.JPADomainList.containsDomainInternal(JPADomainList.java:100) > > >> > >>at > >> > org.apache.james.domainlist.lib.AbstractDomainList.containsDomain(AbstractDomainList.java:179) > > >> > >>at > >> > org.apache.james.mailetcontainer.impl.LocalResourcesImpl.isLocalServer(LocalResourcesImpl.java:67) > > >> > >> > >> Please can you help me understand what this query is doing and what > >> is it > >> querying? There is no "JamesDomain" table in the tables generated in our > >> SQL Server database (there is a James_Domain). > >> I presume :name is a dynamic marker, in which case what will it be > >> setting > >> the value to? > >> > >> Below is a list of tables generated by James in SQL Server: > >> > >> JAMES_DOMAIN > >> JAMES_MAIL > >> JAMES_MAILBOX > >> JAMES_MAILBOX_ANNOTATION > >> JAMES_MAIL_PROPERTY > >> JAMES_MAIL_REPOS > >> JAMES_MAIL_STORE > >> JAMES_MAIL_USERFLAG > >> JAMES_MAX_DOMAIN_MESSAGE_COUNT > >> JAMES_MAX_DOMAIN_STORAGE > >> JAMES_MAX_GLOBAL_MESSAGE_COUNT > >> JAMES_MAX_Global_STORAGE > >> JAMES_MAX_USER_MESSAGE_COUNT > >> JAMES_MAX_USER_STORAGE > >> JAMES_QUOTA_CURRENTQUOTA > >> JAMES_RECIPIENT_REWRITE > >> JAMES_SIEVE_QUOTA > >> JAMES_SIEVE_SCRIPT > >> JAMES_SUBSCRIPTION > >> JAMES_USER > >> OPENJPA_SEQUENCE_TABLE > >> > >> Thanks and kind regards > >> Matt > >> > >> > >> > >> > >> > >> On Thu, 26 Oct 2023 at 12:41, Matt Pryor > >> > >> wrote: > >> > >>> Many thanks René! > >>> > >>> On Thu, 26 Oct 2023 at 03:32, René CORDIER > >>> wrote: > >>> > Hi Matt, > > On addition to using the cli, you have also other ways: > > - using webadmin: > > https://james.apache.org/server/manage-webadmin.html#Administrating_domains > > > - the domainlist.xml file. localhost is configured as > defaultDomain, but > you can add extra domains in `domainnames.domainname`, which is a > list, > spearated by "," I think... it's undocumented, looks rather obscur > (as a > name) and doesn't seem really tested in the code I realized > though... Might > need to add a little something there :) > > Best regards, > > Rene. > > > On Oct 26, 2023 1:36 AM, from Matt Pryor Thanks a lot Tung will try > that > tomorrow. > > > On Wed, 25 Oct 2023 at 16:33, Tung Tran wrote: > > > Hi > > Have you created a domain name yet? > > By admin api, James Command line... > > Ex: james.apache.org/server/manage-cli.html#Manage_Domains > > > > Tung, > > > > On 25/10/2023 22:16, Matt Pryor wrote: > >>
Advice sought for mailets
Hi there I am hoping to implement three custom mailets for our James 3.8.0 installation: 1) to be called when an email is submitted via SMTP 2) to be called when an email is successfully delivered OR 3) to be called when an email permanently fails to deliver I was hoping to be able to tie the submission and success / failures together based on message ID. Is this possible and if so, can someone advise where best to place the mailet tags? I've tried this (in mailetcontainer.xml) but it doesn't seem to be getting called although I can see it gets initiated on startup: bounces false ./bounces/ Thanks and kind regards Matt -- Kind regards Matt Pryor Software Developer The International Presence Group of Companies EMAIL: pr...@presencebpm.com URL: www.International-presence.com
Re: Advice sought for mailets
Hello Matt, 1. is easy: just put it at the beginning of the transport protocol. 2. is slightly more challenging: a. For RemoteDelivery use onSuccess property to pass a callback upon success (need another processor) b. For LocalDelivery pass property consume to false and handle success afterward il a processor called "local-delivery" is a common practice. 3. is slightly harder. You would need to plug your logic in the various places handling all kind of error: error processor, rrt-error processor, bounces processor, local-address-error, relay-denied ... Hope this helps. Best regards, Benoit On 08/01/2024 13:51, Matt Pryor wrote: Hi there I am hoping to implement three custom mailets for our James 3.8.0 installation: 1) to be called when an email is submitted via SMTP 2) to be called when an email is successfully delivered OR 3) to be called when an email permanently fails to deliver I was hoping to be able to tie the submission and success / failures together based on message ID. Is this possible and if so, can someone advise where best to place the mailet tags? I've tried this (in mailetcontainer.xml) but it doesn't seem to be getting called although I can see it gets initiated on startup: bounces false ./bounces/ Thanks and kind regards Matt - To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org For additional commands, e-mail: server-user-h...@james.apache.org
Re: All incoming email going to spam folder
On 07/01/2024 11:18, Jim Smith wrote: James server 2.3 My office email server was down over the holiday period, and on restarting it all incoming mail is now going to a spam folder on the server. I use fetchmail to bring in mail from various sources to james and pop3 server to access the mail from james. I have an smtp gateway configured pointing to the mail server for an externally hosted domain. As far as I can see, all mail coming in through fetchmail is sent to spam. There is almost nothing in the logs. Fetchmail processing seems to be normal. The only anomaly I can see is in mailet.log 05/01/24 17:17:02 INFO James.Mailet: RemoteDelivery: maxRetries is larger than total number of attempts specified. Increasing last delayTime with 19 attempts 05/01/24 17:17:02 INFO James.Mailet: RemoteDelivery: Delay of 2160 msecs is now attempted: 20 times 05/01/24 17:22:56 INFO James.Mailet: ToRepository: Storing mail Mail1704475375634-0 in file://var/mail/spam/ The first 2 lines appear at startup, and the 3rd line is repeated for each incoming email. Questions. 1 Any ideas what is going on? 2 How do I increase the logging level to help me work out what is going on. 3 Currently, I am accessing these emails by moving them into an inbox, and restarting james. Is there any better way of doing this? Thanks to Julian and Roy. The problem was the spam blacklist. For future reference, can someone tell me how to configure logging on 2.3? - To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org For additional commands, e-mail: server-user-h...@james.apache.org
Re: All incoming email going to spam folder
Hello Jim, First of all you are running a very old release of James and should consider upgrading since I don't know if it's "supported" . I believe James 2.x uses log4j 1.x So you could configure logging by placing a log4j.properties files as first as possible on the classpath. See Step 4: Configure in https://james.apache.org/server/quick-start.html . Not all steps might apply for you since the release is old. Regards, Eugen La 08.01.2024 21:19, Jim Smith a scris: On 07/01/2024 11:18, Jim Smith wrote: James server 2.3 My office email server was down over the holiday period, and on restarting it all incoming mail is now going to a spam folder on the server. I use fetchmail to bring in mail from various sources to james and pop3 server to access the mail from james. I have an smtp gateway configured pointing to the mail server for an externally hosted domain. As far as I can see, all mail coming in through fetchmail is sent to spam. There is almost nothing in the logs. Fetchmail processing seems to be normal. The only anomaly I can see is in mailet.log 05/01/24 17:17:02 INFO James.Mailet: RemoteDelivery: maxRetries is larger than total number of attempts specified. Increasing last delayTime with 19 attempts 05/01/24 17:17:02 INFO James.Mailet: RemoteDelivery: Delay of 2160 msecs is now attempted: 20 times 05/01/24 17:22:56 INFO James.Mailet: ToRepository: Storing mail Mail1704475375634-0 in file://var/mail/spam/ The first 2 lines appear at startup, and the 3rd line is repeated for each incoming email. Questions. 1 Any ideas what is going on? 2 How do I increase the logging level to help me work out what is going on. 3 Currently, I am accessing these emails by moving them into an inbox, and restarting james. Is there any better way of doing this? Thanks to Julian and Roy. The problem was the spam blacklist. For future reference, can someone tell me how to configure logging on 2.3? - 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: Help with "no domain found" error James 3.8.0
Hi, You can use `SizeAndTimeBasedRollingPolicy` in logback file for rotate the file log https://logback.qos.ch/manual/appenders.html#SizeAndTimeBasedRollingPolicy On 08/01/2024 18:57, Matt Pryor wrote: OK thanks Rene. I'm finding the logs a bit challenging, the main use for logs for our use is to track down deliverability issues, but in order to do this we need to turn on debug logging, for example: 16:36:59.492 [DEBUG] o.a.j.t.m.r.d.MailDelivrer - Temporary exception delivering mail (Mail1704386217842-49641a56-f7cf-43c3-911f-bf83b88a4fd4-to-aol.com). RemoteHost said: 421 4.7.0 [TSS04] Messages from 13.82.57.241 temporarily deferred due to unexpected volume or user complaints - 4.16.55.1; see https://postmaster.yahooinc.com/error-codes But this then generates 500+ Mb per day which is a lot to look through. Any tips on how to better manage this would be great. Thanks Matt On Wed, 13 Dec 2023 at 04:14, Rene Cordier wrote: Hi Matt, No problem actually I think. Looking at the code: https://github.com/apache/james-project/blob/master/server/data/data-jpa/src/main/java/org/apache/james/domainlist/jpa/JPADomainList.java#L164 We can see that it's just a debug log saying it tried to look if the domain existed internally or not, it didn't find it. James logged it then as a debug log and then returns false (so no error). A bit verbose but my guess is also you are probably in a testing phase with debug logs enabled? If you turn off the debug logs in logback configuration file, you should not see them anymore I believe. But nothing to be alarmed of I think :) Best regards, Rene. On 12/13/23 10:34, Tung Tran wrote: It just a JPAQuery, the JamesDomain is an entity of table JAMES_DOMAIN. :name is a "dynamic marker" as you wrote. https://github.com/apache/james-project/blob/d7a4f45fa4d248a4911612eb367cef72e56c5f8c/server/data/data-jpa/src/main/java/org/apache/james/domainlist/jpa/model/JPADomain.java#L33 On 12/12/2023 18:42, Matt Pryor wrote: Hi all, I'm still seeing this error in the logs after setting the domain using the webadmin: javax.persistence.NoResultException: Query "SELECT domain FROM JamesDomain domain WHERE domain.name=:name" selected no result, but expected unique result. at org.apache.openjpa.persistence.QueryImpl.getSingleResult(QueryImpl.java:346) at org.apache.james.domainlist.jpa.JPADomainList.containsDomainInternal(JPADomainList.java:162) at org.apache.james.domainlist.jpa.JPADomainList.containsDomainInternal(JPADomainList.java:100) at org.apache.james.domainlist.lib.AbstractDomainList.containsDomain(AbstractDomainList.java:179) at org.apache.james.mailetcontainer.impl.LocalResourcesImpl.isLocalServer(LocalResourcesImpl.java:67) Please can you help me understand what this query is doing and what is it querying? There is no "JamesDomain" table in the tables generated in our SQL Server database (there is a James_Domain). I presume :name is a dynamic marker, in which case what will it be setting the value to? Below is a list of tables generated by James in SQL Server: JAMES_DOMAIN JAMES_MAIL JAMES_MAILBOX JAMES_MAILBOX_ANNOTATION JAMES_MAIL_PROPERTY JAMES_MAIL_REPOS JAMES_MAIL_STORE JAMES_MAIL_USERFLAG JAMES_MAX_DOMAIN_MESSAGE_COUNT JAMES_MAX_DOMAIN_STORAGE JAMES_MAX_GLOBAL_MESSAGE_COUNT JAMES_MAX_Global_STORAGE JAMES_MAX_USER_MESSAGE_COUNT JAMES_MAX_USER_STORAGE JAMES_QUOTA_CURRENTQUOTA JAMES_RECIPIENT_REWRITE JAMES_SIEVE_QUOTA JAMES_SIEVE_SCRIPT JAMES_SUBSCRIPTION JAMES_USER OPENJPA_SEQUENCE_TABLE Thanks and kind regards Matt On Thu, 26 Oct 2023 at 12:41, Matt Pryor wrote: Many thanks René! On Thu, 26 Oct 2023 at 03:32, René CORDIER wrote: Hi Matt, On addition to using the cli, you have also other ways: - using webadmin: https://james.apache.org/server/manage-webadmin.html#Administrating_domains - the domainlist.xml file. localhost is configured as defaultDomain, but you can add extra domains in `domainnames.domainname`, which is a list, spearated by "," I think... it's undocumented, looks rather obscur (as a name) and doesn't seem really tested in the code I realized though... Might need to add a little something there :) Best regards, Rene. On Oct 26, 2023 1:36 AM, from Matt Pryor Thanks a lot Tung will try that tomorrow. On Wed, 25 Oct 2023 at 16:33, Tung Tran wrote: Hi Have you created a domain name yet? By admin api, James Command line... Ex: james.apache.org/server/manage-cli.html#Manage_Domains Tung, On 25/10/2023 22:16, Matt Pryor wrote: Hi, I'm seeing the following error in the logs: 16:07:55.691 [DEBUG] o.a.j.d.j.JPADomainList - No domain found javax.persistence.NoResultException: Query "SELECT domain FROM JamesDomain domain WHERE domain.name=:name" selected no result, but expected unique result. at org.apache.openjpa.persistence.QueryImpl.getSingleResult(QueryImpl.java:346) Queried the jamesdomain table and there's one result containing "localhost". What should be in there
James 3.8 one OpenSuSE 15.5
Hello there everybody, happy new year 2024 to all of you. It's been quite some time since I was last active on this maillist. After upgrading my server to OpenSuSE 15.5 and James to 3.8 and after reading the recent topics on the web archive I decided to post a small round up how it went this way. Important word of warning and security: This is only a personal write-down how I did my setup. I'm aware there're still some security improvements to be done. This is meant as an informative guide. I'm by no means responsible for any security issues that may arise by following this. I myself got hacked by the Log4J issue mostly due to not applying the available update fast enough. It's your own responsibility to make your setup secure. All I can offer are some guidelines from personal experience. That warning out now let's get to the real topic. As several of the active devs here know I use James for quite some time now and over the years encountered several issues mostly specific to OpenSuSE and the packages provided by its repositories. Luckily this time everything went smoothly. I started from a fresh clean "server"-type install, but this should be applicable to any existing system as well. So the first step is to fully update the new system. As OpenSuSE comes with postfix I replace it with sendmail for later. I guess it's also possible with postfix or exim or any other MTA providing the required sendmail dependency. Using sendmail was just the simplest option I figured out when I first used it. The keyword here is "nullclient": It configures sendmail to just forward everything to James without any handling itself. For this sendmail comes with an almost ready-to-use config which only needs one change in /etc/sendmail/ linux.nullclient.mc in line 27 by replacing the example "mailhub.domain.notused" with "localhost". Then just generate the new sendmail.cf from it (either as root or via sudo): m4 /etc/mail/linux.nullclient.mc > /etc/sendmail.cf I also have to edit the systemd script. For some reason the systemctl edit command works a bit unexpected for simple edits so by appending --full it becomes a full override. The service file needs two changes: 1) moving the PIDFile from /var/run to /run as hinted by systemctl status message: PIDFile=/run/sendmail.pid 2) remove the -bd flag from the start args to prevent sendmail from blocking port TCP/25: Environment="SENDMAIL_ARGS=-L -Am -q30m -om" Check if sendmail service is enabled and started: systemctl status sendmail At least enabled it so it gets started at reboot. As James isn't setup yet to take its mails don't start it yet - it could cause a hang into an infinite loop. Before get to James I prepare the rest of the system by install these packages (can be installed along when switching postfix for sendmail): - java-17-openjdk-devel - git - maven - mariadb - phpMyAdmin-apache - yast2-http-server The required dependencies get pulled in by the resolver. After installing the packages YaST tells you to secure MariaDB. So I do this right away by running mariadb-secure-installation as root/sudo and set a root password. All other questions can be answered with thier default option (just hit enter). To get phpMyAdmin running only the initial setup using "yast http-server" is required. Select enable PHP in the 2nd step and complete the setup by just hitting F10 a couple times. If the Apache2 server is accessible via the internet care should be taken by limiting phpMyAdmin to localhost. Edit /etc/ apache2/conf.d/phpMyAdmin.conf line 27 to "Require local" and use ssh tunnels. If you have services like a vpn or a tor hidden service running you may want to secure it even further with something like an .htaccess or similar. This way you prevent attackers from trying to bruteforce your database password. Complete the pre-setup by use phpMyAdmin to add a new user for James. Now let's build James: git clone https://github.com/apache/james-project -b james-project-3.8.0 cd james-project mvn clean package -DskipTests -T 1C As I use the spring package I then unpack the tar in james-project/server/ apps/spring-app/target/james-server-spring-app-3.8.0-app.tar.gz. I also need to get the mariadb-connector/J: https://mariadb.com/downloads/ connectors/ and place the .jar in the james-server-spring-app-3.8.0/lib folder. I'm not sure why this isn't distributed along or part of the package manifest to pull from the repos - guess this is some licence nonesense. It's config time now - and there's not that much to do. As I don't use POP3 the first I do is disable the POP3 server. Next I set up the database stuff by change the driver to org.mariadb.jdbc.Driver and the connector-string to jdbc:mariadb://localhost:3306/james Btw: As pretty much any modern JDBC driver should be a type 4.x there's no need to specify the driver class name or do something like Class.forName() As long as the driver jar is in classpath on startup of the JVM it gets p
Re: Help with "no domain found" error James 3.8.0
Hi Matt, You can maybe tweak too the logback.xml configuration file to have a more fine grained logging experience, which could help you maybe reduce your log volume as well depending which part of James you target for logs. Best regards, Rene. On 1/9/24 08:26, Tung Tran wrote: Hi, You can use `SizeAndTimeBasedRollingPolicy` in logback file for rotate the file log https://logback.qos.ch/manual/appenders.html#SizeAndTimeBasedRollingPolicy On 08/01/2024 18:57, Matt Pryor wrote: OK thanks Rene. I'm finding the logs a bit challenging, the main use for logs for our use is to track down deliverability issues, but in order to do this we need to turn on debug logging, for example: 16:36:59.492 [DEBUG] o.a.j.t.m.r.d.MailDelivrer - Temporary exception delivering mail (Mail1704386217842-49641a56-f7cf-43c3-911f-bf83b88a4fd4-to-aol.com). RemoteHost said: 421 4.7.0 [TSS04] Messages from 13.82.57.241 temporarily deferred due to unexpected volume or user complaints - 4.16.55.1; see https://postmaster.yahooinc.com/error-codes But this then generates 500+ Mb per day which is a lot to look through. Any tips on how to better manage this would be great. Thanks Matt On Wed, 13 Dec 2023 at 04:14, Rene Cordier wrote: Hi Matt, No problem actually I think. Looking at the code: https://github.com/apache/james-project/blob/master/server/data/data-jpa/src/main/java/org/apache/james/domainlist/jpa/JPADomainList.java#L164 We can see that it's just a debug log saying it tried to look if the domain existed internally or not, it didn't find it. James logged it then as a debug log and then returns false (so no error). A bit verbose but my guess is also you are probably in a testing phase with debug logs enabled? If you turn off the debug logs in logback configuration file, you should not see them anymore I believe. But nothing to be alarmed of I think :) Best regards, Rene. On 12/13/23 10:34, Tung Tran wrote: It just a JPAQuery, the JamesDomain is an entity of table JAMES_DOMAIN. :name is a "dynamic marker" as you wrote. https://github.com/apache/james-project/blob/d7a4f45fa4d248a4911612eb367cef72e56c5f8c/server/data/data-jpa/src/main/java/org/apache/james/domainlist/jpa/model/JPADomain.java#L33 On 12/12/2023 18:42, Matt Pryor wrote: Hi all, I'm still seeing this error in the logs after setting the domain using the webadmin: javax.persistence.NoResultException: Query "SELECT domain FROM JamesDomain domain WHERE domain.name=:name" selected no result, but expected unique result. at org.apache.openjpa.persistence.QueryImpl.getSingleResult(QueryImpl.java:346) at org.apache.james.domainlist.jpa.JPADomainList.containsDomainInternal(JPADomainList.java:162) at org.apache.james.domainlist.jpa.JPADomainList.containsDomainInternal(JPADomainList.java:100) at org.apache.james.domainlist.lib.AbstractDomainList.containsDomain(AbstractDomainList.java:179) at org.apache.james.mailetcontainer.impl.LocalResourcesImpl.isLocalServer(LocalResourcesImpl.java:67) Please can you help me understand what this query is doing and what is it querying? There is no "JamesDomain" table in the tables generated in our SQL Server database (there is a James_Domain). I presume :name is a dynamic marker, in which case what will it be setting the value to? Below is a list of tables generated by James in SQL Server: JAMES_DOMAIN JAMES_MAIL JAMES_MAILBOX JAMES_MAILBOX_ANNOTATION JAMES_MAIL_PROPERTY JAMES_MAIL_REPOS JAMES_MAIL_STORE JAMES_MAIL_USERFLAG JAMES_MAX_DOMAIN_MESSAGE_COUNT JAMES_MAX_DOMAIN_STORAGE JAMES_MAX_GLOBAL_MESSAGE_COUNT JAMES_MAX_Global_STORAGE JAMES_MAX_USER_MESSAGE_COUNT JAMES_MAX_USER_STORAGE JAMES_QUOTA_CURRENTQUOTA JAMES_RECIPIENT_REWRITE JAMES_SIEVE_QUOTA JAMES_SIEVE_SCRIPT JAMES_SUBSCRIPTION JAMES_USER OPENJPA_SEQUENCE_TABLE Thanks and kind regards Matt On Thu, 26 Oct 2023 at 12:41, Matt Pryor wrote: Many thanks René! On Thu, 26 Oct 2023 at 03:32, René CORDIER wrote: Hi Matt, On addition to using the cli, you have also other ways: - using webadmin: https://james.apache.org/server/manage-webadmin.html#Administrating_domains - the domainlist.xml file. localhost is configured as defaultDomain, but you can add extra domains in `domainnames.domainname`, which is a list, spearated by "," I think... it's undocumented, looks rather obscur (as a name) and doesn't seem really tested in the code I realized though... Might need to add a little something there :) Best regards, Rene. On Oct 26, 2023 1:36 AM, from Matt Pryor Thanks a lot Tung will try that tomorrow. On Wed, 25 Oct 2023 at 16:33, Tung Tran wrote: Hi Have you created a domain name yet? By admin api, James Command line... Ex: james.apache.org/server/manage-cli.html#Manage_Domains Tung, On 25/10/2023 22:16, Matt Pryor wrote: Hi, I'm seeing the following error in the logs: 16:07:55.691 [DEBUG] o.a.j.d.j.JPADomainList - No domain found javax.persistence.NoResult
Re: James 3.8 one OpenSuSE 15.5
Hello, Interesting read thanks. Few remarks though, but feel free to agree or not :) : - any reason to still run the spring version of James? That version I believe is not always up-to-date with dependencies (specially the sprint dependencies). Truth is it might get deprecated and removed in later release if a consensus is reached, as all active dev is done on the Guice versions now. You might want to check that (JPA Guice here probably closest to the Spring version) - note that there is active development at the moment (still WIP) regarding a Postgresql reactive implementation with james (Guice). I saw you seem to use MariaDB but might interest you for the future maybe? - for sync between your main server and backup, maybe just redirect the mails to both platforms, and let them treat the mails separately? If not I guess db backup and sync between the two could do it too. Good job on running latest James on the new OpenSuse though, thanks for sharing! Rene. On 1/9/24 10:17, cryptearth wrote: Hello there everybody, happy new year 2024 to all of you. It's been quite some time since I was last active on this maillist. After upgrading my server to OpenSuSE 15.5 and James to 3.8 and after reading the recent topics on the web archive I decided to post a small round up how it went this way. Important word of warning and security: This is only a personal write-down how I did my setup. I'm aware there're still some security improvements to be done. This is meant as an informative guide. I'm by no means responsible for any security issues that may arise by following this. I myself got hacked by the Log4J issue mostly due to not applying the available update fast enough. It's your own responsibility to make your setup secure. All I can offer are some guidelines from personal experience. That warning out now let's get to the real topic. As several of the active devs here know I use James for quite some time now and over the years encountered several issues mostly specific to OpenSuSE and the packages provided by its repositories. Luckily this time everything went smoothly. I started from a fresh clean "server"-type install, but this should be applicable to any existing system as well. So the first step is to fully update the new system. As OpenSuSE comes with postfix I replace it with sendmail for later. I guess it's also possible with postfix or exim or any other MTA providing the required sendmail dependency. Using sendmail was just the simplest option I figured out when I first used it. The keyword here is "nullclient": It configures sendmail to just forward everything to James without any handling itself. For this sendmail comes with an almost ready-to-use config which only needs one change in /etc/sendmail/ linux.nullclient.mc in line 27 by replacing the example "mailhub.domain.notused" with "localhost". Then just generate the new sendmail.cf from it (either as root or via sudo): m4 /etc/mail/linux.nullclient.mc > /etc/sendmail.cf I also have to edit the systemd script. For some reason the systemctl edit command works a bit unexpected for simple edits so by appending --full it becomes a full override. The service file needs two changes: 1) moving the PIDFile from /var/run to /run as hinted by systemctl status message: PIDFile=/run/sendmail.pid 2) remove the -bd flag from the start args to prevent sendmail from blocking port TCP/25: Environment="SENDMAIL_ARGS=-L -Am -q30m -om" Check if sendmail service is enabled and started: systemctl status sendmail At least enabled it so it gets started at reboot. As James isn't setup yet to take its mails don't start it yet - it could cause a hang into an infinite loop. Before get to James I prepare the rest of the system by install these packages (can be installed along when switching postfix for sendmail): - java-17-openjdk-devel - git - maven - mariadb - phpMyAdmin-apache - yast2-http-server The required dependencies get pulled in by the resolver. After installing the packages YaST tells you to secure MariaDB. So I do this right away by running mariadb-secure-installation as root/sudo and set a root password. All other questions can be answered with thier default option (just hit enter). To get phpMyAdmin running only the initial setup using "yast http-server" is required. Select enable PHP in the 2nd step and complete the setup by just hitting F10 a couple times. If the Apache2 server is accessible via the internet care should be taken by limiting phpMyAdmin to localhost. Edit /etc/ apache2/conf.d/phpMyAdmin.conf line 27 to "Require local" and use ssh tunnels. If you have services like a vpn or a tor hidden service running you may want to secure it even further with something like an .htaccess or similar. This way you prevent attackers from trying to bruteforce your database password. Complete the pre-setup by use phpMyAdmin to add a new user for James. Now let's build James: git clone https://github.com/apache/james-project -b james-