Solved [Solved] Postfix: unknown user?

Hi,
I got a strange error on my FreeBSD-9.3 RELEASE

Code:
# postfix start
postfix: fatal: file /usr/local/etc/postfix/main.cf: parameter mail_owner: unknown user name value: postfix

Code:
# postconf  mail_owner
mail_owner = postfix

Code:
# grep postfix /etc/passwd
postfix:*:125:125:Postfix Mail System:/var/spool/postfix:/usr/sbin/nologin

Code:
# grep postfix /etc/master.passwd
postfix:*:125:125::0:0:Postfix Mail System:/var/spool/postfix:/usr/sbin/nologin

Code:
# pw user add postfix
pw: user 'postfix' already exists
# pw user del postfix
pw: no such user `postfix'

how can I solve this issue?
Thank you
 
Re: Postfix: unknow user?

Well, the last pw command tells us that the problem lies within the OS and not so much Postfix.

First thing which comes to my mind; although the user may be listed in both /etc/passwd and /etc/master.passwd this doesn't tell us if the user is also listed in the database files. Considering the errors I get the impression that might be the cause of your problems.

So my suggestion would be to look into the pwd_mkdb(8) command.

Basically (as seen in the EXAMPLES section in the manualpage mentioned above) you might need to use this command: # /usr/sbin/pwd_mkdb -p /etc/master.passwd.
 
Re: Postfix: unknow user?

Your /etc/pwd.db is probably out of sync. This usually works: pwd_mkdb -p /etc/master.passwd. I can never remember that syntax so I usually do vipw(8), save and quit without making changes. That should also sync your password databases.
 
Back
Top