This entry will cover a one shot linux fetchmail command of retrieving GMail email messages using terminal without any further fetchmail configuration setup. Read on.
Fetchmail is one good linux tool for fetching and retrieving remote emails. Fetchmail works and retrieves emails from remote email servers and downloads them locally into your local linux box.
I agree that there are a lot of MUAs or email retrieval softwares available both from windows and linux world. If you wish to configure other mail retrieval softwares to retrieve emails from your GMail account, you can visit and read more from here.
Make sure your GMail account to allow POP3 retrieval from external source. If not, this can be with the below instructions.
Login into your GMail account. From there, click Settings from the right corner of your screen. Click Forwarding and POP from one of the tabbed menus and select Enable POP for all mail. From here, you have an option to keep a local copy of emails retrieved or delete the original copy when retrieved by external mail user agent. Click Save to make your changes permanent.
This entry would be accomplished without launching fetchmail in daemon service mode and/or without further configuration to fetchmail default .fetchmailrc configuration file. This entry also assumes that
1. fetchmail package is currently installed from current local box. If not, simply install fetchmail as follows:
# yum -y install fetchmail
2. sendmail, exim, qmail, postfix or any mail transfer agent (MTA) is currently installed and currently running from local box. If not, any mail delivery agent (MDA) like procmail, maildrop or deliver is currently available from local box. Proper configuration of these mentioned package would not be covered here though.
How to retrieve emails from GMail account using fetchmail via terminal?
If you issue the below command as root, the retrieved emails would automatically be dropped or delivered to root mail box. Also prepare your GMail password upon executing the below command.
# fetchmail -v -k -u YOU@gmail.com --ssl -P 995 pop.gmail.com -m "/usr/sbin/sendmail -i -f %F -- %T"
LEGEND:
-v for more verbose fetchmail settings
-k keeps and retains email copies from GMail
-P followed by GMail POP3s port number and POP host server
-m mail would be delivered by sendmail
Any non-zero returned exit status means failure.
You've Got Mail!
Fetchmail can do this GMail mail retrieval steps in various ways. The above is only one way to do it.
Here's another one-shot alternative way to retrieve GMail using fetchmail from terminal.
This time around, it is assumed that any mail transfer agent (MTA) like sendmail, exim or postfix is currently NOT installed. Fetchmail can deliver mails using other MDAs like procmail as an example.
Again, this is possible in one shot fetcmail command without further fetchmail configuration setup and procmail setup.
Here's how to fetch Gmail email using fetchmail and procmail. Simply do as follows:
# fetchmail -v -k -u YOU@gmail.com --ssl -P 995 pop.gmail.com -m "/usr/bin/procmail $h $g"
You've got mail again!
Subscription
Categories
- HowTos (612)
- Linux Devices (40)
- Linux Diggs (620)
- Linux News (1541)
- Linux Videos (24)
Recent Posts
Blog Archive
-
▼
2007
(340)
-
▼
August
(95)
- KCron - GUI task scheduler
- Linux backups powered by Tar
- INQ7 front page image retrieval
- using wget for data and file transfers
- BibleTime - Bible study from Linux howto
- human readable DVD/CD drive technical details
- sound-juicer - alternative audio CD ripper install
- Stellarium - watch the sky from Linux
- Munin - monitor linux hosts install howto
- blocking yahoo chat messenger
- string manipulation using cut linux command
- graphing skystream DVB receiver's Eb/No and signal...
- BZFlag - 3D multi-player tank game install howto
- screenshot and snapshot creations howtos
- string parsing using bash
- grep multiple character from string or file
- enable and disable of telnet service
- grep multiple strings from a file
- remove spaces from filenames
- ISO creation and CD/DVD burning from terminal
- send a message to user's terminal
- retrieve GMail emails via terminal using fetchmail
- more of activating and deactivating network card
- set new mysql password
- TIP: enable thumbnail display images from apache
- monitor large mailbox users
- using the linux yes command
- string manipulation using tr linux command
- install and play 2D chess game in linux
- more firefox tips and tricks
- recover root password on linux
- establish ssh connection from different port
- uniq linux command
- remove blank lines using grep or sed
- date and time sync via NTP server howto
- who am I
- delete spam email and folder regularly howto
- hello world bash and perl script
- passwordless rdesktop session with XP howto
- force VGA screen resolution and screen mode
- RealPlayer 10 for linux install howto
- Grip - CD ripper install howto
- Banshee - music management and playback
- gnome music applet install howto
- Pirut and yum-updatesd - software management
- Alacarte - editing panel menus install howto
- access NTFS drive in Fedora
- FileLight - graphical disk usage and statistics
- TestDisk- partition tool install howto
- using /dev/null in linux terminal
- yahoo messenger in fedora install howto
- check and repair MS-DOS file systems howto
- using fdformat and mkdosfs from terminal
- Tremulous - Quake 3 install howto
- block consecutive IP address using scripts
- using floppy linux command from terminal
- display word or text file in reversed pattern
- convert a file to equivalent hex/binary code
- spell check text file from terminal
- create screen timer from linux howto
- recreate deleted /dev/null
- harddisk monitoring using smartctl
- bind ssh to selected IP address
- restrict su command to superuser only
- thunderbird install howto
- dovecot POP3/POP3S server with SSL/TLS install howto
- qpopper POP3 server install howto
- my other linux pages
- more ssh log parsing and monitoring
- checking daemon service bash script
- HTML CHM help file viewer install howto
- du - the disk usage linux command howto
- gnome language translator install howto
- display linux memory information howto
- display the number of processor howto
- 3d tabletennis game install howto
- Nokia N70 on Fedora via USB data cable
- Fedora 7 as guest host from VirtualBox
- at - jobs scheduling howto
- Nokia 70 linux connection via bluetooth dongle howto
- crontab - jobs scheduling howto
- managing daemon services howto
- create your own linux OS distro howto
- kernel devel headers install howto
- more multimedia browser plugins install howto
- numlock on with X install howto
- Fedora and RHEL differences
- create virtual terminals with single ssh connection
- virtual CentOS using VMWare 5.5.4 install howto
- VMware workstation 5.5.4 install howto
- 50 quick linux command tips part 4
- 5 SysAds permanent static route story
- ssh log parsing and monitoring
- removable drives, devices and media preferences
- gnome-blog desktop blogging install howto
-
▼
August
(95)
Friday, August 24, 2007
retrieve GMail emails via terminal using fetchmail
Subscribe to:
Post Comments (Atom)
ILoveTux - howtos and news | About | Contact | TOS | Policy
0 comments:
Post a Comment