<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:ref="http://purl.org/rss/1.0/modules/reference/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns="http://purl.org/rss/1.0/">
	<channel rdf:about="https://www.cyberbyte.ch/blog/rss.rdf">
		<title>Sysadmin Blog</title>
		<link>https://www.cyberbyte.ch/blog/index.php</link>
		<description><![CDATA[Copyright Cyberbyte Networks]]></description>
		<items>
			<rdf:Seq>
				<rdf:li resource="https://www.cyberbyte.ch/blog/index.php?entry=entry140414-121759" />
				<rdf:li resource="https://www.cyberbyte.ch/blog/index.php?entry=entry140228-104539" />
				<rdf:li resource="https://www.cyberbyte.ch/blog/index.php?entry=entry120929-000000" />
			</rdf:Seq>
		</items>
	</channel>
	<item rdf:about="https://www.cyberbyte.ch/blog/index.php?entry=entry140414-121759">
		<title>Postfix Mail Queue Cleaner</title>
		<link>https://www.cyberbyte.ch/blog/index.php?entry=entry140414-121759</link>
		<description><![CDATA[This small shell script removes all messages originating from a certain sender address out of the postfix mail queue.<br /><br /><pre><br />#! /bin/bash<br />if [ &quot;$1&quot; == &quot;&quot; ]; then<br />  echo &quot;please give e-mail address&quot;<br />  exit 1<br />else<br />  emailaddr=$1<br />fi<br />for id in `mailq | egrep &quot;[0-9A-F]{10} &quot; | grep &quot;$emailaddr&quot; | cut -d &quot; &quot; -f 1`<br />do<br />  echo $id<br />  postsuper -d $id<br />done<br /><br /></pre>]]></description>
	</item>
	<item rdf:about="https://www.cyberbyte.ch/blog/index.php?entry=entry140228-104539">
		<title>Detect and block abuse of (cracked) e-mail account</title>
		<link>https://www.cyberbyte.ch/blog/index.php?entry=entry140228-104539</link>
		<description><![CDATA[To avoid bad things(TM) caused by a cracked e-mail account on our postfix mailserver, I used the script <a href="http://sourceforge.net/projects/checkauthlog/files/check_auth_log-2.0.0.tgz/download?use_mirror=switch" >Check Auth Log</a> to detect abnormal high numbers of logins or logins from many different IP addresses within a certain time onto a certain account. Then the script will lock out the account. This, together with per-session limits within postfix configuration (smtpd_client_message_rate_limit, smtpd_client_recipient_rate_limit), should help to avoid or at least mitigate the damage caused by cracked accounts, i.e. SMTP server being blacklisted.<br />]]></description>
	</item>
	<item rdf:about="https://www.cyberbyte.ch/blog/index.php?entry=entry120929-000000">
		<title>Postfix Mail Queue Manager</title>
		<link>https://www.cyberbyte.ch/blog/index.php?entry=entry120929-000000</link>
		<description><![CDATA[<h2>Description</h2><br />This PHP script shows the content of the mail queues of multiple servers and give you the possibility to hold, release, delete and reqeue single messages. <br /><br />If you install a tiny wrapper script on mail servers, you may even remove or requeue multiple messages from a certain sender.<br /><br />In addition, you can also requeue all messages (<code>sendmail -q</code>).<br /><br /><h2>Download</h2><br />Download the <a href="http://www.cyberbyte.ch/Linux/mail/mailqmgr.tar.gz" >gzip&#039;ped tar archive</a><br /><br /><h2>Prerequisites:</h2><br />On a web- or intranet accessible host (access protection highly recommended!):<br />- Web Server with PHP script language support (<code>shell_exec</code> function has to be enabled)<br />- Key-based SSH access to mail servers for webserver user<br /><br />On mail servers:<br />- Postfix<br />- sudo<br /><br /><h2>Installation</h2><br />    Unpack the archive beneath a webserver document root<br /><br />    Adapt the variables $mailservers and $user to your needs, if you like to use the selection by sender e-mail address feature, configure also variable $wrapper_cmd<br /><br />    Add the following lines to <code>/etc/sudoers</code> on the mail server(s), assuming user <code>admin</code> for login to the mail server(s) (change it to your needs):<br /><br /><pre>admin    ALL=(ALL) NOPASSWD: /usr/sbin/postsuper<br />admin    ALL=(ALL) NOPASSWD: /usr/sbin/postqueue<br />admin    ALL=(ALL) NOPASSWD: /usr/local/bin/mailqueue.sh</pre>(last line only needed for selection by sender address)<br /><br />    If you want to use the selection by e-mail address feature, put mailqueue.sh to some path on the mail server(s) and make it executable, e.g.:<br /><pre>cp mailqueue.sh /usr/local/bin/mailqueue.sh<br />chmod 755 /usr/local/bin/mailqueue.sh</pre><br />    Try it out using <code>http://yourwebserver/mailqmgr/index.php</code>]]></description>
	</item>
</rdf:RDF>
