* How to add arguments in variable "sendmail-program"
@ 2006-11-14 2:54 ssSslang
2006-11-14 8:54 ` Reiner Steib
0 siblings, 1 reply; 5+ messages in thread
From: ssSslang @ 2006-11-14 2:54 UTC (permalink / raw)
Hi all!
I use msmtp to send mail. Now I have two mail boxes: home and office. So
I thought I should just set the sendmail-program to "/usr/bin/msmtp -a
[home|office]"(argu -a means to use different accounts). But when I did
this, the debug told me that can not find the program "/usr/bin/msmtp -a
[home|office]". If I set it to "/usr/bin/msmtp", gnus works well. But I
cannot select account in this way. Can someone has a solution? Thanks.
--
ssSslang
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to add arguments in variable "sendmail-program"
2006-11-14 2:54 How to add arguments in variable "sendmail-program" ssSslang
@ 2006-11-14 8:54 ` Reiner Steib
2006-11-14 10:05 ` ssSslang
0 siblings, 1 reply; 5+ messages in thread
From: Reiner Steib @ 2006-11-14 8:54 UTC (permalink / raw)
On Tue, Nov 14 2006, ssSslang wrote:
> I use msmtp to send mail. Now I have two mail boxes: home and office. So
> I thought I should just set the sendmail-program to "/usr/bin/msmtp -a
> [home|office]"(argu -a means to use different accounts).
Maybe msmtp offers to select the account according to the
(Envelope-)From header (see `message-sendmail-envelope-from')?
> But when I did this, the debug told me that can not find the program
> "/usr/bin/msmtp -a [home|office]". If I set it to "/usr/bin/msmtp",
> gnus works well. But I cannot select account in this way. Can
> someone has a solution? Thanks.
I don't think there's an option in message.el for this. Could you try
the following patch and set `message-sendmail-extra-arguments' e.g. to
'("-a" "home") / '("-a" "office")?
--8<---------------cut here---------------start------------->8---
--- message.el 09 Nov 2006 20:15:01 +0100 7.190
+++ message.el 14 Nov 2006 09:45:54 +0100
@@ -761,6 +761,13 @@
:link '(custom-manual "(message)Mail Variables")
:group 'message-sending)
+(defcustom message-sendmail-extra-arguments nil
+ "Additional arguments to `sendmail-program'."
+ :version "23.0" ;; No Gnus
+ :type '(repeat string)
+ :group 'message-sending)
+;; :link '(custom-manual "(message)Mail Variables")
+
;; qmail-related stuff
(defcustom message-qmail-inject-program "/var/qmail/bin/qmail-inject"
"Location of the qmail-inject program."
@@ -4282,6 +4289,7 @@
"/usr/ucblib/sendmail")
(t "fakemail"))
nil errbuf nil "-oi")
+ message-sendmail-extra-arguments
;; Always specify who from,
;; since some systems have broken sendmails.
;; But some systems are more broken with -f, so
--8<---------------cut here---------------end--------------->8---
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to add arguments in variable "sendmail-program"
2006-11-14 8:54 ` Reiner Steib
@ 2006-11-14 10:05 ` ssSslang
2006-11-15 17:39 ` Shanks N
[not found] ` <mailman.664.1163616755.2155.info-gnus-english@gnu.org>
0 siblings, 2 replies; 5+ messages in thread
From: ssSslang @ 2006-11-14 10:05 UTC (permalink / raw)
Reiner Steib <reinersteib+gmane@imap.cc> writes:
>
> I don't think there's an option in message.el for this. Could you try
> the following patch and set `message-sendmail-extra-arguments' e.g. to
> '("-a" "home") / '("-a" "office")?
>
It works. Thanks *very much* !
--
ssSslang
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to add arguments in variable "sendmail-program"
2006-11-14 10:05 ` ssSslang
@ 2006-11-15 17:39 ` Shanks N
[not found] ` <mailman.664.1163616755.2155.info-gnus-english@gnu.org>
1 sibling, 0 replies; 5+ messages in thread
From: Shanks N @ 2006-11-15 17:39 UTC (permalink / raw)
ssSslang <sssslang@163.com.removeme> writes:
> Reiner Steib <reinersteib+gmane@imap.cc> writes:
>
>>
>> I don't think there's an option in message.el for this. Could you try
>> the following patch and set `message-sendmail-extra-arguments' e.g. to
>> '("-a" "home") / '("-a" "office")?
>>
>
> It works. Thanks *very much* !
>
> --
> ssSslang
I too use msmtp. Can you please post the relevant parts of msmtprc
and .gnus file? I too use multiple accounts to send and would be
interested in knowing how to do it.
regards,
Shanks
--
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to add arguments in variable "sendmail-program"
[not found] ` <mailman.664.1163616755.2155.info-gnus-english@gnu.org>
@ 2006-11-16 3:33 ` ssSslang
0 siblings, 0 replies; 5+ messages in thread
From: ssSslang @ 2006-11-16 3:33 UTC (permalink / raw)
Shanks N <shanks.n@gmail.com> writes:
>
> I too use msmtp. Can you please post the relevant parts of msmtprc
> and .gnus file? I too use multiple accounts to send and would be
> interested in knowing how to do it.
>
I don't wanna talk much about msmtp, and you could find it in its
manpage. :)
First, you must apply the patch to message.el supplied by kind Reiner.
Then, I assume you have two accounts in ~/.msmtprc file, "home" and
"office". You may try to add the following to ~/.gnus:
--8<---------------cut here---------------start------------->8---
(setq sendmail-program "/usr/bin/msmtp")
(defun sssslang-use-home-smtp-server ()
(setq message-sendmail-extra-arguments '("-a" "home"))
(setq user-full-name "sssslang")
(setq user-mail-address "sssslang@home"))
(defun sssslang-use-office-smtp-server ()
(setq message-sendmail-extra-arguments '("-a" "office"))
(setq user-full-name "sssslang")
(setq user-mail-address "sssslang@office"))
(setq gnus-posting-styles
'(("mail\\.home"
(name "sssslang")
(signature "I'm at home.")
(eval (sssslang-use-home-smtp-server)))
("mail\\.office"
(name "sssslang")
(signature "I'm at office.")
(eval (sssslang-use-office-smtp-server)))))
--8<---------------cut here---------------end--------------->8---
That's all. If I missed something or there's another better way, please
let me know, thanks.
--
ssSslang
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-11-16 3:33 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-14 2:54 How to add arguments in variable "sendmail-program" ssSslang
2006-11-14 8:54 ` Reiner Steib
2006-11-14 10:05 ` ssSslang
2006-11-15 17:39 ` Shanks N
[not found] ` <mailman.664.1163616755.2155.info-gnus-english@gnu.org>
2006-11-16 3:33 ` ssSslang
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).