<?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>RedHatVN Network &#187; exim</title>
	<atom:link href="http://redhatvn.net/tag/exim/feed" rel="self" type="application/rss+xml" />
	<link>http://redhatvn.net</link>
	<description>Shared Linux problems</description>
	<lastBuildDate>Tue, 07 Sep 2010 08:08:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>SMTP Relaying Via a Smarthost</title>
		<link>http://redhatvn.net/smtp-relaying-via-a-smarthost</link>
		<comments>http://redhatvn.net/smtp-relaying-via-a-smarthost#comments</comments>
		<pubDate>Mon, 18 Jan 2010 04:46:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Centos]]></category>
		<category><![CDATA[Cpanel]]></category>
		<category><![CDATA[Directadmin]]></category>
		<category><![CDATA[vps]]></category>
		<category><![CDATA[exim]]></category>

		<guid isPermaLink="false">http://redhatvn.net/?p=1104</guid>
		<description><![CDATA[This page describes how to set up exim 4 on both a laptop and a server so that you can relay mail via the server no matter where your laptop logs in from. Overview Laptops are portable and end up being connected to various networks from day to day. You might connect it at the [...]]]></description>
			<content:encoded><![CDATA[<p>This page describes how to set up exim 4 on both a laptop and a server so that you can relay mail via the server no matter where your laptop logs in from.<br />
<span id="more-1104"></span></p>
<h2>Overview</h2>
<p>Laptops are portable and end up being connected to various networks from day to day.  You might connect it at the office, at home, at a friend&#8217;s house, at conferences, at random coffee houses&#8230;.  For most configuration settings, you can rely on DHCP, but an exception is mail relaying.</p>
<p>Because SMTP doesn&#8217;t do anything about spam, many sites do not accept mail that is relayed from untrusted networks.  Untrusted networks include those of a lot of ISP&#8217;s such as Comcast and BellSouth, which is irritating.  Untrusted networks include those of random coffee houses, which&#8211;let&#8217;s be honest&#8211;is unavoidable.  For practical purposes, you can&#8217;t use direct SMTP if you log into a large variety of networks.</p>
<p>The strategy I use is to have a relay out on a host that is considered to be on a trusted network by the major spam lists.  The relay server requires authentication from the client, so that the client can safely connect to the relay server no matter what kind of network connection is available.  The relay server can then send mail to its ultimate destination using direct SMTP as normal.  Since its network is not on the spam lists, the email goes through reliably.</p>
<p>As an extra complication, I set the laptop-to-relay connection to avoid the standard ports 25 and 465.  Many local networks, including BellSouth/DSL, block connections to standard ports completely.  It&#8217;s evil, it&#8217;s aggravating, it&#8217;s understandable, there has to be a better way, etc., but again, that&#8217;s how things are, and so that&#8217;s what a practical configuration has to deal with.  It turns out that <code>exim</code> can handle non-standard ports.</p>
<p>There are alternative approaches you may also want to consider:</p>
<ul>
<li><em>Use a web-based email program</em>.  If you use Hotmail or Yahoo or Gmail, then you can process your email anywhere that you have a WWW connection.  You lose the ability to process email offline, however, as well as losing a lot of ability to read and to process your email using your own software.</li>
<li><em>Use the relay provided by your ISP</em>.  I&#8217;m sure some ISP&#8217;s let you relay through their SMTP servers if you use SMTP authentication.  The main reasons I don&#8217;t do this are (a) I don&#8217;t always have a current ISP subscription, and (b) I do happen to use networks where port 25 is blocked, and so I still can&#8217;t send from those networks to any server running on port 25 as usual.</li>
</ul>
<h2>Exim Configuration  Files</h2>
<p>Exim on Debian is configured in a confusing way.  You can install it to use &#8220;split&#8221; or &#8220;unsplit&#8221; configuration files, and in either case, the configuration files you see are not the ones that exim itself sees.  I use the unsplit version, and I edit <code>/etc/exim4/exim4.conf.template</code>.  If you want to change between split and unsplit configurations, use <code>dpkg-reconfigure exim4-config</code>.  Whenever you change a configuration setting, use <code>/etc/init.d/exim4 restart</code>.</p>
<p>As an aside, this situation strikes me as more complicated than is helpful.  I found myself wishing there was a way to create and use a single <code>/etc/exim/exim4.conf</code>, but did not dig up how to do so.</p>
<h2>Configuring the Relay Server</h2>
<p>First the relay server needs to be set up.  As you go along, you will want a way to test how the server is working.  I found this short page helpful:</p>
<blockquote><p><a href="http://qmail.jms1.net/test-auth.shtml">Testing SMTP AUTH connections</a></p></blockquote>
<p>The suggestion on that page regarding the <code>-starttls</code> option of <code>openssl</code> did not work for me, but after some Googling, I found <a href="http://www.mail-archive.com/openssl-dev%40openssl.org/msg20105.html">a proposed patch</a> for <code>openssl</code> that appears to fix the problem.  So, by the time you read this, even that might work.</p>
<p>Start by installing the <code>exim4</code> package and configuring it to work as normal on an always-connected Internet host.</p>
<p>Run <code>/usr/share/doc/exim4-base/examples/exim-gencert</code> and answer all of its question.  This will create a TLS certification that is needed to use SSL connections.</p>
<p>Turn on plain-text authentication by uncommenting the <code>plain_server</code> section of the exim configuration file.  I also changed the <code>server_condition</code> line to have a hardcoded username and password instead of reading it from a file. The result looks like this (with USERNAME and PASSWORD substituted with the name and password I chose):</p>
<blockquote><p>
 plain_server:<br />
  driver = plaintext<br />
  public_name = PLAIN<br />
#  server_condition = &#8220;${if crypteq{$3}{${extract{1}{:}{${lookup{$2}lsearch{CONF<br />
DIR/passwd}{$value}{*:*}}}}}{1}{0}}&#8221;<br />
  server_condition = \<br />
    ${if and {{eq{$2}{USERNAME}}{eq{$3}{PASSWORD}}}{yes}{no}}<br />
  server_set_id = $2<br />
  server_prompts = :
