info-gnus-english
[Top][All Lists]
Advanced

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

Re: How to add arguments in variable "sendmail-program"


From: Reiner Steib
Subject: Re: How to add arguments in variable "sendmail-program"
Date: Tue, 14 Nov 2006 09:54:40 +0100
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.90 (gnu/linux)

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/


reply via email to

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