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

Bug#420469: closed by Rene Engelhard <rene@debian.org> (Re: Bug#420469: openoffice.org: email settings: undocumented, broken behaviour)



On Sun, Apr 22, 2007 at 06:17:35PM +0200, Rene Engelhard wrote:
> > pane? how direct sendmail will be handled then?
> 
> That example sucks since sendmail itself can't do proper MIME, can it?
...
> There simply is no direct way to use sendmail directly. Yes, upstream

did not mean 'sendmail(8)', sorry for bad wording. Did mean what happens on
'send as email ...' function.

> 
> > # locate senddoc.sh
> > # find /usr/lib/openoffice/ -name senddoc.sh
> 
> senndoc.sh is how it's called in the source, what's installed is
> /usr/lib/openoffice/program/senddoc. Which, with a bit of thinking -
> could have douns by you if you eitrher used senddoc* for searching or
> looked with ls. But I apologize for my typo.

well, could have been SendDoc.sh etc., for that matter. Anyway, got it thanks.

> 
> > nothing at all.
> > So, pls explain how a user is supposed to 'simply add whatever he likes in
> > that box'; the only box avail is that for the program name/path; also pls 
> 
> huh? Just add "kmail" or whatever you like there? What is difficult
> there?

1. it is *undocumented*
2. it is out of (normal user) reach
3. it doesn't suffice to put in there 'mymailer', you need to figure out
   how the script is called, which args are handed over by OOo, what return
   code it is supposed to return.

> No, wrong. There's no configs imported from OOo1 to OOo2.

yep, sorry, that was 1st run of OOo's OOo2.1 over old OOo1 install.
Debian's doesn't care of old install, indeed.

> > > That's exactly what senddoc does.
> > 
> > except that noone knows about that.
> 
> And why is that a bug in the program?

it is undocumented; it just bails out with a dumb 'unsupported' without
telling the user which - in Debian's mua pkgs choice - is 'supported'; it
just bails out instead of just hand args over to user supplied program and
let it figure out.

> > it does *not* do that: if it doesn't like the program name the user set in 
> > the path box, it just bails out saying it's 'unsupported'.
> 
> Because it *IS* unspported then.

again, that's wrong way to handle the issue, imo: no clues to the user about 
what 'supported' means, script assumed to be so smart and authoritative to 
either know about all 'approved' mailers or rule out others.

While it can be handled much better, the OOo1 approach wins here - at least 
it's not that hidden.

--><--

Anyway, I put a test script in place of that 'senddoc' and got the args OOo
passes to the script, eg:

--mailclient sensible-ooomua --from Name Surname <name@domain> --attach /tmp/sv18g.tmp/sv1a3.tmp/filename

where the ---from stuff appears only if any corresponding field in setup is
non void.

It would also set --to --cc --bcc --subject, though I'm unable to figure out 
where such header values should be set for the to-be-sent doc.

Anyway, the --mailclient and --attach is all that suffice to know and make
the senddoc a bit more useful.

BTW, http://go-ooo.org/lxr/source/gsl/shell/source/cmdmail/cmdmailsuppl.cxx#252
seems the source of this helper:

251 // Retrieve the value for "Program" node and append it feed senddoc with it
252 // using the (undocumented) --mailclient switch
253 xNameAccess->getByName( OUString::createFromAscii( "Program" ) ) >>= aMailer;

'undocumented' by design?

264 #ifdef MACOSX
265             else
266                 aBuffer.append("--mailclient Mail ");
267 #endif

good to know when I'll upgrade OSX 10.2.8, hance OOo1->OOo2, as I'm
*not* using Apple's Mail ...

and following lines there in set the other --* stuff.

My 1st workaroud to this bug was to write a /usr/local/bin/mozilla wrapper,
so it carries a name to fool the smarty senddoc, but a possible fix to 
senddoc could be:

--- /usr/lib/openoffice/program/senddoc.origc      2006-11-30 20:32:54.000000000 +0100
+++ /usr/lib/openoffice/program/senddoc    2007-04-22 23:39:07.000000000 +0200
@@ -351,9 +351,14 @@
                fi
                ;;
                
-       *)
-               echo "Unsupported mail client: `basename $MAILER | sed 's/-.*^//'`"
-               exit 2
+       *) # if user supplied fullpath to program, assume it's a 
+          # (user's) program/script that knows how to handle our args
+               case "$MAILER" in
+                       /*)  $MAILER $@ & ;;
+                       *) echo "Unsupported mail client: `basename $MAILER | sed 's/-.*^//'`"
+                          exit 2
+                          ;;
+               esac
                ;;
 esac  
 
so, eg 'tkrat' would be 'unsupported' while '/usr/local/bin/tkrat' would be
'user knows'. A far better 
Makes sense? WFM anyway. 
A  better way though would be to allow for a full program path + args, like 
the (TMP) (PHONE) for the fax.


thanks
--
paolo



Reply to: