2

Postfix quit sending me mail from an Ubuntu 10.04LTS server. I spent an hour to two checking /etc/aliases, running and re-running sudo newaliases and sudo postfix reload, web searches for my issue etc.

Sample log entry:

Dec  9 11:35:32 localhost postfix/local[1901]: warning: lookup owner-database, NIS domain nisdomain, map mail.aliases: no such map in server's domain
Dec  9 11:35:32 localhost postfix/local[1902]: B33FFACE000: to=<root@server9>, orig_to=<root>, relay=local, delay=833, delays=833/0.02/0/0.09, dsn=4.3.0, status=deferred (alias database unavailable)

I am using NIS and I don't have a mail.aliases map, but my /etc/aliases file is just fine. It should still work, right? Wrong.

It turns out that NIS was the problem. The alias_maps directive was set up by the installer in the commented-out line, removing the second entry fixed it.

alias_maps = hash:/etc/aliases, nis:mail.aliases

change to

alias_maps = hash:/etc/aliases

With the original line, my expectation is that Postfix would first look in /etc/aliases, then in mail.aliases. Anyone care to comment as to why postfix does/should fail to send at all instead of just the valid entry from /etc/aliases?

masegaloeh
  • 17,978
  • 9
  • 56
  • 104
nortally
  • 381
  • 2
  • 11

1 Answers1

1

Before performing alias lookup, postfix will check all database whether it is reachable or not.

Pseudocode

if all mapping was OK (file was found, external server was reachable)
    for each map in maps_array:
        if found in map
            return result
else 
    fail. give warning in maillog
masegaloeh
  • 17,978
  • 9
  • 56
  • 104