1 (edited by neil 2012-06-06 22:06:49)

Topic: Installing on Gentoo

==== Provide required information ====
- iRedMail version and backend (LDAP/MySQL/PGSQL):
0.8.0/MySQL
- Linux/BSD distribution name and version:
Gentoo from latest Stage 3
- Any related log? Log is helpful for troubleshooting.
====

After wrestling with iRedMail for a few days, I finally got it installed and (almost) working on 2 Gentoo servers. My experience leads me to point out the following in the hope it might help someone else:

1. The default kernel config in Gentoo does not include support for "multiport" in network settings. This must be enabled in order for iptables to load the iRedMail rules.

2. The latest Gentoo stages have a "run" symlink in /var pointing to /run rather than the actual directory /var/run. This breaks clamd - i.e. it cannot create it's socket so fails to load.

3. The iRedMail.sh script creates an /etc/portage/package.mask file that does exactly the opposite of what is intended. The "<" needs to be changed to ">". I found it necessary to do the following to get everything working without error:
                                   Make sure python 2.7 is installed
                                   "eselect python set 1" (to select the 2.7 version as default)
                                   "emerge -C python" (to remove python 3.2. It will leave python 2.7 alone)
                                   "python-updater" (to make sure everything is using python 2.7)

There actually seem to only be a few syntax errors preventing iRedMAil from running with python 3.2. Maybe you could look into that?

Just one little niggle remains with my 2 installations - logging in to awstats returns a "You do not have permission" error. I guess this is because Apache runs as the apache user and the files reside in /usr/share/wwwroot.

All-in-all, I'm pretty impressed with iRedMail. Thank you for your hard work. smile


Be lucky,

Neil

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Installing on Gentoo

neil wrote:

After wrestling with iRedMail for a few days, I finally got it installed and (almost) working on 2 Gentoo servers. My experience leads me to point out the following in the hope it might help someone else:

Thanks for your feedback. smile

neil wrote:

1. The default kernel config in Gentoo does not include support for "multiport" in network settings. This must be enabled in order for iptables to load the iRedMail rules.

The easiest way is converting '--multiport' to multiple rules with single port. For example:

# OLD RULE
#-A INPUT -p tcp -m multiport --dport 80,443,25,587,110,995,143,993,465,22 -j ACCEPT

# NEW RULE
-A INPUT -p tcp --dport 80 -j ACCEPT
-A INPUT -p tcp --drport 443 -j ACCEPT
...

== UPDATE ==
Converted '--multiport' to one port each iptables rule moment ago: https://bitbucket.org/zhb/iredmail/chan … debd369524
But i'm afraid you have to enable '--multiport' support for Fail2ban, otherwise you have to tune Fail2ban config file to ban single network port instead of multiple ones.

neil wrote:

2. The latest Gentoo stages have a "run" symlink in /var pointing to /run rather than the actual directory /var/run. This breaks clamd - i.e. it cannot create it's socket so fails to load.

Will test it again.

neil wrote:

3. The iRedMail.sh script creates an /etc/portage/package.mask file that does exactly the opposite of what is intended. The "<" needs to be changed to ">". I found it necessary to do the following to get everything working without error:
                                   Make sure python 2.7 is installed
                                   "eselect python set 1" (to select the 2.7 version as default)
                                   "emerge -C python" (to remove python 3.2. It will leave python 2.7 alone)
                                   "python-updater" (to make sure everything is using python 2.7)

Weird, the default one works for me here. sad Will test it again.

neil wrote:

There actually seem to only be a few syntax errors preventing iRedMAil from running with python 3.2. Maybe you could look into that?

I don't think so.
The web-based admin panel, iRedAdmin, depends on Python web framework, web.py, it doesn't work with Python 3 yet. That's the biggest issue, but other components should be fine with Py3.

neil wrote:

Just one little niggle remains with my 2 installations - logging in to awstats returns a "You do not have permission" error. I guess this is because Apache runs as the apache user and the files reside in /usr/share/wwwroot.

Did you access https://your_server/awstats/awstats.pl?config=web or just https://your_server/awstats/awstats.pl?
First one should be OK, second one will report the same error message.

3

Re: Installing on Gentoo

ZhangHuangbin wrote:
neil wrote:

Just one little niggle remains with my 2 installations - logging in to awstats returns a "You do not have permission" error. I guess this is because Apache runs as the apache user and the files reside in /usr/share/wwwroot.

Did you access https://your_server/awstats/awstats.pl?config=web or just https://your_server/awstats/awstats.pl?
First one should be OK, second one will report the same error message.

Ahh, that was it! smile Must have been getting screen-blind by then. roll

Thanks for your rapid and helpful response. smile

Be lucky,

Neil