1 (edited by promaethius 2016-05-17 01:17:41)

Topic: phpLDAPadmin and mass alias import

==== Required information ====
- iRedMail version (check /etc/iredmail-release):
- Linux/BSD distribution name and version: Ubuntu 14.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? Yes
- Related log if you're reporting an issue:
====

This is a two part post:
I'm having immense difficulty integrating phpldapadmin into the existing iRedMail nginx default installation. I've combed through several ways to do this and tried them all but no success. Does anyone have experience installing it into their existing iRedMail setups? I'm looking for sample configs to see what I'm doing wrong.

I'm migrating aliases, domains, and users from an SQL installation into LDAP. The domains I'm already resolved to doing by hand and the users I can use the csv > ldif converter. But how do I migrate aliases? The structure of the mailAlias object class can be imported as an ldif but those exist under the User? Or would it be easier to use the add user to group tool in iRedMail and forego aliases entirely and just use mail lists? And if that's the case, how can I mass create mail lists?

----

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

2

Re: phpLDAPadmin and mass alias import

promaethius wrote:

I'm having immense difficulty integrating phpldapadmin into the existing iRedMail nginx default installation. I've combed through several ways to do this and tried them all but no success. Does anyone have experience installing it into their existing iRedMail setups? I'm looking for sample configs to see what I'm doing wrong.

Does it work if you just copy phpLDAPadmin web files to DocumentRoot?

promaethius wrote:

But how do I migrate aliases?

Reference:
http://www.iredmail.org/docs/ldap.add.mail.alias.html

promaethius wrote:

The structure of the mailAlias object class can be imported as an ldif but those exist under the User?

I don't understand this question. What do you want to convert?

promaethius wrote:

And if that's the case, how can I mass create mail lists?

Write a simple script to create one mailing list, then automate the mass creation.

3 (edited by promaethius 2016-05-18 13:06:39)

Re: phpLDAPadmin and mass alias import

I've tried a lot of ways to incorporate phpldapadmin into the nginx installation but this is the only error I get:

upstream: "fastcgi://unix:/var/run/php-fpm.socket:", host: "mx.example.com"
2016/05/18 05:03:05 [error] 23416#0: *322 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 66.189.165.40, server: _, request: "GET /phpldapadmin/htdocs/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm.socket:", host: "mx.example.com"
2016/05/18 05:03:19 [error] 23416#0: *322 "/var/www/phpldapadmin/htdoc/index.php" is not found (2: No such file or directory), client: 66.189.165.40, server: _, request: "GET /phpldapadmin/htdoc/ HTTP/1.1", host: "mx.example.com"
2016/05/18 05:03:25 [error] 23416#0: *322 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 66.189.165.40, server: _, request: "GET /phpldapadmin/htdocs/index.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm.socket:", host: "mx.example.com"

I've done some more technical reading and am modifying the script to import forwarding as attributes in the csv to ldif user conversion. As far as mailing lists (groups) go I'm resolved I'll have to figure out a way to import those as well (and before the users so that they can be added to the mailing lists during the user import).

4

Re: phpLDAPadmin and mass alias import

About phpLDAPadmin:

*) Does it work if you just copy phpLDAPadmin web files to DocumentRoot?
*) Here's old Nginx config file we used for phpLDAPadmin, hope it helps:
https://bitbucket.org/zhb/iredmail/comm … fault.conf

5

Re: phpLDAPadmin and mass alias import

Ah thank you, the old code does work well. Perhaps it was an issue of location priority somehow.
I can get to it but now I have the error:
2016/05/18 20:06:56 [error] 32618#0: *373 FastCGI sent in stderr: "PHP message: PHP Notice:  Undefined index: plaConfig in /usr/share/phpldapadmin/lib/page.php on line 379
PHP message: PHP Fatal error:  Call to a member function getValue() on a non-object in /usr/share/phpldapadmin/lib/page.php on line 379" while reading response header from upstream, client: 63.200.101.21, server: _, request: "GET /phpldapadmin/htdocs/cmd.php?cmd=login_form&server_id=1&meth=ajax HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm.socket:", host: "mx.example.com", referrer: "https://mx.example.com/phpldapadmin/htdocs/index.php"

6

Re: phpLDAPadmin and mass alias import

Seems bug of phpLDAPadmin. no idea yet. It's recommended to ask for support in phpLDAPadmin mailing list instead.

7

Re: phpLDAPadmin and mass alias import

i have error when i try to open phpldapadmin anyone have any solution
[error] 1692#0: *32 FastCGI sent in stderr: "PHP message: PHP Notice:  Undefined variable: _SESSION in /var/www/html/phpldapadmin/lib/page.php on line 379
PHP message: PHP Fatal error:  Call to a member function getValue() on a non-object in /var/www/html/phpldapadmin/lib/page.php on line 379" while reading response header from upstream, client: 127.0.0.1, server: _, request: "GET /phpldapadmin/htdocs/index.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm.socket:", host: "127.0.0.1"