1

Topic: FreeBSD Jail with iRedmail

==== Required information ====
- iRedMail version: 0.8.3
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): PGSQL
- Linux/BSD distribution name and version: FreeBSD 9.1-Stable
- Related log if you're reporting an issue:

The PostgreSQL not started, see:

root@iredmail:~ # /usr/local/etc/rc.d/postgresql start
postgres cannot access the server configuration file "/usr/local/pgsql/data/postgresql.conf": No such file or directory
pg_ctl: could not start server
Examine the log output.

root@iredmail:~ # /usr/local/etc/rc.d/postgresql initdb
The files belonging to this database system will be owned by user "pgsql".
This user must also own the server process.

The database cluster will be initialized with locale C.
The default text search configuration will be set to "english".

creating directory /usr/local/pgsql/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 10
selecting default shared_buffers ... 400kB
creating configuration files ... ok
creating template1 database in /usr/local/pgsql/data/base/1 ... FATAL:  could not create shared memory segment: Function not implemented
DETAIL:  Failed system call was shmget(key=1, size=2146304, 03600).
child process exited with exit code 1
initdb: removing data directory "/usr/local/pgsql/data"
root@iredmail:~ # /usr/local/etc/rc.d/postgresql initdb
The files belonging to this database system will be owned by user "pgsql".
This user must also own the server process.

The database cluster will be initialized with locale C.
The default text search configuration will be set to "english".

creating directory /usr/local/pgsql/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 10
selecting default shared_buffers ... 400kB
creating configuration files ... ok
creating template1 database in /usr/local/pgsql/data/base/1 ... FATAL:  could not create shared memory segment: Function not implemented
DETAIL:  Failed system call was shmget(key=1, size=2146304, 03600).
child process exited with exit code 1
initdb: removing data directory "/usr/local/pgsql/data"

Feb 26 11:29:31 iredmail postgres[1244]: [1-1] FATAL:  could not create shared memory segment: Function not implemented
Feb 26 11:29:31 iredmail postgres[1244]: [1-2] DETAIL:  Failed system call was shmget(key=1, size=2146304, 03600).

I did the steps in the documentation ... What could be wrong?
====

2

Re: FreeBSD Jail with iRedmail

Do you have below setting in /etc/rc.conf (not inside Jail)?

# Set security.jail.allow_raw_sockets=1 to allow PostgreSQL initial database.
jail_sysvipc_allow="YES"