<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.tetrain.com/index.php?action=history&amp;feed=atom&amp;title=Jalindia_single_URL</id>
	<title>Jalindia single URL - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.tetrain.com/index.php?action=history&amp;feed=atom&amp;title=Jalindia_single_URL"/>
	<link rel="alternate" type="text/html" href="https://wiki.tetrain.com/index.php?title=Jalindia_single_URL&amp;action=history"/>
	<updated>2026-07-27T11:10:47Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://wiki.tetrain.com/index.php?title=Jalindia_single_URL&amp;diff=4305&amp;oldid=prev</id>
		<title>Admin: Auto-created from uploaded PDF text extraction</title>
		<link rel="alternate" type="text/html" href="https://wiki.tetrain.com/index.php?title=Jalindia_single_URL&amp;diff=4305&amp;oldid=prev"/>
		<updated>2026-07-26T16:27:09Z</updated>

		<summary type="html">&lt;p&gt;Auto-created from uploaded PDF text extraction&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;#039;&amp;#039;Auto-generated from the uploaded PDF [[:File:Jalindia_single_URL.pdf|Jalindia_single_URL.pdf]]. This is an extracted-text rendering for searchability; see the original PDF for exact formatting, diagrams, tables, and images.&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
Single URL configuration&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
               Configuration of single URL&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Install python&lt;br /&gt;
