unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* How can i do if i want fetch mail from gmail by guns
@ 2006-06-17 12:26 ada
  2006-06-19 21:00 ` ada
  0 siblings, 1 reply; 3+ messages in thread
From: ada @ 2006-06-17 12:26 UTC (permalink / raw)



my conf look like:

;; send mail
(setq send-mail-function 'smtpmail-send-it
      message-send-mail-function 'smtpmail-send-it)

(require 'smtpmail)
(setq smtpmail-smtp-server "smtp.gmail.com"
      smtpmail-smtp-service 587
      smtpmail-auth-credentials 
                 `(("smtp.gmail.com" 587 "dazhiqian@gmail.com" "********")))

(require 'starttls)
(setq smtpmail-starttls-credentials
      '(("smtp.gmail.com" 587 nil nil)))

;; fetch mail
(require 'pop3)
(setq mail-sources
      '((pop :server "pop.gmail.com"
             :user "dazhiqian"
             :password "*********"
             :port 995
             :connection ssl
             :leave t)))

BUT the gnus don't work.any body can help me?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How can i do if i want fetch mail from gmail by guns
  2006-06-17 12:26 How can i do if i want fetch mail from gmail by guns ada
@ 2006-06-19 21:00 ` ada
  2006-06-26 14:05   ` evan.monroig
  0 siblings, 1 reply; 3+ messages in thread
From: ada @ 2006-06-19 21:00 UTC (permalink / raw)


ada <dazhiqian@gmail.com> writes:


anyone?
> my conf look like:
>
> ;; send mail
> (setq send-mail-function 'smtpmail-send-it
>       message-send-mail-function 'smtpmail-send-it)
>
> (require 'smtpmail)
> (setq smtpmail-smtp-server "smtp.gmail.com"
>       smtpmail-smtp-service 587
>       smtpmail-auth-credentials 
>                  `(("smtp.gmail.com" 587 "dazhiqian@gmail.com" "********")))
>
> (require 'starttls)
> (setq smtpmail-starttls-credentials
>       '(("smtp.gmail.com" 587 nil nil)))
>
> ;; fetch mail
> (require 'pop3)
> (setq mail-sources
>       '((pop :server "pop.gmail.com"
>              :user "dazhiqian"
>              :password "*********"
>              :port 995
>              :connection ssl
>              :leave t)))
>
> BUT the gnus don't work.any body can help me?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How can i do if i want fetch mail from gmail by guns
  2006-06-19 21:00 ` ada
@ 2006-06-26 14:05   ` evan.monroig
  0 siblings, 0 replies; 3+ messages in thread
From: evan.monroig @ 2006-06-26 14:05 UTC (permalink / raw)


I use fetchmail. It fetches mail in the background, so gnus start is
faster :)

this is my ~/.fetchmailrc

----
set daemon 300
set no syslog
set logfile /home/ME/.fetchmail.log

defaults
    protocol pop3
    port 995
    no rewrite                          # do not write additionnal
headers
    mda "/usr/bin/procmail -d %s"

poll pop.gmail.com
    user "EXAMPLE@gmail.com" pass "SOMEPASSWORD"
    flush
    options ssl sslcertck
    sslcertpath "/etc/ssl/certs"
----

for the ssl stuff you may need to install the said ssl certificates.

You then need to use procmail to sort your mail. The following few
lines will suffice in your ~/.procmailrc

----
VERBOSE=off
PATH=$HOME/bin:/usr/bin:/usr/sbin:/bin:/sbin:/usr/local/bin:.
MAILDIR=$HOME/mail
DEFAULT=$MAILDIR/inbox
LOGFILE=$MAILDIR/log

# add a header with number of lines in the email
:0bw
LINES=|wc -l | tr -d " "
:0fhw
|formail -a "Lines: $LINES"

# put all email in the gnus file
:0
inbox
----

This will store all your mail in ~/mail/inbox

Then in your ~/.emacsrc you can put the following

----
(setq
 user-full-name "YOUR NAME"
 user-mail-address "EXAMPLE@gmail.com"
 nnmail-spool-file "~/mail/inbox"
 display-time-mail-file "~/mail/inbox")

(setq gnus-select-method
      '(nnml ""
         (nnml-directory "~/Gnus/mail/")
         (nnml-active-file "~/Gnus/mail/active")))
----
(I'm not sure you need these last two lines if you are fine with the
default directories)

Finally for smtp you can use (for example) msmtp, with the following in
~/.emacs

----
(setq sendmail-program "/usr/bin/msmtp")
----

and the following in ~/.msmtprc

----
defaults
logfile ~/.msmtp.log

# gmail account
account gmail
host smtp.gmail.com
port 587
auth on
tls on
user EXAMPLE@gmail.com
password SOMEPASSWORD

# set default account
account default : gmail
----

Then start fetchmail with the command "fetchmail", and it should be
working.

Evan

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-06-26 14:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-17 12:26 How can i do if i want fetch mail from gmail by guns ada
2006-06-19 21:00 ` ada
2006-06-26 14:05   ` evan.monroig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).