Postfix Mail Queue Cleaner 
Monday, 14 April 2014, 12:17 - Tools & more, Knowledge, Postfix Stuff
Posted by Administrator
This small shell script removes all messages originating from a certain sender address out of the postfix mail queue.


#! /bin/bash
if [ "$1" == "" ]; then
echo "please give e-mail address"
exit 1
else
emailaddr=$1
fi
for id in `mailq | egrep "[0-9A-F]{10} " | grep "$emailaddr" | cut -d " " -f 1`
do
echo $id
postsuper -d $id
done


add comment ( 739 views )   |  permalink   |  $star_image$star_image$star_image$star_image$star_image ( 3 / 317 )
DNS Tools 
Tuesday, 22 October 2013, 23:00 - Tools & more
Posted by Administrator
Web Interface for DNS Queries.

Download


Download the tarball

Prerequisites


The "dig" tool must be installed on your system, and be allowed to be executed from php. If it doesn't work, e.g. if using safe_mode and/or open_basedir restrictions, add the path where dig is located to the two php options:
open_basedir /usr/bin/dig
safe_mode_exec_dir /usr/bin/
Within a VirtualHost, set with php_admin_value <option>.

In addition, TCP port 43 and UDP port 53 need to be open outbound.

Installation


Extract the content of the archive within your web root of the webserver, e.g.
cd <webroot>
tar xvzf dnstools.tar.gz

Usage


Navigate your web-browser to http://<your_host_name>/dnstools/ and enter either the appropriate form.

add comment ( 3290 views )   |  permalink   |  $star_image$star_image$star_image$star_image$star_image ( 3 / 2138 )
QEMU/KVM Virtual Host Manager 
Saturday, 29 September 2012, 21:11 - Tools & more, QEMU/KVM Stuff
Posted by Administrator

Description


This tiny script shows you a overview of the virtual machines on QEMU/KVM carrier servers using libvirt as management interface.

It can either show all virtual machines or only the running VMs.

Prerequisites


This PHP Script requires PHP extension libvirt-php

Download


Download the gzip'ped tar archive

Installation


Unpack the archive to a webserver document root with direct access to your libvirt hypervisors over TCP Port 16509 or SSH

Adapt at least the variables $dnsdomain and $arr_hosts to your infrastructure and change $comtype to "qemu+ssh" when SSH instead of direct port access is wanted

Try it out using http://yourwebserver/virtmgr/index.php

add comment ( 601 views )   |  permalink   |  $star_image$star_image$star_image$star_image$star_image ( 3.1 / 1089 )
Postfix Mail Queue Manager 
Saturday, 29 September 2012, 00:00 - Tools & more, Postfix Stuff, Mail stuff
Posted by Administrator

Description


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.

If you install a tiny wrapper script on mail servers, you may even remove or requeue multiple messages from a certain sender.

In addition, you can also requeue all messages (sendmail -q).

Download


Download the gzip'ped tar archive

Prerequisites:


On a web- or intranet accessible host (access protection highly recommended!):
- Web Server with PHP script language support (shell_exec function has to be enabled)
- Key-based SSH access to mail servers for webserver user

On mail servers:
- Postfix
- sudo

Installation


Unpack the archive beneath a webserver document root

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

Add the following lines to /etc/sudoers on the mail server(s), assuming user admin for login to the mail server(s) (change it to your needs):

admin    ALL=(ALL) NOPASSWD: /usr/sbin/postsuper
admin ALL=(ALL) NOPASSWD: /usr/sbin/postqueue
admin ALL=(ALL) NOPASSWD: /usr/local/bin/mailqueue.sh
(last line only needed for selection by sender address)

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.:
cp mailqueue.sh /usr/local/bin/mailqueue.sh
chmod 755 /usr/local/bin/mailqueue.sh

Try it out using http://yourwebserver/mailqmgr/index.php
add comment ( 12845 views )   |  permalink   |  related link   |  $star_image$star_image$star_image$star_image$star_image ( 3 / 4032 )
Remove Apache VirtualHost section 
Tuesday, 17 July 2012, 00:00 - Tools & more, Apache Stuff
Posted by Administrator
This small perl script removes a VirtualHost configuration section

Call with:
remove_virtual.pl <webname> <apache conf file>

<webname> is to be replaced with the FQDN of the name based virtual host (ServerName)

<apache conf file> is the full path to the apache configuration file that contains the VirtualHost
add comment ( 10638 views )   |  permalink   |  $star_image$star_image$star_image$star_image$star_image ( 3 / 1510 )

| 1 | 2 | Next> Last>>