<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title>Sysadmin Blog</title>
		<link>https://www.cyberbyte.ch/blog/index.php</link>
		<description><![CDATA[Copyright Cyberbyte Networks]]></description>
		<copyright>Copyright 2026, Mike Rhyner</copyright>
		<managingEditor>info@cyberbyte.ch (Mike Rhyner)</managingEditor>
		<language>en-US</language>
		<generator>SPHPBLOG 0.8.1</generator>
		<item>
			<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>
			<category>Tools &amp; more, Knowledge, Postfix Stuff</category>
			<guid isPermaLink="true">https://www.cyberbyte.ch/blog/index.php?entry=entry140414-121759</guid>
			<author>info@cyberbyte.ch (Mike Rhyner)</author>
			<pubDate>Mon, 14 Apr 2014 10:17:59 GMT</pubDate>
			<comments>https://www.cyberbyte.ch/blog/comments.php?y=14&amp;m=04&amp;entry=entry140414-121759</comments>
		</item>
		<item>
			<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>
			<category>Postfix Stuff, Mail stuff</category>
			<guid isPermaLink="true">https://www.cyberbyte.ch/blog/index.php?entry=entry140228-104539</guid>
			<author>info@cyberbyte.ch (Mike Rhyner)</author>
			<pubDate>Fri, 28 Feb 2014 09:45:39 GMT</pubDate>
			<comments>https://www.cyberbyte.ch/blog/comments.php?y=14&amp;m=02&amp;entry=entry140228-104539</comments>
		</item>
		<item>
			<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>
			<category>Tools &amp; more, Postfix Stuff, Mail stuff</category>
			<guid isPermaLink="true">https://www.cyberbyte.ch/blog/index.php?entry=entry120929-000000</guid>
			<author>info@cyberbyte.ch (Mike Rhyner)</author>
			<pubDate>Fri, 28 Sep 2012 22:00:00 GMT</pubDate>
			<comments>https://www.cyberbyte.ch/blog/comments.php?y=12&amp;m=09&amp;entry=entry120929-000000</comments>
		</item>
	</channel>
</rss>
