This commit is contained in:
Zhang Huangbin 2014-09-16 22:54:05 +08:00
parent cf434f48c4
commit dd9e0ee533
16 changed files with 108 additions and 315 deletions

View File

@ -1,7 +1,6 @@
# Amavisd + SpamAssassin not working, no mail header (X-Spam-*) inserted.
Amavisd has below setting in its config file by default:
File: /etc/amavisd/amavisd.conf
Amavisd has below setting in its config file `/etc/amavisd/amavisd.conf` by default:
$sa_tag_level_deflt = 2.0;

View File

@ -9,13 +9,11 @@ In iRedMail, Amavisd provides below features:
* SPF verification (through SpamAssassin + Perl module)
* Disclaimer (throught AlterMIME)
##Stop virus/spam scanning, keep DKIM signing/verification and Disclaimer
### Stop virus/spam scanning, keep DKIM signing/verification and Disclaimer
If you want to disable virus and spam scanning, but keep DKIM signing and disclaimer, please try this:
* Keep "content_filter =" setting in Postfix main.cf.
content_filter = smtp-amavis:[127.0.0.1]:10024
* Keep `content_filter = smtp-amavis:[127.0.0.1]:10024` in Postfix config file `/etc/postfix/main.cf`.
* Find below lines in /etc/amavisd/amavisd.conf:
```perl
@ -25,16 +23,16 @@ If you want to disable virus and spam scanning, but keep DKIM signing and discla
Uncomment above lines (removing "# " at the beginning of each line), and restart Amavisd service.
##Completely disable all features
### Completely disable all features
If you want to completely disable spam and virus scanning services, steps:
* Comment out below two lines in Postfix config file `/etc/postfix/main.cf`, then restart Postfix service.
```
<pre>
content_filter = smtp-amavis:[127.0.0.1]:10024
receive_override_options = no_address_mappings
```
</pre>
* Disable network services: Amavisd, ClamAV.

View File

@ -8,7 +8,7 @@ To create a new mail account with Thunderbird, please click menu: `File -> New -
Add your name, email address and password in this screen.
[[File:thunderbird.new.mail.account.png]]
[[File:../images/thunderbird.new.mail.account.png]]
Click continue, it will detect IMAP and SMTP server automatically.
@ -17,18 +17,18 @@ Note:
* Login username must be full email address. You may want to click `Edit` to ensure it is correct.
* If you want to use POP3 instead of IMAP, click "Edit" and change it to POP3 in this screen with port `110`, `STARTTLS`.
![](images/Thunderbird.new.mail.account.setup.png "Thunderbird.new.mail.account.setup.png")
![](../images/thunderbird.new.mail.account.setup.png "Thunderbird.new.mail.account.setup.png")
##Configure Thunderbird as POP3 client
Warning: Make sure you're using full email address as username.
![](images/Thunderbird.pop3.png "Thunderbird.pop3.png")
![](../images/thunderbird.pop3.png "Thunderbird.pop3.png")
##Configure Thunderbird as IMAP client
Warning: Make sure you're using full email address as username.
![](images/Thunderbird.imap.png "Thunderbird.imap.png")
![](../images/thunderbird.imap.png "Thunderbird.imap.png")
##Configure Thunderbird to send mail via SMTP
@ -36,7 +36,7 @@ Menu: Tools -> Account settings... -> Outgoing server (SMTP) -> Choose the serve
Warning: Make sure you're using full email address as username.
![](images/Thunderbird.smtp.png "Thunderbird.smtp.png")
![](../images/thunderbird.smtp.png "Thunderbird.smtp.png")
##Use OpenLDAP as Global LDAP Address Book

View File

@ -0,0 +1 @@
Backup and Restore

View File

