Sendmail calling a script on inbound mail



First of all I will apologise to those who believe this mail is misplaced in a
Sun admin group - but it may be related.
I am trying to get sendmail to call a Perl script. To do this I have ...

1. modified /etc/aliases with: testUser: "|/usr/local/bin/mailHandler"
2. run newaliases
3. run /usr/lib/sendmail -bv testUser which returns...
"|/usr/local/bin/mailHandler"... deliverable: mailer prog, user
|/usr/local/bin/mailHandler
4. sent a mail using the Perl module Mail::Sendmail from the host to itself.

------------ Mail::Sendmail script -----------------
#!/usr/bin/perl -w

sendMail();

sub sendMail {
use Mail::Sendmail;
my $mail;
$mail{To} = 'testUser@xxxxxxxxxxxxxx';
$mail{From} = 'root@xxxxxxxxxxxxxx';
$mail{Smtp} = '<10.24.2.1>';
$mail{Subject} = "TEST";
$mail{Message} = "TEST";
sendmail %mail;
}
-----------------------------------------------------

My questions are...
- Will it cause an issue if the box isn't part of a domain?
- How the hell do I get it to work?

I assume I would send the mail to testUser@localhost. As I'm not using a
domain, is that correct?
I have queried google but not found any useful docs on how to achieve it and
what to do with the numerous error messages sent to the root account like ...

The original message was received at Mon, 6 Mar 2006 16:38:57 GMT
from mymailserver [10.24.2.1]

----- The following addresses had permanent fatal errors -----
<testUser@xxxxxxxxxxxxxx>

----- Transcript of session follows -----
550 5.1.2 <testUser@xxxxxxxxxxxxxx>... Host unknown (Name server:
telindus.co.uk: host not found)

Any help would be much appreciated

Thanks

Andy

Visit Telindus Access Products & Surveillance Solutions at Cebit 2006, Hall
13, Booth 34, 9-15 March 2006.
Discover Telindus' range of access & surveillance products in a live "voice
and video over DSL" demo and collect the new catalogue 2006-2007. See you in
Hannover!

This e-mail is private and may be confidential and is for the intended
recipient only. If misdirected, please notify us by telephone and confirm
that it has been deleted from your system and any copies destroyed. If you
are not the intended recipient you are strictly prohibited from using,
printing, copying, distributing or disseminating this e-mail or any
information contained in it. We use reasonable endeavours to virus scan all
e-mails leaving the Company but no warranty is given that this e-mail and any
attachments are virus free. You should undertake your own virus checking.
The right to monitor e-mail communications through our network is reserved by
us.
_______________________________________________
sunmanagers mailing list
sunmanagers@xxxxxxxxxxxxxxx
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



Relevant Pages

  • Weird Email Tracking: Possible Virus, Possibly SPAM?
    ... The weird part is she never sent an email out to the intended recipient. ... The e-mail account does not exist at the organization this message was sent to. ... No recent entries indicating virus activity scanning her Outlook addressbook nor auto-propagating hidden emails. ... If not from the user's mailbox, then how does it even register in Message Tracking? ...
    (microsoft.public.exchange.admin)
  • SunSolve
    ... Is the online Sunsolve System Handbook available on cdrom / searchable ... This message is for the intended recipient only. ... We may monitor all Email communication through our ... We take reasonable precautions to ensure our Emails are virus free. ...
    (SunManagers)
  • ld.so.1 false inking errors
    ... This is free software; see the source for copying conditions. ... are not the intended recipient you are strictly prohibited from using, ... We use reasonable endeavours to virus scan all ... e-mails leaving the Company but no warranty is given that this e-mail and any ...
    (SunManagers)
  • process not responding and not able to kill -9!!
    ... PID TSUPRILIM TSUPRI ... I'm not sure If I raised its scheduling priority it would respond to the ... are not the intended recipient you are strictly prohibited from using, ... We use reasonable endeavours to virus scan all ...
    (SunManagers)