1

Topic: Temporary lookup failure 51 4.3.0 cant send or receive

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

after rebooting server I have this error and can not send emails anymore.

Server error : »451 4.3.0 <mymail@domain.si>: Temporary lookup failure«

In log files I have this.
Sep 12 17:47:16 localhost postfix/trivial-rewrite[25568]: warning: proxy:mysql:/etc/postfix/mysql/virtual_mailbox_domains.cf: table lookup problem
Sep 12 17:47:16 localhost postfix/trivial-rewrite[25568]: warning: virtual_mailbox_domains lookup failure


Don't know what is wrong I checked passwords in mysql tables and set it again as it is in virtual_mailbox_domains.cf file for vmail user
also checked database of vmail is utf8_general_ci

now don't know what else can be?
All worked fev days until I have reboot. SElinux is off.
====

----

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

2

Re: Temporary lookup failure 51 4.3.0 cant send or receive

*) Make sure MySQL is running.
*) Make sure the MySQL username/password used in /etc/postfix/mysql/*.cf are correct.

3

Re: Temporary lookup failure 51 4.3.0 cant send or receive

ZhangHuangbin wrote:

*) Make sure MySQL is running.
*) Make sure the MySQL username/password used in /etc/postfix/mysql/*.cf are correct.

mysql is running
username is vmail password is set in mysql as it is in /etc/postfix/mysql/*.cf

4 (edited by Blisk 2016-09-13 02:45:11)

Re: Temporary lookup failure 51 4.3.0 cant send or receive

I also have tried this
$ mysql -uroot -p
mysql> USE vmail;
mysql> DESC mailbox;
mysql> DESC domain;

and result is

MariaDB [(none)]> mysql> USE vmail;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'mysql> USE vmail' at line 1
MariaDB [(none)]> mysql> DESC mailbox;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'mysql> DESC mailbox' at line 1
MariaDB [(none)]> mysql> DESC domain;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'mysql> DESC domain' at line 1

Mails can be send and receive only by users in the same domain like user1@mydomain.com to user2@mydomain.com
Don't know what can be wrong.

5

Re: Temporary lookup failure 51 4.3.0 cant send or receive

Blisk wrote:

MariaDB [(none)]> mysql> DESC domain;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'mysql> DESC domain' at line 1

You must remove "mysql> " when typing sql command in command line.

Please show us FULL output of command below, if it prints plain password, remove it before pasting:

postmap -v -q 'user@domain.com' mysql:/etc/postfix/mysql/virtual_mailbox_maps.cf

6

Re: Temporary lookup failure 51 4.3.0 cant send or receive

postmap -v -q 'dennis@mydomain.net' mysql:/etc/postfix/mysql/virtual_mailbox_maps.cf
postmap: name_mask: ipv4
postmap: inet_addr_local: configured 3 IPv4 addresses
postmap: cfg_get_str: /etc/postfix/mysql/virtual_mailbox_maps.cf: user = vmail
postmap: cfg_get_str: /etc/postfix/mysql/virtual_mailbox_maps.cf: password = 1234567890abcdefg
postmap: cfg_get_str: /etc/postfix/mysql/virtual_mailbox_maps.cf: dbname = vmail
postmap: cfg_get_str: /etc/postfix/mysql/virtual_mailbox_maps.cf: result_format = %s
postmap: cfg_get_int: /etc/postfix/mysql/virtual_mailbox_maps.cf: expansion_limit = 0
postmap: cfg_get_str: /etc/postfix/mysql/virtual_mailbox_maps.cf: query = SELECT                       CONCAT(mailbox.storagenode, '/', mailbox.maildir, '/Maildir/') FROM mailbox,domain WHERE mailbox.username='%s' AND mailbox.active=1 AND mailbox.enabledeliver=1 AND domain.domain = mailbox.domain AND domain.active=1
postmap: cfg_get_str: /etc/postfix/mysql/virtual_mailbox_maps.cf: domain =
postmap: cfg_get_str: /etc/postfix/mysql/virtual_mailbox_maps.cf: hosts = 127.0.0.1
postmap: dict_open: mysql:/etc/postfix/mysql/virtual_mailbox_maps.cf
postmap: dict_mysql_get_active: attempting to connect to host 127.0.0.1
postmap: dict_mysql: successful connection to host 127.0.0.1
postmap: dict_mysql: successful query from host 127.0.0.1
postmap: dict_mysql_lookup: retrieved 1 rows
vmail/mydomain.net/d/a/m/dennis-2016.09.12.15.49.37//Maildir/

7 (edited by Blisk 2016-09-13 16:51:29)

Re: Temporary lookup failure 51 4.3.0 cant send or receive

Ok I manage to come closer to this error.
warning: connect to 127.0.0.1:10031: Connection refused
Sep 13 10:41:26 localhost postfix/smtpd[22636]: warning: problem talking to server 127.0.0.1:10031: Connection refused
Sep 13 10:41:27 localhost postfix/smtpd[22636]: warning: connect to 127.0.0.1:10031: Connection refused
Sep 13 10:41:27 localhost postfix/smtpd[22636]: warning: problem talking to server 127.0.0.1:10031: Connection refused

I don't have installed policyd or cluebringer

after that I have checked main.cf and removed this
check_policy_service inet:127.0.0.1:10031,

why is this needed and why mail didn't work with this in main.cf?

8

Re: Temporary lookup failure 51 4.3.0 cant send or receive

Blisk wrote:

Sep 13 10:41:26 localhost postfix/smtpd[22636]: warning: problem talking to server 127.0.0.1:10031: Connection refused

It means Policyd or Cluebringer service is not running.

9

Re: Temporary lookup failure 51 4.3.0 cant send or receive

Blisk wrote:

Sep 13 10:41:26 localhost postfix/smtpd[22636]: warning: problem talking to server 127.0.0.1:10031: Connection refused

It means Policyd or Cluebringer service is not running.

10

Re: Temporary lookup failure 51 4.3.0 cant send or receive

Ok I checked and it was not installed at all so I have installed clue bringer setup database and passwords now it listen on

netstat -ntlp | grep 10031
tcp        0      0 127.0.0.1:10031         0.0.0.0:*               LISTEN      17051/perl


still can not receive or send emails, and no errors in postfix log

11

Re: Temporary lookup failure 51 4.3.0 cant send or receive

After rebooting email starts to work as it should but still have this errors in log.
how to get rid of it?
016/09/13-20:46:55 - 3238] [POLICIES] WARNING: [ID:6/Name:whitelists]: No group members for source group 'whitelists'
[2016/09/13-20:46:55 - 3238] [POLICIES] WARNING: [ID:7/Name:blacklists]: No group members for source group 'blacklists'
[2016/09/13-20:46:55 - 3238] [POLICIES] WARNING: [ID:8/Name:no_greylisting]: No group members for destination group 'no_greylisting_for_internal'
[2016/09/13-20:46:55 - 3238] [POLICIES] WARNING: [ID:9/Name:no_greylisting]: No group members for source group 'no_greylisting_for_external'

12

Re: Temporary lookup failure 51 4.3.0 cant send or receive

Policyd / Cluebringer were dropped by iRedMail for years, why do you prefer it? Your postfix shouldn't contain 'check_policy_service inet:127.0.0.1:10031' at all.

Greylisting, whitelisting, blacklisting, throttling, all are replaced by iRedAPD plugins.

13 (edited by Blisk 2016-09-14 14:12:18)

Re: Temporary lookup failure 51 4.3.0 cant send or receive

Don't know why it contains that?
I have downloaded latest iredmail and install it. It works fev days and after reboot I had problems.
So it is ok to uninstall cluebringer and delete this line from main.cf 'check_policy_service inet:127.0.0.1:10031'
IredAPD works on check_policy_service inet:127.0.0.1:7777 ???

14

Re: Temporary lookup failure 51 4.3.0 cant send or receive

I have checked again configuration and see why I had that in main.cf.
I have other server with installed iredmail and it is older version with cluebringer.
After my server didn't work I have copied those config files to my new server and forget I did that.
So I have now uninstalled cluebringer and used original config files from latest iredmail installation and problem still persist and don't know what is wrong?
I checked both main.cf from postfix and are alot differend, with old postfix main.cf works with new doesn't work. I still have this error.

Sep 14 09:36:26 localhost postfix/smtpd[17649]: NOQUEUE: reject: RCPT from mail.cpi.si[123.123.123.123]: 451 4.3.0 <myname@mydomain.si>: Temporary lookup failure;
warning: mysql:/etc/postfix/mysql/virtual-mailbox-maps.cf is unavailable. open /etc/postfix/mysql/virtual-mailbox-maps.cf: No such file or directory

15

Re: Temporary lookup failure 51 4.3.0 cant send or receive

I solved that too with this article
https://workaround.org/ispmail/wheezy/c … e-database

now works all

16

Re: Temporary lookup failure 51 4.3.0 cant send or receive

Blisk wrote:

Sep 14 09:36:26 localhost postfix/smtpd[17649]: NOQUEUE: reject: RCPT from mail.cpi.si[123.123.123.123]: 451 4.3.0 <myname@mydomain.si>: Temporary lookup failure;
warning: mysql:/etc/postfix/mysql/virtual-mailbox-maps.cf is unavailable. open /etc/postfix/mysql/virtual-mailbox-maps.cf: No such file or directory

iRedMail uses virtual_mailbox_maps.cf.