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

Re: VBox-Nachrichten per Mail?!?!



Guenther Orth schrieb am Freitag, den 09. März 2001:

> Hat es von euch schon jemand geschafft, dass die Nachrichten von VBox an
> das Infomail angehaengt werden???

Wo ist das Problem? Einfach vboxmail entsprechend ändern bzw. ein
entsprechendes /etc/isdn/vboxmail erzeugen (das hat dann Priorität vor
/usr/sbin/vboxmail, wenn es vorhanden und ausführbar ist).

> Da ich etwas oefters unterwegs bin waere das nett, wenn ich die
> Messages auch gleich per Mail habe.

Ich hänge mal mein vboxmail an, das die Nachricht im vbox-Format
verschickt. Wenn Du einen vernünftigen Mailreader (z.B. Mutt) hast,
der mit einer mailcap umgehen kann, dann reicht es, in diese etwa
folgende Zeile einztragen:

audio/x-vbox; /usr/local/vbox/bin/vboxplay '%s'

(Pfad entsprechend anpassen) und schon kannst Du die Nachricht aus der
Mail heraus abspielen.

Natürlich kann man das ganze auch aufbohren, so daß die Nachricht vor
dem Verschicken konvertiert wird, beispielsweise nach MP3, allerdings
wird die Nachricht dadurch eher größer als kleiner und die Qualität
wird nur schlechter (MP3 ist wohl eher für CD-Qualität geeignet, mit
der 8bit-8kHz-Qualität kann zumindest gigo nicht viel anfangen). Bei
Bedarf kann ich aber ein solches vboxmail nachliefern.

Tschoeeee

        Roland

-- 
 * roland@spinnaker.de * http://www.spinnaker.de/ *
#! /bin/sh
#
# $Id: vboxmail,v 1.3 1999/01/24 02:09:38 roland Exp $
#
# Usage: vboxmail MESSAGENAME CALLERNAME CALLERID MAIL-TO-ADDRESS
#
# This script is a plug-in-replacement for the vboxmail delivered with
# vbox 2.0, but it does not only send you a notify mail but it appends
# the complete voice message as a MIME attachment of the type
# audio/x-vbox. You will need the following in your mailcap to hear
# the message:
# audio/x-vbox; /usr/local/vbox/bin/vboxplay '%s'
# 
# With some small adjustments (see commented out parts) it should be
# easy to convert the sound to ULAW or WAV format and create an
# audio/ulaw or audio/wav MIME type.
#
##########################################################################
#
#   Copyright (C) 1998-2001  Roland Rosenfeld <roland@spinnaker.de>
#
#   This program is free software; you can redistribute it and/or
#   modify it under the terms of the GNU General Public License as
#   published by the Free Software Foundation; either version 2 of
#   the License, or (at your option) any later version.
#
#   This program is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
#   General Public License for more details.
#
#   You should have received a copy of the GNU General Public License
#   along with this program; if not, write to the Free Software
#   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
##########################################################################

MSNAME="${1}"
CALLER="${2}"
CALLID="${3}"
MAILTO="${4}"

SENDMAIL=sendmail
VBOXMODE=vboxmode
VBOXTOAU=vboxtoau
MMENCODE=mimencode

umask 077

tmpdir=${TMPDIR-/tmp}/vboxmail.$$
mkdir $tmpdir || exit 1
trap "rm -rf $tmpdir; exit" 0 1 2 3 15
TMPMAIL=$tmpdir/message

BOUNDARY="vboxmail-`date +%s`-$$"

echo "Subject: New message from ${CALLER} (${CALLID})" > $TMPMAIL
echo "Mime-Version: 1.0" >> $TMPMAIL
echo "Content-Type: multipart/mixed; boundary=$BOUNDARY" >> $TMPMAIL
echo "" >> $TMPMAIL

echo "--$BOUNDARY" >> $TMPMAIL
echo "Content-Type: text/plain; charset=us-ascii" >> $TMPMAIL
echo "" >> $TMPMAIL
$VBOXMODE $MSNAME >> $TMPMAIL
echo "" >> $TMPMAIL

echo "--$BOUNDARY" >> $TMPMAIL
#echo "Content-Type: audio/ulaw" >> $TMPMAIL
echo "Content-Type: audio/x-vbox" >> $TMPMAIL
echo "Content-Transfer-Encoding: base64" >> $TMPMAIL
#echo "Content-Disposition: attachment; filename=\"vbox.au\"" >> $TMPMAIL
echo "Content-Disposition: attachment; filename=\"message.vbox\"" >> $TMPMAIL
echo "" >> $TMPMAIL

#$VBOXTOAU < $MSNAME | $MMENCODE -b >> $TMPMAIL
$MMENCODE -b $MSNAME >> $TMPMAIL

echo "" >> $TMPMAIL

echo "--$BOUNDARY--" >> $TMPMAIL

$SENDMAIL $MAILTO < $TMPMAIL

Reply to: