Home > email > Can I receive mails from Gmail using standard mail/mailx command on linux

Can I receive mails from Gmail using standard mail/mailx command on linux

March 24Hits:1
Advertisement

I searched Google a lot but all I found were the tutorials to send messages using mail/mailx command.I want to receive gmail messages using mail/mailx.Is it possible?

Answers

Your best bet is to use fetchmail to retrieve your email from your gmail account via POP3.

Install fetchmail:

sudo apt-get install fetchmail

(Or equivalent)

Then save this in a .fetchmailrc file in your home directory):

# set username
set postmaster "yourlocalusername"
# set polling time (5 minutes)
set daemon 600

poll pop.gmail.com with proto POP3
   user '[email protected]' there with password 'yourgmailpassword' is yourlocalusername here options ssl

Substituting your gmail user & password and your local username.

Then kick off fetchmail to start it.

Once your mail has been retrieved to a local copy on your machine, you can read it using a wide range of mail clients (including mailx).

There is a quick tutorial here: http://mohan43u.wordpress.com/tag/mailx/

and again at lifehacker: http://lifehacker.com/235207/geek-to-live--back-up-gmail-with-fetchmail

and again here: http://www.axllent.org/docs/networking/gmail-pop3-with-fetchmail/

If you would prefer to use the IMAP protocol, replace:

poll pop.gmail.com with proto POP3

in the fetchmailrc file with:

poll imap.gmail.com with proto IMAP

However YMMV...Google's IMAP implementation is known to deviate from the norm, so you may end up with unexpected results.

I'd ask "why mail/mailx"? Why specifically?

It's built with an old model of email, back when machines were expensive so you usually only had one machine to read mail from so you didn't have to worry about synchronizing across machines. Having it now kind of pins you to a specific machine that has old mail on local files.

Besides that, the UI is ancient, and hard for most people to navigate.

If you just want something you can run in a terminal, I'd suggest mutt, or pine.

Tags:email, gmail