&lt;br /&gt;
yum install nginx python3 python3-pip&lt;br /&gt;
&lt;br /&gt;
pip3 install flask&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now make directory&lt;br /&gt;
&lt;br /&gt;
mkdir /zimbra-login&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now go in to the dir&lt;br /&gt;
&lt;br /&gt;
cd /zimbra-login/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
List the dir&lt;br /&gt;
&lt;br /&gt;
ls&lt;br /&gt;
&lt;br /&gt;
python3 -m venv venv&lt;br /&gt;
&lt;br /&gt;
source venv/bin/activate&lt;br /&gt;
&lt;br /&gt;
pip3 install flask requests&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Make dir.&lt;br /&gt;
&lt;br /&gt;
mkdir static&lt;br /&gt;
&lt;br /&gt;
mv single.conf /root/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Unzip the tar file&lt;br /&gt;
&lt;br /&gt;
tar xvfz single_url.tar.gz&lt;br /&gt;
&lt;br /&gt;
ls&lt;br /&gt;
&lt;br /&gt;
cd zimbra-login/&lt;br /&gt;
&lt;br /&gt;
ls&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy the app.py to zimbra-login&lt;br /&gt;
&lt;br /&gt;
cp app.py /zimbra-login/&lt;br /&gt;
&lt;br /&gt;
cp -pvr static templates /zimbra-login/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
cd /zimbra-login/&lt;br /&gt;
&lt;br /&gt;
cp app.py app.py.org&lt;br /&gt;
&lt;br /&gt;
cat app.py&lt;br /&gt;
&lt;br /&gt;
—---------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
[root@jalindia zimbra-login]# cat app.py&lt;br /&gt;
&lt;br /&gt;
from flask import Flask, request, jsonify, redirect,&lt;br /&gt;
render_template&lt;br /&gt;
&lt;br /&gt;
import requests&lt;br /&gt;
&lt;br /&gt;
from xml.etree import ElementTree as ET&lt;br /&gt;
&lt;br /&gt;
import logging&lt;br /&gt;
&lt;br /&gt;
import urllib.parse&lt;br /&gt;
&lt;br /&gt;
import threading&lt;br /&gt;
&lt;br /&gt;
import time&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
app = Flask(__name__)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Set up logging&lt;br /&gt;
&lt;br /&gt;
logging.basicConfig(level=logging.DEBUG)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Optionally suppress InsecureRequestWarning&lt;br /&gt;
&lt;br /&gt;
requests.packages.urllib3.disable_warnings(requests.package&lt;br /&gt;
s.urllib3.exceptions.InsecureRequestWarning)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Global variables for user lists&lt;br /&gt;
&lt;br /&gt;
ne_users = []&lt;br /&gt;
&lt;br /&gt;
ose_users = []&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Thread-safe lock to protect access to the user lists&lt;br /&gt;
&lt;br /&gt;
user_list_lock = threading.Lock()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Load users from text files&lt;br /&gt;
&lt;br /&gt;
def load_users(file_path):&lt;br /&gt;
&lt;br /&gt;
  with open(file_path, &amp;#039;r&amp;#039;) as f:&lt;br /&gt;
&lt;br /&gt;
    return [line.strip() for line in f.readlines()]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Function to refresh the user lists every 10 minutes&lt;br /&gt;
&lt;br /&gt;
def refresh_user_lists():&lt;br /&gt;
&lt;br /&gt;
  global ne_users, ose_users&lt;br /&gt;
&lt;br /&gt;
  while True:&lt;br /&gt;
&lt;br /&gt;
    with user_list_lock:&lt;br /&gt;
&lt;br /&gt;
        ne_users = load_users(&amp;#039;/zimbra-login/ne_users.txt&amp;#039;) #&lt;br /&gt;
List of users for ne&lt;br /&gt;
&lt;br /&gt;
        ose_users = load_users(&amp;#039;/zimbra-login/ose_users.txt&amp;#039;) #&lt;br /&gt;
List of users for ose&lt;br /&gt;
&lt;br /&gt;
       logging.debug(&amp;quot;User lists reloaded.&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    time.sleep(600) # Sleep for 10 minutes (600 seconds)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Start the background thread for refreshing user lists&lt;br /&gt;
&lt;br /&gt;
refresh_thread = threading.Thread(target=refresh_user_lists)&lt;br /&gt;
&lt;br /&gt;
refresh_thread.daemon = True # Daemonize thread to exit&lt;br /&gt;
when the main program exits&lt;br /&gt;
&lt;br /&gt;
refresh_thread.start()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
@app.route(&amp;#039;/&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
def index():&lt;br /&gt;
&lt;br /&gt;
  return render_template(&amp;#039;login.html&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
@app.route(&amp;#039;/zimbra_auth&amp;#039;, methods=[&amp;#039;POST&amp;#039;])&lt;br /&gt;
&lt;br /&gt;
def zimbra_auth():&lt;br /&gt;
&lt;br /&gt;
  try:&lt;br /&gt;
&lt;br /&gt;
    xml_data = request.data.decode(&amp;#039;utf-8&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    if not xml_data:&lt;br /&gt;
&lt;br /&gt;
         return jsonify({&amp;quot;error&amp;quot;: &amp;quot;XML payload is required&amp;quot;}), 400&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    # Extract email from the XML data to determine the server&lt;br /&gt;
&lt;br /&gt;
     email_start = xml_data.find(&amp;quot;&amp;lt;account by=\&amp;quot;name\&amp;quot;&amp;gt;&amp;quot;) +&lt;br /&gt;
len(&amp;quot;&amp;lt;account by=\&amp;quot;name\&amp;quot;&amp;gt;&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    email_end = xml_data.find(&amp;quot;&amp;lt;/account&amp;gt;&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    email = xml_data[email_start:email_end]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    # Access user lists with thread-safe locking&lt;br /&gt;
&lt;br /&gt;
    with user_list_lock:&lt;br /&gt;
&lt;br /&gt;
         if email in ne_users:&lt;br /&gt;
&lt;br /&gt;
           url = &amp;quot;https://mta2.jalindia.co.in/service/soap&amp;quot;&lt;br /&gt;
&lt;br /&gt;
         elif email in ose_users:&lt;br /&gt;
&lt;br /&gt;
          url = &amp;quot;https://mta3.jalindia.co.in/service/soap&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        else:&lt;br /&gt;
&lt;br /&gt;
         return jsonify({&amp;quot;status&amp;quot;: &amp;quot;failed&amp;quot;, &amp;quot;error&amp;quot;: &amp;quot;User not&lt;br /&gt;
found on any server&amp;quot;}), 400&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    headers = {&lt;br /&gt;
&lt;br /&gt;
        &amp;#039;Content-Type&amp;#039;: &amp;#039;text/xml; charset=utf-8&amp;#039;,&lt;br /&gt;
&lt;br /&gt;
        &amp;#039;SOAPAction&amp;#039;: &amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    logging.debug(f&amp;quot;Sending XML data to {url}&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    response = requests.post(url, data=xml_data,&lt;br /&gt;
headers=headers, verify=False)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
     logging.debug(f&amp;quot;Response Status Code:&lt;br /&gt;
{response.status_code}&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    logging.debug(f&amp;quot;Response Text: {response.text}&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    if response.status_code == 200:&lt;br /&gt;
&lt;br /&gt;
        response_xml = response.text&lt;br /&gt;
&lt;br /&gt;
        root = ET.fromstring(response_xml)&lt;br /&gt;
&lt;br /&gt;
        auth_token =&lt;br /&gt;
root.find(&amp;#039;.//{urn:zimbraAccount}authToken&amp;#039;).text&lt;br /&gt;
&lt;br /&gt;
       # URL encode auth_token&lt;br /&gt;
&lt;br /&gt;
       encoded_auth_token = urllib.parse.quote(auth_token)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       if email in ne_users:&lt;br /&gt;
&lt;br /&gt;
          zimbra_webmail_url =&lt;br /&gt;
f&amp;quot;https://mta2.jalindia.co.in/service/preauth?isredirect=1&amp;amp;autht&lt;br /&gt;
oken={encoded_auth_token}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
       else:&lt;br /&gt;
&lt;br /&gt;
          zimbra_webmail_url =&lt;br /&gt;
f&amp;quot;https://mta3.jalindia.co.in/service/preauth?isredirect=1&amp;amp;autht&lt;br /&gt;
oken={encoded_auth_token}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       logging.debug(f&amp;quot;Redirect URL: {zimbra_webmail_url}&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       # Return redirect URL as JSON&lt;br /&gt;
&lt;br /&gt;
      return jsonify({&amp;quot;status&amp;quot;: &amp;quot;success&amp;quot;, &amp;quot;redirect_url&amp;quot;:&lt;br /&gt;
zimbra_webmail_url})&lt;br /&gt;
&lt;br /&gt;
    else:&lt;br /&gt;
&lt;br /&gt;
      return jsonify({&amp;quot;status&amp;quot;: &amp;quot;failed&amp;quot;, &amp;quot;error&amp;quot;:&lt;br /&gt;
response.text}), response.status_code&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  except Exception as e:&lt;br /&gt;
&lt;br /&gt;
    logging.error(f&amp;quot;Exception: {str(e)}&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
      return jsonify({&amp;quot;error&amp;quot;: str(e)}), 500&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if __name__ == &amp;#039;__main__&amp;#039;:&lt;br /&gt;
&lt;br /&gt;
   app.run(host=&amp;#039;0.0.0.0&amp;#039;, port=5000, debug=True)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[root@jalindia zimbra-login]#&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
—-------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
vi login.html&lt;br /&gt;
&lt;br /&gt;
—-------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
[root@jalindia templates]# cat login.html&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!DOCTYPE html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;html lang=&amp;quot;en&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;head&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;meta charset=&amp;quot;UTF-8&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;meta name=&amp;quot;viewport&amp;quot; content=&amp;quot;width=device-width,&lt;br /&gt;
initial-scale=1.0&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;title&amp;gt;Zimbra Login&amp;lt;/title&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;style&amp;gt;&lt;br /&gt;
&lt;br /&gt;
      /* Resetting default styles */&lt;br /&gt;
&lt;br /&gt;
    *{&lt;br /&gt;
&lt;br /&gt;
         margin: 0;&lt;br /&gt;
&lt;br /&gt;
         padding: 0;&lt;br /&gt;
&lt;br /&gt;
         box-sizing: border-box;&lt;br /&gt;
&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    body {&lt;br /&gt;
&lt;br /&gt;
         font-family: Arial, sans-serif;&lt;br /&gt;
&lt;br /&gt;
       background: url(&amp;#039;/static/image.png&amp;#039;) no-repeat center&lt;br /&gt;
center fixed;&lt;br /&gt;
&lt;br /&gt;
         background-size: cover;&lt;br /&gt;
&lt;br /&gt;
         display: flex;&lt;br /&gt;
&lt;br /&gt;
         justify-content: center;&lt;br /&gt;
&lt;br /&gt;
         align-items: center;&lt;br /&gt;
&lt;br /&gt;
         height: 100vh;&lt;br /&gt;
&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    .container {&lt;br /&gt;
&lt;br /&gt;
      background-color: rgba(255, 255, 255, 0.9); /* White with&lt;br /&gt;
transparency */&lt;br /&gt;
&lt;br /&gt;
         padding: 2em;&lt;br /&gt;
&lt;br /&gt;
         border-radius: 8px;&lt;br /&gt;
&lt;br /&gt;
         box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);&lt;br /&gt;
&lt;br /&gt;
    max-width: 400px;&lt;br /&gt;
&lt;br /&gt;
    width: 100%;&lt;br /&gt;
&lt;br /&gt;
    text-align: center;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
.container h2 {&lt;br /&gt;
&lt;br /&gt;
    color: #333;&lt;br /&gt;
&lt;br /&gt;
    margin-bottom: 20px;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
.logo {&lt;br /&gt;
&lt;br /&gt;
    width: 120px;&lt;br /&gt;
&lt;br /&gt;
    height: auto;&lt;br /&gt;
&lt;br /&gt;
    margin-bottom: 20px;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
.form-group {&lt;br /&gt;
&lt;br /&gt;
    margin-bottom: 15px;&lt;br /&gt;
&lt;br /&gt;
    text-align: left;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
.form-group label {&lt;br /&gt;
&lt;br /&gt;
    font-size: 1rem;&lt;br /&gt;
&lt;br /&gt;
    color: #333;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
.form-group input {&lt;br /&gt;
&lt;br /&gt;
    width: 100%;&lt;br /&gt;
&lt;br /&gt;
    padding: 10px;&lt;br /&gt;
&lt;br /&gt;
    font-size: 1rem;&lt;br /&gt;
&lt;br /&gt;
    border: 1px solid #ccc;&lt;br /&gt;
&lt;br /&gt;
    border-radius: 4px;&lt;br /&gt;
&lt;br /&gt;
    margin-top: 5px;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
.btn {&lt;br /&gt;
&lt;br /&gt;
    width: 100%;&lt;br /&gt;
&lt;br /&gt;
    padding: 10px;&lt;br /&gt;
&lt;br /&gt;
    font-size: 1rem;&lt;br /&gt;
&lt;br /&gt;
    color: #fff;&lt;br /&gt;
&lt;br /&gt;
    background-color: #007bff;&lt;br /&gt;
&lt;br /&gt;
    border: none;&lt;br /&gt;
&lt;br /&gt;
    border-radius: 4px;&lt;br /&gt;
&lt;br /&gt;
    cursor: pointer;&lt;br /&gt;
&lt;br /&gt;
        transition: background-color 0.3s ease;&lt;br /&gt;
&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    .btn:hover {&lt;br /&gt;
&lt;br /&gt;
        background-color: #0056b3;&lt;br /&gt;
&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    #response {&lt;br /&gt;
&lt;br /&gt;
        margin-top: 15px;&lt;br /&gt;
&lt;br /&gt;
        font-size: 1rem;&lt;br /&gt;
&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/style&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/head&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;div class=&amp;quot;container&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;!-- Logo Section --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;img src=&amp;quot;/static/test.jpg&amp;quot; alt=&amp;quot;CRPF Logo&amp;quot; class=&amp;quot;logo&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;h2&amp;gt;Zimbra Login&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;form id=&amp;quot;loginForm&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;div class=&amp;quot;form-group&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
          &amp;lt;label for=&amp;quot;username&amp;quot;&amp;gt;Email Address:&amp;lt;/label&amp;gt;&lt;br /&gt;
&lt;br /&gt;
         &amp;lt;input type=&amp;quot;text&amp;quot; id=&amp;quot;username&amp;quot; name=&amp;quot;username&amp;quot;&lt;br /&gt;
required&amp;gt;&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;div class=&amp;quot;form-group&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
           &amp;lt;label for=&amp;quot;password&amp;quot;&amp;gt;Password:&amp;lt;/label&amp;gt;&lt;br /&gt;
&lt;br /&gt;
       &amp;lt;input type=&amp;quot;password&amp;quot; id=&amp;quot;password&amp;quot;&lt;br /&gt;
name=&amp;quot;password&amp;quot; required&amp;gt;&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;button type=&amp;quot;submit&amp;quot; class=&amp;quot;btn&amp;quot;&amp;gt;Login&amp;lt;/button&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;div id=&amp;quot;response&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
document.getElementById(&amp;#039;loginForm&amp;#039;).addEventListener(&amp;#039;sub&lt;br /&gt;
mit&amp;#039;, function(event) {&lt;br /&gt;
&lt;br /&gt;
      event.preventDefault();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
     const username =&lt;br /&gt;
document.getElementById(&amp;#039;username&amp;#039;).value;&lt;br /&gt;
&lt;br /&gt;
     const password =&lt;br /&gt;
document.getElementById(&amp;#039;password&amp;#039;).value;&lt;br /&gt;
&lt;br /&gt;
         fetch(&amp;#039;/zimbra_auth&amp;#039;, {&lt;br /&gt;
&lt;br /&gt;
              method: &amp;#039;POST&amp;#039;,&lt;br /&gt;
&lt;br /&gt;
              headers: {&lt;br /&gt;
&lt;br /&gt;
                   &amp;#039;Content-Type&amp;#039;: &amp;#039;text/xml&amp;#039;,&lt;br /&gt;
&lt;br /&gt;
              },&lt;br /&gt;
&lt;br /&gt;
        body: `&amp;lt;soap:Envelope&lt;br /&gt;
xmlns:soap=&amp;quot;http://www.w3.org/2003/05/soap-envelope&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                     &amp;lt;soap:Body&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                        &amp;lt;AuthRequest xmlns=&amp;quot;urn:zimbraAccount&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &amp;lt;account&lt;br /&gt;
by=&amp;quot;name&amp;quot;&amp;gt;${username}&amp;lt;/account&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                          &amp;lt;password&amp;gt;${password}&amp;lt;/password&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                        &amp;lt;/AuthRequest&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                     &amp;lt;/soap:Body&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                   &amp;lt;/soap:Envelope&amp;gt;`&lt;br /&gt;
&lt;br /&gt;
         })&lt;br /&gt;
&lt;br /&gt;
         .then(response =&amp;gt; response.json())&lt;br /&gt;
&lt;br /&gt;
         .then(data =&amp;gt; {&lt;br /&gt;
&lt;br /&gt;
              if (data.status === &amp;#039;failed&amp;#039;) {&lt;br /&gt;
&lt;br /&gt;
             document.getElementById(&amp;#039;response&amp;#039;).innerHTML&lt;br /&gt;
= &amp;#039;Login failed: &amp;#039; + data.error;&lt;br /&gt;
&lt;br /&gt;
                   document.getElementById(&amp;#039;response&amp;#039;).style.color =&lt;br /&gt;
&amp;#039;red&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
                  } else {&lt;br /&gt;
&lt;br /&gt;
                      // Redirect to Zimbra URL with token&lt;br /&gt;
&lt;br /&gt;
                      window.location.href = data.redirect_url;&lt;br /&gt;
&lt;br /&gt;
                  }&lt;br /&gt;
&lt;br /&gt;
            })&lt;br /&gt;
&lt;br /&gt;
            .catch(error =&amp;gt; {&lt;br /&gt;
&lt;br /&gt;
                  console.error(&amp;#039;Error:&amp;#039;, error);&lt;br /&gt;
&lt;br /&gt;
          document.getElementById(&amp;#039;response&amp;#039;).innerHTML =&lt;br /&gt;
&amp;#039;An error occurred: &amp;#039; + error;&lt;br /&gt;
&lt;br /&gt;
                  document.getElementById(&amp;#039;response&amp;#039;).style.color =&lt;br /&gt;
&amp;#039;red&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
            });&lt;br /&gt;
&lt;br /&gt;
      });&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[root@jalindia templates]#&lt;br /&gt;
&lt;br /&gt;
—-------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Go into tmux&lt;br /&gt;
&lt;br /&gt;
Run python script&lt;br /&gt;
&lt;br /&gt;
Come out from tmux&lt;br /&gt;
&lt;br /&gt;
Ctrl + b then d&lt;br /&gt;
&lt;br /&gt;
vi ne_ldap-import.sh&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Make two files for NE and NE2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mv ldap-import.sh ne-ldap-import.sh&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
cp ne-ldap-import.sh ne2-ldap-import.sh&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
vi ne2-ldap-import.sh&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>