Using Fetchmail to get mail in text mode
Results 1 to 3 of 3

Thread: Using Fetchmail to get mail in text mode

  1. #1
    AO BOFH: Luser Abuser BModeratorFH gore's Avatar
    Join Date
    Oct 2002
    Location
    Michigan
    Posts
    7,177

    Using Fetchmail to get mail in text mode

    Ok, I searched the forums for this and found nothing. So I'm going to show you how to set up fetchmail so you can get your e-mail without having to load X.

    So you have your *NIX box loaded and maybe you just dont like GUIs? Or maybe running it on an old machine with not alot of power? Well thats fine, You can still check your mail.

    Now for this example/tutorial Im going to be assuming you are using your ISP given e-mail account, and that its pop3.

    Almost all ISPs I have used in the last 3 years Iv owned a computer have used pop3 so you should be fine.

    Ok, log in as root. If you want to feel leet type init 3 and press enter to do this without X at all like I do

    type the following:

    vi /etc/fetchmailrc

    press enter.

    Youll see a blank file, now press "i" on your keyboard to enter insert mode in Vi.

    Type this into the file:

    (Im using examples here so dont copy this exactly, use your head)



    # fetch mail for bob
    poll mail.yourISP.com protocol pop3 user gore there
    with password "myPassword" is LinuxUser here

    Ok, where I said bob, use your name. mail.yourisp.com should be your ISP's information.
    user gore would be the name you sign into your e-mail account with, the password would be the password you use to check your mail at your ISP's website, and finally, LinuxUser is the name you use to sign into your *NIX box.

    Now, while your staring at your screen thinking how the hell to save it in Vi, press ESC (the escape key) and then type

    :wq

    and press enter. It saves the file and exits Vi.

    Easy so far huh? Well there is a problem, the file now has passwords in it, so your going to want to protect it.

    While still logged in as root:

    chmod 600 /etc/fetchmailrc

    Press enter.

    now, while still logged in as root type:

    fetchmail -f /etc/fetchmailrc

    and press enter, if you have mail youll see some information and it will put in your local mail. type exit to become the user you set up fetchmail for.

    Now, open Mutt, Pine, or just type Mail and youll see your e-mail.
    Enjoy.
    Kill the lights, let the candles burn behind the pumpkins’ mischievous grins, and let the skeletons dance. For one thing is certain, The Misfits have returned and once again everyday is Halloween.The Misfits FreeBSD
    Cannibal Holocaust
    SuSE Linux
    Slackware Linux

  2. #2
    Super Moderator
    Know-it-All Master Beaver

    Join Date
    Jan 2003
    Posts
    3,914
    Nice tutorial... although maybe for your example you should have put < > around each variable to make it stand out a little more clearly? Also.. .wouldn't it just be easier to set-up pine to check the pop3 account, after all it is the god of email apps
    IT Blog: .:Computer Defense:.
    PnCHd (Pronounced Pinched): Acronym - Point 'n Click Hacked. As in: "That website was pinched" or "The skiddie pinched my computer because I forgot to patch".

  3. #3
    AO BOFH: Luser Abuser BModeratorFH gore's Avatar
    Join Date
    Oct 2002
    Location
    Michigan
    Posts
    7,177
    Maybe pine is easier but MUTT is way more secure by the way, this is my 900th post
    Kill the lights, let the candles burn behind the pumpkins’ mischievous grins, and let the skeletons dance. For one thing is certain, The Misfits have returned and once again everyday is Halloween.The Misfits FreeBSD
    Cannibal Holocaust
    SuSE Linux
    Slackware Linux

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 Security News

     Patches

       Security Trends

         How-To

           Buying Guides