1

Topic: Change IP on server

==== Required information ====
- iRedMail version: 0.8.4
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Linux/BSD distribution name and version: FreeBSD 9.1 x64
- Related log if you're reporting an issue:
====
I restore users from old server (ubuntu 12.04) file.ldif on new server with FreeBSD_9.1_x64 by manual http://www.iredmail.org/wiki/index.php? … FAQ/Backup
After this I changed IP on new server same old server (old is down).
The messages is not sending.
====
#postqueue -p

-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
927F913C37F      461 Wed May  8 10:16:22  user1@exampl.com
(host 127.0.0.1[127.0.0.1] said: 421 4.3.2 Service shutting down, closing channel (in reply to MAIL FROM command))
                                        user2@exampl.com

1866B139B3B      629 Wed May  8 14:02:28  user1@exampl.com
(host 127.0.0.1[127.0.0.1] said: 421 4.3.2 Service shutting down, closing channel (in reply to MAIL FROM command))
                                         user2@exampl.com

====
In /var/log/maillog
====

May  8 14:30:39 post-bsd64-s4 amavis[905]: (00905-01) (!)connect_to_ldap: unable to connect to host 127.0.0.1
May  8 14:30:39 post-bsd64-s4 amavis[905]: (00905-01) (!!)TROUBLE in process_request: connect_to_ldap: unable to connect at (eval 118) line 149.
May  8 14:30:39 post-bsd64-s4 amavis[905]: (00905-01) (!)Requesting process rundown after fatal error

====

----

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

2

Re: Change IP on server

Hoper wrote:

May  8 14:30:39 post-bsd64-s4 amavis[905]: (00905-01) (!!)TROUBLE in process_request: connect_to_ldap: unable to connect at (eval 118) line 149.

*) Is OpenLDAP service running?
*) Do you have correct LDAP bind dn and password in Amavisd config file (/usr/local/etc/amavisd.conf)? under parameter "$enable_ldap".

3

Re: Change IP on server

ZhangHuangbin wrote:
Hoper wrote:

May  8 14:30:39 post-bsd64-s4 amavis[905]: (00905-01) (!!)TROUBLE in process_request: connect_to_ldap: unable to connect at (eval 118) line 149.

*) Is OpenLDAP service running?

Yes

ZhangHuangbin wrote:
Hoper wrote:

*) Do you have correct LDAP bind dn and password in Amavisd config file (/usr/local/etc/amavisd.conf)? under parameter "$enable_ldap".

bind & password is correct.
Enter to https://IP/ldap/   
cn=vmail,... with pass from file /usr/local/etc/amavisd.conf - OK
Enter to mysql
'DBI:mysql:database=amavisd;host=127.0.0.1;port=3306', 'amavisd', '.....' - OK

4 (edited by kdash224 2013-07-18 18:05:18)

Re: Change IP on server

Hoper wrote:
ZhangHuangbin wrote:
Hoper wrote:

May  8 14:30:39 post-bsd64-s4 amavis[905]: (00905-01) (!!)TROUBLE in process_request: connect_to_ldap: unable to connect at (eval 118) line 149.

*) Is OpenLDAP service running?

Yes

ZhangHuangbin wrote:
Hoper wrote:

*) Do you have correct LDAP bind dn and password in Amavisd config file (/usr/local/etc/amavisd.conf)? under parameter "$enable_ldap".

bind & password is correct.
Enter to https://IP/ldap/   
cn=vmail,... with pass from file /usr/local/etc/amavisd.conf - OK
Enter to mysql
'DBI:mysql:database=amavisd;host=127.0.0.1;port=3306', 'amavisd', '.....' - OK



/etc/rc.conf
slapd_flags='-h "ldapi://%2fvar%2frun%2fopenldap%2fldapi/ ldap://0.0.0.0/ ldaps://0.0.0.0/"'

slapd_flags='-h "ldapi://%2fvar%2frun%2fopenldap%2fldapi/ ldap:/// ldaps:///"'

/usr/local/etc/amavisd.conf
$default_ldap   = {
    hostname        => "127.0.0.1",

$default_ldap   = {
    hostname        => "::1",

/usr/local/etc/rc.d/slapd restart
/usr/local/etc/rc.d/amavisd restart

postqueue -f

Try it

5

Re: Change IP on server

kdash224 wrote:
Hoper wrote:
ZhangHuangbin wrote:

*) Is OpenLDAP service running?

Yes

bind & password is correct.
Enter to https://IP/ldap/   
cn=vmail,... with pass from file /usr/local/etc/amavisd.conf - OK
Enter to mysql
'DBI:mysql:database=amavisd;host=127.0.0.1;port=3306', 'amavisd', '.....' - OK



/etc/rc.conf
slapd_flags='-h "ldapi://%2fvar%2frun%2fopenldap%2fldapi/ ldap://0.0.0.0/ ldaps://0.0.0.0/"'

slapd_flags='-h "ldapi://%2fvar%2frun%2fopenldap%2fldapi/ ldap:/// ldaps:///"'

/usr/local/etc/amavisd.conf
$default_ldap   = {
    hostname        => "127.0.0.1",

$default_ldap   = {
    hostname        => "::1",

/usr/local/etc/rc.d/slapd restart
/usr/local/etc/rc.d/amavisd restart

postqueue -f

Try it

I had this same problem, your solution solved the problem :-)

6

Re: Change IP on server

I have some problem. Thanks.

7

Re: Change IP on server

Hi all,

Does adding 'inet6 => 0,' in '$default_ldap {}' section solve this issue? For example:

$enable_ldap = 1;
$default_ldap   = {
    ...
    inet6           => 0,          # <-- Add this line.
    ...
};

Restarting Amavisd service is required after you changed its config file.