1

Topic: transport_maps_user.cf: query error: Application error

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.7.1 SQL
- Deployed with iRedMail Easy or the downloadable installer? Downloadable installer
- Linux/BSD distribution name and version:  Debian 12.8
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx):Nginx
- Manage mail accounts with iRedAdmin-Pro? : 1309
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Some users are unable to send messages. The issue appears and disappears intermittently. Error 451.
The problem occurs every few minutes.

log mail.log:
Dec 11 15:47:00 mail postfix/smtpd[221929]: NOQUEUE: reject: RCPT from pi01.ssz.local[192.168.87.112]: 451 4.3.0 <user@domain.pl>: Temporary lookup failure; from=<user@domain.pl> to=<user@gmail.com> proto=ESMTP helo=<pi01.ssz.local>
Sometimes I catch the problem:

root@mail:/usr/local/sbin# postmap -q "user@domain.pl" proxy:mysql:/etc/postfix/mysql/transport_maps_user.cf
postmap: fatal: table proxy:mysql:/etc/postfix/mysql/transport_maps_user.cf: query error: Application error

root@mail:~# netstat -lnap | grep :3306 | wc -l
146

my.cnf:
max_connections=640
max_allowed_packet     = 512M

----

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

2

Re: transport_maps_user.cf: query error: Application error

Temporary lookup failure;

Your DNS resolver is the problem

3

Re: transport_maps_user.cf: query error: Application error

What's the full output of postmap command with "-v" argument?

postmap -v -q "user@domain.pl" proxy:mysql:/etc/postfix/mysql/transport_maps_user.cf

Note: remove sensitive info before pasting here.

4

Re: transport_maps_user.cf: query error: Application error

root@mail:/usr/local/sbin# postmap -v -q "user@domain.pl" proxy:mysql:/etc/postfix/mysql/transport_maps_user.cf
postmap: name_mask: all
postmap: inet_addr_local: configured 4 IPv4 addresses
postmap: inet_addr_local: configured 0 IPv6 addresses
postmap: connect to subsystem /var/spool/postfix/private/proxymap
postmap: /var/spool/postfix/private/proxymap socket: wanted attribute: protocol
postmap: input attribute name: protocol
postmap: input attribute value: proxymap_protocol
postmap: /var/spool/postfix/private/proxymap socket: wanted attribute: (list terminator)
postmap: input attribute name: (end)
postmap: send attr request = open
postmap: send attr table = mysql:/etc/postfix/mysql/transport_maps_user.cf
postmap: send attr flags = 0
postmap: /var/spool/postfix/private/proxymap socket: wanted attribute: status
postmap: input attribute name: status
postmap: input attribute value: 0
postmap: /var/spool/postfix/private/proxymap socket: wanted attribute: flags
postmap: input attribute name: flags
postmap: input attribute value: 542800
postmap: /var/spool/postfix/private/proxymap socket: wanted attribute: (list terminator)
postmap: input attribute name: (end)
postmap: dict_proxy_open: connect to map=mysql:/etc/postfix/mysql/transport_maps_user.cf status=0 server_flags=fixed|lock|no_regsub|fold_fix|utf8_request
postmap: dict_open: proxy:mysql:/etc/postfix/mysql/transport_maps_user.cf
postmap: send attr request = lookup
postmap: send attr table = mysql:/etc/postfix/mysql/transport_maps_user.cf
postmap: send attr flags = 540737
postmap: send attr key = user@domain.pl
postmap: /var/spool/postfix/private/proxymap socket: wanted attribute: status
postmap: input attribute name: status
postmap: input attribute value: 1
postmap: /var/spool/postfix/private/proxymap socket: wanted attribute: value
postmap: input attribute name: value
postmap: input attribute value: (end)
postmap: /var/spool/postfix/private/proxymap socket: wanted attribute: (list terminator)
postmap: input attribute name: (end)
postmap: dict_proxy_lookup: table=mysql:/etc/postfix/mysql/transport_maps_user.cf flags=warn_dup|lock|fold_fix|utf8_request key=user@domain.pl -> status=1 result=

5

Re: transport_maps_user.cf: query error: Application error

local mail doesn't work either (sometimes):

Dec 12 07:17:01 mail postfix/smtpd[337172]: NOQUEUE: reject: RCPT from unknown[192.168.87.30]: 451 4.3.0 <user@domain.pl>: Temporary lookup failure; from=<user@domain.pl> to=<user1@domain.pl> proto=ESMTP helo=<desktop.ssz.local>

6

Re: transport_maps_user.cf: query error: Application error

It's your DNS resolver which causes problems, which one are you useing?

7

Re: transport_maps_user.cf: query error: Application error

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
# 127.0.0.53 is the systemd-resolved stub resolver.
# run "resolvectl status" to see details about the actual nameservers.
nameserver 208.67.222.222
nameserver 208.67.220.220
nameserver 8.8.8.8

8

Re: transport_maps_user.cf: query error: Application error

208.67.222.222 and 208.67.220.220 belong to OpenDNS, 8.8.8.8 belongs to Google

you can't use those, you'll get false queries from SA which blocks public resolvers

either use your own resolver, or the one by your hosting provider instead, this will aswell resolve the other issues you have

personally, i use unbound as resolver and never had any issues

9 (edited by tm 2024-12-12 20:12:57)

Re: transport_maps_user.cf: query error: Application error

This server has been running like this for several years, and the issue appeared after the Debian update. iRedMail was updated earlier – and it was working.


I also tried using local DNS – it doesn't make any difference.

10

Re: transport_maps_user.cf: query error: Application error

Try to convert "vmail" SQL database and all its tables to utf8mb4 character set.

11 (edited by tm 2024-12-13 18:25:22)

Re: transport_maps_user.cf: query error: Application error

Done. The error still occurs. It didn't change anything.

The problem most often occurs for users within the server.