Linux.com

alexis.wood

alexis.wood

  • Linux.com Member
  • Posts: 1
  • Member Since: 17 Jan 11
  • Last Logged In: 01 Mar 11

Latest Posts

Posted by
Topic
Post Preview
Posted
  • alexis.wood
    Sendmail scripting - amending subjects of emails
    Hi, I am using a .pl script with sendmail to complete the task: [i]Copy inbound mail to disk for parsing into DB system[/i] before forwarding onto a different recipient address... [code] #!/usr/bin/perl use strict; use warnings; open(OUTFILE, ">/maildump/" . $ARGV[0] . "/message" . "$$" . "$^T" . int(rand(100)) . ".eml"); while () { print OUTFILE; } close(OUTFILE);[/code] What I would like to do is to amend the subject lines for emails being delivered into Sendmail from external sources/mail servers. For the amended subjects I want to prefix them with "LM:".. example... Original Subject = Hello World, New subject = LM: Hello World. Anyone have any ideas?
    Link to this post 18 Jan 11

    Hi,

    I am using a .pl script with sendmail to complete the task: Copy inbound mail to disk for parsing into DB system before forwarding onto a different recipient address...

    	#!/usr/bin/perl

    use strict;
    use warnings;

    open(OUTFILE, ">/maildump/" . $ARGV[0] . "/message" . "$$" . "$^T" . int(rand(100)) . ".eml");

    while (<STDIN>) {
    print OUTFILE;
    }

    close(OUTFILE);

    What I would like to do is to amend the subject lines for emails being delivered into Sendmail from external sources/mail servers.

    For the amended subjects I want to prefix them with "LM:".. example... Original Subject = Hello World, New subject = LM: Hello World.

    Anyone have any ideas?

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board