My 2 paisas

Archive for the ‘debian’ Category

As always, this is my another new attempt to do some contribution to Free Software community. Hopefully this will give some result unlike all my previous ventures. So let me explain how to start.

I have taken up debian-installer package for localization. No specific reason other than that the person who introduced me to localization was already working on it and hence it was a good starting point.

So to start with, you need to get all the packages which help you type kannada in your system.

Packages that you need to install are:

  • Scim : Smart Common Input Method (SCIM) is an input method (IM) platform.  Input methods are needed to enter complex characters in many non-latin languages.
  • Scim-bridge-client-gtk : scim-bridge is a wrapper libray for SCIM, written in C.
  • Scim-m17n: M17N (Multilingualization) Input Method Engine enables SCIM to input many non-latin characters from the keyboard using libm17n library.
  • ttf-indic-fonts: This package merely depends on the various Indian language font packages available in Debian. Use this if you want fonts for every official Indian language.

This should get the system ready. To test it, Open Gedit. Right click on a new page and Select Input Methods as Scim-input-method. Now Press Ctrl+Space. You should see the icon of scim on the bottom right of the screen. Select Kannada in the list and in Kannada select Kn-itrans. Now type something in english and you will notice that it will get converted to Kannada while you type.

Different type of Kannada input methods:

There are mainly two types:

Kn-itrans: In this, you will be typing in english and that will be automatically getting converted phonotically in kannada. So if you type in english as “nanna hesaru vignesh”, you will notice in the screen as “ನನ್ನ ಹೆಸರು ವಿಗ್ನೆಶ್”. This is good for people who are planning to use kannada only occasionally and hence dont want to understand the complete keyboard layout of Kannada. There are problems also in this method. Like I have not yet been able to find a way to type in “swanta” the way it should come in kannada with a “n” circle. I am able to get “ಸ್ವನ್ತ” but this is wrong.

Kn-inscript: In this, you will be typing in kannada itself and hence you will have to know the exact layout of kannada keyboard. Obvious way is to replace the English alphabets with Kannada alphabets on the keyboard. This is useful for those who regularly use Kannada for typing and hence will soon get to understand and memorize the layout.

With this understanding you will be able to start typing in Kannada.

I have a desktop in which I have installed Debain. I connected to it using vnc from my laptop and was typing some command when I observed that the complete Keyboard layout had changed to some unknown keyboard layout. I tried re-installing but the problem still existed. So when I googled it, I found this bug report which was luckily resolved and the solution was also shared in it.
Hence all I had to do to solve the problem was to add the following line in $HOME/.vnc/xstartup before the last line /etc/X11/Xsession

I just got an idea of trying out the command rm -rf * in a virtual system. I had thought of creating a new domU in xen server in the office and then testing in it. However I just tried to switch on my Desktop which had been shut since last week due to some problem with my HDD. Strangely when I started the desktop, the BIOS detected my HDD and it booted into ubuntu. Now this made my expiriment lot more easier because now all I had to do was take a backup of the VM image and then boot using the image in qemu.

After booting up I started a screen and tried the command
rm -rf /
I got an error saying that “/” could not be deleted.

Then I tried the command
cd /; rm -rf *

and then it started deleting all the files in my filesystem. I went to another screen and tried the command “ls”. It told me that “ls” command not found. Then I tried various commands, but none of them worked, except echo and cd. I dont know why these didnt get deleted.

At last I was left with following file structure:
notice:/# cd
dev/ home/ lib/ proc/ .rnd sys/ var/

When I just press Tab twice, I get the following output:

