{"id":428,"date":"2015-09-11T06:12:54","date_gmt":"2015-09-11T06:12:54","guid":{"rendered":"http:\/\/www.exploreax.com\/blog\/?p=428"},"modified":"2015-09-16T06:11:35","modified_gmt":"2015-09-16T06:11:35","slug":"ax-db-restore-scripts-6-smtp-server-and-dmf-folder","status":"publish","type":"post","link":"http:\/\/www.exploreax.com\/blog\/blog\/2015\/09\/11\/ax-db-restore-scripts-6-smtp-server-and-dmf-folder\/","title":{"rendered":"AX DB Restore Scripts #6 &#8211; SMTP Server and DMF Folder"},"content":{"rendered":"<p>Recently I started creating a list and a<a href=\"http:\/\/www.exploreax.com\/blog\/blog\/2015\/09\/01\/ax-database-restore-scripts-list\/\"> series of posts<\/a> on SQL scripts\u00a0I\u00a0use when restoring Dynamics AX databases from one environment to another, typically from production to QA or development.<\/p>\n<p>We have so far discussed a number of configurations that must be changed for the new system to operate effectively and starting yesterday we moved onto exploring more optional configurations.<\/p>\n<p>Today we will cover two of these items namely re-configuring the outgoing SMTP server\u00a0in AX and configuring the settings for the DMF working folder.<\/p>\n<p><em>Note: In my experience the SMTP server will most likely not change between a production and development server, but you may need to reconfigure it if moving to a new domain etc. Similarly it will work to use the same DMF shared folder between PROD and DEV, however I would recommend changing this to keep the data 100% separate.<\/em><\/p>\n<p>These two configurations are located in\u00a0the Dynamics AX 2012 client\u00a0under the following paths.<br \/>\n1. SMTP Server, accessed via System Administration -&gt; Setup -&gt; System -&gt;\u00a0E-mail parameters.<a href=\"http:\/\/www.exploreax.com\/blog\/wp-content\/uploads\/2015\/09\/EmailServer.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-430\" src=\"http:\/\/www.exploreax.com\/blog\/wp-content\/uploads\/2015\/09\/EmailServer-300x183.png\" alt=\"EmailServer\" width=\"300\" height=\"183\" srcset=\"http:\/\/www.exploreax.com\/blog\/wp-content\/uploads\/2015\/09\/EmailServer-300x183.png 300w, http:\/\/www.exploreax.com\/blog\/wp-content\/uploads\/2015\/09\/EmailServer.png 582w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>2. Data import, export framework shared working directory. Accessed via <em>&#8220;Data import export framework\u00a0-&gt; Setup\u00a0-&gt; Data import export framework parameters&#8221;<\/em><br \/>\n<a href=\"http:\/\/www.exploreax.com\/blog\/wp-content\/uploads\/2015\/09\/DMF.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-431\" src=\"http:\/\/www.exploreax.com\/blog\/wp-content\/uploads\/2015\/09\/DMF-300x228.png\" alt=\"DMF\" width=\"300\" height=\"228\" srcset=\"http:\/\/www.exploreax.com\/blog\/wp-content\/uploads\/2015\/09\/DMF-300x228.png 300w, http:\/\/www.exploreax.com\/blog\/wp-content\/uploads\/2015\/09\/DMF.png 916w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>To update these 2 settings above we need to do the following:<\/p>\n<p>1. Update the SysEmailParameters table to update the SMTP server name (and additional login parameters)<br \/>\n2.\u00a0Update the <strong>DMFParameters<\/strong>\u00a0table to reflect the new shared folder path.<\/p>\n<p>The following SQL code will accomplish the above. I have parameterised the SQL for easier reuse or adjustment.<\/p>\n<pre class=\"lang:mysql decode:true\">---Outgoing Email Settings---\r\nDeclare @SMTP_SERVER varchar(100) = 'smtp.mydomain.com' --Your SMTP Server\r\nDeclare @SMTP_PORT int = 25\r\n\r\n---DMF Folder Settings ---\r\nDeclare @DMFFolder varchar(100) = '\\\\[YOUR FILE SERVER]\\AX import\\'\r\n\r\n---Update Email Parameters---\r\nUpdate SysEmailParameters set SMTPRELAYSERVERNAME = @SMTP_SERVER, @SMTP_PORT=@SMTP_PORT\r\n---Update DMF Settings---\r\nupdate DMFParameters set SHAREDFOLDERPATH = @DMFFolder \r\nwhere SHAREDFOLDERPATH != @DMFFolder --Optional to see affected rows<\/pre>\n<p>I hope this assists you and will be useful in your management of your AX environments.<\/p>\n<p><a href=\"http:\/\/www.exploreax.com\/blog\/blog\/2015\/09\/16\/ax-db-restore-scripts-7-setting-email-templates-and-user-email-addresses\/\">View next &#8211;\u00a0AX DB Restore Scripts #7 \u2013 Setting Email Templates and User Email Addresses<\/a><\/p>\n<p><a href=\"http:\/\/www.exploreax.com\/blog\/blog\/2015\/09\/10\/ax-db-restore-scripts-5-configure-service-accounts-and-help-server\/\">View Previous &#8211;\u00a0AX DB Restore Scripts #5 \u2013 Configure Service Accounts and Help Server<\/a><\/p>\n<p><a href=\"http:\/\/www.exploreax.com\/blog\/blog\/2015\/09\/01\/ax-database-restore-scripts-list\/\">Back to List<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently I started creating a list and a series of posts on SQL scripts\u00a0I\u00a0use when restoring Dynamics AX databases from one environment to another, typically from production to QA or development. We have so far discussed a number of configurations that must be changed for the new system to operate effectively and starting yesterday we&hellip;<a href=\"http:\/\/www.exploreax.com\/blog\/blog\/2015\/09\/11\/ax-db-restore-scripts-6-smtp-server-and-dmf-folder\/\">Read more <span class=\"screen-reader-text\">AX DB Restore Scripts #6 &#8211; SMTP Server and DMF Folder<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2,5,47,45],"tags":[36,44,109,46,39],"_links":{"self":[{"href":"http:\/\/www.exploreax.com\/blog\/wp-json\/wp\/v2\/posts\/428"}],"collection":[{"href":"http:\/\/www.exploreax.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.exploreax.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.exploreax.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.exploreax.com\/blog\/wp-json\/wp\/v2\/comments?post=428"}],"version-history":[{"count":3,"href":"http:\/\/www.exploreax.com\/blog\/wp-json\/wp\/v2\/posts\/428\/revisions"}],"predecessor-version":[{"id":449,"href":"http:\/\/www.exploreax.com\/blog\/wp-json\/wp\/v2\/posts\/428\/revisions\/449"}],"wp:attachment":[{"href":"http:\/\/www.exploreax.com\/blog\/wp-json\/wp\/v2\/media?parent=428"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.exploreax.com\/blog\/wp-json\/wp\/v2\/categories?post=428"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.exploreax.com\/blog\/wp-json\/wp\/v2\/tags?post=428"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}