Related Articles

  • Can I receive mails from Gmail using standard mail/mailx command on linuxMarch 24

    I searched Google a lot but all I found were the tutorials to send messages using mail/mailx command.I want to receive gmail messages using mail/mailx.Is it possible? --------------Solutions------------- Your best bet is to use fetchmail to retrieve

  • Auto Forward mails to Gmail from iCloud Mail or iCloud Mail on Android

    Auto Forward mails to Gmail from iCloud Mail or iCloud Mail on AndroidMay 12

    I want to do auto forward receiving mails from Mail to Gmail. Also it can be asked like this: How can I see my iCloud mails on my android phone? --------------Solutions------------- GMail cannot access a third party mail provider unless the third par

  • How can I send smtp mail via gmail and osx Lion mailx?June 17

    I would like to be able to send email from utility/batch/launchd scripts via my gmail account and the mailx client that is bundled in OS X Lion. I cannot find how to configure this. I found http://www.andrews-corner.org/mutt.html#sending which descri

  • How to send encrypted mail using mailx command in Linux/Unix?February 6

    I want to make my email encrypted as email is confidential. Can anyone please tell me how to encrypt the email using the mailx command. In my shell script I have already used mailx to send the emails, so I want this to be done by mailx command only.

  • Don't delete mail in GMail when deleting mail with OutlookSeptember 2

    I have started using Outlook as an IMAP client for GMail. Until now, I never delete email in GMail (using the web interface)... I always hit "Archive" which simply removes the mail from the GMail Inbox, but leaves it in the "All Mail"

  • sending mail with attachement (or without) using mailx on centos linuxApril 6

    in solaris I used to send mail easily by doing: uuencode file.txt file txt | mailx [email protected] I can't find "uuencode" in centos and mailx always stop for CC. I want to automatically send the email with no questions at all --------------Solutio

  • Maverick's Mail Stops Receiving Messages from Gmail accountsFebruary 4

    Once in a while (hours or even a day or two) mac Mail stops receiving messages from gmail accounts attached to it. Messages from iCloud accounts are delivered properly. In order to solve that issue I have to restart the app or take the account offlin

  • Can't receive mails from GmailDecember 19

    A few days ago Gmail suddenly decided to stop sending mails to my mailserver. I am using Postfix and Dovecot with an paid SSL Certificate running on Debian 7 with everything updated. My mail.log shows the following error: Dec 19 11:09:11 server postf

  • Receive mail into Gmail from custom domain Google Apps

    Receive mail into Gmail from custom domain Google AppsMay 6

    I have a regular gmail account and a custom domain'd gmail account. I want to use Gmail's "Check mail using POP3" function to retrieve the latter into my regular [email protected] but I cant get past this popup. It either says it had a problem conn

  • How Gmail and other mail services detects a mail as a spam?August 17

    When I am sending a mail from my one mail account (Yahoo) to other (Gmail), Gmail automatically puts my mails into the Spam folder. What is the basic criteria to send an email by which mail servers cannot treat my mail as a spam? --------------Soluti

  • Browser extension for OpenPGP decryption of an e-mail in Gmail

    Browser extension for OpenPGP decryption of an e-mail in GmailMarch 14

    I sometimes received emails on Gmail that people encrypted using my OpenPGP public key. I am looking for a browser extension that can: decrypt e-mails in Gmail using my OpenPGP private key (e.g. automatically or by clicking on some "decrypt" but

  • GMail IMAP + Apple Mail / iPhone - "Account exceeded bandwidth limits. (Failure)"September 4

    Started seeing this this morning in Apple Mail. I have one of those exclamation point error indicators next to "Inbox", with this error message when I click on it: There may be a problem with the mail server or network. Verify the settings for a

  • Gmail push new mail notifications to Linux?November 30

    Is there any way to coax Gmail into pushing new-mail notifications into my Linux machine, without using a full-on graphical mail client like Thunderbird? edit: Thanks for all the responses, but (unless I'm mistaken) these applications all poll, none

  • Send urgent mail in GmailAugust 22

    Is it possible to set the "urgent" flag in Gmail for outgoing mail? I'd like to be able to flag time-sensitive emails as such. --------------Solutions------------- Interesting. I tested by sending an email to my Gmail acct from an Exchange accou

  • Suddenly can't send E-Mails with Apple Mail to Gmail SMTPJanuary 15

    I have a weird problem that started just today. I am using Apple Mail on a Leopard machine, connecting to Gmail. Fetching e-mail works just fine. My SMTP settings are also correct. Still, I can't send mail, it will display a pop up saying that "trans

  • What steps do Gmail, Yahoo! Mail, and Hotmail take to prevent eavesdropping on email?August 22

    I would like to ask what happens when an email is sent from gmail, yahoo or hotmail public web email services? I don't understand email protocols in details, but as far as I know email traffic is unencrypted and the messages are passed along many mai

  • Postfix: forwarding e-mail to GMail not workingSeptember 6

    On my (web server) machine, I just want to be able to send and receive e-mail, and have e-mail addressed to particular addresses forwarded to my GMail inbox. Right now, I have installed postfix and made a ~/.forward file with: [email protected] If I

  • How to see the "receiver address" in Gmail?December 21

    I receive e-mails for multiple e-mail addresses on my Gmail. In my Inbox, how can I see what e-mail address the specific e-mail was sent to? If I choose "show original", the only relevant information I get is this line: To: Undisclosed recipient

  • How can I convert Gmail from standard view to basic HTML view?March 15

    How can I convert Gmail from standard view to basic HTML view permanently? A while ago there was an option at the bottom allowing me to do so, but now it is gone. --------------Solutions------------- The direct link to basic HTML view is: https://mai

  • Why my own created mail server can not deliver mails to yahoo, gmail etcMarch 21

    I found that my server's sent mail can not reach to the mail receipent in yahoo gmail etc.. After studies, I have found that I need to check port 25 Reverse DNS, that means the receiver's MTA can use my domin name to check whether my server actually

Copyright (C) 2018 ceus-now.com, All Rights Reserved. webmaster#ceus-now.com 14 q. 0.806 s.