This commit is contained in:
Zhang Huangbin 2017-03-05 11:27:25 +08:00
parent 1955c9630c
commit 9ecb3a4b87
4 changed files with 34 additions and 25 deletions

View File

@ -42,11 +42,16 @@ disable_plaintext_auth=yes
ssl=required
```
## Allow insecure SMTP connection
## Allow insecure SMTP connection on port 25
Please comment out lines below in Postfix config file `/etc/postfix/main.cf`
and reload or restart Postfix service:
```
smtpd_tls_auth_only=yes
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
# force all clients to use secure connection through port 25
#smtpd_tls_auth_only=yes
```

View File

@ -22,57 +22,57 @@ Sample `curl` commands to interact iRedAdmin-Pro RESTful API.
# Replace `<username>` by the real admin email address.
# Replace `<password>` by the real admin password.
# It will create a plain text file `cookie.txt` under current directory.
curl -X POST -c cookie.txt -d "username=<username>&password=<password>" https://<server>/api/login
curl -X POST -c cookie.txt -d "username=<username>&password=<password>" https://<server>/iredadmin/api/login
#
# Create domain (POST)
#
# cn=ABC Inc. (display name: "ABC Inc."
# quota=20480 (quota: 20 GB)
curl -X POST -i -b cookie.txt -d "cn=ABC Inc.&quota=20480" https://<server>/api/domain/<domain>
curl -X POST -i -b cookie.txt -d "cn=ABC Inc.&quota=20480" https://<server>/iredadmin/api/domain/<domain>
#
# Create mail user (POST)
#
# cn=Zhang Huangbin (display name: "Zhang Huangbin")
# mailQuota=1024 (mailbox quota: 1 GB)
curl -X POST -i -b cookie.txt -d "cn=Zhang Huangbin&mailQuota=1024" https://<server>/api/user/<mail>
curl -X POST -i -b cookie.txt -d "cn=Zhang Huangbin&mailQuota=1024" https://<server>/iredadmin/api/user/<mail>
#
# Delete mail user (DELETE)
#
curl -X DELETE -i -b cookie.txt https://<server>/api/user/<mail>
curl -X DELETE -i -b cookie.txt https://<server>/iredadmin/api/user/<mail>
#
# Update mail user profiles (PUT)
#
curl -X PUT -i -b cookie.txt -d "cn=John Smith&mailQuota=2048" https://<server>/api/user/<mail>
curl -X PUT -i -b cookie.txt -d "cn=John Smith&mailQuota=2048" https://<server>/iredadmin/api/user/<mail>
#
# Create mail alias (POST)
#
# cn=My Alias (display name: "My Alias")
curl -X POST -i -b cookie.txt -d "cn=My Alias" https://<server>/api/alias/<mail>
curl -X POST -i -b cookie.txt -d "cn=My Alias" https://<server>/iredadmin/api/alias/<mail>
#
# Delete mail alias (DELETE)
#
curl -X DELETE -i -b cookie.txt https://<server>/api/alias/<mail>
curl -X DELETE -i -b cookie.txt https://<server>/iredadmin/api/alias/<mail>
#
# Create mailing list (POST, OpenLDAP backend only)
#
curl -X POST -i -b cookie.txt -d "cn=My List" https://<server>/api/maillist/<mail>
curl -X POST -i -b cookie.txt -d "cn=My List" https://<server>/iredadmin/api/maillist/<mail>
#
# Delete mail alias (DELETE)
#
curl -X DELETE -i -b cookie.txt https://<server>/api/maillist/<mail>
curl -X DELETE -i -b cookie.txt https://<server>/iredadmin/api/maillist/<mail>
#
# Delete domain (DELETE)
#
curl -X DELETE -i -b cookie.txt https://<server>/api/domain/<domain>
curl -X DELETE -i -b cookie.txt https://<server>/iredadmin/api/domain/<domain>
```
## See Also

View File

@ -24,7 +24,7 @@
<ul>
<li><a href="#allow-insecure-pop3imapsmtp-connections-without-starttls">Allow insecure POP3/IMAP/SMTP connections without STARTTLS</a><ul>
<li><a href="#allow-insecure-pop3imap-connections">Allow insecure POP3/IMAP connections</a></li>
<li><a href="#allow-insecure-smtp-connection">Allow insecure SMTP connection</a></li>
<li><a href="#allow-insecure-smtp-connection-on-port-25">Allow insecure SMTP connection on port 25</a></li>
</ul>
</li>
</ul>
@ -61,10 +61,14 @@ ssl=yes
ssl=required
</code></pre>
<h2 id="allow-insecure-smtp-connection">Allow insecure SMTP connection</h2>
<h2 id="allow-insecure-smtp-connection-on-port-25">Allow insecure SMTP connection on port 25</h2>
<p>Please comment out lines below in Postfix config file <code>/etc/postfix/main.cf</code>
and reload or restart Postfix service:</p>
<pre><code>smtpd_tls_auth_only=yes
<pre><code>smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
# force all clients to use secure connection through port 25
#smtpd_tls_auth_only=yes
</code></pre><div class="footer">
<p style="text-align: center; color: grey;">All documents are available in <a href="https://bitbucket.org/zhb/iredmail-docs/src">BitBucket repository</a>, and published under <a href="http://creativecommons.org/licenses/by-nd/3.0/us/" target="_blank">Creative Commons</a> license. You can <a href="https://bitbucket.org/zhb/iredmail-docs/get/tip.tar.bz2">download the latest version</a> for offline reading. If you found something wrong, please do <a href="http://www.iredmail.org/contact.html">contact us</a> to fix it.</p>
</div>

