help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: More emacs instances


From: Richard Riley
Subject: Re: More emacs instances
Date: Tue, 17 Aug 2010 16:29:51 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Andrea Crotti <andrea.crotti.0@gmail.com> writes:

> Richard Riley <rileyrg@gmail.com> writes:
>
>>
>> The point of using gnus is bring them closer together.  I like it all
>> being in one UI. And the emacs one at that.
>>
>> Use gnus-posting-styles for your different nicks/email addresses
>> relevant to the groups you are reading.
>>
>> Use gnus topics for logical separation.
>>
>> Use msmtp for posting emails from different smtp servers.
>
> Yes I have to learn better how to use topics and so on, if you have some
> working examples it would be great...

They are well explained in the gnus manual. Very easy.

>
> The other "problem" is that apart from the main imap address, I have
> another old imap and 3 more pop3 mails.

This isnt a problem. Each one is a different
gnus-secondary-select-method.

>
> What I would like would be, aggregate everything in the main imap, but
> marking the original destinatioon address in every message.

I dont really understand what you mean. Some smtp servers (gmail being
one) dont allow you to send from your authenticated smtp using a
different name. Hence msmtp.

>
> So that when I answer to someone I answer with the right address and

gnus-posting-styles.

http://nntp.gnus.org/gnus/manual/gnus_153.html

> hopefully via the right smtp server (well that's relatively important).
>
> Could anything like this work?
>

msmtp. There are examples on the emacs wiki and in google land.

Here is my setup (somewhat sloppy) :-

,----
| (defun msmtp-account (&optional def)
|   (let* ((from
|           (save-restriction    
|             (message-narrow-to-headers)
|             (message-fetch-field "From")))
|          (account (if from (catch 'match
|                              (dolist (element msmtp-name-list)
|                                ;; (message (format "smpt chosen is %s"
|   element))
|                                (when (string-match (format ".*%s.*"
|   element) from)
|                                  (throw 'match element)))) nil)))
|     (if account account (if def def "default"))))
| 
| (defun msmtp-change-smtp ()
|   
|   (setq sendmail-program "/usr/bin/msmtp")
|   (setq message-sendmail-envelope-from 'header)
|   
|   (if (message-mail-p)
|       (setq message-sendmail-extra-arguments (list "-a" (msmtp-account
|       "default")))))
| 
| (add-hook 'message-send-hook 'msmtp-change-smtp)
`----

And you add the msmtp accounts to msmtp-name-list which match the config
sections in your .msmtprc something like this

,----
| defaults
| host smtp.gmail.com
| port 587
| auth on
| tls on
| tls_certcheck off
| logfile /tmp/msmtp.log
| 
| account riley
| user rileyrg@googlemail.com
| password ***********
| from rileyrg@googlemail.com
| 
| account richardriley
| host smtp.richardriley.net
| port 25
| user rgr
| password **********
| from rgr@richardriley.com
`----

And the setting of msmtp-name-list

,----
| (defvar msmtp-name-list '("root" "richardriley"))
| 
| (add-to-list 'msmtp-name-list "riley" t)
`----

Probably one element in the list for each gnus select method.

Enough to get you started ... it tooks me ages to get this all working
way back when..

It's all manpages and experiment from there  on in .. ;)

r.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]