Delivery temporarily suspended: Host or domain name not found

15,273

Looks like your situation looks similar to scenario in this article: postfix in dialup machine.

Taken from that article, here some consideration.

  • Disable spontaneous SMTP mail delivery (if using on-demand dialup IP only).

    With below parameter, postfix won't attempt to send email unless you run postqueue -f manually. Place this parameter in main.cf. More info in here.

      defer_transports = smtp # (Only for on-demand dialup IP hosts)
    
  • Disable SMTP client DNS lookups (dialup LAN only).

    Disable DNS lookups in the Postfix SMTP and LMTP clients. When disabled, hosts are looked up with the getaddrinfo() system library routine which normally also looks in /etc/hosts. So, place the entry of mailad.ad.vz on /etc/hosts. For example

      # echo "192.168.1.99  mailad.ad.vz" >> /etc/hosts
    

    And add this parameter in main.cf

      disable_dns_lookups = yes #(Only for on-demand dialup IP hosts)
    
Share:
15,273
Kirill
Author by

Kirill

Updated on September 18, 2022

Comments

  • Kirill
    Kirill almost 2 years

    I have two independent domain ad.vz and ad2.vz, there is gateway between them. There are 3 postfix servers:

    • mailad.ad.vz - postfix server in first domain
    • mailsh - gateway with postfix and two network adapters
    • mailinet.ad2.vz - postfix server in second domain

    Mailsh can connect at once only with one network area. There work relay, which turn up/down eth every 30 second. I start stress test in mailad whitch send 20 letters, 500KB every 30 second. Sometimes queue begins to accumulate. I can see in maillog follow message:

    Sep  4 08:51:01 mailsh postfix/error[9602]: CFA5E131A7: to=<[email protected]>, relay=none, delay=33, delays=32/0/0/0, dsn=4.4.3, status=deferred (delivery temporarily suspended: Host or domain name not found. Name service error for name=mailinet.ad.vz type=MX: Host not found, try again)"
    

    Every time when adapter turn up, I send command postqueue -f

    Why queue can accumulate ?

    mailad postconf:

    alias_database = hash:/etc/aliases
    alias_maps = hash:/etc/aliases
    command_directory = /usr/sbin
    config_directory = /etc/postfix
    daemon_directory = /usr/libexec/postfix
    data_directory = /var/lib/postfix
    debug_peer_level = 2
    html_directory = no
    inet_interfaces = all
    inet_protocols = all
    mail_owner = postfix
    mailq_path = /usr/bin/mailq.postfix
    manpage_directory = /usr/share/man
    mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
    mydomain = vzavod.ru
    myhostname = mailad.vzavod.ru
    newaliases_path = /usr/bin/newaliases.postfix
    queue_directory = /var/spool/postfix
    readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
    sample_directory = /usr/share/doc/postfix-2.6.6/samples
    sendmail_path = /usr/sbin/sendmail.postfix
    setgid_group = postdrop
    transport_maps = hash:/etc/postfix/transport
    unknown_local_recipient_reject_code = 550
    transport settings:
    vzavod.ru   local
    *       smtp:mailsh.ad.vz
    

    mailsh postconf:

    alias_database = hash:/etc/aliases
    alias_maps = hash:/etc/aliases
    command_directory = /usr/sbin
    config_directory = /etc/postfix
    daemon_directory = /usr/libexec/postfix
    data_directory = /var/lib/postfix
    debug_peer_level = 2
    html_directory = no
    inet_interfaces = all
    inet_protocols = all
    mail_owner = postfix
    mailq_path = /usr/bin/mailq.postfix
    manpage_directory = /usr/share/man
    mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
    mydomain = vzavod.ru
    myhostname = mailsh.vzavod.ru
    newaliases_path = /usr/bin/newaliases.postfix
    queue_directory = /var/spool/postfix
    readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
    sample_directory = /usr/share/doc/postfix-2.6.6/samples
    sendmail_path = /usr/sbin/sendmail.postfix
    setgid_group = postdrop
    transport_maps = hash:/etc/postfix/transport
    unknown_local_recipient_reject_code = 550
    

    transport settings:

    *       smtp:mailinet.ad.vz
    vzavod.ru   smtp:mailad.ad.vz
    
    • 89c3b1b8-b1ae-11e6-b842-48d705
      89c3b1b8-b1ae-11e6-b842-48d705 almost 10 years
      " Name service error for name=mailinet.ad.vz type=MX: Host not found, try again)" can you 'see' that host from the server?
    • Ladadadada
      Ladadadada almost 10 years
      Does "There work relay, which turn up/down eth every 30 second." mean that sometimes the server in question is not connected to the network? Or maybe switches networks with a brief downtime between? The default minimal_backoff_time is 300 seconds so if a mail fails to send it won't re-attempt to send for five minutes.
    • Kirill
      Kirill almost 10 years
      Ladadadada: If users send e-mails to vzavod.ru ([email protected], for example) they will get it without delay inside windows domain ad.vz. If users send E-mail outside ([email protected], for example) first it come to gateway mailsh.ad.vz, when it become available. Mailsh send command postqueue -f to flush queue from mailad. After 30 second mailsh switch network to another windows domain ad.vz with Internet availability and flush all mails to another postfix server mailinet. So networks have a brief downtime. Problem is sometimes letters can't flush from deferred queue
    • Kirill
      Kirill almost 10 years
      tristan: Yes, i can see that host