<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.qnap.com/mediawiki/index.php?title=Postfix&amp;feed=atom&amp;action=history</id>
	<title>Postfix - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.qnap.com/mediawiki/index.php?title=Postfix&amp;feed=atom&amp;action=history"/>
	<link rel="alternate" type="text/html" href="https://wiki.qnap.com/mediawiki/index.php?title=Postfix&amp;action=history"/>
	<updated>2022-08-31T22:33:25Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.2</generator>
	<entry>
		<id>https://wiki.qnap.com/mediawiki/index.php?title=Postfix&amp;diff=948&amp;oldid=prev</id>
		<title>Glenn: +Category:Adding new services</title>
		<link rel="alternate" type="text/html" href="https://wiki.qnap.com/mediawiki/index.php?title=Postfix&amp;diff=948&amp;oldid=prev"/>
		<updated>2015-10-26T09:59:32Z</updated>

		<summary type="html">&lt;p&gt;+&lt;a href=&quot;/wiki/Category:Adding_new_services&quot; title=&quot;Category:Adding new services&quot;&gt;Category:Adding new services&lt;/a&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 09:59, 26 October 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l65&quot; &gt;Line 65:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 65:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;You might want to have a look at the [http://www.postfix.org/documentation.html Postfix-Documenation] or at e.g. [http://wanderingbarque.com/howtos/mailserver/mailserver.html this tutorial].&amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;You might want to have a look at the [http://www.postfix.org/documentation.html Postfix-Documenation] or at e.g. [http://wanderingbarque.com/howtos/mailserver/mailserver.html this tutorial].&amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Adding new services]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Glenn</name></author>
	</entry>
	<entry>
		<id>https://wiki.qnap.com/mediawiki/index.php?title=Postfix&amp;diff=123&amp;oldid=prev</id>
		<title>Admin: Created page with &quot;= Postfix  =  When trying to use a QNAP as mailserver, one can decide to use the available QNAP-provided mailservers ... whatever the benefits of this approach, it is often no...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.qnap.com/mediawiki/index.php?title=Postfix&amp;diff=123&amp;oldid=prev"/>
		<updated>2015-06-16T10:13:20Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;= Postfix  =  When trying to use a QNAP as mailserver, one can decide to use the available QNAP-provided mailservers ... whatever the benefits of this approach, it is often no...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Postfix  =&lt;br /&gt;
&lt;br /&gt;
When trying to use a QNAP as mailserver, one can decide to use the available QNAP-provided mailservers ... whatever the benefits of this approach, it is often not sufficient. For example it is not possible, to use ldap-based authentification together with an IMAP-server. &lt;br /&gt;
&lt;br /&gt;
Postfix without an IMAP or POP3-server is not very valuable, so you might want to have a look at [[Dovecot Compilation|Dovecot_Compilation]] as well. &lt;br /&gt;
&lt;br /&gt;
== Compile Postfix  ==&lt;br /&gt;
&lt;br /&gt;
=== IPKG  ===&lt;br /&gt;
&lt;br /&gt;
First install ipkg. Then install a number of needed packages: &lt;br /&gt;
&amp;lt;pre&amp;gt;ipkg install autoconf automake bash binutils bzip2 coreutils cyrus-sasl cyrus-sasl-libs diffutils findutils \&lt;br /&gt;
gawk gcc gdbm gnutls gnutls-dev grep groff gzip libc-dev libdb libdb52 libgcrypt libstdc++ make man ncurses \&lt;br /&gt;
ncursesw openldap openldap-libs openssl openssl-dev pcre perl readline sed tar zlib&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Fix Environment  ===&lt;br /&gt;
&lt;br /&gt;
Then make sure, that '/opt/bin' and '/opt/sbin' are FIRST in $PATH &lt;br /&gt;
&amp;lt;pre&amp;gt;export PATH=/opt/bin:/opt/sbin:$PATH&amp;lt;/pre&amp;gt; &lt;br /&gt;
Then fix a *terribly* annoying bug in the postfix makefile (it checks for db.h in /usr/include and NOT in the given include-directories) &lt;br /&gt;
&amp;lt;pre&amp;gt;ln -s /opt/include /usr/include&amp;lt;/pre&amp;gt; &lt;br /&gt;
Then add freshly installed libraries to the list of available ones &lt;br /&gt;
&amp;lt;pre&amp;gt;echo /opt/lib &amp;amp;gt;&amp;amp;gt; /etc/ld.so.conf&lt;br /&gt;
ldconfig&amp;lt;/pre&amp;gt; &lt;br /&gt;
And you need some user and group for postfix, e.g. by running &lt;br /&gt;
&amp;lt;pre&amp;gt;adduser -S mail&lt;br /&gt;
addgroup maildrop&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Compile  ===&lt;br /&gt;
&lt;br /&gt;
Then compile: &lt;br /&gt;
&amp;lt;pre&amp;gt;export CCARGS='-I/opt/include -L/opt/lib -DHAS_LDAP -DDEF_COMMAND_DIR=\&amp;quot;/opt/sbin\&amp;quot; \&lt;br /&gt;
-I/opt/include/sasl -DUSE_SASL_AUTH -DUSE_CYRUS_SASL \&lt;br /&gt;
-DHAS_SSL -I/opt/include/openssl -DUSE_TLS\&lt;br /&gt;
-DDEF_CONFIG_DIR=\&amp;quot;/opt/etc/postfix\&amp;quot; -DDEF_DAEMON_DIR=\&amp;quot;/opt/libexec/postfix\&amp;quot; -DDEF_DATA_DIR=\&amp;quot;/opt/var/lib/postfix\&amp;quot; \&lt;br /&gt;
-DDEF_MAILQ_PATH=\&amp;quot;/usr/bin/mailq\&amp;quot; -DDEF_HTML_DIR=\&amp;quot;/opt/share/doc/postfix/html\&amp;quot; -DDEF_MANPAGE_DIR=\&amp;quot;/opt/man\&amp;quot; \&lt;br /&gt;
-DDEF_NEWALIAS_PATH=\&amp;quot;/opt/bin/newaliases\&amp;quot; -DDEF_QUEUE_DIR=\&amp;quot;/opt/var/spool/postfix\&amp;quot; \&lt;br /&gt;
-DDEF_README_DIR=\&amp;quot;/opt/share/doc/postfix/readme\&amp;quot; -DDEF_SENDMAIL_PATH=\&amp;quot;/opt/sbin/sendmail\&amp;quot;'&lt;br /&gt;
export AUXLIBS='-llber -lldap -lsasl2 -L/opt/lib/sasl2 -lcrypto -lssl'&lt;br /&gt;
make tidy&lt;br /&gt;
make -f Makefile.init makefiles CCARGS=&amp;quot;$CCARGS&amp;quot; AUXLIBS=&amp;quot;$AUXLIBS&amp;quot;&lt;br /&gt;
make&amp;lt;/pre&amp;gt; &lt;br /&gt;
Then fix the makedefs and postinstall-scripts to use /opt/bin/bash as shell. Then go through post-install.sh and fix mentions of 'root' to 'admin' - yes, the postfix-makefiles are screwed up big time. &lt;br /&gt;
&lt;br /&gt;
And afterwards run '''make install''' (kills existing configuration) or '''make upgrade''' (keeps and needs existing configuration), depending on your needs. &lt;br /&gt;
&lt;br /&gt;
== Common problems  ==&lt;br /&gt;
&lt;br /&gt;
Nearly every error is due to either forgetting to install libraries/ipkg-packages, typos in the install commands, a faulty PATH (e.g. /bin preceeding /opt/bin), missing changes to /etc/ld.so.conf or (in some cases) hard-coded pathes in postfix. &lt;br /&gt;
&lt;br /&gt;
*If configure fails e.g. with a syntax-error spawn by gawk or awk, your PATH is defective and the pre-installed QNAP versions of sed or gawk are used. Please fix your path. &lt;br /&gt;
*If make fails with an error like &amp;quot;object name conflicts&amp;quot;, you probably don't have a real sort installed - or (again) your PATH is defective. &lt;br /&gt;
*Running postfix throws errors mentioning invalid usernames ('root' is hardcoded in several places, QNAP uses 'admin' insted, fix libexec/postfix/postfix-script) or busybox-errors (add the correct PATH to libexec/postfix/postfix-script) &lt;br /&gt;
*If &amp;quot;make install&amp;quot; or &amp;quot;make upgrade&amp;quot; fails with a find-error (e.g. displaying busyboy-logo), you might check your PATH again - or remove /usr/bin/find and link it to /opt/bin/find&lt;br /&gt;
&amp;lt;pre&amp;gt;mv /usr/bin/find /usr/bin/find.bb&lt;br /&gt;
ln -s /opt/bin/find /usr/bin/find&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
To test your path, you can run &lt;br /&gt;
&amp;lt;pre&amp;gt;which sed&lt;br /&gt;
which find&lt;br /&gt;
[etc]&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
And don't forget: Changes to /etc are often not permanent and need to be repeated after rebooting your QNAP. If you start a new shell (e.g. by writing a compile-script for postfix), you probably have to redefine e.g. $PATH. And changes to $PATH don't mean anything, if installation scripts start new shells or use hardcoded pathes (both of which postfix is doing). &lt;br /&gt;
&lt;br /&gt;
== Links  ==&lt;br /&gt;
&lt;br /&gt;
You might want to have a look at the [http://www.postfix.org/documentation.html Postfix-Documenation] or at e.g. [http://wanderingbarque.com/howtos/mailserver/mailserver.html this tutorial].&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>