Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* choose/set from address & gcc-sent_mail
@ 2015-12-27 21:51 Benjamin Slade
  2015-12-28  1:02 ` Eric Abrahamsen
  0 siblings, 1 reply; 8+ messages in thread
From: Benjamin Slade @ 2015-12-27 21:51 UTC (permalink / raw)
  To: info-gnus-english

Is there any way to have Gnus automatically prompt for an account in
case none is set, when composing a new mail or replying to an email?

I have set:

(setq gnus-parameters
      '(
        ("home"
         (posting-style
          (address "me@gmail.com")
          (gcc "\"nnimap+home:[Gmail].Sent Mail\"")))
        ("work"
         (posting-style
          (address "me@work.com")
          (gcc "\"nnimap+work:[Gmail].Sent Mail\"")))
))

Which means that if I reply to an email or compose a new email when I'm
in nnimap+home:.* or nnimap+work:.* it automatically picks the right
from address and puts a copy of the sent mail in the right place.

But if I'm in a virtual group or in no group at all, then no Gcc is set,
and From is set to
"....i-did-not-set--mail-host-address--so-tickle-me". What I would like
to do is, in the absence of the account already being properly set, as
per the above rules, to prompt me to chose between, say, "home" and
"work".

Does anyone have something like this set up?


-- 
( Dr Benjamin Slade . b.slade@utah.edu . http://www.jnanam.net/slade )
 ( Linguistics . University of Utah )
   (pgp_fingerprint: (21BA 2AE1 28F6 DF36 110A 0E9C A320 BBE8 2B52 EE19))
         '(sent by 真/MA Gnus on Emacs running under GNU/Linux)

_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

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

* Re: choose/set from address & gcc-sent_mail
  2015-12-27 21:51 choose/set from address & gcc-sent_mail Benjamin Slade
@ 2015-12-28  1:02 ` Eric Abrahamsen
  2015-12-28  5:31   ` Benjamin Slade
  2015-12-28 20:59   ` Benjamin Slade
  0 siblings, 2 replies; 8+ messages in thread
From: Eric Abrahamsen @ 2015-12-28  1:02 UTC (permalink / raw)
  To: info-gnus-english

Benjamin Slade <slade@jnanam.net> writes:

> Is there any way to have Gnus automatically prompt for an account in
> case none is set, when composing a new mail or replying to an email?
>
> I have set:
>
> (setq gnus-parameters
>       '(
>         ("home"
>          (posting-style
>           (address "me@gmail.com")
>           (gcc "\"nnimap+home:[Gmail].Sent Mail\"")))
>         ("work"
>          (posting-style
>           (address "me@work.com")
>           (gcc "\"nnimap+work:[Gmail].Sent Mail\"")))
> ))
>
> Which means that if I reply to an email or compose a new email when I'm
> in nnimap+home:.* or nnimap+work:.* it automatically picks the right
> from address and puts a copy of the sent mail in the right place.
>
> But if I'm in a virtual group or in no group at all, then no Gcc is set,
> and From is set to
> "....i-did-not-set--mail-host-address--so-tickle-me". What I would like
> to do is, in the absence of the account already being properly set, as
> per the above rules, to prompt me to chose between, say, "home" and
> "work".

You can stop Gnus tickling you by setting the `user-mail-address' to a
default "from" value. That will at least prevent you from getting those
bogus values.

But that won't run the appropriate gnus-parameters, or set any other
headers up.

There have been a few discussions about this on this and other lists
recently. Apparently there are a couple of external packages you can
try: Gnus Pers, and Gnus Alias:

http://www.emacswiki.org/emacs/GnusPers
http://www.emacswiki.org/emacs/GnusAlias

I haven't tried them, but they are definitely there to solve this sort
of problem...

> Does anyone have something like this set up?



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

* Re: choose/set from address & gcc-sent_mail
  2015-12-28  1:02 ` Eric Abrahamsen
@ 2015-12-28  5:31   ` Benjamin Slade
  2015-12-28 20:59   ` Benjamin Slade
  1 sibling, 0 replies; 8+ messages in thread