</p></blockquote>
<p>You also need to set up a couple of other things.  Put the following settings near the top of your <code>exim4.conf.template</code>:</p>
<blockquote><p>
MAIN_TLS_ENABLE=1<br />
daemon_smtp_ports=smtp : 26
</p></blockquote>
<p>That should be it.  Your exim server on the relay machine should now:</p>
<ol>
<li>Accept authentication using your chosen USERNAME and PASSWORD.</li>
<li>Listen on port 26 in addition to 25.</li>
<li>Accept SSL/TLS connections via the STARTTLS directive.</li>
</ol>
<h2>Configuring the Client</h2>
<p>Next, set up the client to send all outgoing mail via the relay host.  Install <code>exim4</code> and set it to use your relay server as a smarthost.  Edit <code>/etc/exim4/passwd.client</code> and put in your username and password, something like:</p>
<blockquote><p>
### CONFDIR/passwd.client<br />
#<br />
# Format:<br />
#targetmailserver.example:login:password<br />
#<br />
# default entry:<br />
### *:bar:foo<br />
*:USERNAME:PASSWORD
</p></blockquote>
<p>Finally, hack your <code>exim4.conf.template</code> to use port 26 instead of 25.  Find the section for <code>remote_smtp_smarthost</code> and add <code>port = 26</code> to it.  In my file it looks like this:</p>
<blockquote><p>
  remote_smtp_smarthost:<br />
  debug_print = &#8220;T: remote_smtp_smarthost for $local_part@$domain&#8221;<br />
  driver = smtp<br />
  hosts_try_auth = ${if exists {CONFDIR/passwd.client}{DCsmarthost}{}}<br />
  tls_tempfail_tryclear = false<br />
  DEBCONFheaders_rewriteDEBCONF<br />
  DEBCONFreturn_pathDEBCONF<br />
  port = 26
