Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: Reiner Steib <reinersteib+gmane@imap.cc>
Subject: Re: How to add arguments in variable "sendmail-program"
Date: Tue, 14 Nov 2006 09:54:40 +0100	[thread overview]
Message-ID: <v9r6w6h0hb.fsf@marauder.physik.uni-ulm.de> (raw)
In-Reply-To: <r6w6u48z.fsf@163.com>

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	other threads:[~2006-11-14  8:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-14  2:54 ssSslang
2006-11-14  8:54 ` Reiner Steib [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=v9r6w6h0hb.fsf@marauder.physik.uni-ulm.de \
    --to=reinersteib+gmane@imap.cc \
    --cc=Reiner.Steib@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).