View File

@ -39,57 +39,57 @@
# Replace `&lt;username&gt;` by the real admin email address.
# Replace `&lt;password&gt;` by the real admin password.
# It will create a plain text file `cookie.txt` under current directory.
curl -X POST -c cookie.txt -d &quot;username=&lt;username&gt;&amp;password=&lt;password&gt;&quot; https://&lt;server&gt;/api/login
curl -X POST -c cookie.txt -d &quot;username=&lt;username&gt;&amp;password=&lt;password&gt;&quot; https://&lt;server&gt;/iredadmin/api/login
#
# Create domain (POST)
#
# cn=ABC Inc. (display name: &quot;ABC Inc.&quot;
# quota=20480 (quota: 20 GB)
curl -X POST -i -b cookie.txt -d &quot;cn=ABC Inc.&amp;quota=20480&quot; https://&lt;server&gt;/api/domain/&lt;domain&gt;
curl -X POST -i -b cookie.txt -d &quot;cn=ABC Inc.&amp;quota=20480&quot; https://&lt;server&gt;/iredadmin/api/domain/&lt;domain&gt;
#
# Create mail user (POST)
#
# cn=Zhang Huangbin (display name: &quot;Zhang Huangbin&quot;)
# mailQuota=1024 (mailbox quota: 1 GB)
curl -X POST -i -b cookie.txt -d &quot;cn=Zhang Huangbin&amp;mailQuota=1024&quot; https://&lt;server&gt;/api/user/&lt;mail&gt;
curl -X POST -i -b cookie.txt -d &quot;cn=Zhang Huangbin&amp;mailQuota=1024&quot; https://&lt;server&gt;/iredadmin/api/user/&lt;mail&gt;
#
# Delete mail user (DELETE)
#
curl -X DELETE -i -b cookie.txt https://&lt;server&gt;/api/user/&lt;mail&gt;
curl -X DELETE -i -b cookie.txt https://&lt;server&gt;/iredadmin/api/user/&lt;mail&gt;
#
# Update mail user profiles (PUT)
#
curl -X PUT -i -b cookie.txt -d &quot;cn=John Smith&amp;mailQuota=2048&quot; https://&lt;server&gt;/api/user/&lt;mail&gt;
curl -X PUT -i -b cookie.txt -d &quot;cn=John Smith&amp;mailQuota=2048&quot; https://&lt;server&gt;/iredadmin/api/user/&lt;mail&gt;
#
# Create mail alias (POST)
#
# cn=My Alias (display name: &quot;My Alias&quot;)
curl -X POST -i -b cookie.txt -d &quot;cn=My Alias&quot; https://&lt;server&gt;/api/alias/&lt;mail&gt;
curl -X POST -i -b cookie.txt -d &quot;cn=My Alias&quot; https://&lt;server&gt;/iredadmin/api/alias/&lt;mail&gt;
#
# Delete mail alias (DELETE)
#
curl -X DELETE -i -b cookie.txt https://&lt;server&gt;/api/alias/&lt;mail&gt;
curl -X DELETE -i -b cookie.txt https://&lt;server&gt;/iredadmin/api/alias/&lt;mail&gt;
#
# Create mailing list (POST, OpenLDAP backend only)
#
curl -X POST -i -b cookie.txt -d &quot;cn=My List&quot; https://&lt;server&gt;/api/maillist/&lt;mail&gt;
curl -X POST -i -b cookie.txt -d &quot;cn=My List&quot; https://&lt;server&gt;/iredadmin/api/maillist/&lt;mail&gt;
#
# Delete mail alias (DELETE)
#
curl -X DELETE -i -b cookie.txt https://&lt;server&gt;/api/maillist/&lt;mail&gt;
curl -X DELETE -i -b cookie.txt https://&lt;server&gt;/iredadmin/api/maillist/&lt;mail&gt;
#
# Delete domain (DELETE)
#
curl -X DELETE -i -b cookie.txt https://&lt;server&gt;/api/domain/&lt;domain&gt;
curl -X DELETE -i -b cookie.txt https://&lt;server&gt;/iredadmin/api/domain/&lt;domain&gt;
</code></pre>
<h2 id="see-also">See Also</h2>