<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[iRedMail — import_users.py Error]]></title>
		<link>https://forum.iredmail.org/topic20982-importuserspy-error.html</link>
		<atom:link href="https://forum.iredmail.org/feed-rss-topic20982.xml" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in import_users.py Error.]]></description>
		<lastBuildDate>Mon, 22 Sep 2025 03:59:28 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: import_users.py Error]]></title>
			<link>https://forum.iredmail.org/post91281.html#p91281</link>
			<description><![CDATA[<p>Thank you.</p>]]></description>
			<author><![CDATA[null@example.com (interlinktelecom)]]></author>
			<pubDate>Mon, 22 Sep 2025 03:59:28 +0000</pubDate>
			<guid>https://forum.iredmail.org/post91281.html#p91281</guid>
		</item>
		<item>
			<title><![CDATA[Re: import_users.py Error]]></title>
			<link>https://forum.iredmail.org/post91280.html#p91280</link>
			<description><![CDATA[<p>You should run the script inside iRedAdmin-Pro directory /opt/www/iredadmin/tools/, not iRedAPD (/opt/iRedAPD-*).</p>]]></description>
			<author><![CDATA[null@example.com (ZhangHuangbin)]]></author>
			<pubDate>Mon, 22 Sep 2025 03:19:15 +0000</pubDate>
			<guid>https://forum.iredmail.org/post91280.html#p91280</guid>
		</item>
		<item>
			<title><![CDATA[Re: import_users.py Error]]></title>
			<link>https://forum.iredmail.org/post91256.html#p91256</link>
			<description><![CDATA[<p>It&#039;s clearly documented in the import_users.py, please read the comment lines in it:<br /></p><div class="codebox"><pre><code># Usage:
#
#   - Make sure your iRedAdmin-Pro has RESTful API interface enabled by
#     following our tutorial:
#     https://docs.iredmail.org/iredadmin-pro.restful.api.html#enable-restful-api
#
#   - Generate file /opt/users.list which contains the mail accounts you want
#     to import, one account per line, with account info stored in few fields:
#
#     1: [REQUIRED] user&#039;s full email address.
#     2: [REQUIRED] plain text or password hash which starts with the password
#                   scheme name. For example, &quot;{SSHA}xxx&quot;, &quot;{SSHA512}xxx&quot;.
#     3: [optional] mailbox quota in MB. Must be an integer number.
#     4: [optional] full display name.
#     5: [optional] list of mailing list addresses. If not empty, user will be
#                   assigned to given mailing lists as a member.
#
#                   Notes:
#
#                   - Multiple addresses must be separated by &quot;:&quot;.
#                   - If mailing list doesn&#039;t exist, it will not be created automatically.
#     6: [optional] employeeid: employee id.
#
#     NOTE: the separator &quot;,&quot; for ending EMPTY optional fields is not required.
#
#     Samples:
#
#       user@domain.com, plain_password
#       user@domain.com, plain_password, 1024, Zhang Huangbin, list1@domain.com:list2@domain.com
#       user@domain.com, plain_password, , , list1@domain.com:list2@domain.com
#       user@domain.com, plain_password, 1024, Zhang Huangbin
#
#   - Update 3 parameters in this file:
#
#       api_endpoint = &#039;&#039;
#       verify_cert = True
#       admin = &#039;postmaster@a.io&#039;
#       pw = &#039;password&#039;
#
#     - &quot;api_endpoint&quot; is the endpoint of iRedAdmin-Pro RESTful API.
#     - With &quot;verify_cert = True&quot;, a valid ssl cert is required on API
#       server (https://). If you don&#039;t have a valid ssl cert yet, please set
#       it to False.
#     - &quot;admin&quot; is the email address of domain admin which has privilege to
#             manage the email domain which you&#039;re going to import users to.
#     - &quot;pw&quot; is plain password of domain admin.
#
#   - Run commands below to create users listed in the &quot;/opt/users.list&quot; file:
#
#       python import_users.py /opt/users.list</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (ZhangHuangbin)]]></author>
			<pubDate>Mon, 15 Sep 2025 08:05:23 +0000</pubDate>
			<guid>https://forum.iredmail.org/post91256.html#p91256</guid>
		</item>
		<item>
			<title><![CDATA[Re: import_users.py Error]]></title>
			<link>https://forum.iredmail.org/post91255.html#p91255</link>
			<description><![CDATA[<div class="quotebox"><cite>ZhangHuangbin wrote:</cite><blockquote><p>It tried to connect to 127.0.0.1:8080.<br />Do you use the correct iRedAdmin-Pro API endpoint in this file?</p></blockquote></div><p>how to use it? or must be change API endpoint ip from 127.0.0.1 to&nbsp; iredmail server ip. but I run in local server . I&#039;m confuse .</p>]]></description>
			<author><![CDATA[null@example.com (interlinktelecom)]]></author>
			<pubDate>Mon, 15 Sep 2025 06:05:45 +0000</pubDate>
			<guid>https://forum.iredmail.org/post91255.html#p91255</guid>
		</item>
		<item>
			<title><![CDATA[Re: import_users.py Error]]></title>
			<link>https://forum.iredmail.org/post91254.html#p91254</link>
			<description><![CDATA[<p>It tried to connect to 127.0.0.1:8080.<br />Do you use the correct iRedAdmin-Pro API endpoint in this file?</p>]]></description>
			<author><![CDATA[null@example.com (ZhangHuangbin)]]></author>
			<pubDate>Mon, 15 Sep 2025 01:58:22 +0000</pubDate>
			<guid>https://forum.iredmail.org/post91254.html#p91254</guid>
		</item>
		<item>
			<title><![CDATA[import_users.py Error]]></title>
			<link>https://forum.iredmail.org/post91253.html#p91253</link>
			<description><![CDATA[<p>==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====<br />- iRedMail version (check /etc/iredmail-release): 1.7.4<br />- Deployed with iRedMail Easy or the downloadable installer?downloadable<br />- Linux/BSD distribution name and version: Almalinux9<br />- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL<br />- Web server (Apache or Nginx):Nginx<br />- Manage mail accounts with iRedAdmin-Pro?yes.<br />- [IMPORTANT] Related original log or error message is required if you&#039;re experiencing an issue.<br />====<br />I&#039;m test to run import_users.py Error .<br />anything mistake?</p><br /><p>[root@mx ~]# cat /tmp/acctest.txt <br />j.chakkrit@interlinktelecom.co.th,CKmi45dfsrio4k#df2013,,Chakkrit Jaiman,,20560006<br />[root@mx ~]# python3 /opt/www/iredadmin/tools/import_users.py /tmp/acctest.txt <br />Traceback (most recent call last):<br />&nbsp; File &quot;/usr/lib/python3.9/site-packages/urllib3/connection.py&quot;, line 169, in _new_conn<br />&nbsp; &nbsp; conn = connection.create_connection(<br />&nbsp; File &quot;/usr/lib/python3.9/site-packages/urllib3/util/connection.py&quot;, line 96, in create_connection<br />&nbsp; &nbsp; raise err<br />&nbsp; File &quot;/usr/lib/python3.9/site-packages/urllib3/util/connection.py&quot;, line 86, in create_connection<br />&nbsp; &nbsp; sock.connect(sa)<br />ConnectionRefusedError: [Errno 111] Connection refused</p><p>During handling of the above exception, another exception occurred:</p><p>Traceback (most recent call last):<br />&nbsp; File &quot;/usr/lib/python3.9/site-packages/urllib3/connectionpool.py&quot;, line 700, in urlopen<br />&nbsp; &nbsp; httplib_response = self._make_request(<br />&nbsp; File &quot;/usr/lib/python3.9/site-packages/urllib3/connectionpool.py&quot;, line 395, in _make_request<br />&nbsp; &nbsp; conn.request(method, url, **httplib_request_kw)<br />&nbsp; File &quot;/usr/lib/python3.9/site-packages/urllib3/connection.py&quot;, line 234, in request<br />&nbsp; &nbsp; super(HTTPConnection, self).request(method, url, body=body, headers=headers)<br />&nbsp; File &quot;/usr/lib64/python3.9/http/client.py&quot;, line 1285, in request<br />&nbsp; &nbsp; self._send_request(method, url, body, headers, encode_chunked)<br />&nbsp; File &quot;/usr/lib64/python3.9/http/client.py&quot;, line 1331, in _send_request<br />&nbsp; &nbsp; self.endheaders(body, encode_chunked=encode_chunked)<br />&nbsp; File &quot;/usr/lib64/python3.9/http/client.py&quot;, line 1280, in endheaders<br />&nbsp; &nbsp; self._send_output(message_body, encode_chunked=encode_chunked)<br />&nbsp; File &quot;/usr/lib64/python3.9/http/client.py&quot;, line 1040, in _send_output<br />&nbsp; &nbsp; self.send(msg)<br />&nbsp; File &quot;/usr/lib64/python3.9/http/client.py&quot;, line 980, in send<br />&nbsp; &nbsp; self.connect()<br />&nbsp; File &quot;/usr/lib/python3.9/site-packages/urllib3/connection.py&quot;, line 200, in connect<br />&nbsp; &nbsp; conn = self._new_conn()<br />&nbsp; File &quot;/usr/lib/python3.9/site-packages/urllib3/connection.py&quot;, line 181, in _new_conn<br />&nbsp; &nbsp; raise NewConnectionError(<br />urllib3.exceptions.NewConnectionError: &lt;urllib3.connection.HTTPConnection object at 0x7f4db4a1a880&gt;: Failed to establish a new connection: [Errno 111] Connection refused</p><p>During handling of the above exception, another exception occurred:</p><p>Traceback (most recent call last):<br />&nbsp; File &quot;/usr/lib/python3.9/site-packages/requests/adapters.py&quot;, line 612, in send<br />&nbsp; &nbsp; resp = conn.urlopen(<br />&nbsp; File &quot;/usr/lib/python3.9/site-packages/urllib3/connectionpool.py&quot;, line 756, in urlopen<br />&nbsp; &nbsp; retries = retries.increment(<br />&nbsp; File &quot;/usr/lib/python3.9/site-packages/urllib3/util/retry.py&quot;, line 576, in increment<br />&nbsp; &nbsp; raise MaxRetryError(_pool, url, error or ResponseError(cause))<br />urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host=&#039;127.0.0.1&#039;, port=8080): Max retries exceeded with url: /api/login (Caused by NewConnectionError(&#039;&lt;urllib3.connection.HTTPConnection object at 0x7f4db4a1a880&gt;: Failed to establish a new connection: [Errno 111] Connection refused&#039;))</p><p>During handling of the above exception, another exception occurred:</p><p>Traceback (most recent call last):<br />&nbsp; File &quot;/opt/www/iredadmin/tools/import_users.py&quot;, line 136, in &lt;module&gt;<br />&nbsp; &nbsp; r = requests.post(api_endpoint + &#039;/login&#039;,<br />&nbsp; File &quot;/usr/lib/python3.9/site-packages/requests/api.py&quot;, line 119, in post<br />&nbsp; &nbsp; return request(&#039;post&#039;, url, data=data, json=json, **kwargs)<br />&nbsp; File &quot;/usr/lib/python3.9/site-packages/requests/api.py&quot;, line 61, in request<br />&nbsp; &nbsp; return session.request(method=method, url=url, **kwargs)<br />&nbsp; File &quot;/usr/lib/python3.9/site-packages/requests/sessions.py&quot;, line 544, in request<br />&nbsp; &nbsp; resp = self.send(prep, **send_kwargs)<br />&nbsp; File &quot;/usr/lib/python3.9/site-packages/requests/sessions.py&quot;, line 657, in send<br />&nbsp; &nbsp; r = adapter.send(request, **kwargs)<br />&nbsp; File &quot;/usr/lib/python3.9/site-packages/requests/adapters.py&quot;, line 689, in send<br />&nbsp; &nbsp; raise ConnectionError(e, request=request)<br />requests.exceptions.ConnectionError: HTTPConnectionPool(host=&#039;127.0.0.1&#039;, port=8080): Max retries exceeded with url: /api/login (Caused by NewConnectionError(&#039;&lt;urllib3.connection.HTTPConnection object at 0x7f4db4a1a880&gt;: Failed to establish a new connection: [Errno 111] Connection refused&#039;))<br />[root@mx ~]#</p>]]></description>
			<author><![CDATA[null@example.com (interlinktelecom)]]></author>
			<pubDate>Sun, 14 Sep 2025 04:05:57 +0000</pubDate>
			<guid>https://forum.iredmail.org/post91253.html#p91253</guid>
		</item>
	</channel>
</rss>
