LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-03-2010, 11:59 AM   #1
cosmicd
LQ Newbie
 
Registered: Jan 2010
Posts: 19

Rep: Reputation: 0
Reading and writing emails from the console


Hi guys. I want to be able to access my email account from the console. I'm reading all day about fetchmail, postfix, sendmail etc. but all the stuff I found is related to building whole mail system. All I want to do is to read my emails and write some. Which is the painless way to do this? I successfully configured Evolution for this purpose but I want to do that from the console.
 
Old 04-03-2010, 12:06 PM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Take a look at mutt
http://www.mutt.org/
 
Old 04-03-2010, 12:07 PM   #3
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,821

Rep: Reputation: 1890Reputation: 1890Reputation: 1890Reputation: 1890Reputation: 1890Reputation: 1890Reputation: 1890Reputation: 1890Reputation: 1890Reputation: 1890Reputation: 1890
or try Alpine. I used it on my workstation and it's very powerful
 
Old 04-03-2010, 12:12 PM   #4
barshani
LQ Newbie
 
Registered: Sep 2004
Location: Trivandrum
Distribution: Redhat
Posts: 18

Rep: Reputation: 3
through console use mail, mutt.
 
0 members found this post helpful.
Old 04-03-2010, 12:22 PM   #5
rg3
Member
 
Registered: Jul 2007
Distribution: Fedora
Posts: 527

Rep: Reputation: Disabled
Usually you only need to configure getmail/fetchmail, mutt and putmail/msmtp to be able to do that, but there was another thread started some days ago with someone trying to do the same and he was unable to configure the sending part, for some strange reason. Usually it's simple. I use mutt too.
 
Old 04-03-2010, 12:33 PM   #6
cosmicd
LQ Newbie
 
Registered: Jan 2010
Posts: 19

Original Poster
Rep: Reputation: 0
mutt is MUA. I tried that but I couldn't configure it. And I need MTA (fetchmail?). So what I understand is that the MTA fetches the email from the server and with the MUA I can read it once it's on my local machine ?
 
Old 04-03-2010, 01:22 PM   #7
penguiniator
Member
 
Registered: Feb 2004
Location: Olympia, WA
Distribution: SolydK
Posts: 442
Blog Entries: 3

Rep: Reputation: 60
I use Mutt with gmail and without fetchmail or any other external mail handlers. Information about configuring it for pop and smtp is scattered throughout the documentation. The relevant settings from my configuration are:
Code:
set pop_host = "pops://username@pop.gmail.com:995/"
set pop_user = "username"
set pop_pass = "password"
set smtp_url = "smtp://username@smtp.gmail.com:587/"
set smtp_pass = "password"
set from = "username@gmail.com"
set realname = 'Real Name'
Additional settings you might want to tweak:
Code:
set alias_file = "${HOME}/.mutt/aliasesrc"
set folder = "${HOME}/Mail"
set record = "${HOME}/Mail/Sent/sent"
set postponed = "${HOME}/Mail/Postponed/postponed"
set edit_headers = "yes"
set editor = "$EDITOR"
set visual = "$editor"
set pop_delete = "yes"
set delete = "yes"
set xterm_set_titles = "yes"
There is a nice guide to using Mutt available at http://www.therandymon.com/woodnotes/mutt/.
 
Old 04-03-2010, 01:39 PM   #8
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,352

Rep: Reputation: 5382Reputation: 5382Reputation: 5382Reputation: 5382Reputation: 5382Reputation: 5382Reputation: 5382Reputation: 5382Reputation: 5382Reputation: 5382Reputation: 5382
Quote:
Originally Posted by cosmicd View Post
mutt is MUA. I tried that but I couldn't configure it. And I need MTA (fetchmail?). So what I understand is that the MTA fetches the email from the server and with the MUA I can read it once it's on my local machine ?
You already have an MTA. Sendmail.

You set up Fetchmail or Getmail with the information needed to pull mail from your ISP's server. They use sendmail to send these emails to your local mail account, where Mutt reads them. You then set up msmtp with the login and host information for your SMTP server, and set Mutt up to send outgoing mail through msmtp.
 
Old 04-03-2010, 02:48 PM   #9
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,367

Rep: Reputation: 844Reputation: 844Reputation: 844Reputation: 844Reputation: 844Reputation: 844Reputation: 844
Quote:
Originally Posted by penguiniator View Post
I use Mutt with gmail and without fetchmail or any other external mail handlers. Information about configuring it for pop and smtp is scattered throughout the documentation. The relevant settings from my configuration are:
Code:
set pop_host = "pops://username@pop.gmail.com:995/"
set pop_user = "username"
set pop_pass = "password"
set smtp_url = "smtp://username@smtp.gmail.com:587/"
set smtp_pass = "password"
set from = "username@gmail.com"
set realname = 'Real Name'
Additional settings you might want to tweak:
Code:
set alias_file = "${HOME}/.mutt/aliasesrc"
set folder = "${HOME}/Mail"
set record = "${HOME}/Mail/Sent/sent"
set postponed = "${HOME}/Mail/Postponed/postponed"
set edit_headers = "yes"
set editor = "$EDITOR"
set visual = "$editor"
set pop_delete = "yes"
set delete = "yes"
set xterm_set_titles = "yes"
There is a nice guide to using Mutt available at http://www.therandymon.com/woodnotes/mutt/.
For the record, though mutt can be used as an all-in-one utility without the need for fetchmail/procmail/sendmail/offlineimap/etc., this is a compile-time option and I don't believe Slackware configures mutt to be able to do any of this. mutt is a mere MUA in Slackware. `mutt -v` will show you the compile-time options, and indeed the options required for native imap/pop3 retrieval are absent. You would need to recompile mutt to do this, but in my opinion, it's better to just use mutt as an MUA and let the professionals (fetchmail+procmail, sendmail/msmtp) do their job.

