Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

... 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
share|improve this question

2 Answers 2

up vote 1 down vote accepted

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.

EDIT:

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.

share|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

newaliases

this worked for me

share|improve this answer
2  
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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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