<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Debian Tutorials &#187; Mail</title>
	<atom:link href="http://www.debiantutorials.com/category/mail/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.debiantutorials.com</link>
	<description>Copy/Paste tutorials for Debian based Linux distros</description>
	<lastBuildDate>Tue, 27 Dec 2011 01:15:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Installing Dovecot IMAP and POP3 daemon with MySql backend on squeeze</title>
		<link>http://www.debiantutorials.com/installing-dovecot-imap-and-pop3-daemon-with-mysql-backend-on-squeeze/</link>
		<comments>http://www.debiantutorials.com/installing-dovecot-imap-and-pop3-daemon-with-mysql-backend-on-squeeze/#comments</comments>
		<pubDate>Mon, 15 Aug 2011 00:52:14 +0000</pubDate>
		<dc:creator>aip</dc:creator>
				<category><![CDATA[Mail]]></category>
		<category><![CDATA[Squeeze]]></category>
		<category><![CDATA[dovecot]]></category>
		<category><![CDATA[imap]]></category>
		<category><![CDATA[pop]]></category>
		<category><![CDATA[pop3]]></category>

		<guid isPermaLink="false">http://www.debiantutorials.com/?p=409</guid>
		<description><![CDATA[Dovecot is an open source IMAP and POP3 server for Linux/UNIX-like systems, written primarily with security in mind. Dovecot primarily aims to be a lightweight, fast and easy to set up open source mailserver. It's assumed that you have already installed and configured Postfix according to this tutorial: Installing Postfix with MySql backend and SASL [...]]]></description>
			<content:encoded><![CDATA[<p>Dovecot is an open source IMAP and POP3 server for Linux/UNIX-like systems, written primarily with security in mind. Dovecot primarily aims to be a lightweight, fast and easy to set up open source mailserver.</p>
<p>It's assumed that you have already installed and configured Postfix according to this tutorial:<br />
<a href="http://www.debiantutorials.net/installing-postfix-with-mysql-backend-and-sasl-for-smtp-authentication/">Installing Postfix with MySql backend and SASL for SMTP authentication</a></p>
<p>1. Install required packages</p>
<p><code>apt-get install dovecot-imapd dovecot-pop3d<br />
</code><span id="more-409"></span></p>
<p>2. Configure Dovecot (pico /etc/dovecot/dovecot.conf)</p>
<p><code>mail_location = maildir:/home/vmail/%d/%n<br />
auth default {<br />
	passdb sql {<br />
	  args = /etc/dovecot/dovecot-sql.conf<br />
	}<br />
	userdb sql {<br />
	  args = /etc/dovecot/dovecot-sql.conf<br />
	}<br />
}<br />
disable_plaintext_auth = no<br />
user = vmail<br />
</code></p>
<p><em>Add or edit the above properties and leave everything else with the default value or configure according to your needs</em></p>
<p>3. Configure the MySql connector (pico /etc/dovecot/dovecot-sql.conf)</p>
<p><code>driver = mysql<br />
connect = host=127.0.0.1 dbname={database} user={username} password={password}<br />
default_pass_scheme = CRYPT<br />
password_query = SELECT email as user, password FROM users WHERE email = '%u'<br />
user_query = SELECT CONCAT('/home/vmail/',SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/') as home, '5000' as uid, '5000' as gid FROM users WHERE email = '%u'<br />
</code></p>
<p><em>{database} = MySql database name<br />
{username} = MySql username<br />
{password} = MySql password</em></p>
<p>4. Restart Dovecot daemon</p>
<p><code>/etc/init.d/dovecot restart<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.debiantutorials.com/installing-dovecot-imap-and-pop3-daemon-with-mysql-backend-on-squeeze/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to install Roundcube on squeeze</title>
		<link>http://www.debiantutorials.com/how-to-install-roundcube-on-squeeze/</link>
		<comments>http://www.debiantutorials.com/how-to-install-roundcube-on-squeeze/#comments</comments>
		<pubDate>Mon, 15 Aug 2011 00:35:17 +0000</pubDate>
		<dc:creator>aip</dc:creator>
				<category><![CDATA[Mail]]></category>
		<category><![CDATA[Squeeze]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[roundcube]]></category>

		<guid isPermaLink="false">http://www.debiantutorials.com/?p=406</guid>
		<description><![CDATA[Roundcube is a browser-based multilingual IMAP client with an application-like user interface. It provides full functionality you expect from an e-mail client, including MIME support, address book, folder manipulation, message searching and spell checking. Installation is easy in Debian but the application is pretty outdated in the squeeze apt repository so you may want to [...]]]></description>
			<content:encoded><![CDATA[<p>Roundcube is a browser-based multilingual IMAP client with an application-like user interface. It provides full functionality you expect from an e-mail client, including MIME support, address book, folder manipulation, message searching and spell checking.</p>
<p>Installation is easy in Debian but the application is pretty outdated in the squeeze apt repository so you may want to install the latest version manually instead. You can download the source from <a href="http://sourceforge.net/projects/roundcubemail/files/roundcubemail/">Sourceforge</a>.</p>
<p>1. Install roundcube</p>
<p><code>apt-get install roundcube roundcube-mysql<br />
</code><span id="more-406"></span></p>
<p>2. Configure apache (pico /etc/apache2/conf.d/roundcube)</p>
<p><code>Alias /roundcube/program/js/tiny_mce/ /usr/share/tinymce/www/<br />
Alias /roundcube /var/lib/roundcube<br />
</code></p>
<p>3. For some reason the default language is set to ar_SA. Change it to English (pico /var/lib/roundcube/config/main.inc.php)</p>
<p><code>$rcmail_config['language'] = 'en_US';<br />
</code></p>
<p>4. Restart apache</p>
<p><code>/etc/init.d/apache2 restart<br />
</code></p>
<p>Now you can access Roundcube on this location: http://yourserver/roundcube</p>
]]></content:encoded>
			<wfw:commentRss>http://www.debiantutorials.com/how-to-install-roundcube-on-squeeze/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Installing sSMTP MTA (Mail Transfer Agent)</title>
		<link>http://www.debiantutorials.com/installing-ssmtp-mta-mail-transfer-agent/</link>
		<comments>http://www.debiantutorials.com/installing-ssmtp-mta-mail-transfer-agent/#comments</comments>
		<pubDate>Sat, 13 Aug 2011 15:24:18 +0000</pubDate>
		<dc:creator>aip</dc:creator>
				<category><![CDATA[Lenny]]></category>
		<category><![CDATA[Mail]]></category>
		<category><![CDATA[Squeeze]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[smtp]]></category>
		<category><![CDATA[ssmtp]]></category>

		<guid isPermaLink="false">http://www.debiantutorials.com/?p=396</guid>
		<description><![CDATA[sSMTP is an extremely simple MTA to get mail off the system to a mail hub. It contains no suid-binaries or other dangerous things - no mail spool to poke around in, and no daemons running in the background. Mail is simply forwarded to the configured mailhost. Extremely easy configuration. This is ideal for web [...]]]></description>
			<content:encoded><![CDATA[<p>sSMTP is an extremely simple MTA to get mail off the system to a mail hub. It contains no suid-binaries or other dangerous things - no mail spool to poke around in, and no daemons running in the background. Mail is simply forwarded to the configured mailhost. Extremely easy configuration.</p>
<p>This is ideal for web servers to avoid running MTA daemons like sendmail, Exim and Postfix which use up resources on the server.</p>
<p>1. Install sSMTP (Note: Any previously installed MTA will be removed)</p>
<p><code>apt-get install ssmtp<br />
</code><span id="more-396"></span></p>
<p>2. Configure the server (pico /etc/ssmtp/ssmtp.conf)</p>
<p><code>mailhub=mail.example.org<br />
FromLineOverride=YES<br />
</code></p>
<p><em>Replace mail.example.org with the external mail server that you want to relay all mail to.</em></p>
<p>If you would like to relay through Google Mail servers, change these configuration values:</p>
<p><code>mailhub=smtp.gmail.com:587<br />
UseSTARTTLS=Yes<br />
AuthUser={username}<br />
AuthPass={password}<br />
FromLineOverride=YES<br />
</code></p>
<p><em>Replace {username} with your Gmail username and {password} with your Gmail password.</em></p>
<p>That's all! sSMTP doesn't run as service so there's no restart required. sSMTP creates a link to /usr/sbin/sendmail which most programs use by default to send mail including PHP.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.debiantutorials.com/installing-ssmtp-mta-mail-transfer-agent/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install and configure MailWatch monitoring tool for MailScanner</title>
		<link>http://www.debiantutorials.com/install-and-configure-mailwatch-monitoring-tool-for-mailscanner/</link>
		<comments>http://www.debiantutorials.com/install-and-configure-mailwatch-monitoring-tool-for-mailscanner/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 00:35:59 +0000</pubDate>
		<dc:creator>aip</dc:creator>
				<category><![CDATA[Lenny]]></category>
		<category><![CDATA[Mail]]></category>
		<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[mailscanner]]></category>
		<category><![CDATA[mailwatch]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.debiantutorials.com/?p=349</guid>
		<description><![CDATA[MailWatch for MailScanner is a web-based front-end to MailScanner written in PHP, MySQL and JpGraph. It comes with a CustomConfig module for MailScanner which causes MailScanner to log all message data (excluding body text) to a MySQL database which is then queried by MailWatch for reporting and statistics. 1. Install Apache2, MySql server and PHP5 [...]]]></description>
			<content:encoded><![CDATA[<p>MailWatch for MailScanner is a web-based front-end to MailScanner written in PHP, MySQL and JpGraph. It comes with a CustomConfig module for MailScanner which causes MailScanner to log all message data (excluding body text) to a MySQL database which is then queried by MailWatch for reporting and statistics. </p>
<p>1. Install Apache2, MySql server and PHP5 with required modules. You may already have some or all of these packages installed.</p>
<p><code>apt-get install apache2 php5-cli php5 mysql-server libdbd-mysql-perl php5-gd php5-mysql libapache2-mod-php5<br />
</code><span id="more-349"></span></p>
<p>2. Download the latest version of MailWatch</p>
<p><code>wget http://downloads.sourceforge.net/project/mailwatch/mailwatch/1.0.5/mailwatch-1.0.5.tar.gz<br />
</code></p>
<p><em>At the time this tutorial was written, version 1.0.5 was the latest version. Check this location for latest version: http://sourceforge.net/projects/mailwatch/files/</em></p>
<p>3. Extract and enter the mailwatch directory</p>
<p><code>tar zxvf mailwatch-1.0.5.tar.gz<br />
cd mailwatch-1.0.5<br />
</code></p>
<p>4. Create the database and tables</p>
<p><code>mysql -p < create.sql<br />
</code></p>
<p>5. Create a MySql user used for MailScanner logging (mysql -u root -p)</p>
<p><code>GRANT ALL ON mailscanner.* TO '{username}'@'localhost' IDENTIFIED BY '{password}';<br />
FLUSH PRIVILEGES;<br />
</code></p>
<p><em>Replace {username} and {password} with a username and password of choice.</em></p>
<p>6. Configure the MailScanner logger (pico MailWatch.pm)</p>
<p><code>my($db_user) = '{username}';<br />
my($db_pass) = '{password}';<br />
</code></p>
<p><em>On line 43 and 44, input your MySql user created in step 5</em></p>
<p>7. Move the MailScanner logger to correct directory</p>
<p><code>mv MailWatch.pm /usr/share/MailScanner/MailScanner/CustomFunctions/<br />
</code></p>
<p>8. Edit Mail Scanner config to enable MailWatch logger (pico /etc/MailScanner/MailScanner.conf)</p>
<p><code>Always Looked Up Last = &#038;MailWatchLogging<br />
</code></p>
<p>9. Create a MailWatch web admin user (mysql -u root -p)</p>
<p><code>USE mailscanner;<br />
INSERT INTO users VALUES ('{username}',md5('{password}'),'Administrator name','A','0','0','0','0','0');<br />
</code></p>
<p><em>Replace {username} and {password} with a username and password used to enter the web interface.</em></p>
<p>10. Move the web interface to the web server's root</p>
<p><code>mv mailscanner /var/www/mailwatch<br />
</code></p>
<p>11. Make the temp and cache directories writeable</p>
<p><code>chmod 777 /var/www/mailwatch/temp<br />
chmod 777 /var/www/mailwatch/images/cache<br />
</code></p>
<p>12. Copy the example config file</p>
<p><code>mv /var/www/mailwatch/conf.php.example /var/www/mailwatch/conf.php<br />
</code></p>
<p>13. Configure the web interface (pico /var/www/mailwatch/conf.php)</p>
<p><code>define('DB_USER', '{username}');<br />
define('DB_PASS', '{password}');<br />
define('MAILWATCH_HOME', '/var/www/mailscanner');<br />
</code></p>
<p><em>Type the MySql username and password created in step 5</em></p>
<p>14. Install PEAR PHP framework</p>
<p><code>apt-get install php-pear<br />
</code></p>
<p>15. Install required PEAR packages</p>
<p><code>pear install DB<br />
pear install DB_Pager<br />
pear install Mail_mimeDecode<br />
</code></p>
<p>16. On line 37, add /usr/share/php to the mailwatch include path (pico /var/www/mailwatch/functions.php)</p>
<p><code>ini_set('include_path','.:'.MAILWATCH_HOME.'/pear:'.MAILWATCH_HOME.'/fpdf:'.MAILWATCH_HOME.'/xmlrpc:/usr/share/php');<br />
</code></p>
<p>17. Restart Apache and MailScanner</p>
<p><code>/etc/init.d/apache2 restart<br />
/etc/init.d/mailscanner restart<br />
</code></p>
<p>18. You're all set. Enter the web interface at this location http://yourserver/mailwatch</p>
]]></content:encoded>
			<wfw:commentRss>http://www.debiantutorials.com/install-and-configure-mailwatch-monitoring-tool-for-mailscanner/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Configuring goldfish autoresponder for Postfix</title>
		<link>http://www.debiantutorials.com/configuring-goldfish-autoresponder-for-postfix/</link>
		<comments>http://www.debiantutorials.com/configuring-goldfish-autoresponder-for-postfix/#comments</comments>
		<pubDate>Sat, 07 Aug 2010 13:46:21 +0000</pubDate>
		<dc:creator>aip</dc:creator>
				<category><![CDATA[Etch]]></category>
		<category><![CDATA[Lenny]]></category>
		<category><![CDATA[Mail]]></category>
		<category><![CDATA[Squeeze]]></category>
		<category><![CDATA[autoresponder]]></category>
		<category><![CDATA[goldfish]]></category>
		<category><![CDATA[postfix]]></category>

		<guid isPermaLink="false">http://www.debiantutorials.net/?p=335</guid>
		<description><![CDATA[goldfish is a quite simple autoresponder for Postfix in conjunction with MySQL, written in PHP. It consists of only one PHP file which can be started through a cronjob. In this tutorial, it's assumed that you have already installed Postfix with MySql backend using this tutorial: Installing Postfix with MySql backend and SASL for SMTP [...]]]></description>
			<content:encoded><![CDATA[<p>goldfish is a quite simple autoresponder for Postfix in conjunction with MySQL, written in PHP. It consists of only one PHP file which can be started through a cronjob. </p>
<p>In this tutorial, it's assumed that you have already installed Postfix with MySql backend using this tutorial: <a href="http://www.debiantutorials.net/installing-postfix-with-mysql-backend-and-sasl-for-smtp-authentication/">Installing Postfix with MySql backend and SASL for SMTP authentication</a></p>
<p>1. Install PHP5-CLI (Command Line Interpreter) if it's not already installed</p>
<p><code>apt-get install php5-cli<br />
</code><span id="more-335"></span></p>
<p>2. Create a MySql table for goldfish and a user that has only read access to the users table and read/update access to the autoresponder table (mysql -u root -p)</p>
<p><code>USE mail;<br />
&nbsp;<br />
CREATE TABLE autoresponder (<br />
email varchar(255) NOT NULL,<br />
descname varchar(255) default NULL,<br />
`from` date NOT NULL,<br />
`to` date NOT NULL,<br />
message text NOT NULL,<br />
enabled tinyint(4) NOT NULL default '0',<br />
subject varchar(255) NOT NULL,<br />
PRIMARY KEY (email),<br />
FULLTEXT KEY message (message)<br />
) TYPE=MyISAM;<br />
&nbsp;<br />
-- Insert a sample out of office message for the<br />
-- e-mail address email@example.com<br />
-- Goldfish automatically enables and disables the out of office<br />
-- message according to the from and to dates<br />
-- (in this case: 7th of august to 14th of august 2010)<br />
INSERT INTO autoresponder ('email@example.com', 'Your name', '2010-08-07', '2010-08-14', 'Your message', '1', 'Your subject');<br />
&nbsp;<br />
GRANT SELECT,UPDATE ON mail.autoresponder TO '{username}'@'localhost' IDENTIFIED BY '{password}';<br />
GRANT SELECT ON mail.users TO '{username}'@'localhost' IDENTIFIED BY '{password}';<br />
FLUSH PRIVILEGES;<br />
&nbsp;<br />
exit;<br />
</code></p>
<p><em>Replace {username} and {password} with selected username and password that will be used by goldfish</em></p>
<p><em>We'll use the mail database that was created in the Postfix installation tutorial.</em></p>
<p>3. Download goldfish and put it to any location on the server. In this example I'll place it in /usr/local/goldfish</p>
<p><code>mkdir /usr/local/goldfish<br />
wget http://www.remofritzsche.com/projects/goldfish/download/goldfish-1.1-STABLE.tar.gz<br />
tar zxvf goldfish-1.1-STABLE.tar.gz<br />
mv goldfish-1.1-STABLE/* /usr/local/goldfish/<br />
rm goldfish-1.1-STABLE* -rf # Clean up<br />
</code></p>
<p><em>1.1 was the latest stable version when this tutorial was written. Check this location for updated version: http://www.remofritzsche.com/projects/goldfish/download/</em></p>
<p>4. Configure database information in goldfish (pico /usr/local/goldfish/autoresponder.php)</p>
<p><code>/* Database information */<br />
$conf['mysql_host'] = "localhost";<br />
$conf['mysql_user'] = "{username}";<br />
$conf['mysql_password'] = "{password}";<br />
$conf['mysql_database'] = "mail";<br />
</code></p>
<p><em>Input your MySql server information and the login created in step 2. mysql_host should be localhost in most cases and the mysql_database should be mail (if you didn't choose another name for the database when Postfix was installed with MySql backend)</em></p>
<p>5. Configure database queries in goldfish (pico /usr/local/goldfish/autoresponder.php)</p>
<p><code>/* Database Queries */<br />
&nbsp;<br />
# This query has to return the path (`path`) of the corresponding<br />
# maildir-Mailbox with email-address %m<br />
$conf['q_mailbox_path'] = "SELECT CONCAT('/home/vmail/', SUBSTRING_INDEX(email,'@',-1), '/', SUBSTRING_INDEX(email,'@',1), '/') as `path` FROM users WHERE `email` = '%m'";<br />
</code></p>
<p><em>The database queries begin on line 56 in version 1.1. Replace the q_mailbox_path query with the one shown above. The only change is that the table name is changed from view_users to users.</em></p>
<p>6. Make the vmail user the owner of the goldfish directory and make the php file executable. The vmail user was created when you installed Postfix.</p>
<p><code>chown vmail /usr/local/goldfish -R<br />
chmod 700 /usr/local/goldfish/autoresponder.php<br />
</code></p>
<p>7. Create a cronjob to run goldfish every 5 minutes as the vmail user. It must be running as a user that can read the maildir mailboxes currently located in /home/vmail. (crontab -e)</p>
<p><code>*/5 * * * * vmail /usr/local/goldfish/autoresponder.php<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.debiantutorials.com/configuring-goldfish-autoresponder-for-postfix/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Setup DomainKeys Identified Mail (DKIM) in Postfix</title>
		<link>http://www.debiantutorials.com/setup-domainkeys-identified-mail-dkim-in-postfix/</link>
		<comments>http://www.debiantutorials.com/setup-domainkeys-identified-mail-dkim-in-postfix/#comments</comments>
		<pubDate>Wed, 16 Jun 2010 08:39:04 +0000</pubDate>
		<dc:creator>aip</dc:creator>
				<category><![CDATA[Lenny]]></category>
		<category><![CDATA[Mail]]></category>
		<category><![CDATA[dkim]]></category>
		<category><![CDATA[DomainKeys]]></category>
		<category><![CDATA[milter]]></category>
		<category><![CDATA[postfix]]></category>

		<guid isPermaLink="false">http://www.debiantutorials.net/?p=323</guid>
		<description><![CDATA[DomainKeys Identified Mail (DKIM) is a method for email authentication that allows an organization to take responsibility for a message it has sent in a way that can be validated by a recipient. The technique is based on public-key cryptography: Responsibility is claimed by the signer by adding a digital signature to a message's header, [...]]]></description>
			<content:encoded><![CDATA[<p>DomainKeys Identified Mail (DKIM) is a method for email authentication that allows an organization to take responsibility for a message it has sent in a way that can be validated by a recipient. The technique is based on public-key cryptography: Responsibility is claimed by the signer by adding a digital signature to a message's header, the DKIM-Signature header field. The verifier recovers the signer's public key using the DNS, and then verifies that the signed parts have not been altered.</p>
<p>1. Install DKIM filter</p>
<p><code>apt-get install dkim-filter<br />
</code><span id="more-323"></span></p>
<p>2. Create a key for each domain verified</p>
<p><code>mkdir -p /etc/dkim/keys/domain1.com<br />
cd /etc/dkim/keys/domain1.com<br />
dkim-genkey -r -d domain1.com<br />
</code></p>
<p><em>Replace domain1.com with the domain that this mail server should authenticate using DKIM</em></p>
<p>3. Add a line for each domain to dkim-keys.conf file (pico /etc/dkim-keys.conf)</p>
<p><code>*@domain1.com:domain1.com:/etc/dkim/keys/domain1.com/default.private<br />
</code></p>
<p><em>Replace domain1.com with the domain that this mail server should authenticate using DKIM</em></p>
<p>4. Add a TXT record to the DNS for the domain being authenticated using DKIM. The record is automatically created and stored in /etc/dkim/keys/domain1.com/default.txt. You just need to add it to the DNS server. (cat /etc/dkim/keys/domain1.com/default.txt)</p>
<p>Here's a sample output:</p>
<p><code>default._domainkey IN TXT "v=DKIM1; g=*; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC8IQNYlS+8jyrbAxNsghsPrWYgOQQWI0Ab4e9MToZYLTBGI41V3Zet5Awrt19nMIUlTpuE+/YVnjP/pu3fgeYkoe6NUzp+oEcWAioQXBmx0njigac7iJ/I0naTP1xTrDacnwsTp/F+lMwGgjiHpaJA7iBmL0AfYMXlTBo5pFog2QIDAQAB" ; ----- DKIM default for domain1.com<br />
</code></p>
<p>Repeat steps 2, 3 and 4 for every domain that this server should authenticate using DKIM.</p>
<p>5. Uncomment line 37 to make DKIM filter use the dkim-keys.conf file to look up domains available (pico /etc/dkim-filter.conf)</p>
<p><code>KeyList                /etc/dkim-keys.conf<br />
</code></p>
<p>6. Add a inet socket that Postfix can communicate with (pico /etc/default/dkim-filter)</p>
<p><code>SOCKET="inet:8891@localhost"<br />
</code></p>
<p>7. Restart DKIM filter</p>
<p><code>/etc/init.d/dkim-filter restart<br />
</code></p>
<p>8. Configure Postfix to query DKIM filter using the socket created earlier. Add these lines to main.cf (pico /etc/postfix/main.cf)</p>
<p><code>milter_default_action = accept<br />
milter_protocol = 2<br />
smtpd_milters = inet:localhost:8891<br />
non_smtpd_milters = inet:localhost:8891<br />
</code></p>
<p>9. Reload Postfix config</p>
<p><code>postfix reload<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.debiantutorials.com/setup-domainkeys-identified-mail-dkim-in-postfix/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Implementing SPF checks in Postfix</title>
		<link>http://www.debiantutorials.com/implementing-spf-checks-in-postfix/</link>
		<comments>http://www.debiantutorials.com/implementing-spf-checks-in-postfix/#comments</comments>
		<pubDate>Sat, 15 May 2010 18:56:02 +0000</pubDate>
		<dc:creator>aip</dc:creator>
				<category><![CDATA[Lenny]]></category>
		<category><![CDATA[Mail]]></category>
		<category><![CDATA[mailscanner]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[spam]]></category>
		<category><![CDATA[spf]]></category>

		<guid isPermaLink="false">http://www.debiantutorials.net/?p=299</guid>
		<description><![CDATA[Sender Policy Framework (SPF), as defined in RFC 4408, is an e-mail validation system designed to prevent e-mail spam by addressing a common vulnerability, source address spoofing. SPF allows administrators to specify which hosts are allowed to send e-mail from a given domain by creating a specific DNS SPF record in the public DNS. Mail [...]]]></description>
			<content:encoded><![CDATA[<p>Sender Policy Framework (SPF), as defined in RFC 4408, is an e-mail validation system designed to prevent e-mail spam by addressing a common vulnerability, source address spoofing. SPF allows administrators to specify which hosts are allowed to send e-mail from a given domain by creating a specific DNS SPF record in the public DNS. Mail exchangers then use the DNS to check that mail from a given domain is being sent by a host sanctioned by that domain's administrators.<span id="more-299"></span></p>
<p>It's assumed that you have already installed Postfix and MailScanner. If not, check these tutorials:</p>
<p><a href="http://www.debiantutorials.net/installing-postfix-with-mysql-backend-and-sasl-for-smtp-authentication/">Installing Postfix with MySql backend and SASL for SMTP authentication</a><br />
<a href="http://www.debiantutorials.net/installing-and-configuring-mailscanner-for-virus-and-spam-filtering-postfix-clamav-spamassassin-razor/">Installing and configuring MailScanner for virus and spam filtering (Postfix, ClamAV, SpamAssassin, Razor)</a></p>
<p>1. Install the Postfix policy engine</p>
<p><code>apt-get install postfix-policyd-spf-perl<br />
</code></p>
<p>2. Add the policy check to smtpd_recipient_restrictions (pico /etc/postfix/main.cf)</p>
<p><code>smtpd_recipient_restrictions = [...], check_policy_service unix:private/policy<br />
</code></p>
<p><em>Make sure you don't remove other restrictions, just add it to the end of the line.</em></p>
<p>3. Add the policy engine to the Postfix master.cf (pico /etc/postfix/master.cf)</p>
<p><code>policy  unix    -       n       n       -       -       spawn<br />
user=nobody argv=/usr/bin/perl /usr/sbin/postfix-policyd-spf-perl<br />
</code></p>
<p>4. Reload Postfix configuration</p>
<p><code>postfix reload<br />
</code></p>
<p>5. Check if this is working</p>
<p><code>telnet yourserver 25<br />
HELO gmail.com<br />
MAIL FROM: <user*@gmail.com><br />
RCPT TO: <user*@domain.com><br />
DATA<br />
test<br />
.<br />
</code></p>
<p><em>Replace user*@domain.com with a e-mail address hosted on your Postfix mailserver and user*@gmail.com with a valid Gmail e-mail address.</em></p>
<p>Look at /var/log/mail.log and you should see that the MailScanner score has been increased by SPF related rules:</p>
<p><code>Message 62ACA1813C.AFC5A from 192.168.1.4 (user@gmail.com) to domain.com is spam, SpamAssassin (score=7.394, required 6, MISSING_SUBJECT 1.28, SPF_HELO_NEUTRAL 2.00, SPF_NEUTRAL 1.21, TVD_SPACE_RATIO 2.90)<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.debiantutorials.com/implementing-spf-checks-in-postfix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Transfer mailboxes between IMAP servers with imapsync</title>
		<link>http://www.debiantutorials.com/transfer-mailboxes-between-imap-servers-with-imapsync/</link>
		<comments>http://www.debiantutorials.com/transfer-mailboxes-between-imap-servers-with-imapsync/#comments</comments>
		<pubDate>Tue, 27 Apr 2010 09:22:40 +0000</pubDate>
		<dc:creator>aip</dc:creator>
				<category><![CDATA[Mail]]></category>
		<category><![CDATA[imap]]></category>
		<category><![CDATA[sync]]></category>

		<guid isPermaLink="false">http://www.debiantutorials.net/?p=260</guid>
		<description><![CDATA[imapsync is a tool for facilitating incremental recursive IMAP transfers from one mailbox to another. It is useful for mailbox migration, and reduces the amount of data transferred by only copying messages that are not present on both servers. Read, unread, and deleted flags are preserved, and the process can be stopped and resumed. The [...]]]></description>
			<content:encoded><![CDATA[<p>imapsync is a tool for facilitating incremental recursive IMAP transfers from one mailbox to another. It is useful for mailbox migration, and reduces the amount of data transferred by only copying messages that are not present on both servers. Read, unread, and deleted flags are preserved, and the process can be stopped and resumed. The original messages can optionally be deleted after a successful transfer.</p>
<p>1. Install imapsync</p>
<p><code>apt-get install imapsync<br />
</code><span id="more-260"></span></p>
<p>2. Sync the mailboxes</p>
<p><code>imapsync --host1 {host1} --user1 {user1} --password1 {password1} --host2 {host2} --user2 {user2} --password2 {password2} --subscribe<br />
</code></p>
<p><em>{host1}: The source mail server's host or ip address<br />
{user1}: User name on the source mail server<br />
{password1}: Password on the source mail server<br />
{host2}: The destination mail server's host or ip address<br />
{user2}: User name on the destination mail server<br />
{password2}: Password on the destination mail server<br />
</em></p>
<p>When moving between different server software you may need to add or remove prefixes. For example when moving from dovecot to courier you need to add this parameter to remove the INBOX. prefix from the folder names: --prefix1 INBOX.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.debiantutorials.com/transfer-mailboxes-between-imap-servers-with-imapsync/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Installing nginx from source with mail support</title>
		<link>http://www.debiantutorials.com/installing-nginx-from-source-with-mail-support/</link>
		<comments>http://www.debiantutorials.com/installing-nginx-from-source-with-mail-support/#comments</comments>
		<pubDate>Mon, 29 Mar 2010 23:14:33 +0000</pubDate>
		<dc:creator>aip</dc:creator>
				<category><![CDATA[Lenny]]></category>
		<category><![CDATA[Mail]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[proxy]]></category>

		<guid isPermaLink="false">http://www.debiantutorials.net/?p=251</guid>
		<description><![CDATA[nginx is a lightweight, high performance web server/reverse proxy and e-mail (SMTP/IMAP/POP3) proxy. 1. Install required packages apt-get install build-essential autotools-dev debhelper libpcre3-dev zlib1g-dev libssl-dev 2. Receive the nginx source apt-get source nginx 3. Enable the mail modules cd nginx-x.x.x pico debian/rules Replace nginx-x.x.x with the correct folder created. Add "--with-mail --with-mail_ssl_module" to the line [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.debiantutorials.net/wp-content/uploads/2010/03/nginx-logo.png" alt="nginx" title="nginx" width="175" height="45" class="alignright size-full wp-image-253" />nginx is a lightweight, high performance web server/reverse proxy and e-mail (SMTP/IMAP/POP3) proxy.</p>
<p>1. Install required packages</p>
<p><code>apt-get install build-essential autotools-dev debhelper libpcre3-dev zlib1g-dev libssl-dev<br />
</code><span id="more-251"></span></p>
<p>2. Receive the nginx source</p>
<p><code>apt-get source nginx<br />
</code></p>
<p>3. Enable the mail modules</p>
<p><code>cd nginx-x.x.x<br />
pico debian/rules<br />
</code></p>
<p><em>Replace nginx-x.x.x with the correct folder created.</em></p>
<p>Add "--with-mail --with-mail_ssl_module" to the line starting with ./configure so that it looks something like this:</p>
<p><code>./configure $(CONFIGURE_OPTS) --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --pid-path=/var/run/nginx.pid --lock-path=/var/lock/nginx.lock   --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/body --http-proxy-temp-path=/var/lib/nginx/proxy --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --with-debug --with-http_stub_status_module --with-http_flv_module --with-http_ssl_module --with-http_dav_module --with-mail --with-mail_ssl_module<br />
</code></p>
<p>4. Build the package</p>
<p><code>dpkg-buildpackage<br />
</code></p>
<p>5. Install the new nginx package</p>
<p><code>dpkg -i ../nginx_x.x.x-x.deb<br />
</code></p>
<p><em>Replace nginx_x.x.x-x.deb with the correct version and platform. In my case the filename is: nginx_0.6.32-3+lenny3_amd64.deb</em></p>
<p>6. Configure nginx</p>
<p>Next step is to configure the nginx rules. That's outside the scope of this tutorial.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.debiantutorials.com/installing-nginx-from-source-with-mail-support/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Blacklisting e-mail addresses using MailScanner</title>
		<link>http://www.debiantutorials.com/blacklisting-e-mail-addresses-using-mailscanner/</link>
		<comments>http://www.debiantutorials.com/blacklisting-e-mail-addresses-using-mailscanner/#comments</comments>
		<pubDate>Sat, 16 Jan 2010 21:53:30 +0000</pubDate>
		<dc:creator>aip</dc:creator>
				<category><![CDATA[Mail]]></category>
		<category><![CDATA[mailscanner]]></category>

		<guid isPermaLink="false">http://www.debiantutorials.net/?p=229</guid>
		<description><![CDATA[1. Create a new file containing the blacklisted e-mail addresses (pico /etc/MailScanner/rules/spam.blacklist.rules) FromOrTo: user1@domain.com yes FromOrTo: user2@domain.net yes FromOrTo: default no 2. Configure MailScanner to handle all messages in the blacklist as spam (pico /etc/MailScanner/MailScanner.conf) Replace this line: Is Definitely Spam = no &#160; with this: Is Definitely Spam = %rules-dir%/spam.blacklist.rules If you want to [...]]]></description>
			<content:encoded><![CDATA[<p>1. Create a new file containing the blacklisted e-mail addresses (pico /etc/MailScanner/rules/spam.blacklist.rules)</p>
<p><code>FromOrTo:	user1@domain.com	yes<br />
FromOrTo:	user2@domain.net	yes<br />
FromOrTo:	default			no<br />
</code><span id="more-229"></span></p>
<p>2. Configure MailScanner to handle all messages in the blacklist as spam (pico /etc/MailScanner/MailScanner.conf)</p>
<p><code>Replace this line:<br />
Is Definitely Spam = no<br />
&nbsp;<br />
with this:<br />
Is Definitely Spam = %rules-dir%/spam.blacklist.rules<br />
</code></p>
<p>If you want to handle all messages from blacklisted e-mail addresses like high scoring spam, change this property:</p>
<p><code>Definite Spam Is High Scoring = yes<br />
</code></p>
<p>3. Restart MailScanner</p>
<p><code>/etc/init.d/mailscanner restart<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.debiantutorials.com/blacklisting-e-mail-addresses-using-mailscanner/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