: } case continue elif export getopts kill popd select then ulimit
! alias cd declare else false hash l printf set time umask
./ bg cdcgi dirs enable fc help let pushd shift times unalias
[ bind cdtmpl disown esac fg history ll pwd shopt trap unset
[[ break command do eval fi if local read source true until
]] builtin compgen done exec for in logout readonly suspend type wait
{ caller complete echo exit function jobs ls return test typeset while

Though this would be a very stupid thing to do in any circumstances, I didnt loose anything as I was just testing it on a VM. However the importent question still remains that is there any way to recover fmo here?

Tags: , ,
  • Coutsey to Bob Peers
  • The basics.

    About POP.

    POP is simply a protocol for retrieving emails from a remote server. The vast majority of mail
    providers use this protocol and it has been around for many years now. The protocol, in it’s
    simplest form, is just a few text commands sent from your computer over the internet which when received by the mail server prompt it to respond with the
    requested information. There’s only 4 or 5 basic commands we need to know to get started so it’s very simple.

    Before starting it’s important to know a few things:

    Mail server address.

    The address of your mail server, this will usually be of the form You should look at the settings in your email client or documentation about your
    email account to get this information.


    In this demonstration we will be sending our account username and password unencrypted over the internet, if this is a major concern to you then you should not follow
    this exercise.

    Using telnet.

    If you make a mistake in a telnet session you cannot use backspace to delete the entry, you may have to press enter to get an error and then re-type the command or quit and start again.

    Connecting to the host.

    First open up a terminal and type the following, of course replacing with the address of your POP server:

    telnet 110

    This should return something like:

    telnet 110
    Connected to (
    Escape character is '^]'.
    +OK Hello there.

    Logging in.

    Next we need to log in using the user command.

    user myusername
    +OK Password required.

    Now give our password using the pass command.

    pass ***********
    +OK logged in.

    The list command.

    To see a list of all the messages on the server and their sizes in bytes use the list command. If you specify a message number then only that message will be shown,
    i.e list 7.

    +OK POP3 clients that break here, they violate STD53.
    1 22683
    2 19870
    3 785
    4 4475
    5 3221
    6 2972
    7 2412

    This just shows that I have 7 emails on the server, they are listed in order from oldest first to newest last.

    Reading the messages using retr.

    To read one of the messages use the retr command followed
    by the message number returned from the list command. It will return the whole message including all headers.

    retr 7
    +OK 2412 octets follow.
    Return-Path: <>
    Received: from ( [])
    by (Postfix) with ESMTP id 554DA180D71
    for <>; Wed, 1 Feb 2006 10:09:54 +0100 (CET)
    Received: from ( [])
    by (Postfix) with ESMTP id 2984C7049
    for <>; Tue, 31 Jan 2006 18:37:01 +0100 (CET)
    Received: from frontend1.internal (mysql-sessions.internal [])
    by (Postfix) with ESMTP id 2069DD335A7
    for <>; Tue, 31 Jan 2006 12:36:18 -0500 (EST)
    Received: from ([])
    by frontend1.internal (MEProxy); Tue, 31 Jan 2006 12:36:18 -0500
    Received: by (Postfix, from userid 99)
    id 1148513964; Tue, 31 Jan 2006 12:36:12 -0500 (EST)
    Content-Disposition: inline
    Content-Transfer-Encoding: 7bit
    Content-Type: text/plain
    MIME-Version: 1.0
    X-Mailer: MIME::Lite 5022 (F2.73; T1.15; A1.64; B3.05; Q3.03)
    Date: Tue, 31 Jan 2006 17:36:12 UT
    From: "Email Administrator" <>
    Reply-To: "Email Administrator" <>
    Subject: Your account activation
    Message-Id: <>


    Reading the top n lines with top.

    The top command is used to read the top n lines of a message, the syntax is ‘top message n’ where n is the number of lines you wish to read. Note
    that the full headers will be returned along with a new line and then the n lines of the message body.

    top 3 5
    Headers appear here.....

    This is a multi-part message in MIME format.

    Content-Type: text/plain;

    The stat command.

    To see the total number and size of all messages issue the stat command.

    +OK 7 56418

    Deleting messages using dele.

    To delete a message use dele followed by the message number, note that messages are not immediately deleted, they will only be deleted after quitting the session.

    dele 7
    +OK Deleted.

    The stat command again shows the message is gone.

    +OK 6 54006

    Resetting the account using rset.

    Since the message is only marked for deletion we can undelete the message (and any other marked for deletion) by using rset (for reset).

    +OK Resurrected.

    Again, stat shows the message is now back.

    +OK 7 56418

    To end the session use quit, this will now permanently delete the messages you deleted during this session.

    +OK Bye-bye.


    It’s very simple to read your emails from a POP account using telnet by just remembering a few simple commands, what we have done here is basically exactly
    the same as an email client, like Thunderbird or Outlook Express, does when it retrieves your mail. Of course on a daily basis it’s much nicer to use a web interface
    or email client but in those situations where all you have is an internet connection then this is a great fall-back especially since nearly every computer will
    have telnet already installed.

    Tags: , ,
  • Courtsey to Chris Johnson

  • Answer to ::

    ‘Sorry, that domain isn’t in my list of allowed rcpthosts’

    What exactly is relaying, anyway?

    You’ve set up your qmail server. It’s hosting a few domains (i.e. they’re listed in your locals file or your virtualdomains file). You’ve set things up so that qmail-smtpd can take connections on port 25 to receive mail from other hosts.

    Another host on the Internet connects to your server on port 25. This might be another mail server running qmail, sendmail, or some other mail transfer agent, or it might be an end user, who wants to send mail from his desktop mail client. The SMTP conversation starts off with the remote host identifying itself:


    Your server responds:


    The remote host sends the “From” part of the envelope:

        MAIL FROM:

    Your host responds with:

        250 ok

    The remote host now sends one or more RCPT TO commands, which specify the recipients of the message:

        RCPT TO:

    Just a minute! is not one of the domains that your server hosts. What does your server do? It can agree to accept the message and attempt to deliver it:

        250 ok

    Or it can reject it:

        553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1)

    In the first case, your server is acting as a relay: it’s accepting and agreeing to try to deliver a message that’s not destined for a domain that your server hosts. In the second case, it’s refusing to act as a relay.

    qmail’s rcpthosts file, which gets its name from the RCPT TO command, determines whether the recipient will be accepted: it will be accepted if and only if the domain of the address given in the RCPT TO command is listed in rcpthosts. (I’ll talk about exceptions to this rule later on.) If the rcpthosts file does not exist, then any recipient will be accepted.

    An SMTP server is an “open relay” if it agrees to relay mail no matter who’s sending it–if another host connects to port 25 with some mail, an open relay will accept and try to deliver it no matter what its destination is and no matter who is sending it. A qmail server without a rcpthosts file will act as an open relay.

    So why shouldn’t I have an open relay? My customers need to send mail to other domains. And why would anyone but my customers want to use my server as a relay, anyway?

    This was a safe attitude several years ago; people generally used the relay provided by their ISP, employer, or university.

    Then came the spammers, the mass-mailers of unsolicited commercial e-mail. Rather than use their own bandwidth and server resources, they seek open relays that will accept a single message with, say, 100,000 recipients, and distribute it for them. This consumes the bandwidth and server resources of an unwitting third party, and the administrators of the relaying server will likely be flooded with complaints from the spam’s recipients. The relaying server may even find itself blacklisted, so that other hosts on the Internet will refuse to receive mail from it (see, for example). Leaving your mail relay open these days is considered to be irresponsible.

    I’m convinced–I don’t want to have an open relay. How do I fix it?

    Simply list in your rcpthosts file all the domains that your server is hosting (and for which it’s acting as secondary mail exchanger, if any). Now you’re safe.

    But now my own customers get the message “Sorry, that domain isn’t in my list of allowed rcpthosts.” I’d like for my own customers to be able to use my server as a relay, but I can’t possibly list every domain in my rcpthosts file to which they might want to send mail.

    Nor should you try to! Fortunately, there’s a way to get qmail-smtpd selectively to ignore the rcpthosts file. If the variable RELAYCLIENT is set in qmail-smtpd’s environment, rcpthosts will be ignored and relaying will be allowed. What you need is a way to set RELAYCLIENT for your customers, but not for anyone else. (I’ll refer to your users as “customers” here; substitute “employees,” “students at my university,” or whatever is appropriate in your case.)

    First, you need a way to identify them. There’s no sort of user name/password authentication in the SMTP protocol, so how do you identify whether a particular SMTP connection is from one of your customers? The surest way to distinguish a customer of yours from the rest of the world is by the fact that he’s connecting to your server from a host on your network, i.e. a host with an IP address that’s in your address space.

    Once you know he’s connecting from one of your IP addresses, you need a way to set RELAYCLIENT so that he can relay. It’s pretty easy to set up qmail to do this. Read about selective relaying with tcpserver and qmail-smtpd to find out how.

    Most of my customers aren’t on my network–they use various ISPs. Can’t I allow relaying if the mail is coming from one of my domains?

    The way most people define “coming from one of my domains” is “has one of my domains in the sender address.” The problem with this is that forging the sender address on a piece of mail is trivial, and you’d have to take the word of the sender that his address is what he says it is. There’s clearly no security with this method.

    Then how are they supposed to relay their mail?

    The best thing for them to do is to use the SMTP servers provided by their ISPs. There’s (usually) no reason that they should have to use your server to relay their mail; any server that’ll agree to relay their mail will work, and ISPs’ servers are there to relay their customers’ mail.

    Unfortunately, I’ve heard reports of a very small number of ISPs that require not only that the sending host be connected to the ISP’s network, but also that the sender use the address provided by his ISP as his envelope sender address. I’ve never seen a non-Unix mail client that allows one to specify an envelope sender address that’s different from the address that appears in the “From” header, so if your customer wants to relay mail through his ISP’s SMTP server (and he has one of these envelope-checking ISPs) he won’t be able to show in his “From” header the address that you’ve provided him–all his mail will have to appear to come from his ISP address.

    So if my customer has one of these idiot ISPs and wants his mail to show an address with my domain, what is he to do?

    There are some partial solutions to this problem; I don’t think any of them is ideal. Probably the best is “SMTP-after-POP”: you allow a particular IP address to relay through your server for a short period of time after a host at that address authenticates via POP. There are various implementations of SMTP-after-POP; one which doesn’t require any patching is Bruce Guenter’s relay-ctrl. The only problem with this approach is that at least some popular Windows mail clients are hard-wired to send any queued mail before checking mail. Your users will have to get into the habit of checking their mail before putting anything in their outboxes.

    Another possible solution that people have recommended is running a separate instance of qmail-smtpd on a different IP address and a non-standard port, and telling your users to configure their mail clients to use it for their outgoing mail. One problem with this is that some mail clients don’t allow you to set a non-standard SMTP port. Another problem is that it offers no real security, only “security through obscurity.” You can make it somewhat safer, however, with tarpitting. This will help prevent it from being abused if it is discovered.

    There are patches to qmail-smtpd that allow it to use SMTP AUTH, an extension to SMTP that implements user/password authentication for relaying. If your clients support SMTP AUTH, this is an excellent way to allow relaying to selected users who are not on your network. See the qmail web site for more information. <!—

    I think I’ve got everything set up correctly. How can I test my server to make sure it’s not an open relay?

    Try the relay tester at Unlike many relay testers, this one requires that its probe message actually be relayed back to it in order for it to determine that you’re an open relay. Other testers may flag you as an open relay if you simply accept a probe, whether or not you ultimately relay it.

    Questions? Comments? I’m glad to hear them.


    Chris Johnson

    Links that I liked to save

    Blog Stats

    • 43,360 hits