@ -1,20 +1,42 @@
<http://www.iredmail.org/wiki/index.php?title=Addition/Migrate.to.New.iRedMail.Server>
#How to migrate a test server to production
#How to migrate old iRedMail server to the latest stable release
__TO BE CONTINUED.__
`WARNING`: Please try it on a test server first. if it works well, then try it on product server.
__Please try it on a test server first, if it works well, then try it on product server.__
Since new iRedMail server will install same components as old server, you can choose what data you want to migrate. Most important data are:
Since new iRedMail server will install same components as old server, you can choose what data you want to migrate. The core data are mail accounts, user mailboxes, roundcube webmail database, Policyd database, Amavisd database.
* email accounts stored in SQL/LDAP.
* user mailboxes. Stored under /var/vmail by default.
* SQL database of Roundcube webmail. It stores per-user webmail preferences, and address book.
* Policyd/Cluebringer database. It stores white/blacklists records, greylisting records, etc.
* Amavisd database.
* It stores per-recipient white/blacklists in SQL tables: `mailaddr`, `policy`, `users`, `wblist`.
* Basic info of in/out emails are stored in SQL tables: `maddr`, `msgs`, `msgrcpt`. Quarantined emails are stored in `quarantine`, it requires other 3 tables. If you don't have any quarantined emails, it's safe to delete all records in these 4 tables.
WARNING: Do not restore database "mysql" exported from old server, it contains SQL usernames/passwords for Roundcube/Amavisd/Policyd/Cluebringer used on old server. New iRedMail server has the same SQL usernames, but different passwords. So please do not restore it.
__WARNING__: Do not restore database `mysql` exported from old server, it contains SQL usernames/passwords for Roundcube/Amavisd/Policyd/Cluebringer used on old server. New iRedMail server has the same SQL usernames, but different passwords. So please do not restore it.
##Client settings (Outlook, Thunderbird)
* Since iRedMail-0.8.7, iRedMail enforces secure smtp connection, client must issue 'STARTTLS' command before authentication, so you must change your mail client program (e.g. Outlook, Thunderbird) to use TLS connection on port 587. If you want to enable smtp authentication on port 25 (again, not recommended), please comment out Postfix parameter __"smtpd\_tls\_auth\_only = yes"__ in its config file /etc/postfix/main.cf.
Since iRedMail-0.8.7, iRedMail enforces secure POP3/IMAP/SMTP connections.
Mail client programs must issue 'STARTTLS' command before authentication,
so please update your mail client programs you must change your mail client
programs (e.g. Outlook, Thunderbird) to use TLS connection.
* For SMTP service, use port `587` with `STARTTLS` (or `TLS`).
* For IMAP service, use port `143` with `STARTTLS` (or `TLS`).
* For POP3 service, use port `110` with `STARTTLS` (or `TLS`).
Addition notes:
* If you want to enable smtp authentication on port `25` (again, not
recommended), please comment out Postfix parameter `smtpd_tls_auth_only = yes`
in its config file `/etc/postfix/main.cf`.
* if you want to enable SMTPS (SMTP over SSL, port `465`) to support legency
mail clients, please follow this tutorial: (How to enable SMTPS service)[./faq-howto/howto.enable.smtps.service].
##LDAP: migrate mail accounts
Steps to migrate LDAP mail accounts:
* Setup a new server with the latest iRedMail, and make iRedAdmin-Pro-LDAP work as expected.
@ -28,10 +50,15 @@ __Note__:
##MySQL/PostgreSQL: Migrate mail accounts
All mail accounts are stored in database __vmail__ by default, to migrate mail accounts, just simply export this database on old server, then import it on new server.
All mail accounts are stored in database `vmail` by default, to migrate mail
accounts, you can simply export this database on old server, then import it
on new server.
* __IMPORTANT NOTE__: iRedMail-0.8.7 drops several SQL columns, so before you import backup SQL database, please add them first. It's safe to drop them after you imported database.
<pre>
__IMPORTANT NOTE__: iRedMail-0.8.7 drops several SQL columns, so before you
import backup SQL database, please add them first. It's safe to drop them
after you imported old database on new server.
```mysql
mysql> USE vmail;
mysql> ALTER TABLE mailbox ADD COLUMN bytes BIGINT(20) NOT NULL DEFAULT 0;
@ -47,10 +74,12 @@ mysql> ALTER TABLE domain ADD COLUMN minpasswordlength INT(10) NOT NULL DEFAULT
mysql> ALTER TABLE domain ADD COLUMN maxpasswordlength INT(10) NOT NULL DEFAULT 0;
mysql> ALTER TABLE alias ADD COLUMN islist TINYINT(1) NOT NULL DEFAULT 0;
</pre>
```
After you imported backup SQL databases, please execute below commands to mark mail alias accounts and drop above newly created columns:
<pre>
After imported backup SQL databases, please execute below commands to mark
mail alias accounts and drop above newly created columns:
```mysql
mysql> USE vmail;
mysql> UPDATE alias SET islist=1 WHERE address NOT IN (SELECT username FROM mailbox);
mysql> UPDATE alias SET islist=0 WHERE address=domain; -- domain catch-all account
@ -72,37 +101,23 @@ mysql> ALTER TABLE domain DROP minpasswordlength;
mysql> ALTER TABLE domain DROP maxpasswordlength;
mysql> ALTER TABLE domain DROP disableddomainprofiles;
mysql> ALTER TABLE domain DROP disableduserprofiles;
</pre>
```
* __IMPORTANT NOTE__: There might be some changes in SQL structure, please read all upgrade tutorials for your running iRedMail version, then apply SQL structure related upgradings. For example: <http://www.iredmail.org/wiki/index.php?title=Upgrade/iRedMail/0.7.4-0.8.0#Add_internal_service_required_by_Doveadm_2>
__IMPORTANT NOTE__: There might be some changes in SQL structure, please read
all upgrade tutorials for your current iRedMail release, then apply SQL
structure related changes. For example:
<http://www.iredmail.org/wiki/index.php?title=Upgrade/iRedMail/0.7.4-0.8.0#Add_internal_service_required_by_Doveadm_2>
##Migrate mailboxes (in maildir format)
* Simply copy all mailboxes (in maildir format) to new iRedMail server.
* Set correct file owner of mailboxes. Default is owned by user __vmail__, group __vmail__.
* Set correct file permission of mailboxes. Default is 0700.
##Migrate mailboxes (Maildir format)
WARNING: please make sure maildir path which stored/configured in LDAP
will match the real path on file system, so that mail clients can find
them.
* Simply copy all mailboxes (in Maildir format) to new iRedMail server.
* Set correct file owner of mailboxes. Default owner is `vmail`, group is `vmail`.
* Set correct file permission of mailboxes. Default is `0700`.
##Important Notes for MySQL backend
__This section is applicable to iRedMail-0.7.3 and earlier versions, with MySQL backend. Not required in iRedMail-0.7.4 and later versions.__
Please refer to this section for more details: [Store realtime mailbox quota usage in seperate SQL table](http://iredmail.org/wiki/index.php?title=Upgrade/iRedMail/0.7.3-0.7.4#Store_realtime_mailbox_quota_usage_in_seperate_SQL_table)
WARNING: please make sure maildir path stored in SQL/LDAP matches the mailbox
path on file system, so that mail clients can find imported emails.
##Migrate Roundcube webmail data
* Export/import roundcube webmail database, and upgrade database to work with new version of Roundcube.
<http://trac.roundcube.net/wiki/Howto_Upgrade>
__IMPORTANT NOTES__
* Upcoming iRedMail-0.8.7 enforces secure smtp connection. client must issue 'STARTTLS' command to establish secure smtp connection before authentication, otherwise you will get __"SMTP error: Authentication failure"__ in Roundcube while sending email. To fix this error, you have to change smtp server address and port to below settings(config/config.inc.php):
<pre>
// Settings for Roundcube webmail 1.0.0 and later releases
$config['smtp_server'] = 'tls://127.0.0.1';
$config['smtp_port'] = 587;
</pre>
##Migrate Policyd database
Policyd database stores blacklist/whitelist, throttling, etc. To migrate its data, simply export this database on old server, then import it on new server.

View File

@ -80,7 +80,7 @@ for chapter_dir in ${all_chapter_dirs}; do
# Get title.
_article_title="$(head -1 ${article_file} | awk -F'#' '{print $2}')"
#echo "article title: ${_article_title}"
echo "## [${_article_title}](${_output_chapter_dir}/${article_html_file})" >> ${INDEX_MD}
echo "* [${_article_title}](${_output_chapter_dir}/${article_html_file})" >> ${INDEX_MD}
${CMD_CONVERT} ${article_file} ${_output_chapter_dir}
done
@ -89,7 +89,7 @@ done
cd ${OUTPUT_DIR}
# Generate index.html
python ../tools/markdown2html.py ${INDEX_MD} ${OUTPUT_DIR}
python ../tools/markdown2html.py ${INDEX_MD} ${OUTPUT_DIR} css='../css/markdown.css'
# Cleanup
rm -f ${INDEX_MD}

View File

@ -1,13 +1,11 @@
body{
margin: 0 auto;
font-family: Georgia, Palatino, serif;
color: #444444;
line-height: 1;
max-width: 960px;
max-width: 80%;
padding: 30px;
}
h1, h2, h3, h4 {
color: #111111;
font-weight: 400;
}
h1, h2, h3, h4, h5, p {
@ -16,14 +14,14 @@ h1, h2, h3, h4, h5, p {
}
h1 {
/*font-size: 48px;*/
font-size: 24px;
font-size: 36px;
}
h2 {
/*font-size: 36px;*/
/* The bottom margin is small. It's designed to be used with gray meta text
* below a post title. */
/*margin: 24px 0 6px;*/
font-size: 16px;
font-size: 24px;
margin: 10px 0 6px 20px;
}
h3 {
@ -49,7 +47,7 @@ a:visited {
color: purple;
}
ul, ol {
padding: 0;
padding-left: 30px;
margin: 0;
}
li {
@ -61,11 +59,11 @@ li ul, li ul {
p, ul, ol {
font-size: 16px;
line-height: 24px;
max-width: 540px;
/*max-width: 540px;*/
}
pre {
padding: 0px 24px;
max-width: 800px;
/*max-width: 800px;*/
white-space: pre-wrap;
}
code {
@ -76,13 +74,13 @@ code {
aside {
display: block;
float: right;
width: 390px;
/*width: 390px;*/
}
blockquote {
border-left:.5em solid #eee;
padding: 0 2em;
margin-left:0;
max-width: 476px;
/*max-width: 476px;*/
}
blockquote cite {
font-size:14px;
@ -95,10 +93,10 @@ blockquote cite:before {
blockquote p {
color: #666;
max-width: 460px;
/*max-width: 460px;*/
}
hr {
width: 540px;
/*width: 540px;*/
text-align: left;
margin: 0 auto 0 0;
color: #999;
@ -261,3 +259,20 @@ button::-moz-focus-inner {
padding: 0;
border: 0;
}
pre, code {
font-size: 16px;
background: #f5f5f5;
border: 1px solid #ccc;
border-radius: 3px;
overflow-x: auto;
padding: 5px 10px 5px 10px;
word-wrap: normal
}
code {padding: 1px 5px 1px 5px;}
pre>code {
font-size: 16px;
margin: 0;
border: 0;
padding: 1px 3px;
}

View File

@ -1,10 +0,0 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link href="../css/markdown.css" rel="stylesheet"></head>
</head>
<body>
<h3></h3>
<p>This is most frequently asked questions.</p></body></html>

View File

@ -1,23 +0,0 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link href="../css/markdown.css" rel="stylesheet"></head>
</head>
<body>
<h3></h3>
<h1 id="amavisd-spamassassin-not-working-no-mail-header-x-spam-inserted">Amavisd + SpamAssassin not working, no mail header (X-Spam-*) inserted.</h1>
<p>Amavisd has below setting in its config file by default:
File: /etc/amavisd/amavisd.conf</p>
<pre><code>$sa_tag_level_deflt = 2.0;
</code></pre>
<p>That means Amavisd will insert <code>X-Spam-Flag</code> and other <code>X-Spam-*</code> headers when email score &gt;= 2.0. If you want to let Amavisd always insert these headers, you can set it to a low score, for example:</p>
<pre><code>$sa_tag_level_deflt = -999;
</code></pre>
<p>Amavisd's main config file is different on different Linux/BSD distributions:</p>
<ul>
<li>Red Hat, CentOS, OpenBSD: <code>/etc/amavisd/amavisd.conf</code></li>
<li>Debian, Ubuntu: <code>/etc/amavis/conf.d/50-user</code> (and other config files under <code>/etc/amavs/conf.d/</code>)</li>
<li>FreeBSD: <code>/usr/local/etc/amavisd/amavisd.conf</code></li>
</ul></body></html>

View File

@ -1,52 +0,0 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link href="../css/markdown.css" rel="stylesheet"></head>
</head>
<body>
<h3></h3>
<h1 id="how-to-completely-disable-amavisdclamavspamassassin">How to completely disable amavisd/ClamAV/SpamAssassin</h1>
<p>In iRedMail, Amavisd provides below features:</p>
<ul>
<li>content-based spam scanning (invoke SpamAssassin)</li>
<li>Virus scanning (invoke ClamAV)</li>
<li>DKIM singing</li>
<li>DKIM verification (through SpamAssassin + Perl module)</li>
<li>SPF verification (through SpamAssassin + Perl module)</li>
<li>Disclaimer (throught AlterMIME)</li>
</ul>
<h2 id="stop-virusspam-scanning-keep-dkim-signingverification-and-disclaimer">Stop virus/spam scanning, keep DKIM signing/verification and Disclaimer</h2>
<p>If you want to disable virus and spam scanning, but keep DKIM signing and disclaimer, please try this:</p>
<ul>
<li>
<p>Keep "content_filter =" setting in Postfix main.cf.</p>
<p>content_filter = smtp-amavis:[127.0.0.1]:10024</p>
</li>
<li>
<p>Find below lines in /etc/amavisd/amavisd.conf:</p>
</li>
</ul>
<pre><code class="perl"># @bypass_virus_checks_maps = (1); # controls running of anti-virus code
# @bypass_spam_checks_maps = (1); # controls running of anti-spam code
</code></pre>
<p>Uncomment above lines (removing "# " at the beginning of each line), and restart Amavisd service.</p>
<h2 id="completely-disable-all-features">Completely disable all features</h2>
<p>If you want to completely disable spam and virus scanning services, steps:</p>
<ul>
<li>Comment out below two lines in Postfix config file <code>/etc/postfix/main.cf</code>, then restart Postfix service.</li>
</ul>
<pre><code>content_filter = smtp-amavis:[127.0.0.1]:10024
receive_override_options = no_address_mappings
</code></pre>
<ul>
<li>Disable network services: Amavisd, ClamAV.</li>
</ul>
<p>Notes:</p>
<ul>
<li>ClamAV and SpamAssassin will be invoked by Amavisd, so if you disable Amavisd, those two are disabled too.</li>
<li>SpamAssassin doesn't have daemon service running in iRedMail solution, so there's no need to stop SpamAssassin service.</li>
</ul></body></html>

View File

@ -1,32 +0,0 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link href="../css/markdown.css" rel="stylesheet"></head>
</head>
<body>
<h3></h3>
<h1 id="how-to-disable-spam-virus-scanning-for-outgoing-mails">How to disable spam virus scanning for outgoing mails</h1>
<p>To disable spam/virus scanning for outgoing mails, you can add bypass settings in Amavisd config file: <code>/etc/amavisd/amavisd.conf</code> (RHEL/CentOS/Scientific Linux) or <code>/etc/amavis/conf.d/50-user</code> (Debian/Ubuntu) or <code>/usr/local/etc/amavisd.conf</code> (FreeBSD).</p>
<ul>
<li>bypass_spam_checks_maps</li>
<li>bypass_virus_checks_maps</li>
<li>bypass_header_checks_maps</li>
<li>bypass_banned_checks_maps</li>
</ul>
<p>These settings can be added in setting block <code>$policy_bank{'MYUSERS'}</code>:</p>
<pre><code class="perl">$policy_bank{'MYUSERS'} = {
[...OMIT OTHER SETTINGS HERE...]
# don't perform spam/virus/header check.
bypass_spam_checks_maps =&gt; [1],
bypass_virus_checks_maps =&gt; [1],
bypass_header_checks_maps =&gt; [1],
# allow sending any file names and types
bypass_banned_checks_maps =&gt; [1],
}
</code></pre>
<p>Restarting Amavisd service is required after changing settings.</p></body></html>

View File

@ -1,58 +0,0 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link href="../css/markdown.css" rel="stylesheet"></head>
</head>
<body>
<h3></h3>
<h1 id="how-to-enable-smtps-service-smtp-over-ssl-port-465">How to enable SMTPS service (SMTP over SSL, port 465)</h1>
<h3 id="why-iredmail-doesnt-enable-smtps-smtp-over-ssl-by-default">Why iRedMail doesn't enable SMTPS (SMTP over SSL) by default</h3>
<p>SMTPS is deprecated, so iRedMail disable it by default.
Quote from wikipedia.org: http://en.wikipedia.org/wiki/SMTPS</p>
<blockquote>
<p>Originally, in early 1997, the Internet Assigned Numbers Authority registered 465 for SMTPS. By the end of 1998, this was revoked when STARTTLS has been specified. With STARTTLS, the same port can be used with or without TLS. SMTP was seen as particularly important, because clients of this protocol are often other mail servers, which can not know whether a server they wish to communicate with will have a separate port for TLS. The port 465 is now registered for Source-Specific Multicast audio and video.</p>
</blockquote>
<h3 id="why-enable-smtps-since-its-depreciated">Why enable SMTPS since it's depreciated</h3>
<p>Unfortunately, there're some popular mail clients don't support submission (SMTP over STARTTLS, port 587), the famous one is Microsoft Outlook. Quote from wikipedia.org:</p>
<blockquote>
<p>Even in 2013, there are still services that continue to offer the deprecated SMTPS interface on port 465 in addition to (or instead of!) the RFC-compliant message submission interface on the port 587 defined by RFC 6409. Service providers that maintain port 465 do so because older Microsoft applications (including Entourage v10.0) do not support STARTTLS, and thus not the smtp-submission standard (ESMTPS on port 587). The only way for service providers to offer those clients an encrypted connection is to maintain port 465.</p>
</blockquote>
<h3 id="how-to-enable-smtps">How to enable SMTPS</h3>
<p>To enable SMTPS, you should configure Postfix to listen on port 465 first, then open port 465 in iptables.</p>
<p>Please find below lines in Postfix config file <code>/etc/postfix/master.cf</code> (Linux/OpenBSD) or <code>/usr/local/etc/postfix/master.cf</code> (FreeBSD):</p>
<pre><code>#smtps inet n - n - - smtpd
# -o smtpd_tls_wrappermode=yes
# -o smtpd_sasl_auth_enable=yes
# -o smtpd_client_restrictions=permit_sasl_authenticated,reject
# -o milter_macro_daemon_name=ORIGINATING
</code></pre>
<p>Uncomment first 4 lines, but leave the last one commented out (because iRedMail doesn't use Postfix milter at all):</p>
<pre><code>smtps inet n - n - - smtpd
-o smtpd_tls_wrappermode=yes
-o smtpd_sasl_auth_enable=yes
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
# -o milter_macro_daemon_name=ORIGINATING
</code></pre>
<p>Restart Postfix service to enable SMTPS.</p>
<h3 id="open-port-465-in-iptables">Open port 465 in iptables</h3>
<p>On RHEL/CentOS, please update iptables rule file <code>/etc/sysconfig/iptables</code>, add one rule (third line in below code) for port 465, then restart iptables service.</p>
<pre><code># File: /etc/sysconfig/iptables
-A INPUT -p tcp --dport 25 -j ACCEPT
-A INPUT -p tcp --dport 587 -j ACCEPT
-A INPUT -p tcp --dport 465 -j ACCEPT
</code></pre>
<p>On Debian/Ubuntu, if you use iptables rule file provided by iRedMail, please update <code>/etc/default/iptables</code>, add one rule (third line in below code) for port 465, then restart iptables service.</p>
<pre><code>File: /etc/sysconfig/iptables
-A INPUT -p tcp --dport 25 -j ACCEPT
-A INPUT -p tcp --dport 587 -j ACCEPT
-A INPUT -p tcp --dport 465 -j ACCEPT
</code></pre>
<p>On OpenBSD, please append service 'smtps' in <code>/etc/pf.conf</code>, parameter <code>mail_services=</code>:</p>
<pre><code>File: /etc/pf.conf
mail_services="{www, https, submission, imap, imaps, pop3, pop3s, ssh, smtps}"
</code></pre>
<p>Reload PF rule file:</p>
<pre><code># pfctl -f /etc/pf.conf
</code></pre></body></html>

View File

@ -1,56 +0,0 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link href="../css/markdown.css" rel="stylesheet"></head>
</head>
<body>
<h3></h3>
<h1 id="configure-thunderbird-as-mail-client-imap-smtp-and-global-ldap-address-book">Configure Thunderbird as mail client (IMAP, SMTP and global ldap address book)</h1>
<p>iRedMail provides POP3S (POP3 over TLS), IMAPS (IMAP over TLS), SMTPS (SMTP over TLS) for receiving and sending emails by default.</p>
<h2 id="create-new-mail-account">Create new mail account</h2>
<p>To create a new mail account with Thunderbird, please click menu: <code>File -&gt; New -&gt; Mail Account</code>.</p>
<p>Add your name, email address and password in this screen.</p>
<p>[[File:thunderbird.new.mail.account.png]]</p>
<p>Click continue, it will detect IMAP and SMTP server automatically.</p>
<p>Note:</p>
<ul>
<li>Login username must be full email address. You may want to click <code>Edit</code> to ensure it is correct.</li>
<li>If you want to use POP3 instead of IMAP, click "Edit" and change it to POP3 in this screen with port <code>110</code>, <code>STARTTLS</code>.</li>
</ul>
<p><img alt="" src="images/Thunderbird.new.mail.account.setup.png" title="Thunderbird.new.mail.account.setup.png" /></p>
<h2 id="configure-thunderbird-as-pop3-client">Configure Thunderbird as POP3 client</h2>
<p>Warning: Make sure you're using full email address as username.</p>
<p><img alt="" src="images/Thunderbird.pop3.png" title="Thunderbird.pop3.png" /></p>
<h2 id="configure-thunderbird-as-imap-client">Configure Thunderbird as IMAP client</h2>
<p>Warning: Make sure you're using full email address as username.</p>
<p><img alt="" src="images/Thunderbird.imap.png" title="Thunderbird.imap.png" /></p>
<h2 id="configure-thunderbird-to-send-mail-via-smtp">Configure Thunderbird to send mail via SMTP</h2>
<p>Menu: Tools -&gt; Account settings... -&gt; Outgoing server (SMTP) -&gt; Choose the server you're using.</p>
<p>Warning: Make sure you're using full email address as username.</p>
<p><img alt="" src="images/Thunderbird.smtp.png" title="Thunderbird.smtp.png" /></p>
<h2 id="use-openldap-as-global-ldap-address-book">Use OpenLDAP as Global LDAP Address Book</h2>
<p><strong>IMPORTANT NOTE</strong>: Thunderbird won't show contacts in LDAP address book directly, but it works when you starting typing email address in recipient field while composing email.</p>
<p>Here we take Thunderbird 5.0 for example. Steps:</p>
<ul>
<li>Click <code>Address Book</code> in main Thunderbird window. </li>
<li>In Address Book window, click menu <code>File -&gt; New -&gt; LDAP Directory</code>.</li>
<li>In tab <code>General</code>:
<strong> <code>Name</code>: use whatever name you like. e.g. Global LDAP Address Book.
</strong> <code>Hostname</code>: IP address or hostname of your iRedMail server.
<strong> <code>Base DN</code>: Base dn of your domain in LDAP directory. Normally, it's <code>domainName=domain.ltd,o=domains,dc=xxx,dc=xxx</code>. For example, <code>domainName=example.com,o=domains,dc=iredmail,dc=org</code>.
</strong> <code>Port Number</code>: 389. <strong>Note</strong>: If you prefer to connect to OpenLDAP server over SSL, please check the <code>Use secure connection (SSL)</code> under same tab.
** <code>Bind DN</code>: It's full LDAP dn of your mail account. Normally, it's <code>mail=user@domain.ltd,ou=Users,domainName=domain.ltd,o=domains,dc=xxx,dc=xxx</code>. For example: <code>mail=john@example.com,ou=Users,domainName=example.com,o=domains,dc=iredmail,dc=org</code>.</li>
<li>
<p>In tab <code>Advanced</code>:
<strong> <code>Don't return more than xxx results</code>: depends on how many accounts stored in same domain, you may want to increase or descrease it. Default value in 100.
</strong> <code>Scope</code>: Subtree.
<strong> <code>Search filter</code>: <code>(&amp;(enabledService=mail)(enabledService=deliver)(enabledService=displayedInGlobalAddressBook)(|(objectClass=mailList)(objectClass=mailAlias)(objectClass=mailUser)))</code>
</strong> <code>Login method</code>: <code>Simple</code>.</p>
</li>
<li>
<p>Now switch to tab <code>Offline</code>, click button <code>Download Now</code> to test your settings. It will prompt to input password for this LDAP server, just type password of your mail account. With correct bind dn and password, it will display <code>Replicated succeeded</code>.</p>
</li>
</ul>
<p>That's all.</p></body></html>

View File

@ -1,15 +0,0 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link href="../css/markdown.css" rel="stylesheet"></head>
</head>
<body>
<h3></h3>
<h1 id="frequently-asked-questions-and-howto-documents"><a href="/Users/zhb/projects/docs/html/faq-howto/_summary.html">Frequently Asked Questions and Howto documents</a></h1>
<h2 id="amavisd-spamassassin-not-working-no-mail-header-x-spam-inserted"><a href="/Users/zhb/projects/docs/html/faq-howto/amavisd_no_x-spam-headers.html"> Amavisd + SpamAssassin not working, no mail header (X-Spam-*) inserted.</a></h2>
<h2 id="how-to-completely-disable-amavisdclamavspamassassin"><a href="/Users/zhb/projects/docs/html/faq-howto/completely.disable.amavisd.clamav.spamassassin.html"> How to completely disable amavisd/ClamAV/SpamAssassin</a></h2>
<h2 id="how-to-disable-spam-virus-scanning-for-outgoing-mails"><a href="/Users/zhb/projects/docs/html/faq-howto/disable.spam.virus.scanning.for.outgoing.mails.html"> How to disable spam virus scanning for outgoing mails</a></h2>
<h2 id="how-to-enable-smtps-service-smtp-over-ssl-port-465"><a href="/Users/zhb/projects/docs/html/faq-howto/how-to-enable-smtps-service.html"> How to enable SMTPS service (SMTP over SSL, port 465)</a></h2>
<h2 id="configure-thunderbird-as-mail-client-imap-smtp-and-global-ldap-address-book"><a href="/Users/zhb/projects/docs/html/faq-howto/howto.configure.thunderbird.for.iredmail.html">Configure Thunderbird as mail client (IMAP, SMTP and global ldap address book)</a></h2></body></html>

View File

@ -24,8 +24,19 @@ output_dir = sys.argv[2]
# Set output file name
output_html_file = output_dir + '/' + filename_without_ext + '.html'
# Get other options and convert them to a dict.
args = sys.argv[3:]
cmd_opts = {}
for arg in args:
if '=' in arg:
(var, value) = arg.split('=')
cmd_opts[var] = value
if not 'css' in cmd_opts:
cmd_opts['css'] = '../../css/markdown.css'
# Get article title
title = commands.getoutput("""grep 'Title:' %s |awk -F'Title: ' '{print $2}'""" % filename)
cmd_opts['title'] = commands.getoutput("""grep 'Title:' %s |awk -F'Title: ' '{print $2}'""" % filename)
# Set HTML head
html = """\
@ -33,12 +44,12 @@ html = """\
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>%(title)s</title>
<link href="../css/markdown.css" rel="stylesheet"></head>
<link href="%(css)s" rel="stylesheet"></head>
</head>
<body>
<h3>%(title)s</h3>
""" % {'title': title}
""" % cmd_opts
# Read markdown file and render as HTML body
# Handle unicode characters with web.safeunicode