From: Benjamin Slade @ 2015-12-28  5:31 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: info-gnus-english

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> Benjamin Slade <slade@jnanam.net> writes:
>
>> Is there any way to have Gnus automatically prompt for an account in
>> case none is set, when composing a new mail or replying to an email?
>>
>> I have set:
>>
>> (setq gnus-parameters
>>       '(
>>         ("home"
>>          (posting-style
>>           (address "me@gmail.com")
>>           (gcc "\"nnimap+home:[Gmail].Sent Mail\"")))
>>         ("work"
>>          (posting-style
>>           (address "me@work.com")
>>           (gcc "\"nnimap+work:[Gmail].Sent Mail\"")))
>> ))
>>
>> Which means that if I reply to an email or compose a new email when I'm
>> in nnimap+home:.* or nnimap+work:.* it automatically picks the right
>> from address and puts a copy of the sent mail in the right place.
>>
>> But if I'm in a virtual group or in no group at all, then no Gcc is set,
>> and From is set to
>> "....i-did-not-set--mail-host-address--so-tickle-me". What I would like
>> to do is, in the absence of the account already being properly set, as
>> per the above rules, to prompt me to chose between, say, "home" and
>> "work".
>
> You can stop Gnus tickling you by setting the `user-mail-address' to a
> default "from" value. That will at least prevent you from getting those
> bogus values.
>
> But that won't run the appropriate gnus-parameters, or set any other
> headers up.
>
> There have been a few discussions about this on this and other lists
> recently. Apparently there are a couple of external packages you can
> try: Gnus Pers, and Gnus Alias:
>
> http://www.emacswiki.org/emacs/GnusPers
> http://www.emacswiki.org/emacs/GnusAlias
>
> I haven't tried them, but they are definitely there to solve this sort
> of problem...
>

Thanks. I'll try those out.


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

* Re: choose/set from address & gcc-sent_mail
  2015-12-28  1:02 ` Eric Abrahamsen
  2015-12-28  5:31   ` Benjamin Slade
@ 2015-12-28 20:59   ` Benjamin Slade
  2015-12-29  1:08     ` Eric Abrahamsen
  1 sibling, 1 reply; 8+ messages in thread
From: Benjamin Slade @ 2015-12-28 20:59 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: info-gnus-english

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> You can stop Gnus tickling you by setting the `user-mail-address' to a
> default "from" value. That will at least prevent you from getting those
> bogus values.
>
> But that won't run the appropriate gnus-parameters, or set any other
> headers up.
>
> There have been a few discussions about this on this and other lists
> recently. Apparently there are a couple of external packages you can
> try: Gnus Pers, and Gnus Alias:
>
> http://www.emacswiki.org/emacs/GnusPers
> http://www.emacswiki.org/emacs/GnusAlias
>
> I haven't tried them, but they are definitely there to solve this sort
> of problem...
>
>> Does anyone have something like this set up?

Tried playing with Gnus Alias. There doesn't seem to be a
straightforward way of getting it to work with smtpmail-multi. So, I can
get Gnus Alias to automatically set Sender and Gcc, but then my smtpmail
server isn't set.


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

* Re: choose/set from address & gcc-sent_mail
  2015-12-28 20:59   ` Benjamin Slade
@ 2015-12-29  1:08     ` Eric Abrahamsen
  2015-12-29  4:18       ` Benjamin Slade
       [not found]       ` <mailman.1210.1451362694.843.info-gnus-english@gnu.org>
  0 siblings, 2 replies; 8+ messages in thread
From: Eric Abrahamsen @ 2015-12-29  1:08 UTC (permalink / raw)
  To: info-gnus-english

Benjamin Slade <slade@jnanam.net> writes:

> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> You can stop Gnus tickling you by setting the `user-mail-address' to a
>> default "from" value. That will at least prevent you from getting those
>> bogus values.
>>
>> But that won't run the appropriate gnus-parameters, or set any other
>> headers up.
>>
>> There have been a few discussions about this on this and other lists
>> recently. Apparently there are a couple of external packages you can
>> try: Gnus Pers, and Gnus Alias:
>>
>> http://www.emacswiki.org/emacs/GnusPers
>> http://www.emacswiki.org/emacs/GnusAlias
>>
>> I haven't tried them, but they are definitely there to solve this sort
>> of problem...
>>
>>> Does anyone have something like this set up?
>
> Tried playing with Gnus Alias. There doesn't seem to be a
> straightforward way of getting it to work with smtpmail-multi. So, I can
> get Gnus Alias to automatically set Sender and Gcc, but then my smtpmail
> server isn't set.

The wiki page claims that it can set: "Extra headers - a list of
arbitrary header to set (e.g. X-Archive: no)". I haven't used this and
don't know how it works, but I'll bet you can make it set the
X-SMTP-Server header, which would solve your problem.



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

* Re: choose/set from address & gcc-sent_mail
  2015-12-29  1:08     ` Eric Abrahamsen
@ 2015-12-29  4:18       ` Benjamin Slade
       [not found]       ` <mailman.1210.1451362694.843.info-gnus-english@gnu.org>
  1 sibling, 0 replies; 8+ messages in thread
From: Benjamin Slade @ 2015-12-29  4:18 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: info-gnus-english

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> Benjamin Slade <slade@jnanam.net> writes:
>> Tried playing with Gnus Alias. There doesn't seem to be a
>> straightforward way of getting it to work with smtpmail-multi. So, I can
>> get Gnus Alias to automatically set Sender and Gcc, but then my smtpmail
>> server isn't set.
>
> The wiki page claims that it can set: "Extra headers - a list of
> arbitrary header to set (e.g. X-Archive: no)". I haven't used this and
> don't know how it works, but I'll bet you can make it set the
> X-SMTP-Server header, which would solve your problem.

