Reputation: 399
I am using Gnus with Offlineimap to read GMail. Offlineimap fetches the mail from GMail and stores in in Maildir folders on my local machine at /mnt/Mail/ . I point Gnus to these folders, from where it reads the mail and displays it to me.
When I try to reply to a mail (by typing 'r' when the cursor is on the mail's subject in the Summary buffer), I get the following problems:
(i) The "Fcc:" field is populated with a non-existant directory, and I am told that this directory does not exist (it does not). I am also prompted whether I want to create this directory as a new maildir directory:
/mnt/Mail/sent is not a maildir. Create it? (y or n)
Since I don't want to save a local copy of the sent message (because Gmail SMTP and IMAP will get it for me anyway), I have to always say "no" before proceeding. This is a huge inconvenience when it happens every time.
How do I get rid of this field? I do not want to save sent mails anywhere on my local machine in this manner.
I have tried the following settings in my .gnus file, but to no avail:
(setq gnus-author-copy nil) (setq gnus-author-copy-saver nil)
..
(setq mail-yank-ignored-headers "Fcc:")
(ii) There is a "References:" field in the message header which says something like:
References: <[email protected]>
How do I get rid of this field? This looks ugly, and quite useless in normal emails.
(iii) The "From:" field in the message header refers to my local machine:
From: G Philip <[email protected]>
I have to edit this field also every time so that it contains my proper email address.
Since I use a couple of email addresses with my gmail account, I have tried the following in my .gnus file to get this field to use the "To:" address of the email to which I am replying, but neither approach works:
(setq message-alternative-emails (regexp-opt '("[email protected]" "[email protected]")))
..
(setq gnus-posting-styles '(((header "to" "myfirstaddress gmail.com") (address "myfirstaddress gmail.com")) ((header "to" "myotheraddress gmail.com") (address "myotheraddress gmail.com"))))
How do I set things up so that the "From:" field automatically gets filled with the "To:" field of the original email?
My .gnus file looks like this:
;; Use Gnus to read gmail from the local directory to which offlineimap syncs
(setq gnus-select-method
'(nnmaildir "Gmail" (directory "/mnt/Mail") (expire-age never)))
;; Don't hide read email
(setq gnus-fetch-old-headers t)
;; Sort by date, newest first.
(setq gnus-thread-sort-functions
'(gnus-thread-sort-by-number gnus-thread-sort-by-most-recent-date))
;; Do not look for new "groups" every time.
(setq gnus-check-new-newsgroups nil)
;; Use the better (but slower) function to extract information
;; from mail headers.
(setq gnus-extract-address-components
'mail-extract-address-components)
;; Use the gmail SMTP server to send email.
(setq send-mail-function 'smtpmail-send-it
message-send-mail-function 'smtpmail-send-it smtpmail-starttls-credentials '(("smtp.gmail.com" 587 nil nil)) smtpmail-auth-credentials '(("smtp.gmail.com" 587 "[email protected]" nil)) smtpmail-default-smtp-server "smtp.gmail.com" smtpmail-smtp-server "smtp.gmail.com" smtpmail-smtp-service 587 smtpmail-debug-info t smtpmail-local-domain "gmail.com")
Upvotes: 0
Views: 783
Reputation: 3176
Well, (ii) is easy enough. You can hide any header by adding it to gnus-ignored-headers
(or by removing it from gnus-visible-headers
, if it's there). See http://www.gnus.org/manual/gnus_142.html#SEC142
(iii) may also be easy, if I understand the question correctly. Are you talking about the From field in a message that you are sending? If so, then set user-mail-address
to whatever value you want to use by default and Gnus won't have to guess based on your username and your machine's hostname.
Upvotes: 0