<?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>exim &#8211; VeriTeknik</title>
	<atom:link href="https://www.veriteknik.net.tr/en/tag/exim/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.veriteknik.net.tr/en/</link>
	<description>VeriTeknik Bilişim &#124; VeriTeknik Bilişim</description>
	<lastBuildDate>Wed, 07 Nov 2018 20:32:49 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>A faster way to delete files</title>
		<link>https://www.veriteknik.net.tr/en/faster-way-delete-files/</link>
					<comments>https://www.veriteknik.net.tr/en/faster-way-delete-files/#respond</comments>
		
		<dc:creator><![CDATA[ckaraca]]></dc:creator>
		<pubDate>Mon, 12 May 2014 23:41:48 +0000</pubDate>
				<category><![CDATA[DirectAdmin]]></category>
		<category><![CDATA[LINUX]]></category>
		<category><![CDATA[exim]]></category>
		<category><![CDATA[fast]]></category>
		<category><![CDATA[faster]]></category>
		<category><![CDATA[find]]></category>
		<category><![CDATA[rm]]></category>
		<category><![CDATA[unlink]]></category>
		<guid isPermaLink="false">http://www.plugged.in/?p=963</guid>

					<description><![CDATA[<p>If you are struggling with millions of SPAM messages like me, you should rather use &#8220;find&#8221; instead of &#8220;rm&#8221; while deleting files in a folder. This method is tested to be faster than rm -rf: switch to the folder containing files, in my case: cd /var/spool/exim/ ans start deleting files by typing: find . -maxdepth [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/faster-way-delete-files/">A faster way to delete files</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>If you are struggling with millions of SPAM messages like me, you should rather use &#8220;find&#8221; instead of &#8220;rm&#8221; while deleting files in a folder. This method is tested to be faster than rm -rf:</p>
<p>switch to the folder containing files, in my case:</p>
<pre class="brush: bash; gutter: true; first-line: 1">cd /var/spool/exim/</pre>
<p>ans start deleting files by typing:</p>
<pre class="brush: bash; gutter: true; first-line: 1">find . -maxdepth 1 -type f -delete</pre>
<p>you can track the number of remaining files easily by tiping the below command from another terminal: (cd to same directory)</p>
<pre class="brush: bash; gutter: true; first-line: 1">find . -maxdepth 1 -type f | wc -l</pre>
<p>..</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/faster-way-delete-files/">A faster way to delete files</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.veriteknik.net.tr/en/faster-way-delete-files/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">963</post-id>	</item>
		<item>
		<title>Delete Mail From Queue in Exim</title>
		<link>https://www.veriteknik.net.tr/en/delete-mail-from-queue-in-exim/</link>
					<comments>https://www.veriteknik.net.tr/en/delete-mail-from-queue-in-exim/#respond</comments>
		
		<dc:creator><![CDATA[Mustafa Emre Aydın]]></dc:creator>
		<pubDate>Fri, 18 Jan 2013 15:43:58 +0000</pubDate>
				<category><![CDATA[DirectAdmin]]></category>
		<category><![CDATA[LINUX]]></category>
		<category><![CDATA[exim]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[spam]]></category>
		<guid isPermaLink="false">http://www.plugged.in/?p=767</guid>

					<description><![CDATA[<p>Deleting email from the exim queue is unfortunately not that simple. If you have a massive spammer in your system, you can clear the email originating from them with the command below. exim -bpru &#124; tr '\n' + &#124; sed -e "s/++/=/g" &#124; tr -d + &#124; tr = '\n' &#124; grep "spammer@email.com" &#124; awk [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/delete-mail-from-queue-in-exim/">Delete Mail From Queue in Exim</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Deleting email from the exim queue is unfortunately not that simple. If you have a massive spammer in your system, you can clear the email originating from them with the command below.</p>
<pre class="brush: bash; gutter: true; first-line: 1">exim -bpru | tr '\n' + | sed -e "s/++/=/g" | tr -d + | tr = '\n' | grep "spammer@email.com" | awk {'print $3'} | xargs exim -Mrm</pre>
<p>Simple replace the spammer@email.com address with the potential spammer.<br />
Don&#8217;t forget that this command uses the whole queue list to process. Sometimes if you have hundreds of thousands of email from this spammer in queue, it will get hard to process them all for the system. So instead of using the whole queue list, we can break it down to pieces with the head command.</p>
<p>The command below will break it down to pieces of 5000, so if you have more than 5000, you should run this command several times.</p>
<pre class="brush: bash; gutter: true; first-line: 1">exim -bpru | head -n 5000 | tr '\n' + | sed -e "s/++/=/g" | tr -d + | tr = '\n' | grep "spammer@email.com" | awk {'print $3'} | xargs exim -Mrm</pre>
<p>To delete all mails from the queue, simply use this command.</p>
<pre class="brush: bash; gutter: true; first-line: 1">exim -bp | awk '/^ *[0-9]+[mhd]/{print "exim -Mrm " $3}' | sh</pre>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/delete-mail-from-queue-in-exim/">Delete Mail From Queue in Exim</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.veriteknik.net.tr/en/delete-mail-from-queue-in-exim/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">767</post-id>	</item>
		<item>
		<title>Directadmin : Problem Receiving Emails &#8211; The &#8220;Unknown User&#8221; Issue</title>
		<link>https://www.veriteknik.net.tr/en/directadmin-problem-recieving-emails-the-unknown-user-issue/</link>
					<comments>https://www.veriteknik.net.tr/en/directadmin-problem-recieving-emails-the-unknown-user-issue/#respond</comments>
		
		<dc:creator><![CDATA[Mustafa Emre Aydın]]></dc:creator>
		<pubDate>Sat, 09 Jun 2012 08:55:47 +0000</pubDate>
				<category><![CDATA[DirectAdmin]]></category>
		<category><![CDATA[directadmin]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[exim]]></category>
		<guid isPermaLink="false">http://www.plugged.in/?p=535</guid>

					<description><![CDATA[<p>If you get a 550 error as a reply when you email a user with directadmin, saying Remote host said: 550 &#8220;Unknown User&#8221; or The error that the other server returned was: 550 550 &#8220;Unknown User&#8221; (state 13). or something equivalent, then the problem might be your virtual domainowner settings. This happens with exim especially [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/directadmin-problem-recieving-emails-the-unknown-user-issue/">Directadmin : Problem Receiving Emails &#8211; The &#8220;Unknown User&#8221; Issue</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>If you get a <em>550 error</em> as a reply when you email a user with directadmin, saying <strong>Remote host said: 550 &#8220;Unknown User&#8221;</strong> or <strong>The error that the other server returned was: 550 550 &#8220;Unknown User&#8221; (state 13).</strong> or something equivalent, then the problem might be your virtual domainowner settings.</p>
<p>This happens with exim especially when moving from one server to another via Directadmin.</p>
<p>To verify this solution, first check your paniclog:</p>
<pre class="brush: bash; gutter: true; first-line: 1">tail /var/log/exim/paniclog</pre>
<p>If you get something like this:</p>
<blockquote><p>2012-06-08 18:53:01 1SczTF-0002Cj-B8 Failed to find user &#8220;&#8221; from expanded string &#8220;${lookup{$domain}lsearch{/etc/virtual/domainowners}{$value}}&#8221; for the domain_filter router</p></blockquote>
<p>then you probably have an issue with your domainowners file. as you can see, the perl script can&#8217;t parse the <em>username</em>, hence the error &#8220;unknown user&#8221; when receiving email.</p>
<p>The solution is to rebuild the /etc/virtual directory</p>
<p>Get a backup</p>
<pre class="brush: bash; gutter: true; first-line: 1">cd /etc
cp -Rp virtual virtual.backup</pre>
<p>Verify its existance</p>
<pre class="brush: bash; gutter: true; first-line: 1">mkdir -p /etc/virtual
chmod 755 /etc/virtual
chown mail:mail /etc/virtual</pre>
<p>Create this script and save it somewhere, let&#8217;s say /root/fix_virtual.sh</p>
<pre class="brush: bash; gutter: true; first-line: 1">#!/bin/sh

echo -n '' &gt; /etc/virtual/domains
echo -n '' &gt; /etc/virtual/domainowners

mkdir -p /etc/virtual/`hostname`
chown mail:mail /etc/virtual/`hostname`
chmod 711 /etc/virtual/`hostname`
echo `hostname` &gt;&gt; /etc/virtual/domains

for u in `ls /usr/local/directadmin/data/users`; do
{
       for d in `cat /usr/local/directadmin/data/users/$u/domains.list`; do
       {
               echo "$d: $u" &gt;&gt; /etc/virtual/domainowners
               echo "$d" &gt;&gt; /etc/virtual/domains

               DMN=/etc/virtual/$d

               mkdir -p $DMN
               chmod 711 $DMN
               chown mail:mail $DMN

               touch $DMN/aliases
               if [ ! -s $DMN/aliases ]; then
                       echo "$u: $u" &gt; $DMN/aliases
               fi
               touch $DMN/autoresponder.conf
               touch $DMN/filter
               touch $DMN/filter.conf
               touch $DMN/passwd
               touch $DMN/quota
               touch $DMN/vacation.conf
               chown mail:mail $DMN/*

               mkdir -p $DMN/majordomo
               chmod 751 $DMN/majordomo
               chown majordomo:daemon $DMN/majordomo

               mkdir -p $DMN/reply
               chmod 700 $DMN/reply
               chown mail:mail $DMN/reply

               for p in `cat /usr/local/directadmin/data/users/$u/domains/$d.pointers 2&gt;/dev/null`; do
               {
                       echo "$p: $u"  &gt;&gt; /etc/virtual/domainowners
                       echo "$p" &gt;&gt; /etc/virtual/domains
                       ln -s $d /etc/virtual/$p
               };
               done;
       }
       done;
}
done;

chown mail:mail /etc/virtual/domains
chown mail:mail /etc/virtual/domainowners
chmod 644 /etc/virtual/domainowners
chmod 644 /etc/virtual/domains</pre>
<p>Make it exacutable and run.</p>
<pre class="brush: bash; gutter: true; first-line: 1">chmod 755 /root/fix_virtual.sh
/root/fix_virtual.sh</pre>
<p>Restart exim services</p>
<pre class="brush: bash; gutter: true; first-line: 1">service exim restart</pre>
<p>Your problem should be fixed.</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/directadmin-problem-recieving-emails-the-unknown-user-issue/">Directadmin : Problem Receiving Emails &#8211; The &#8220;Unknown User&#8221; Issue</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.veriteknik.net.tr/en/directadmin-problem-recieving-emails-the-unknown-user-issue/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">535</post-id>	</item>
		<item>
		<title>Detecting Possible Mail Forgers in EXIM</title>
		<link>https://www.veriteknik.net.tr/en/detecting-possible-mail-forgers-in-exim/</link>
					<comments>https://www.veriteknik.net.tr/en/detecting-possible-mail-forgers-in-exim/#respond</comments>
		
		<dc:creator><![CDATA[Mustafa Emre Aydın]]></dc:creator>
		<pubDate>Fri, 23 Mar 2012 12:15:12 +0000</pubDate>
				<category><![CDATA[LINUX]]></category>
		<category><![CDATA[exim]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[spam]]></category>
		<guid isPermaLink="false">http://www.plugged.in/?p=243</guid>

					<description><![CDATA[<p>The other day we were working on a mail server of a customer&#8217;s that spammed insanely. Since the mail transfer agent it uses is exim, it&#8217;s necessary to check the mainlog files. Whilst doing that, we realized the server was getting a lot of incoming mails as forgery. So, it is possible to get the [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/detecting-possible-mail-forgers-in-exim/">Detecting Possible Mail Forgers in EXIM</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>The other day we were working on a mail server of a customer&#8217;s that spammed insanely. Since the <a href="http://en.wikipedia.org/wiki/Message_transfer_agent" target="_blank">mail transfer agent</a> it uses is <a href="http://www.exim.org/" target="_blank">exim</a>, it&#8217;s necessary to check the <a href="http://www.exim.org/exim-html-current/doc/html/spec_html/ch49.html" target="_blank">mainlog</a> files.</p>
<p>Whilst doing that, we realized the server was getting a lot of incoming mails as forgery. So, it is possible to get the IP list of the possible forgerers.</p>
<p>To do this, we need to check the lines that indicate an INCOMING message, and that claims it uses our mail server itself as a sender, but actually connects through a different IP address.</p>
<p>Exim uses the notation <strong> for incoming messages, so it is easy to catch.<br />
It also uses the notation <strong>H=IP.ADD.RE.SS</strong> to state the IP address (or the hostname) of the incoming message. The beauty in this is that, it also gets the real IP address and checks if they match, if they don&#8217;t match, then it brackets the H= value like this <strong>H=(IP.ADD.RE.SS)</strong> and right after that, gives the real IP address with boxed brackets. <strong>[REAL.IP.ADD.RESS]</strong></strong></p>
<p>To detect forgeries done in a time period, and getting ONLY the IP address is crutial when you want check those IP addresses with others tools and scripts. So here&#8217;s an example <strong>grep</strong> line :</p>
<p><code>grep -ohP "(?</code></p>
<p>The example above, assumes that your mailserver&#8217;s IP Address is 10.1.31.33, of course this won&#8217;t be the case since it&#8217;s a local ip, so change that with yours.<br />
It also checks for attempts in <em>March 2012</em>, you can also edit this, since we&#8217;re using the Perl compatible regular expressions (the -P option of grep) than we can use <strong>..</strong> as wildcards for 2 characters (the day indicator).<br />
Since we&#8217;re checkig for more than 1 file, (<em>mainlog*</em>) grep will output the filenames too, the -h option is to suppress that.<br />
Also, we&#8217;re piping the output to <strong>uniq</strong>, so that we don&#8217;t get multiple results for the same IP address.<br />
Now you can simply redirect these IP addresses to your script/tool or save them for other purpose.</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/detecting-possible-mail-forgers-in-exim/">Detecting Possible Mail Forgers in EXIM</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.veriteknik.net.tr/en/detecting-possible-mail-forgers-in-exim/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">243</post-id>	</item>
	</channel>
</rss>