</p></blockquote>
<p>That should be it.  Now mail sent locally will get relayed via port 26 on your relay host.</p>
]]></content:encoded>
			<wfw:commentRss>http://redhatvn.net/smtp-relaying-via-a-smarthost/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Delete Frozen Emails</title>
		<link>http://redhatvn.net/delete-frozen-emails</link>
		<comments>http://redhatvn.net/delete-frozen-emails#comments</comments>
		<pubDate>Fri, 25 Dec 2009 06:00:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Centos]]></category>
		<category><![CDATA[Cpanel]]></category>
		<category><![CDATA[Directadmin]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[vps]]></category>
		<category><![CDATA[exim]]></category>
		<category><![CDATA[exim remove queue]]></category>
		<category><![CDATA[mail server]]></category>

		<guid isPermaLink="false">http://redhatvn.net/?p=975</guid>
		<description><![CDATA[Howto check number of emails in the mail queue: exim -bpc To check the email ID, sender and receiver of the each email: exim -bp &#124; more To delete frozen emails from the mail queue, execute: exim -bp &#124; grep ‘frozen’ &#124; awk ‘{print $3}’ &#124; xargs exim -Mrm similarly, to delete emails sent using [...]]]></description>
			<content:encoded><![CDATA[<p>Howto check <strong>number of emails in the mail queue</strong>:</p>
<blockquote><p><strong><strong><code>exim -bpc</code></strong></strong></p></blockquote>
<p>To check the <strong>email ID, sender and receiver of the each email</strong>:</p>
<blockquote><p><strong><code>exim -bp | more</code></strong></p></blockquote>
<p>To <strong>delete frozen emails</strong> from the mail queue, execute:</p>
<blockquote><p><strong><code>exim -bp | grep ‘frozen’ | awk ‘{print $3}’ | xargs exim -Mrm</code></strong></p></blockquote>
<p>similarly, to delete emails sent using a script’</p>
<blockquote><p><strong><code>exim -bp | grep ‘&lt;&gt;’ | awk ‘{print $3}’ | xargs exim -Mrm</code></strong></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://redhatvn.net/delete-frozen-emails/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Howto: Disable MailMan</title>
		<link>http://redhatvn.net/howto-disable-mailman</link>
		<comments>http://redhatvn.net/howto-disable-mailman#comments</comments>
		<pubDate>Fri, 25 Dec 2009 06:02:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Centos]]></category>
		<category><![CDATA[Cpanel]]></category>
		<category><![CDATA[Directadmin]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[vps]]></category>
		<category><![CDATA[exim]]></category>
		<category><![CDATA[mail server]]></category>

		<guid isPermaLink="false">http://redhatvn.net/?p=978</guid>
		<description><![CDATA[To disable Mailman on a cPanel server, remove the execute permissions of the mailman wrapper chmod -x /usr/local/cpanel/3rdparty/mailman/mail/wrapper If you ever want to enable it: chmod +x /usr/local/cpanel/3rdparty/mailman/mail/wrapper]]></description>
			<content:encoded><![CDATA[<p>To <strong>disable Mailman on a cPanel server</strong>, remove the execute permissions of the mailman wrapper</p>
<blockquote><p><strong><code>chmod -x /usr/local/cpanel/3rdparty/mailman/mail/wrapper</code></strong></p></blockquote>
<p>If you ever want to enable it:</p>
<blockquote><p><strong><code>chmod +x /usr/local/cpanel/3rdparty/mailman/mail/wrapper</code></strong></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://redhatvn.net/howto-disable-mailman/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>EasyApache Custom Modules</title>
		<link>http://redhatvn.net/easyapache-custom-modules</link>
		<comments>http://redhatvn.net/easyapache-custom-modules#comments</comments>
		<pubDate>Fri, 25 Dec 2009 06:46:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Centos]]></category>
		<category><![CDATA[Cpanel]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[vps]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[exim]]></category>

		<guid isPermaLink="false">http://redhatvn.net/?p=1020</guid>
		<description><![CDATA[Custom Apache and PHP modules add features to the EasyApache system, and are accessible from both the command line and graphical WHM interfaces. These modules are compiled into Apache and/or PHP just like the modules provided with EasyApache. Before you begin You can find documentation for creating custom modules your server at WHM &#62; EasyApache [...]]]></description>
			<content:encoded><![CDATA[<p>Custom Apache and PHP modules add features to the EasyApache system, and are accessible from both the command line and graphical WHM interfaces. These modules are compiled into Apache and/or PHP just like the modules provided with EasyApache.</p>
<p><span id="more-1020"></span></p>
<h2>Before you begin</h2>
<p>You can find documentation for creating custom modules your server at WHM &gt; <em>EasyApache</em> &gt; <em>Help</em> &gt; <em>Cpanel::Easy Framework POD</em>, or and via command line at <code>/scripts/easyapache --perldoc</code>.</p>
<p>You can download a few sample custom modules below. These modules are not likely to be included in EasyApache in the near future.</p>
<p><img title="PICK" src="http://twiki.cpanel.net/twiki/pub/TWiki/TWikiDocGraphics/starred.gif" border="0" alt="PICK" width="16" height="16" /> <strong>Important:</strong> If you have problems building Apache with your custom modules, and you are unable to troubleshoot the problem, run <code>/scripts/easyapache --skip-custom-optmods</code> to build Apache and PHP without any custom modules. (Or, access the WHM equivalent found in EasyApache&#8217;s <em>Help</em> section).</p>
<h2><a name="Custom_modules"></a> Custom modules</h2>
<h3><span style="color: #993300;"><a name="Installing_a_custom_module"></a> Installing a custom module</span></h3>
<p>To install a custom module:</p>
<ol>
<li> Download and unzip it into <code>/var/cpanel/easy/apache/custom_opt_mods/</code>.</li>
<li> When logged into your server as <code>root</code>, you can install any module listed below by running the following commands. Be sure to replace <code>$NAME.tar.gz</code> with the filename of the module you wish to download:</li>
</ol>
<p><code>wget http://easyapache.cpanel.net/optmods/$NAME.tar.gz<br />
tar -C /var/cpanel/easy/apache/custom_opt_mods -xzf $NAME.tar.gz<br />
</code></p>
<h3><span style="color: #993300;"><a name="Removing_a_custom_module"></a> Removing a custom module</span></h3>
<p>In order to remove a custom module from the server, simply delete the files you created when you issued the above commands. The module will be removed from all future builds and the EasyApache interface.</p>
<h3><span style="color: #993300;"><a name="Available_modules"></a> Available modules</span></h3>
<p><img title="ALERT!" src="http://twiki.cpanel.net/twiki/pub/TWiki/TWikiDocGraphics/warning.gif" border="0" alt="ALERT!" width="16" height="16" /> <strong>Warning:</strong> cPanel <strong>does not</strong> provide support for custom modules, including the ones linked below. The following modules are not developed by cPanel, Inc. Use them at your own risk.</p>
<p><span style="color: #ff6600;"><strong>mod_auth_mysql</strong></span> — This module allows you to authenticate users and authorize access through a MySQL database.</p>
<ul>
<li> Download: <a href="http://twiki.cpanel.net/twiki/pub/EasyApache3/CustomMods/custom_opt_mod-mod_auth_mysql.tar.gz" target="_top">custom_opt_mod-mod_auth_mysql.tar.gz</a></li>
<li> <a href="http://modauthmysql.sourceforge.net/" target="_blank">mod_auth_mysql project page</a>.</li>
</ul>
<p><span style="color: #ff6600;"><strong>mod_GeoIP</strong></span> — This module looks up the IP address of the client web user in the GeoIP database.</p>
<ul>
<li> Download: <a href="http://twiki.cpanel.net/twiki/pub/EasyApache3/CustomMods/custom_opt_mod-mod_geoip.tar.gz" target="_top">custom_opt_mod-mod_geoip.tar.gz</a></li>
<li> <a href="http://www.maxmind.com/app/mod_geoip" target="_blank">mod_GeoIP project page</a></li>
</ul>
<p><span style="color: #ff6600;"><strong>mod_python</strong></span> — This module embeds the Python interpreter into Apache, for faster Python applications.</p>
<ul>
<li> Download: <a href="http://twiki.cpanel.net/twiki/pub/EasyApache3/CustomMods/custom_opt_mod-mod_python.tar.gz" target="_top">custom_opt_mod-mod_python.tar.gz</a></li>
<li> <a href="http://www.modpython.org/" target="_blank">mod_python project page</a></li>
</ul>
<p><span style="color: #ff6600;"><strong>GD with JIS-mapped Japanese font support</strong></span> — This module provides JIS-mapped Japanese font support for the GD library under PHP5.</p>
<ul>
<li> Download: <a href="http://twiki.cpanel.net/twiki/pub/EasyApache3/CustomMods/custom_opt_mod-php5-gd_jis_mapped_japanese_font_support.tar.gz" target="_top">custom_opt_mod-php5-gd_jis_mapped_japanese_font_support.tar.gz</a></li>
</ul>
<p><span style="color: #ff6600;"><strong>Turkish locale patch for PHP5</strong></span> — This module improves PHP5 support for Turkish.</p>
<ul>
<li> Download: <a href="http://twiki.cpanel.net/twiki/pub/EasyApache3/CustomMods/custom_opt_mod-php5-turkish_locale_patch.tar.gz" target="_top">custom_opt_mod-php5-turkish_locale_patch.tar.gz</a></li>
</ul>
<p><span style="color: #ff6600;"><strong>suPHP PAM patch</strong></span> — This module allows you to use limits (<code>/etc/security*.conf</code>) with suPHP.</p>
<ul>
<li> Download: <a href="http://twiki.cpanel.net/twiki/pub/EasyApache3/CustomMods/custom_opt_mod-suphp_pam_patch.tar.gz" target="_top">custom_opt_mod-suphp_pam_patch.tar.gz</a></li>
<li> <a href="http://www.mail-archive.com/suphp@lists.marsching.biz/msg00049.html" target="_blank">suPHP PAM patch information</a></li>
</ul>
<p><span style="color: #ff6600;">Source</span>: http://twiki.cpanel.net/twiki/bin/view/EasyApache3/CustomMods</p>
]]></content:encoded>
			<wfw:commentRss>http://redhatvn.net/easyapache-custom-modules/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Exim Remove All messages From the Mail Queue</title>
		<link>http://redhatvn.net/exim-remove-all-messages-from-the-mail-queue</link>
		<comments>http://redhatvn.net/exim-remove-all-messages-from-the-mail-queue#comments</comments>
		<pubDate>Thu, 27 Aug 2009 08:50:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Cpanel]]></category>
		<category><![CDATA[Directadmin]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[exim]]></category>
		<category><![CDATA[exim remove queue]]></category>

		<guid isPermaLink="false">http://redhatvn.net/?p=251</guid>
		<description><![CDATA[Question: I&#8217;m using Exim mail server under CentOS Linux. How do I remove all messages from the Exim mail queue using a shell prompt? Answer: Exim is a mail transfer agent (MTA) used on Unix-like operating systems. It aims to be a general and flexible mailer with extensive facilities for checking incoming e-mail. To print [...]]]></description>
			<content:encoded><![CDATA[<p><span style="color: #ff0000;">Question:</span> I&#8217;m using Exim mail server under CentOS Linux. How do I remove all messages from the Exim mail queue using a shell prompt?</p>
<p><span style="color: #009900;">Answer:</span> Exim is a mail transfer agent (MTA) used on Unix-like operating systems. It aims to be a general and flexible mailer with extensive facilities for checking incoming e-mail.</p>
<p><span id="more-251"></span></p>
<h2>To print a list of the messages in the queue, enter:</h2>
<p><code># exim -bp</code></p>
<h2>To remove a message from the queue, enter:</h2>
<p><code># exim -Mrm {message-id}</code></p>
<h2>To remove all messages from the queue, enter:</h2>
<p><code># exim -bp | awk '/^ *[0-9]+[mhd]/{print "exim -Mrm " $3}' | bash</code><br />
<a href="http://www.cyberciti.biz/faq/exim-remove-all-messages-from-the-mail-queue/#comment-39266">Dallas Marlow</a>, suggested following clean command:<br />
<code># exim -bp | exiqgrep -i | xargs exim -Mrm</code></p>
<h3>Further readings:</h3>
<ul>
<li>man pages awk, exim</li>
<li><a href="http://www.exim.org/docs.html">Exim documentation</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://redhatvn.net/exim-remove-all-messages-from-the-mail-queue/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! -->