THIS ARTICLE IS A SOLUTION FOR PLESK 10.4 AND EARLIER.
TO VIEW THE MOST UPDATED ARTICLE, VISIT HERE
A while back, I was having an issue with my mail not being delivered. I would write a function using
<?php mail(); ?>
and it would successfully send an email to every address EXCEPT one particular address. I couldn’t tell why. This is something that occurs on Parellels’ PLESK server administration software.
I’ll get to it awfully quick, then I’ll tell you how I figured it out.
First, you need to ask yourself, is this email address the same domain being hosted on PLESK? Bingo. The problem was that when PostFix (the SMTP sendmail uses by default in most cases) determined the address to be the same as the domain it was hosting, it did a local search to find that address rather than just sending the email.
Naturally, if you didn’t have that particular email address set up, or any email with that extension set up on the server, it found nothing, and wouldn’t send the email. There is a very easy fix to this issue by commenting out 3 lines in your Postfix ‘main.cf’ configuration file. This was originally documented by Luke Tarplin, and I can’t explain how helpful it was.
Find your ‘main.cf’ configuration file for PostFix, which for CentOS 6, is located at
If you can’t find it, do a
# which postfix
SSH command to at least see where Postfix is on your server.
Then, open the file up through a text editor, or in the Linux shell, and make these lines (should be at the end of the file, around line 677) :
virtual_mailbox_domains = $virtual_mailbox_maps, hash:/var/spool/postfix/plesk/virtual_domains virtual_alias_maps = $virtual_maps, hash:/var/spool/postfix/plesk/virtual virtual_mailbox_maps = hash:/var/spool/postfix/plesk/vmailbox
commented out like this :
#virtual_mailbox_domains = $virtual_mailbox_maps, hash:/var/spool/postfix/plesk/virtual_domains #virtual_alias_maps = $virtual_maps, hash:/var/spool/postfix/plesk/virtual #virtual_mailbox_maps = hash:/var/spool/postfix/plesk/vmailbox
Then, restart the Postfix service, and Apache while your at it (can’t hurt), and voila! Your email address should be receiving those emails now. This also doesn’t affect any of your regular emails or anything else, either.
Now, I figured out how to look for this by checking over my mail logs. Any time you have an error with sending an email, check your mail logs. For CentOS, they are located:
although for most Linux OS, they are located
On mine, I noticed that the output for that particular email kept saying
Apr 10 10:26:29 ######### postfix/qmgr: 19EA21827: from= <firstname.lastname@example.org>, size=645, nrcpt=1 (queue active) Apr 10 10:26:29 ######### postfix-local: postfix-local: email@example.com, firstname.lastname@example.org, dirname=/var/qmail/mailnames Apr 10 10:26:29 ######### postfix-local: cannot chdir to mailname dir name: No such file or directory Apr 10 10:26:29 ######### postfix-local: Unknown user: email@example.com Apr 10 10:26:29 ######### postfix/pipe: 19EA21827: to=<firstname.lastname@example.org>, 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: 19EA21827: removed </email@example.com></firstname.lastname@example.org>
On line 2, you can see that Postfix begins a
search. That was a dead giveaway that for some reason PostFix was reverting to a local search. I put 2 and 2 together and starting searching for the appropriate solution.
If, for some reason, you happen to have similar circumstances but this isn’t the right solution, just remember : Always check your mail logs. It has everything you could ever need to know in fixing a problem. Good luck and happy coding!
- centos email postfix wont send
- one address wont receive email
- one email address isnt receiving emails
- php mail() not sending email to address
- php mail() wont send email to one address
- plesk hosting site sending email to site
- plesk local loop for email
- plesk sending email
- postfix doesnt send email to one address
- postfix not sending email
- postfix sendmail centos
- site on plesk wont receive email