{"id":129,"date":"2009-11-04T13:30:48","date_gmt":"2009-11-04T18:30:48","guid":{"rendered":"http:\/\/1uthavi.adadaa.com\/?p=129"},"modified":"2009-11-04T13:30:48","modified_gmt":"2009-11-04T18:30:48","slug":"wildcard-dns-webmail-atmail","status":"publish","type":"post","link":"https:\/\/adadaa.net\/1uthavi\/2009\/11\/04\/wildcard-dns-webmail-atmail\/","title":{"rendered":"Plesk, Wildcard DNS and Webmail"},"content":{"rendered":"<p>If you have a Virtual Private Server [VPS] on a CentOS and use Plesk as a control panel and want to add Wildard &#8220;*&#8221; DNS entry while still maintaining webmail.domain.com, then you have come to the right place.<\/p>\n<p><em><strong>Throughout the steps, replace <span style=\"color: #ff0000\">domain.com<\/span> with your <span style=\"color: #808000\">actual <\/span>domain name.<\/strong><\/em><\/p>\n<p>When you add ServerAlias *.domain.com to the vhost.conf file, the already working webmail.domain.com will no longer work, as the wildcard will catch that.<\/p>\n<p><strong><span style=\"text-decoration: underline\">How to add Wildcard &#8220;*&#8221; DNS entry<\/span><\/strong><\/p>\n<p>In your domain, select DNS Settings<\/p>\n<p>Click Add Record<\/p>\n<p>Select CNAME for Record Type;  put * into domain name and domain.com for the canonical name. [You may use A record type too]<\/p>\n<p>Login to PowerPanel [Parallels Power Panel] as root<\/p>\n<p style=\"padding-left: 30px\">&#8211; click File Manager<br \/>\n&#8211; go to  \/  var\/  www\/  vhosts\/  domain.com\/  conf\/<br \/>\n&#8211; there you&#8217;ll find <em>httpd.include<\/em> do not edit this.  This is automatically updated by Plesk.<br \/>\n&#8211; create\/update another file <em>vhost.conf<\/em><br \/>\n&#8211; enter only<\/p>\n<p style=\"padding-left: 60px\">ServerAlias *.domain.com<\/p>\n<p style=\"padding-left: 30px\">&#8211; do not enter &lt;VirtualHost inside the file.\u00a0 this file will be included inside httpd.include.\u00a0 So that syntax already exists.<\/p>\n<p><em>To run commands, you can use SSH Client.  In PowerPanel, click &#8220;SSH Connection&#8221; and Login.<\/em><\/p>\n<p>&#8211; after the creation of vhost.conf file, we need to run the update. run the following.  If no error message is displayed, then all is good.<\/p>\n<p style=\"padding-left: 30px\">&#8211; # \/usr\/local\/psa\/admin\/bin\/websrvmng -av<\/p>\n<p>&#8211; whether the vhost.conf was new or not, you will need to reload the Apache configuration:<\/p>\n<p style=\"padding-left: 30px\">&#8211; # \/etc\/init.d\/httpd reload<\/p>\n<p>If you want, you can restart Apache using the command:<\/p>\n<p style=\"padding-left: 30px\">&#8211; # \/sbin\/service httpd restart<\/p>\n<p>Now you have added the Wildcard &#8220;*&#8221; DNS Entry in both DNS Settings and vhost.conf.  Let&#8217;s make sure AtMail is working.<\/p>\n<p><span style=\"text-decoration: underline\"><strong>How to make AtMail working even after adding Wildcard &#8220;*&#8221; DNS entry<\/strong><\/span><\/p>\n<p>Click File Manager<\/p>\n<p style=\"padding-left: 30px\">&#8211; go to  \/  etc\/  httpd\/  conf.d\/<\/p>\n<p>You&#8217;ll see a file called<\/p>\n<p style=\"padding-left: 30px\">zz_atmail_vhost.conf<\/p>\n<p>This is the AtMail configuration file.  Because the filename starts with &#8220;zz&#8221; it is at the bottom of sort order.  It is this order Apache processes the configuration.  So we need to put this file just above zz010_psa_httpd.conf [<em>in your server, you may not find exactly this file.  You should find something similar to this name<\/em>].<\/p>\n<p>So I just renamed our <strong><em>zz_atmail_vhost.conf<\/em><\/strong> to <em><strong>zz001_atmail_vhost.conf<\/strong><\/em><br \/>\nThis put the file just above our zz010_psa_httpd.conf  [note: <em>I tried putting atmail_vhost.conf, which put it at the top, but that made viewing received emails <\/em>impossible]<\/p>\n<p>Now you need to restart qmail.<br \/>\nYou can restart qmail using Plesk under Server -&gt; Service Management. You can use &#8216;service qmail restart&#8217; on CentOS.<\/p>\n<p>Even after this, if you still not able to view received emails, just restart your container [PowerPanel].<\/p>\n<p><em>This is not necessary but you can rebuild Qmail configuration files using \/usr\/local\/psa\/admin\/sbin\/mchk utility. <\/em><\/p>\n<p><em>Test:<\/em><\/p>\n<p>check webmail.domain.com is working [make sure sending, receiving and <em><strong>able to read received emails<\/strong><\/em> working]<br \/>\ncheck your wildcard dns working [that is your dynamic subdomains you may already have working]<br \/>\ncheck any domain alias you may have working.<br \/>\ncheck your main domain.com working<\/p>\n<p><em>Thanks to:<\/em><\/p>\n<p>http:\/\/forum.parallels.com\/showthread.php?t=91870<br \/>\nhttp:\/\/rackerhacker.com\/2007\/08\/10\/using-wildcard-subdomains-in-plesk\/<br \/>\nhttp:\/\/kb.parallels.com\/en\/1380<br \/>\nhttp:\/\/forum.parallels.com\/showthread.php?t=74996<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you have a Virtual Private Server [VPS] on a CentOS and use Plesk as a control panel and want to add Wildard &#8220;*&#8221; DNS entry while still maintaining Webmail.domain.com, then you have come to the right place.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[9,15,16],"class_list":["post-129","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-atmail","tag-webmail","tag-wildcard-dns"],"_links":{"self":[{"href":"https:\/\/adadaa.net\/1uthavi\/wp-json\/wp\/v2\/posts\/129","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/adadaa.net\/1uthavi\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/adadaa.net\/1uthavi\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/adadaa.net\/1uthavi\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/adadaa.net\/1uthavi\/wp-json\/wp\/v2\/comments?post=129"}],"version-history":[{"count":0,"href":"https:\/\/adadaa.net\/1uthavi\/wp-json\/wp\/v2\/posts\/129\/revisions"}],"wp:attachment":[{"href":"https:\/\/adadaa.net\/1uthavi\/wp-json\/wp\/v2\/media?parent=129"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/adadaa.net\/1uthavi\/wp-json\/wp\/v2\/categories?post=129"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/adadaa.net\/1uthavi\/wp-json\/wp\/v2\/tags?post=129"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}