Get a Free Techie custom email address

do you want  an email address that look more professional ? one that make you feel techie?

while digging deeper in google, i found some free email providers:

mail.com

The main drawback: no option to forward mail to another account such as gmail (feature available in premium account)
You can create email account in the form:

name@linuxmail.org
name@bsdmail.com
name@techie.com
name@programmer.net

name@hackermail.com

There is more to choose from.You will find a long list when you sign up.

easy.la

Good news is that it allows to forward to another account (as specified on their website).
You can create email account in the form:

name@admin.la

Again,there is more to choose from.You will find a long list when you sign up.

Wireshark Remote Capture using X-Forwarding

Because I was not very satisfied with the results of googling “wireshark remote capture x forwarding”, I wrote this little tutorial for my happiness.

1. To enable X11 forwarding on the server you need at least the xauth  program.
On the remote server install the following:

apt-get install xserver-xorg

apt-get install xbase-clients

apt-get install wireshark

2. on local machine:

# ssh -X root@remotemachine
# wireshark

3. Go to Capture > Options > Interface > Pseudo-Device

linux: reset iptables firewall rules

Create a shell script (iptables_flush.sh) and copy paste the following lines:

#!/bin/sh
echo "Flushing iptables rules..."
sleep 1
iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X
iptables -t mangle -F
iptables -t mangle -X
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT

Make the file executable

chmod +x iptables_flush.sh

and run the script:

./iptables_flush.sh

Source:
http://insanelabs.com/linux/linux-reset-iptables-firewall-rules/

POSTFIX – Per Recipient Sender Restrictions

The following is taken from the official postfix documentation:

Protecting internal email distribution lists

We want to implement an internal email distribution list. Something like all@our.domain.com, which aliases to all employees. My first thought was to use the aliases map, but that would lead to “all” being accessible from the “outside”, and this is not desired… 🙂

Postfix can implement per-address access controls. What follows is based on the SMTP client IP address, and therefore is subject to IP spoofing.

/etc/postfix/main.cf:
    smtpd_recipient_restrictions =
        check_recipient_access hash:/etc/postfix/access
        ...the usual stuff...

/etc/postfix/access:
    all@my.domain   permit_mynetworks,reject
    all@my.hostname permit_mynetworks,reject

Specify dbm instead of hash if your system uses dbm files instead of db files. To find out what map types Postfix supports, use the command postconf -m.

Now, that would be sufficient when your machine receives all Internet mail directly from the Internet. That’s unlikely if your network is a bit larger than an office. For example, your backup MX hosts would “launder” the client IP address of mail from the outside so it would appear to come from a trusted machine.

In the general case you need two lookup tables: one table that lists destinations that need to be protected, and one table that lists domains that are allowed to send to the protected destinations.

What follows is based on the sender SMTP envelope address, and therefore is subject to SMTP sender spoofing.

/etc/postfix/main.cf:
    smtpd_recipient_restrictions =
        check_recipient_access hash:/etc/postfix/protected_destinations
        ...the usual stuff...

    smtpd_restriction_classes = insiders_only
    insiders_only = check_sender_access hash:/etc/postfix/insiders, reject

/etc/postfix/protected_destinations:
    all@my.domain   insiders_only
    all@my.hostname insiders_only

/etc/postfix/insiders:
    my.domain       OK  matches my.domain and subdomains
    another.domain  OK  matches another.domain and subdomains

Getting past this scheme is relatively easy, because all one has to do is to spoof the SMTP sender address.

If the internal list is a low-volume one, perhaps it makes more sense to make it moderated.

PLEASE NOTE:

To get this working you have to perform these additional steps.

1.You need to run postmap to create the database:

# postmap /etc/postfix/protected_destinations
# postmap /etc/postfix/insiders

2. Restart postfix :

# /etc/init.d/postfix restart

Source: http://www.postfix.org/RESTRICTION_CLASS_README.html

multi-row vs multiple inserts postgresql

While doing a research on improving the INSERT performance on PostgreSQL  i found the following useful links:

http://kaiv.wordpress.com/2007/07/19/faster-insert-for-multiple-rows/

http://stackoverflow.com/questions/1793169/which-is-faster-multiple-single-inserts-or-one-multiple-row-insert

N.B:If you played around or tested it , please share your experience.

writing perl code in a shakespeare style

Lingua::Shakespeare makes it possible to write perl programs that
are as poetic as a Shakespeare play.
The language is referred to as SPL 
(Shakespeare Programming Language)

HELLO WORLD EXAMPLE
use Lingua::Shakespeare;

  The Infamous Hello World Program.

  Romeo, a young man with a remarkable patience.
  Juliet, a likewise young woman of remarkable grace.
  Ophelia, a remarkable woman much in dispute with Hamlet.
  Hamlet, the flatterer of Andersen Insulting A/S.

                      Act I: Hamlet's insults and flattery.

                      Scene I: The insulting of Romeo.

  [Enter Hamlet and Romeo]

  Hamlet:
   You lying stupid fatherless big smelly half-witted coward!
   You are as stupid as the difference between a handsome rich brave
   hero and thyself! Speak your mind!

   You are as brave as the sum of your fat little stuffed misused dusty
   old rotten codpiece and a beautiful fair warm peaceful sunny summer's
   day. You are as healthy as the difference between the sum of the
   sweetest reddest rose and my father and yourself! Speak your mind!

   You are as cowardly as the sum of yourself and the difference
   between a big mighty proud kingdom and a horse. Speak your mind.

   Speak your mind!

  [Exit Romeo]

                      Scene II: The praising of Juliet.

  [Enter Juliet]

  Hamlet:
   Thou art as sweet as the sum of the sum of Romeo and his horse and his
   black cat! Speak thy mind!

  [Exit Juliet]

                      Scene III: The praising of Ophelia.

  [Enter Ophelia]

  Hamlet:
   Thou art as lovely as the product of a large rural town and my amazing
   bottomless embroidered purse. Speak thy mind!

   Thou art as loving as the product of the bluest clearest sweetest sky
   and the sum of a squirrel and a white horse. Thou art as beautiful as
   the difference between Juliet and thyself. Speak thy mind!

  [Exeunt Ophelia and Hamlet]

write perl programs in latin

NOMEN

    Lingua::Romana::Perligata -- Perl in Latin

DESCRIPTIO

    The Lingua::Romana::Perligata makes it makes it possible to write Perl
    programs in Latin. (If you have to ask "Why?", then the answer probably
    won't make any sense to you either.)

    The linguistic principles behind Perligata are described in:

            http://www.csse.monash.edu.au/~damian/papers/HTML/Perligata.html

    The module is `use'd at the start of the program, and installs a filter
    which allows the rest of the program to be written in (modified) Latin,
    as described in the accompanying documentation.

EXEMPLUM

	#! /usr/bin/perl -w
        use Lingua::Romana::Perligata;

	adnota Illud Cribrum Eratothenis

        maximum tum val inquementum tum biguttam tum stadium egresso scribe.
        vestibulo perlegementum da meo maximo.
        maximum tum novumversum egresso scribe.
        da II tum maximum conscribementa meis listis.
        dum damentum nexto listis decapitamentum fac sic
               lista sic hoc tum nextum recidementum cis vannementa da listis.
               next tum biguttam tum stadium tum nextum tum novumversum
                        scribe egresso.
        cis.

SCRIPTOR

    Damian Conway (damian@conway.org)
AVAILABILITY

Lingua::Romana::Perligata has been uploaded to the CPAN
and is also available from:

	http://www.csse.monash.edu.au/~damian/CPAN/Lingua-Romana-Perligata.tar.gz