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.

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=
<my.valid.email@myserver.com>, size=645, nrcpt=1 (queue active)
Apr 10 10:26:29 ######### postfix-local[8331]: postfix-local: 
from=my.valid.email@myserver.com, to=name@company.com,
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: name@company.com
Apr 10 10:26:29 ######### postfix/pipe[8330]: 19EA21827:
to=<name@company.com>, 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

my.valid.email@myserver.com is the name I've declared in php.ini for

sendmail_from = "my.valid.email@myserver.com" sendmail_path = "/usr/sbin/sendmail -t -f my.valid.email@myserver.com"

and the recipient is supposed to be name@company.com.

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

Many thanks SF.

share|improve this question
2  
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
2  
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 - name@company.com. 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

2 Answers 2

Apr 10 10:26:29 ######### postfix-local[8331]: postfix-local: from=my.valid.email@myserver.com, to=name@company.com, 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: name@company.com

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

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

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

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

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.