Ah, I'll look into that. I used extra headers to set Gcc; I'll see if I
can use it to set the smtp server.


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

* Re: choose/set from address & gcc-sent_mail
       [not found]       ` <mailman.1210.1451362694.843.info-gnus-english@gnu.org>
@ 2015-12-29  9:05         ` Jens Klöcker
  2015-12-31  8:53           ` Benjamin Slade
  0 siblings, 1 reply; 8+ messages in thread
From: Jens Klöcker @ 2015-12-29  9:05 UTC (permalink / raw)
  To: info-gnus-english


[-- Attachment #1.1: Type: text/plain, Size: 1643 bytes --]

Am 29.12.2015 um 05:18 Uhr schrieb Benjamin Slade:

> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> Benjamin Slade <slade@jnanam.net> writes:
>>> Tried playing with Gnus Alias. There doesn't seem to be a
>>> straightforward way of getting it to work with smtpmail-multi. So, I
>>> can get Gnus Alias to automatically set Sender and Gcc, but then my
>>> smtpmail server isn't set.
>>
>> The wiki page claims that it can set: "Extra headers - a list of
>> arbitrary header to set (e.g. X-Archive: no)". I haven't used this
>> and don't know how it works, but I'll bet you can make it set the
>> X-SMTP-Server header, which would solve your problem.
>
> Ah, I'll look into that. I used extra headers to set Gcc; I'll see if
> I can use it to set the smtp server.

I use this for several years now and set the smtp server among many
other things via posting styles:

--8<---------------cut here---------------start------------->8---
(setq gnus-posting-styles
      '(
	(".*"
         MY DEFAULT SETTINGS
        )
        ("work:.*"                                
	 MY WORK SETTINGS
        )
        ("private:.*"
	 MY PRIVATE SETTINGS
         ("X-Message-SMTP-Method" "smtp smtp.someserver.de 587 username")
        )))
--8<---------------cut here---------------end--------------->8---

The SMTP server used for work is set using the
normal message-send-mail-function.

-- 
Jens Klöcker · Public key: http://www.kloecker.org/jens/public-key.txt
        Mastery of UNIX, like mastery of language, offers real freedom.
                                                      (Thomas Scoville)

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 180 bytes --]



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

* Re: choose/set from address & gcc-sent_mail
  2015-12-29  9:05         ` Jens Klöcker
@ 2015-12-31  8:53           ` Benjamin Slade
  0 siblings, 0 replies; 8+ messages in thread
From: Benjamin Slade @ 2015-12-31  8:53 UTC (permalink / raw)
  To: Jens Klöcker; +Cc: info-gnus-english

> > Ah, I'll look into that. I used extra headers to set Gcc; I'll see if
> > I can use it to set the smtp server.

> I use this for several years now and set the smtp server among many
> other things via posting styles:

> --8<---------------cut here---------------start------------->8---
> (setq gnus-posting-styles
>       '(
> 	(".*"
>          MY DEFAULT SETTINGS
>         )
>         ("work:.*"                                
> 	 MY WORK SETTINGS
>         )
>         ("private:.*"
> 	 MY PRIVATE SETTINGS
>          ("X-Message-SMTP-Method" "smtp smtp.someserver.de 587 username")
>         )))
> --8<---------------cut here---------------end--------------->8---

> The SMTP server used for work is set using the
> normal message-send-mail-function.

Yes, that works.  But there remain two issues, one major, one more minor

1. When replying to messages like this one, i.e. from a mailing list,
the identity rules seem to fail, as I get a "no match" error, and S W
fails to actually quote in that case. (Though gnus alias seems to arrive
at the correct identity anyway).  I'm not sure how to resolve this.

2. The more minor issue is that the message-id isn't correctly set. I
get things like:  Message-ID:
<87poxnrpkg.fsf@sushoma.i-did-not-set--mail-host-address--so-tickle-me>

Setting the organisation in gnus alias doesn't seem to help.

-- 
( Dr Benjamin Slade . b.slade@utah.edu . http://www.jnanam.net/slade )
 ( Linguistics . University of Utah )
   (pgp_fingerprint: (21BA 2AE1 28F6 DF36 110A 0E9C A320 BBE8 2B52 EE19))
         '(sent by 真/MA Gnus on Emacs running under GNU/Linux)

_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

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

end of thread, other threads:[~2015-12-31  8:53 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-27 21:51 choose/set from address & gcc-sent_mail Benjamin Slade
2015-12-28  1:02 ` Eric Abrahamsen
2015-12-28  5:31   ` Benjamin Slade
2015-12-28 20:59   ` Benjamin Slade
2015-12-29  1:08     ` Eric Abrahamsen
2015-12-29  4:18       ` Benjamin Slade
     [not found]       ` <mailman.1210.1451362694.843.info-gnus-english@gnu.org>
2015-12-29  9:05         ` Jens Klöcker
2015-12-31  8:53           ` Benjamin Slade

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 NNTP newsgroup(s).