View previous topic :: View next topic |
Author |
Message |
MasquedAvenger Guru
Joined: 21 Aug 2003 Posts: 559 Location: Southern California
|
Posted: Fri May 21, 2004 3:03 am Post subject: program that can append message to email |
|
|
Hey everyone. I just found out that altermime doesn't perform the key operations I wanted it to do when it is reading from stdin. That was very dissapointing. I need therefore a program that I can call from procmail that will allow me to append a message to the bottom of an email message. For example:
--
Scanned by ClamAV: No Viruses Found
That sort of thing. Anyone that knows of anything please let me know
James |
|
Back to top |
|
|
adaptr Watchman
Joined: 06 Oct 2002 Posts: 6730 Location: Rotterdam, Netherlands
|
Posted: Fri May 21, 2004 12:33 pm Post subject: |
|
|
Well - an email is a simple text file, yes ?
With clearly-defined delimiters for attachements.
So you could write a one-line perl script[1] to look for the end of the text message and insert your own text there, then copy everything out to stdout again.
Procmail should do fine.
[1] Okay, so maybe it's 3 lines... _________________ >>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen |
|
Back to top |
|
|
MasquedAvenger Guru
Joined: 21 Aug 2003 Posts: 559 Location: Southern California
|
Posted: Fri May 21, 2004 3:51 pm Post subject: |
|
|
Very true. Although since I know absolutely nothing about perl, that would be really tough for me to do I guess maybe it's time for me to learn something new...
James |
|
Back to top |
|
|
adaptr Watchman
Joined: 06 Oct 2002 Posts: 6730 Location: Rotterdam, Netherlands
|
Posted: Sat May 22, 2004 10:43 pm Post subject: |
|
|
*Basic* perl isn't that difficult - really, rather like Pascal or something.
I could probably knock up a one-liner for everyday jobs myself.
Advanced (and therefore useful) perl is another matter...
Imagine an advanced programming language, like C++ - got it ?
Okay, now throw out any sort of type definition, your basic precedence rules and whatever internal logic you're used to, and take a hit or two of some really good acid.
THAT's perl
But I'm sure you can scrounge something like this from one of the many excellent scripting forums on the net. _________________ >>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen |
|
Back to top |
|
|
|