Difference between revisions of "MailArchiva"

From SME Server
Jump to navigation Jump to search
 
(13 intermediate revisions by 5 users not shown)
Line 6: Line 6:
 
===Description===
 
===Description===
 
MailArchiva is a state-of-the-art email archiving system.
 
MailArchiva is a state-of-the-art email archiving system.
 +
{{Warning box| : Some portions obsolete}}
 +
 +
{{Note box|This How-To has been amended to work with SME Server 10.}}
  
 
http://www.mailarchiva.com/
 
http://www.mailarchiva.com/
  
===Enable SME maillog archiving following this FAQ:===
+
===Enable SME maillog archiving===
  
 
  http://wiki.contribs.org/SME_Server:Documentation:FAQ#Keep_a_copy_of_all_emails
 
  http://wiki.contribs.org/SME_Server:Documentation:FAQ#Keep_a_copy_of_all_emails
  
===Download MailArchiva===
+
===Installing on SME Server 10.1===
 +
 
 +
MailArchiva On Premise v9.0.26
 +
 
 +
'''Downloading . . .'''
 +
 
 +
There are two options available
 +
 
 +
'''Option A (preferred)'''
 +
https://help.mailarchiva.com/enterprise-linux-install
 +
 
 +
Copy and paste the command in Step 2
 +
curl -sS https://bs.stimulussoft.com/api/v1/download/product/maonprem/linux/latest | grep -oP '"downloadUrl": *"\K[^"]*' | xargs curl | tar -xz -C /tmp && cd /tmp/mailarchiva-* && ./install && rm -r /tmp/mailarchiva-*
 +
 +
Note1: If you wish to keep the setup files (in /tmp/mailarchiva-*), don't copy "&& rm -r /tmp/mailarchiva-*" in the line above prior to issuing the command
 +
 
 +
Note2: As an alternative, the link to download the latest version may also be found on the download page. After downloading and extracting the archive, run ./install to begin setup.
 +
 
 +
'''Option B'''
 +
 
 +
Download and extract the most recent tar.gz archive
 +
https://bs.stimulussoft.com/downloads
 +
After extracting the archive, cd into the mailarchiva-* directory and execute the install script:
 +
# ./install
 +
 
 +
You'll initially be required to read the license agreement . . . <blockquote><code>Press [enter] to read the license agreement...</code></blockquote>After reading through the agreement, you can proceed as follows . . .
 +
 
 +
During the installation process (either method), you'll be asked two questions:<blockquote><code>Do you agree to the terms of the agreement (yes/no)?</code></blockquote>("yes" is the proper answer)<blockquote><code>Max heap size [512m-7557m]?:</code></blockquote>(If your server has 8GB of physical RAM, you can use 5192m for the Max heap size value)
 +
 
 +
Refer to http://help.mailarchiva.com/enterprise-memory-settings for heap space recommendations
 +
 
 +
If installation is successful, you'll see the following:<blockquote><code>mailarchiva service installed</code>
 +
 
 +
<code>to start service, type sudo systemctl start mailarchiva</code>
 +
 
 +
<code>to stop service, type sudo systemctl stop mailarchiva</code>
  
http://downloads.sourceforge.net/openmailarchiva
+
<code>mailarchiva server has been installed in /opt/mailarchiva</code>
  
===Installation without Tomcat===
+
<code>after starting, access web console at <nowiki>http://localhost:8090</nowiki></code>
If you do not have [[Tomcat]] in your SME Server, follow these instructions.
 
  
# tar -zxvf mailarchiva_opensource_edition_v1_7_9c_linux_32bit.tar.gz
+
<code>if service start fails, start server using /opt/mailarchiva/server/startserver</code>
# cd ./mailarchiva_dist
 
# ./install.sh
 
  
====SME Server specific config changes====
+
<code>visit <nowiki>http://help.mailarchiva.com/</nowiki> for setup and configuration instructions</code></blockquote>
  
# config set mailarchiva service TCPPort 8090 access private status enabled
+
==='''Tweaking The Installation: The SME Server Way'''===
# ln -s /etc/rc.d/init.d/e-smith-service /etc/rc.d/rc7.d/S99mailarchiva
+
SME Server 10.1 requires a few additional tweaks in order to:
  
===Installation with Tomcat===
+
*allow Mailarchiva traffic on TCP port 8090
If you already have [[Tomcat]] in your SME Server, follow these instructions.
+
*allow Mailarchiva to run as a service under the SME Server system
 +
*allow Mailarchiva to be publicly (or privately) accessible
 +
*allow Mailarchiva to survive a server reboot
  
# service tomcat stop
+
The tweaks required to make Mailarchiva work on SME Server 10.1 are:
# tar -zxvf mailarchiva_opensource_edition_v1_7_9c_linux_32bit.tar.gz
+
<syntaxhighlight lang="bash">
# cp -r mailarchiva_dist/mailarchiva/server/webapps/mailarchiva /opt/tomcat/webapps/mailarchiva
+
mkdir /etc/systemd/system/mailarchiva.service.d
# chown -R tomcat.tomcat /opt/tomcat*
+
printf "[Install]\nWantedBy=sme-server.target" > /etc/systemd/system/mailarchiva.service.d/50koozali.conf
# service tomcat start
+
db configuration set mailarchiva service TCPPort 8090 access public status enabled
 +
signal-event console-save
 +
</syntaxhighlight>
  
===Configure MailArchiva===
+
If you prefer not to have your implementation available to the public, change the 3rd line above to:
  
Read and follow: mailarchiva_opensource_edition_v1_7_administration_guide.pdf
+
<syntaxhighlight lang="bash">
 +
db configuration set mailarchiva service TCPPort 8090 access private status enabled
 +
</syntaxhighlight>Then you can ssh to your server via a tunnel on port 8090 and then access Mailarchiva at http://localhost:8090
  
http://yourserver:8090/mailarchiva
 
or Tomcat port.
 
  
Step 1: Create a Volume and enter your Email Encryption Password
 
Step 2: Add your Domains
 
Step 3: Add a Journal Account Connection, username = maillog, test the connection
 
  
MailArchiva should now be ready and working.
+
'''Kudos'''
  
 +
I'm very grateful for the assistance of ReetP and Jean-Philippe Pialasse via the Contribs.org Forums for their guidance in getting this to work, and to the author of the original Mailarchiva Wiki How-To for the original initiative.
 +
----
 
[[Category:Howto]]
 
[[Category:Howto]]
 +
[[Category:Mail]]

Latest revision as of 12:28, 23 August 2024


MailArchiva for SME Server

  Skill level: medium
The instructions on this page require a basic knowledge of linux.


Description

MailArchiva is a state-of-the-art email archiving system.

  Warning:
: Some portions obsolete



  Note:
This How-To has been amended to work with SME Server 10.


http://www.mailarchiva.com/

Enable SME maillog archiving

http://wiki.contribs.org/SME_Server:Documentation:FAQ#Keep_a_copy_of_all_emails

Installing on SME Server 10.1

MailArchiva On Premise v9.0.26

Downloading . . .

There are two options available

Option A (preferred)

https://help.mailarchiva.com/enterprise-linux-install

Copy and paste the command in Step 2

curl -sS https://bs.stimulussoft.com/api/v1/download/product/maonprem/linux/latest | grep -oP '"downloadUrl": *"\K[^"]*' | xargs curl | tar -xz -C /tmp && cd /tmp/mailarchiva-* && ./install && rm -r /tmp/mailarchiva-*

Note1: If you wish to keep the setup files (in /tmp/mailarchiva-*), don't copy "&& rm -r /tmp/mailarchiva-*" in the line above prior to issuing the command

Note2: As an alternative, the link to download the latest version may also be found on the download page. After downloading and extracting the archive, run ./install to begin setup.

Option B

Download and extract the most recent tar.gz archive

https://bs.stimulussoft.com/downloads

After extracting the archive, cd into the mailarchiva-* directory and execute the install script:

# ./install

You'll initially be required to read the license agreement . . .

Press [enter] to read the license agreement...

After reading through the agreement, you can proceed as follows . . . During the installation process (either method), you'll be asked two questions:

Do you agree to the terms of the agreement (yes/no)?

("yes" is the proper answer)

Max heap size [512m-7557m]?:

(If your server has 8GB of physical RAM, you can use 5192m for the Max heap size value)

Refer to http://help.mailarchiva.com/enterprise-memory-settings for heap space recommendations

If installation is successful, you'll see the following:

mailarchiva service installed

to start service, type sudo systemctl start mailarchiva

to stop service, type sudo systemctl stop mailarchiva

mailarchiva server has been installed in /opt/mailarchiva

after starting, access web console at http://localhost:8090

if service start fails, start server using /opt/mailarchiva/server/startserver

visit http://help.mailarchiva.com/ for setup and configuration instructions

Tweaking The Installation: The SME Server Way

SME Server 10.1 requires a few additional tweaks in order to:

  • allow Mailarchiva traffic on TCP port 8090
  • allow Mailarchiva to run as a service under the SME Server system
  • allow Mailarchiva to be publicly (or privately) accessible
  • allow Mailarchiva to survive a server reboot

The tweaks required to make Mailarchiva work on SME Server 10.1 are:

mkdir /etc/systemd/system/mailarchiva.service.d
printf "[Install]\nWantedBy=sme-server.target" > /etc/systemd/system/mailarchiva.service.d/50koozali.conf
db configuration set mailarchiva service TCPPort 8090 access public status enabled
signal-event console-save

If you prefer not to have your implementation available to the public, change the 3rd line above to:

db configuration set mailarchiva service TCPPort 8090 access private status enabled

Then you can ssh to your server via a tunnel on port 8090 and then access Mailarchiva at http://localhost:8090


Kudos

I'm very grateful for the assistance of ReetP and Jean-Philippe Pialasse via the Contribs.org Forums for their guidance in getting this to work, and to the author of the original Mailarchiva Wiki How-To for the original initiative.