... related to a previous question about trouble running postfix on Centos 5.2(Final)

Looks like postfix relies on aliases.db which is built by newaliases.postfix command

When I run newaliases.postfix it just hangs indefinitely. I have found some tips, but they weren't helpful (I've changed /etc/hosts and /etc/sysconfig/network accordingly to no effect)

Running strace newaliases.postfix shows this

close(4)                                = 0
munmap(0x2b9bb210c000, 4096)            = 0
read(0,  <unfinished ...>

Apparently it's trying to read from standard input but never gets any input.

Am I supposed to feed something to newaliases?

When I try newaliases.postfix < /etc/aliases I get

newaliases.postfix: fatal: Recipient addresses must be specified on \
the command line or via the -t option

You shouldn't have to specify newaliases.postfix, it should just be newaliases - but then again, you didn't tell me if you are on FreeBSD, Linux, OS X, or ? What are you running?

Just the command by itself should digest the file. If it's hanging on the digest then something is horked.


Ok, you have /etc/aliases.db now, but postfix is failing to start on CentOS.

Try this (as root):

yum upgrade postfix
service postfix restart ; tail -f /var/log/maillog

When postfix fails to start, it should dump out an error message at the end of the log, and the tail command will show that message for you.

| improve this answer | |
  • it's centos 5.2 – Evgeny Jul 29 '09 at 18:16
  • well that made some difference I am cautiously optimistic :) – Evgeny Jul 29 '09 at 18:18
  • now I have aliases.db, but postfix still does not start – Evgeny Jul 29 '09 at 18:20

you have to put this on console and choose the right MTA (postfix in this case)

alternatives --config mta

then run


this worked for me

| improve this answer | |
  • 3
    For the record: I've just installed a completely fresh Centos 6.2 with only postfix installed. alternatives --config mta only had 1 option which was already selected, but selecting it again caused a /usr/bin/newaliases to be created. This seems to be a symlink via the /etc/alternatives/mta-newaliases link to /usr/bin/newaliases.postfix, yet the two behave differently. strace shows newaliases.postfix stops when it reads on stdin (read(0, ") .. newaliases doesn't read on stdin, it just seems to open /etc/passwd a few times then complete normally. – Neek Jul 19 '12 at 3:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.