Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
program that can append message to email
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
MasquedAvenger
Guru
Guru


Joined: 21 Aug 2003
Posts: 559
Location: Southern California

PostPosted: Fri May 21, 2004 3:03 am    Post subject: program that can append message to email Reply with quote

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
View user's profile Send private message
adaptr
Watchman
Watchman


Joined: 06 Oct 2002
Posts: 6730
Location: Rotterdam, Netherlands

PostPosted: Fri May 21, 2004 12:33 pm    Post subject: Reply with quote

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
View user's profile Send private message
MasquedAvenger
Guru
Guru


Joined: 21 Aug 2003
Posts: 559
Location: Southern California

PostPosted: Fri May 21, 2004 3:51 pm    Post subject: Reply with quote

Very true. Although since I know absolutely nothing about perl, that would be really tough for me to do :-P I guess maybe it's time for me to learn something new...

James
Back to top
View user's profile Send private message
adaptr
Watchman
Watchman


Joined: 06 Oct 2002
Posts: 6730
Location: Rotterdam, Netherlands

PostPosted: Sat May 22, 2004 10:43 pm    Post subject: Reply with quote

*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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum