Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
04-03-2010, 11:59 AM
|
#1
|
LQ Newbie
Registered: Jan 2010
Posts: 19
Rep:
|
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.
|
|
|
04-03-2010, 12:06 PM
|
#2
|
LQ 5k Club
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529
|
Take a look at mutt
http://www.mutt.org/
|
|
|
04-03-2010, 12:07 PM
|
#3
|
Senior Member
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,821
|
or try Alpine. I used it on my workstation and it's very powerful
|
|
|
04-03-2010, 12:12 PM
|
#4
|
LQ Newbie
Registered: Sep 2004
Location: Trivandrum
Distribution: Redhat
Posts: 18
Rep:
|
through console use mail, mutt.
|
|
0 members found this post helpful.
|
04-03-2010, 12:22 PM
|
#5
|
Member
Registered: Jul 2007
Distribution: Fedora
Posts: 527
Rep:
|
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.
|
|
|
04-03-2010, 12:33 PM
|
#6
|
LQ Newbie
Registered: Jan 2010
Posts: 19
Original Poster
Rep:
|
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 ?
|
|
|
04-03-2010, 01:22 PM
|
#7
|
Member
Registered: Feb 2004
Location: Olympia, WA
Distribution: SolydK
Posts: 442
Rep:
|
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/.
|
|
|
04-03-2010, 01:39 PM
|
#8
|
LQ Guru
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,352
|
Quote:
Originally Posted by cosmicd
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.
|
|
|
04-03-2010, 02:48 PM
|
#9
|
Senior Member
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,367
|
Quote:
Originally Posted by penguiniator
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.
|
04-03-2010, 07:04 PM
|
#10
|
Member
Registered: Jul 2007
Distribution: Fedora
Posts: 527
Rep:
|
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.
|
04-04-2010, 06:55 AM
|
#11
|
LQ Newbie
Registered: Jan 2010
Posts: 19
Original Poster
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 12:10 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|