Postfix relay all mail to one mailbox

May 18th, 2010 by Rudolf

Postfix relay all mail to one mailbox

To configure postfix to relay all outgoing mail to one localmailbox is very easy.Use the following settings in your /etc/postfix/main.cf and reload your postfix daemon with “sudo postfix reload”

First configure the relay of all outgoing mail to one local mailbox:

always_bcc = yourusername@localhost

Second if you want to discard all outgoing mail too you need some extra settings  (this comes in handy when you are configuring a test server that must not mail to the outside world)

step 1) set a relayhost to a non-existant ip in your network

relayhost = 10.0.0.2

step 2) change the bounce queue settings so that bounced mail will be discarded instantly.

bounce_queue_lifetime = 0
maximal_queue_lifetime = 0

Now you are done! You have a test mailserver that can accept mail no matter to what e-mail adres it was addressed in the first place, deliver a blind carbon copy locally and discard the outgoing copy so that e-mail never leaves the server. You can use the command line program “mutt” to read the mail that has been delivered locally.

Rudolf Maduro – IT Specialist & Personal Life Coach

, , , , , ,

Nagios remote server monitoring with nagstamon

May 4th, 2010 by Rudolf

Nagios Remote server monitoring with nagstamon

Our Nagios VPS servers are fully compatible with the popular Nagios Desktop utility Nagstamon.

Nagstamon is a Nagios status monitor which resides in systray or desktop (GNOME, KDE and Windows) as floating statusbar to inform you in realtime about the status of your hosts and services. It allows to connect to multiple Nagios and Opsview servers.

Download Nagstamon utility from http://sourceforge.net/projects/nagstamon/

You can even try it on a demo server! … read more …

, , , ,

linux debian server installation help

April 21st, 2010 by Rudolf

linux debian server installation help

Debian Linux is a good choice when configuring a robust Linux server. A good sysadmin can configure a system capable of handling thousands of connections per second with a simple out-of-the box installation with some minor tweaks  here and there.

When configuring a server that needs to handle a lot of connections to the apache webserver you might want to do a virtualisation setup with OpenVZ and some virtual containers. This is so you can isolate your webserver from your MySQL server for performance reasons. One other tweak that is overlooked many times is the Apache daemon. The out-of-the-box configuration file of apache is not capable to handle a thousands of connections. You might need to tweak this by hand.

Using nginx as a front-end proxy to direct http/https traffic to your apache servers is also a good choice to split up the load to increase performance.

If you currently have a site that is drawing a lot of traffic and you are in need to split up the load you may contact me for assistance. I do like these kind of projects.

greetz,

Rudolf Maduro (mail+@+ rudolfmaduro+.+ com)

, , , , , , ,

htaccess password – apache

April 21st, 2010 by Rudolf

htaccess password

apache

To protect a folder against unauthorized access via a webbrowser you need to follow a couple of simple steps.

Place a .htaccess file in the folder you want to protect with the following directives:

AuthUserFile /FULLPATHTOYOURPASSWORDFILE/.htpasswd
AuthGroupFile /dev/null
AuthName “Please Login First”
AuthType Basic
<Limit GET POST>
require valid-user
</Limit>

Do not forget to make sure that you have write access to the full path where you want to store your password file. Note on security it is better not to store the .htpasswd in your webroot. Store it in a folder below your webroot whenever possible.

Then do the following on the command line

cd /var/www/FULLPATHTOYOURPASSWORDFILE

Now you can create the password file for the first time with the apache tool “htpasswd” you will be prompted to enter the new password for the user 2 times.

htpasswd -c .htpasswd username

To add more users do the following:

htpasswd .htpasswd username2

htpasswd .htpasswd username2

That’s it, now when you want to access this folder via a webbrowser you will be prompted for a password.

Rudolf Maduro (IT specialist and Personal Life Coach)

CEO of www.remote-server-monitoring.com , www.network-monitoring.biz and www.onlinelifecoach.nl

Note: I assume no responsibility when the above information is used. Any damages to you or your users after using this procedure is your own responsibility. This information is given for educational purposes only.

, , , , , , , , , ,