« Return to Thread: sendbug(1) patch

Re: sendbug(1) patch

by Ray-72 :: Rate this Message:

Reply to Author | View in Thread

Sendbug was rewritten some time ago, so your patch doesn't apply, sorry.

I was unaware of problems people had with sendmail, is this a  
widespread problem?

-Ray-

On Apr 12, 2008, at 10:51 PM, Dasn <dasn@...> wrote:

> Hi,
>
> I found some people suffer from the failure of sendbug(1). Because  
> most
> of them did not (or had no permission to) configure their sendmail(1)
> properly, I suppose.
>
> The following patch in order to solve this problem by adding a new
> environment variable, PR_AGENT, which allows users to specify their  
> own
> MTA instead of the default sendmail(1). For example:
>
> $ export PR_AGENT="/usr/local/bin/msmtp -a my_obsd_account -t"
> $ sendbug
>
>
> diff -u /usr/src/gnu/usr.bin/sendbug/sendbug.1 sendbug/sendbug.1
> --- /usr/src/gnu/usr.bin/sendbug/sendbug.1    Tue Aug  1 18:10:33 2006
> +++ sendbug/sendbug.1    Sun Apr 13 10:12:21 2008
> @@ -123,7 +123,7 @@
> .Ox
> bugs database.
> .Sh ENVIRONMENT
> -.Bl -tag -width "PR_FORM"
> +.Bl -tag -width "PR_AGENT"
> .It Ev EDITOR
> Specifies the editor to invoke on the template.
> The default editor is
> @@ -132,6 +132,9 @@
> Used as the file name of the template for your problem-report  
> editing session.
> You can use this to start with a partially completed form (for  
> example,
> a form with the identification fields already completed).
> +.It Ev PR_AGENT
> +The absolute path to the program which override the default Mail  
> Transfer Agent
> +to send the PR.
> .El
> .Sh HOW TO FILL OUT A PROBLEM REPORT
>
> diff -u /usr/src/gnu/usr.bin/sendbug/sendbug.sh sendbug/sendbug.sh
> --- /usr/src/gnu/usr.bin/sendbug/sendbug.sh    Tue Nov 30 05:57:45  
> 2004
> +++ sendbug/sendbug.sh    Sun Apr 13 09:54:21 2008
> @@ -57,11 +57,17 @@
> # What mailer to use.  This must come after the config file, since  
> it is
> # host-dependent.
> -if [ -f /usr/sbin/sendmail ]; then
> -  MAIL_AGENT="/usr/sbin/sendmail -oi -t"
> +if [ X"$PR_AGENT" = X"" ]; then
> +    if [ -f /usr/sbin/sendmail ]; then
> +      MAIL_AGENT="/usr/sbin/sendmail -oi -t"
> +    else
> +      MAIL_AGENT="/usr/lib/sendmail -oi -t"
> +    fi
> else
> -  MAIL_AGENT="/usr/lib/sendmail -oi -t"
> +    # A user defined mail transfer agent.
> +    MAIL_AGENT="$PR_AGENT"
> fi
> +
> MAILER=`echo $MAIL_AGENT | sed -e 's, .*,,'`
> if [ ! -f "$MAILER" ]; then
>  echo "$COMMAND: Cannot find mail program \"$MAILER\"."
> --
> Dasn

 « Return to Thread: sendbug(1) patch