Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using the PHP mail() function, using PostFix, on CentOS6, Plesk 10.4, and my email is not getting delivered to a particular address. My personal GMail and Yahoo email addresses receive email from my server fine and do not produce errors. After a wonderful suggestion on here, I checked my mail logs, and this is the error I see :

Apr 10 10:26:29 ######### postfix/qmgr[8323]: 19EA21827: from=
<>, size=645, nrcpt=1 (queue active)
Apr 10 10:26:29 ######### postfix-local[8331]: postfix-local:,,
Apr 10 10:26:29 ######### postfix-local[8331]: 
cannot chdir to mailname dir name: No such file or directory
Apr 10 10:26:29 ######### postfix-local[8331]: 
Unknown user:
Apr 10 10:26:29 ######### postfix/pipe[8330]: 19EA21827:
to=<>, relay=plesk_virtual, delay=0.15, delays=0.11/0/0/0.04,
dsn=2.0.0, status=sent (delivered via plesk_virtual service)
Apr 10 10:26:29 ######### postfix/qmgr[8323]: 19EA21827: removed is the name I've declared in php.ini for

sendmail_from = "" sendmail_path = "/usr/sbin/sendmail -t -f"

and the recipient is supposed to be

Is this an error on my side or the recipients? Can I address this on my server?

Many thanks SF.


locked by HopelessN00b Jan 12 '15 at 11:17

This question exists because it has historical significance, but it is not considered a good, on-topic question for this site, so please do not use it as evidence that you can ask similar questions here. This question and its answers are frozen and cannot be changed. More info: help center.

closed as off-topic by HopelessN00b Jan 12 '15 at 11:17

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions should demonstrate reasonable business information technology management practices. Questions that relate to unsupported hardware or software platforms or unmaintained environments may not be suitable for Server Fault - see the help center." – HopelessN00b
If this question can be reworded to fit the rules in the help center, please edit the question.

Check the contents of mail logs in /var/log/ – becomingwisest Apr 10 '12 at 13:34
hm.... /var/log/mail/ is empty, and /var/log/maillog and all files like it are blank. I've sent emails with this server.... is that normal? – RCNeil Apr 10 '12 at 13:42
looks like CentOS doesn't use /var/log/maillog, they use /usr/local/psa/var/log/maillog instead... – RCNeil Apr 10 '12 at 13:58
I do not speak Postfix but it seems that your web server thinks it should deliver the mail locally. Does your problem exist with any recipient, or only with your domains? Is it the case that your email is hosted elsewhere (e.g. Google) than your web server in question? – adamo Apr 10 '12 at 15:15
The problem only exists for the recipient's address - GMail, Yahoo, MSN, all receive emails from my server with the mail() function fine and do not produce the same errors in my mail logs. I never set up a SMTP outside the server, so I would imagine it's still on my server. Hope I answered that correctly. – RCNeil Apr 10 '12 at 15:19
up vote 2 down vote accepted

I've discovered this is an error due to PLESK (and the user), and because there isn't much documentation on it, I think this post is worth keeping.

Because I had the vhost domain of the email address I was sending to established in PLESK, it tried to revert to a local Postfix search when it recognized the tail end of the email address as something it thought was hosted on the server itself.

There is documentation on how to fix this in the PostFix configuration file here.

I appreciate everyone's efforts.

I've been scratching my head about this same issue for ages myself, thank you for sharing the info on how to fix it! – Vince Pettit Nov 15 '13 at 14:38

Apr 10 10:26:29 ######### postfix-local[8331]: postfix-local:,, dirname=/var/qmail/mailnames Apr 10 10:26:29 ######### postfix-local[8331]: cannot chdir to mailname dir name: No such file or directory Apr 10 10:26:29 ######### postfix-local[8331]: Unknown user:

Contrary to what you may think, these are not postfix logs.

Postfix prefixes all log messages with postfix/<servicename> - never postfix-<servicename>

I don't think anything. Would it provide better insight if I found and posted the PostFix logs? Should I change the title of my post to better suit my problem? – RCNeil Apr 10 '12 at 15:00
What I mean is that I suspect that those are not written by postfix - hence postfix is only part of the mail delivery chain and may or may not be part of the problem. – adaptr Apr 10 '12 at 15:25
Yea, even stranger is what @adamo suggested, that it starts with Postfix, reverts to local for some reason, then the final output (which I added to my post later) is Postfix, no? It even returns a 'status=sent' which can't be right either, although from what I've read this is a PLESK 10.3+ bug. – RCNeil Apr 10 '12 at 15:28
You should have included the real postfix logs right away; I could have told you that the postfix-local lines were irrelevant, and wrong. as you can see from the pipe(8) delivery, postfix handed the message off to plesk. – adaptr Apr 10 '12 at 15:43
Sorry. I'm learning this as I go. – RCNeil Apr 10 '12 at 15:47

I had this issue too. Any email being sent to my company domain was being sent locally. This is (I believe) because in Plesk (yes it's a Plesk issue).

So basically it's going oh is the registered user lets send any emails locally or something like that.

Anyway, I have had to fix this twice now and I did it by editing the /etc/postfix/ file and commenting out the lines that started with "virtual".

See for instructions on how to fix the issue


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