• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Mail not hosted locally, MX records ignored

V

VyReN LLC

Guest
Mail not hosted locally, MX records ignored [SOLVED]

PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE
Parallels Plesk Panel v10.2.0_build1011110331.11 os_CentOS 5 64 bit

PROBLEM DESCRIPTION AND STEPS TO REPRODUCE
We have a domain where we only host the website, not the e-mail services. E-Mail services for this domain are turned off. The MX record has been updated with the proper IP address for mail to be delivered to. In Plesk 9 this was enough to have mail routed correctly. Mail generated externally is delivered as expected.

ACTUAL RESULT
When mail is sent from a form on this domain or via SMTP on this server, the mail attempts to deliver to the local machine (and bounces since the accounts don't exist here).

EXPECTED RESULT
All E-Mails for this domain that are created locally should "redirect" to the proper outside server.

ANY ADDITIONAL INFORMATION
This account was freshly created on the new Plesk 10.2 server hosted with GoDaddy. We haven't upgraded past 10.2 due to GoDaddy's internal update repo. It is possible to bypass and use the Parallels upgrade repo, but was advised against it (by GoDaddy, but they suck so we may do it anyway).
 
Last edited by a moderator:
First of all make sure that you have correct DNS records in zone of this domain. After that run following command:
# /usr/local/psa/bin/domain -u domain.tld -mail_service false
 
To prevent this situation I would like to know which key in which table holds the value of "mail_service"

I would like to execute a mysql command on my server that shows all the domains with "mail_service" turned on and not having e-mail accounts configured at all.

The domains found deserve some investigation.
These may have turned "mail_service" on when in fact it shouldn't.


Could you please tell me what command to use, or at least the name of the key?


This command gives me domains that does have addresses configured:
mysql -uadmin -p`cat /etc/psa/.psa.shadow ` psa -e 'select CONCAT(mail_name,"@",name) as email_address from mail left join domains on domains.id=mail.dom_id left join accounts on accounts.id=mail.account_id;' | awk -F@ '{print $2}' | sort | uniq

What I want can probably be done with 1 efficient mysql-command...
I just copied a command from here (http://pleskhacker.com/) and added a bit of generic bash.
 
IgorG - Thanks for the fast reply, that fixed the issue!

Frater - I believe, if I'm looking at the database correctly, the Table of DomainServices is what you are looking for. The domain we applied this setting to now has a status (column) of "16" under type "mail". The others have a status of "0". Did you know you can view the Plesk database in phpMyAdmin? Tools & Utilities->Databases->Click the little icon all the way to the right in the line for MySQL. Then select the "psa" database. But I think logic should tell you to be very careful, and you always need to run the appropriate command line function/program for plesk to reconfigure based on the database. I'm no pro here and have broken Plesk at least a dozen times mucking directly in the database. Don't do it unless you HAVE to. IMHO. :) I've found searching these forums or just asking the right question (See the OP) gets you an answer that doesn't involve mucking with the database.

On a side note... Been working with clients using Plesk for about 5 years now. From before the Parallel's buyout. And I've noticed something VERY different the last year. These forums are effective. IgorG is actually working very hard to reply and communicate on these forums. Two years ago if I posted this question I would have been lucky to get a response at all, much less within 24 hours. For what it is worth, I'm very pleased with the increased communication here on the forum. Before it was a lot of user on user bugfixing and hacking. Now we actually get real responses and have a path to submit bugs/issues to the dev team. +1 for Parallels (And IgorG, whomever you may be!)
 
VyReN, LLC,
Thank you very much for your kind words and for cooperation! :)
 
Frater - I believe, if I'm looking at the database correctly, the Table of DomainServices is what you are looking for. The domain we applied this setting to now has a status (column) of "16" under type "mail". The others have a status of "0".
VyReN, LLC, iirc that status can take 4 possible values: 0 or 16 when the domain is active, also 2 or 18 when the domain is suspended. Found that a while ago when I was working on building an automated command line tool for migrating clients across Plesk servers. That's why if you (or someone else for that matter) think of using that status for whatever purpose, bear in mind that it can take 4 values, not 2. This being said, I double your suggestion: don't fiddle with the database unless it's really necessary and you know what you're doing :)
Also, a sidenote about Plesk tech support responsiveness: it's usually down to the reporter providing useful information. The approach "after upgrading all my websites are displaying 404, now what?" doesn't work. The better the report, the bigger the changes to get someone @Parallels to look into it.
 
Also, a sidenote about Plesk tech support responsiveness: it's usually down to the reporter providing useful information. The approach "after upgrading all my websites are displaying 404, now what?" doesn't work. The better the report, the bigger the changes to get someone @Parallels to look into it.

Quite right note. It would be nice if everyone followed this rule :)
 
I had no intention at all to change any data in the 'psa' database.
I just want to query it and see all the domains that has mail enabled and no e-mail addresses configured.

I want to use this list for peace of mind.
I can then investigate these domains using the Plesk Panel and check if the setting make sense.
Changes will only be done using the Plesk Panel.

I just want to prevent the situation of the OP.

Anyone knows already knows enough now how such a SQL-command would look like?
 
Last edited:
Back
Top