diff --git a/indra/newview/app_settings/settings_alchemy.xml b/indra/newview/app_settings/settings_alchemy.xml
index 37ff7e33720e8b26c703a14be9716a3fb00cdbac..12e22085f29f110e34c7c040b87fdeee6627f5d8 100644
--- a/indra/newview/app_settings/settings_alchemy.xml
+++ b/indra/newview/app_settings/settings_alchemy.xml
@@ -2,6 +2,17 @@
 <llsd xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:noNamespaceSchemaLocation="llsd.xsd">
   <map>
+    <key>AlchemyAutoAcceptAllInventory</key>
+    <map>
+      <key>Comment</key>
+      <string>Automatically accept all types of inventory</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>0</integer>
+    </map>
     <key>AlchemyChatCommandAnimationOverride</key>
     <map>
       <key>Comment</key>
diff --git a/indra/newview/llimprocessing.cpp b/indra/newview/llimprocessing.cpp
index fbd069a54d5d9945bab26d89d783ee300d9617ce..763fc3739c3bb54b82d66a66a72e22876837d632 100644
--- a/indra/newview/llimprocessing.cpp
+++ b/indra/newview/llimprocessing.cpp
@@ -58,6 +58,7 @@
 #include "rlvactions.h"
 #include "rlvhelper.h"
 #include "rlvhandler.h"
+#include "rlvinventory.h"
 #include "rlvui.h"
 // [/RLVa:KB]
 
@@ -194,30 +195,52 @@ void inventory_offer_handler(LLOfferInfo* info)
         return;
     }
 
-    bool bAutoAccept(false);
-    // Avoid the Accept/Discard dialog if the user so desires. JC
-    if (gSavedSettings.getBOOL("AutoAcceptNewInventory")
-        && (info->mType == LLAssetType::AT_NOTECARD
-        || info->mType == LLAssetType::AT_LANDMARK
-        || info->mType == LLAssetType::AT_TEXTURE))
-    {
-        // For certain types, just accept the items into the inventory,
-        // and possibly open them on receipt depending upon "ShowNewInventory".
-        bAutoAccept = true;
-    }
-
     // Strip any SLURL from the message display. (DEV-2754)
     std::string msg = info->mDesc;
-    int indx = msg.find(" ( http://slurl.com/secondlife/");
+	size_t indx = msg.find(" ( http://slurl.com/secondlife/");
     if (indx == std::string::npos)
     {
         // try to find new slurl host
         indx = msg.find(" ( http://maps.secondlife.com/secondlife/");
     }
-    if (indx >= 0)
+    if (indx != std::string::npos && indx >= 0)
     {
         LLStringUtil::truncate(msg, indx);
     }
+    bool bAutoAccept(false);
+
+    bool al_accept_new_inv = gSavedSettings.getBOOL("AlchemyAutoAcceptAllInventory");
+    bool is_nc_lm_txtr = info->mType == LLAssetType::AT_NOTECARD
+        || info->mType == LLAssetType::AT_LANDMARK
+        || info->mType == LLAssetType::AT_TEXTURE;
+
+    // Avoid the Accept/Discard dialog if the user so desires. JC
+    // For certain types, just accept the items into the inventory,
+    // and possibly open them on receipt depending upon "ShowNewInventory".
+    // Also accept all inventory types if secondary override is in effect
+    // But do not accept RLV folder gives automagically
+    if ((al_accept_new_inv || (gSavedSettings.getBOOL("AutoAcceptNewInventory")
+        && is_nc_lm_txtr))
+        && ((!rlv_handler_t::isEnabled()) || (!RlvInventory::instance().isGiveToRLVOffer(*info))))
+    {
+        bAutoAccept = true;
+        if (al_accept_new_inv && !is_nc_lm_txtr)
+        {
+            LLSD args;
+            args["NAME"] = LLSLURL(info->mFromGroup ? "group" : "agent", info->mFromID, "about").getSLURLString();
+            if (info->mFromObject)
+                args["ITEM"] = msg;
+            else
+            {
+                const std::string& verb = "select?name=" + LLURI::escape(msg);
+                args["ITEM"] = LLSLURL("inventory", info->mObjectID, verb.c_str()).getSLURLString();
+            }
+            LLNotificationsUtil::add("AutoAcceptedInventory", args);
+        }
+    }
+
+    // Strip any SLURL from the message display. (DEV-2754)
+        // try to find new slurl host
 
     LLSD args;
     args["[OBJECTNAME]"] = msg;
@@ -744,7 +767,7 @@ void LLIMProcessing::processNewMessage(LLUUID from_id,
             }
             else
             {
-                S32 index = original_name.find(" Resident");
+                std::string::size_type index = original_name.find(" Resident");
                 if (index != std::string::npos)
                 {
                     original_name = original_name.substr(0, index);
@@ -1541,7 +1564,7 @@ void LLIMProcessing::processNewMessage(LLUUID from_id,
         {
             LLSD payload;
             payload["from_id"] = from_id;
-            payload["session_id"] = session_id;;
+            payload["session_id"] = session_id;
             payload["online"] = (offline == IM_ONLINE);
             payload["sender"] = sender.getIPandPort();
 
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index ba62372f7dbefa42ad44e62db152997f3b68ccd2..1febca05611df06d847c86e8f450bc6f16c35707 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -11739,5 +11739,14 @@ Unable to load the track from [TRACK1] into [TRACK2].
     <tag>fail</tag>
     [PACKAGE] was added successfully.
   </notification>
+
+  <notification
+   icon="notify.tga"
+   name="AutoAcceptedInventory"
+   persist="true"
+   type="notify">
+    Auto-accepted [ITEM] from [NAME] and placed in inventory.
+  </notification>
+
   
 </notifications>