1. A computerized method for automatically creating a security access policy to an electronic document in a document management system, the method comprising: employing at least one hardware processor for performing one or more of the following: (a1) associating metadata with the document, the metadata comprising one or more attributes of the document; (b1) configuring security access policies to be applied to documents in the document management system, comprising specifying one or more metadata rules governing application of security access policies to the documents, comprising specifying a dynamic metadata, which is dynamically retrieved based on external content analysis of the document performed outside the document management system, comprising the metadata not inferred from contents of the document; and (c1) determining the security access policy to be applied to the document to be added to the document management system based on said one or more metadata rules and the metadata associated with the document.