[edit] I am apparently blind, as USE_POP and USE_IMAP were passed at compile-time on Slackware64-13.0. Guess I must have been looking for POP3 or something and didn't catch the POP on its own...I don't know. [/edit]

Last edited by T3slider; 04-03-2010 at 10:53 PM.
 
1 members found this post helpful.
Old 04-03-2010, 07:04 PM   #10
rg3
Member
 
Registered: Jul 2007
Distribution: Fedora
Posts: 527

Rep: Reputation: Disabled
mutt in slackware, at least from current, does have POP3 and IMAP support compiled in. However, AFAIK, SMTP support is available only in the unstable 1.5 branch, and slackware ships the stable 1.4 branch.

Code:
Mutt 1.4.2.3i (2007-05-26)
Copyright (C) 1996-2002 Michael R. Elkins and others.
Mutt comes with ABSOLUTELY NO WARRANTY; for details type `mutt -vv'.
Mutt is free software, and you are welcome to redistribute it
under certain conditions; type `mutt -vv' for details.

System: Linux 2.6.33.2 (i686) [using ncurses 5.6]
Compile options:
-DOMAIN
-DEBUG
-HOMESPOOL  -USE_SETGID  +USE_DOTLOCK  -DL_STANDALONE  
+USE_FCNTL  -USE_FLOCK
+USE_POP  +USE_IMAP  -USE_GSS  +USE_SSL  -USE_SASL  
+HAVE_REGCOMP  -USE_GNU_REGEX  
+HAVE_COLOR  +HAVE_START_COLOR  +HAVE_TYPEAHEAD  +HAVE_BKGDSET  
+HAVE_CURS_SET  +HAVE_META  +HAVE_RESIZETERM  
+HAVE_PGP  -BUFFY_SIZE -EXACT_ADDRESS  -SUN_ATTACHMENT  
+ENABLE_NLS  +LOCALES_HACK  -HAVE_WC_FUNCS  +HAVE_LANGINFO_CODESET  +HAVE_LANGINFO_YESEXPR  
+HAVE_ICONV  -ICONV_NONTRANS  +HAVE_GETSID  +HAVE_GETADDRINFO  
ISPELL="/usr/bin/ispell"
SENDMAIL="/usr/sbin/sendmail"
MAILPATH="/var/spool/mail"
PKGDATADIR="/usr/share/mutt"
SYSCONFDIR="/etc/mutt"
EXECSHELL="/bin/sh"
-MIXMASTER
To contact the developers, please mail to <mutt-dev@mutt.org>.
To report a bug, please use the flea(1) utility.
Edit: anyway, mutt is indeed a MUA, it only handles local mailboxes. To get remote email to a file in your box, so mutt can read it, you tipically use another tool like getmail, but getmail is not an MTA with the meaning normally used in literature. It's merely a program that connects to a POP or IMAP server and gets your email.

To send, you would use putmail or msmtp, but they are not MTAs either in the usual sense, so they are better named "SMTP clients". In other words, a program that reads an email message composed by a MUA and uses an SMTP server to send it.

So basically the philosophy in mutt is "tell me a file or directory to read email from (a spool or inbox) and I'll display it and let you archive it and administrate it, and tell me a program to send email and I'll use it to send email you compose". It's not really that hard. Sendmail can be left out of that equation (for example, getmail doesn't need it and putmail doesn't need it). However, it's a good idea to run an MTA like sendmail in your computer, if only to receive email from cron jobs, for example. But that's a different story.

Last edited by rg3; 04-03-2010 at 07:17 PM.
 
1 members found this post helpful.
Old 04-04-2010, 06:55 AM   #11
cosmicd
LQ Newbie
 
Registered: Jan 2010
Posts: 19

Original Poster
Rep: Reputation: 0
Ok, I've managed to configure mutt, fetchmail and msmtp. No problem reading the mails, but the problem is with sending ones.

Code:
msmtp: recipient address <valid-email-adress> not accepted by the server
msmtp: server message: 554 Relay rejected for policy reasons.
msmtp: could not send mail (account default from /home/<user>/.msmtprc)
I'm not using gmail.

Last edited by cosmicd; 04-04-2010 at 06:57 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
writing and reading at same time dideas Programming 16 11-13-2006 07:49 PM
writing and reading from a file! sahel Programming 1 12-27-2005 02:33 PM
C File reading and writing AbhishekSamuel Programming 3 05-03-2005 04:59 PM
Help reading and writing to file xiste Programming 1 04-15-2005 01:43 AM
reading multipart mime emails alan_h404 Linux - Software 3 01-24-2005 12:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration