Thread View: news.software.readers
7 messages
7 total messages
Started by Louis-David Mitterrand
Sun, 24 Nov 1996 00:00
Sharing mail aliases between slrn and a mailer
Author: Louis-David Mitterrand
Date: Sun, 24 Nov 1996 00:00
Date: Sun, 24 Nov 1996 00:00
21 lines
1042 bytes
1042 bytes
Hi,
I'm using slrn which is a great program. Often I am forwarding funny (or
discusting) articles to friends (or family) and I have to enter their
full email even if an alias is already defined in my mail config file.
Is there a way to make slrn aware of these aliases and/or easily insert
them from a menu?
Thanks.
--
Louis-David Mitterrand
(Formula 1): http://www.zoom.com/mito/
(Java page): http://www.zoom.com/mito/quote/
mito@sprynet.com
Re: Sharing mail aliases between slrn and a mailer
Author: Sven Guckes
Date: Sun, 24 Nov 1996 00:00
Date: Sun, 24 Nov 1996 00:00
57 lines
2588 bytes
2588 bytes
mito@retriever.qc (Louis-David Mitterrand): > I'm using slrn which is a great program. Often I am forwarding funny (or > discusting) articles to friends (or family) and I have to enter their > full email even if an alias is already defined in my mail config file. > Is there a way to make slrn aware of these aliases and/or easily insert > them from a menu? I don't think that SLRN supports mail aliases yet. So here's what I do: My aliases are defined with my mailer ELM which ships with the "elmalias", a utility that extracts aliases from the "database" and allows for formatting the output. So I can easily call elmalias from my editor, vim, using the following macros in my vimrc (http://www.math.fu-berlin.de/~guckes/vim/vimrc): " Part 8 - News: Insert Adresses for To: and Cc: lines " " ,ca = check alias (reads in expansion of alias name) map ,ca :r!elmalias -f "\%v (\%n)" " ,Ca = check alias (reads in expansion of alias name) map ,Ca :r!elmalias -f "\%n <\%v>" So when I use ",ca" I get this on the command line: :r!elmalias -f "\%v (\%n)" Then I only need to supply the alias name: :r!elmalias -f "\%v (\%n)" slrn And in return I get this: davis@space.mit.edu (John E. Davis) I remember that SLRN once did not like the "address (NAME)" form, but worked well with the other address form, "NAME <address>". That's why there is ",Ca" - it gives you the other form, eg: John E. Davis <davis@space.mit.edu> Ta-dah! I am sure that if you have elmalias on your system that you can easily use it from another editor, too. Sven -- Sven Guckes guckes@math.fu-berlin.de using SLRN 0.9.0.0 [released 960903] SLRN Pages: http://www.math.fu-berlin.de/~guckes/slrn/ latest SLRN Author: John E. Davis http://space.mit.edu/~davis/slrn.html version: SLRN Manual on WWW: http://www.wp.com/TNTCONSULTING/slrn.html 0.9.1.1 [961022]
Re: Sharing mail aliases between slrn and a mailer
Author: Randall Hopper
Date: Mon, 25 Nov 1996 00:00
Date: Mon, 25 Nov 1996 00:00
77 lines
2989 bytes
2989 bytes
Louis-David Mitterrand <mito@retriever.qc> wrote:
|I'm using slrn which is a great program. Often I am forwarding funny (or
|discusting) articles to friends (or family) and I have to enter their
|full email even if an alias is already defined in my mail config file.
|
|Is there a way to make slrn aware of these aliases and/or easily insert
|them from a menu?
I had the same request, and it was suggested to me that I write a
script and hang it off sendmail_command. I did that, so here it is in the
hopes it may help. Note that this resolves ELM aliases. Assuming you use
ELM, you'll want to change the paths at the top of the script.
...would be a lot nicer if slrn supported an alias file though.
(Maybe it does by now. It's been a few weeks since I pulled the latest
version).
Randall Hopper
rhh@ct.picker.com
set sendmail_command "/net/elmer.ct/client/rhh/.slrn/slrn-mailagent"
#!/opt/bin/perl
#
# SCRIPT : slrn-mailagent
# PURPOSE: SLRN sendmail_command utility emulating the sendmail
# interface, but which in addition handles ELM alias expansion
# of the To: and Cc: lines
# AUTHOR : Randall Hopper (10/14/96)
#
$ELMALIAS = "/opt/elm/bin/elmalias";
$PRLONG = "/opt/elm/lib/prlong";
$SENDMAIL = "/usr/lib/sendmail -oi -t -oem -odb";
open ( STDOUT, "| $SENDMAIL" ) || die "Can't open pipe to mail agent\n";
while (<>) {
if ( /^(To|Cc): (.*)/ ) {
$header = $1;
@recip = split(', *', $2);
$line = $_;
$pid = open( OUT, "-|" );
die "Failed to fork to run elmalias subprocess\n" if ( !defined($pid) );
exec $ELMALIAS, '-ne', @recip if ( $pid == 0 );
wait();
die "elmalias failed: status = $?\n" if ( $? != 0 );
@recip = <OUT>;
close(OUT);
@recip = map( (chomp( $_ ) ? $_ : $_), @recip );
$recip = join( ",", @recip );
system( "echo \"$recip\" | tr , '\012' | $PRLONG -1 \"$header: \" -f ', ' -w 75" );
}
else {
print $_;
}
}
close( STDOUT );
exit 0
--
_____________________________________________________________________________
Randall Hopper (AA8VB) | Picker International, CT Visualization
rhh@ct.picker.com | FAX: (216) 473-7098
*** WINDOWS, from the folks who brought you EDLIN ***
Re: Sharing mail aliases between slrn and a mailer
Author: Vikas Agnihotri
Date: Mon, 25 Nov 1996 00:00
Date: Mon, 25 Nov 1996 00:00
15 lines
1307 bytes
1307 bytes
On 24 Nov 1996 15:37:24 GMT, Sven Guckes <guckes@banach.math.fu-berlin.de> wrote: [You wrote ] [You wrote ] My aliases are defined with my mailer ELM which ships with the "elmalias", [You wrote ] a utility that extracts aliases from the "database" and allows for formatting [You wrote ] the output. So I can easily call elmalias from my editor, vim, using the [You wrote ] following macros in my vimrc (http://www.math.fu-berlin.de/~guckes/vim/vimrc): How about if (gulp) I use Pine instead of ELM? Please.. please..tell me that it is not hopeless :) I knew this day would come. --Vikas
Re: Sharing mail aliases between slrn and a mailer
Author: Even Holen
Date: Tue, 26 Nov 1996 00:00
Date: Tue, 26 Nov 1996 00:00
26 lines
1753 bytes
1753 bytes
In article <slrn59j28l.go4.vikas@joshua.insight.att.com>, Vikas Agnihotri wrote: [...] > How about if (gulp) I use Pine instead of ELM? Please.. please..tell >me that it is not hopeless :) I knew this day would come. > It seems like pine saves it addressbook in the file ~/.addressbook. This file is a tab-separated file, where the order of field is: nickname, Full name, mailaddress, Fcc and comment as last field. Note that Fcc and comments are _not_ required fields. Based on this information it should be a breeze to write a 'pinealias' which does the same as elmalias. I might write it myself someday, but not in the very near future. Good luck to you all the same... -- \\\|||/// \ Even Holen, Berg Presteg�rd, Jonsvannsvn 45, N-7016 Trondheim \\ ~ ~ // \ mailto:evenh@pvv.ntnu.no, Even.Holen@unimed.sintef.no | @ @ | \ www: http://www.stud.ntnu.no/~evenh/ oOo (_) oOo \ 'Christians are not perfect they are forgiven'
Re: Sharing mail aliases between slrn and a mailer
Author: John E. Davis
Date: Tue, 26 Nov 1996 00:00
Date: Tue, 26 Nov 1996 00:00
21 lines
1625 bytes
1625 bytes
On 26 Nov 1996 16:59:56 GMT, Sven Guckes <guckes@banach.math.fu-berlin.de> wrote: >rhh@ct.picker.com (Randall Hopper): >> ...would be a lot nicer if slrn supported an alias file though. (Maybe it >> does by now. It's been a few weeks since I pulled the latest version). > >I don't think that we need yet another program to have code for alias support. >Actually, what we want is a standalone alias utility a la "elmalias". >Unfortunately, noone has come up with such a thing yet. I agree. For that reason I have no intentions of putting in code that will parse an elm or .mailrc alias file. If there were only one standard alias file format, I would probably add support for that. Unfortunately, there appears to be no standard. -- John E. Davis Center for Space Research/AXAF Science Center 617-258-8119 MIT 37-662c, Cambridge, MA 02139 http://space.mit.edu/~davis
Re: Sharing mail aliases between slrn and a mailer
Author: Sven Guckes
Date: Tue, 26 Nov 1996 00:00
Date: Tue, 26 Nov 1996 00:00
13 lines
1105 bytes
1105 bytes
rhh@ct.picker.com (Randall Hopper): > ...would be a lot nicer if slrn supported an alias file though. (Maybe it > does by now. It's been a few weeks since I pulled the latest version). I don't think that we need yet another program to have code for alias support. Actually, what we want is a standalone alias utility a la "elmalias". Unfortunately, noone has come up with such a thing yet. Sven
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads