How to send pager message to another email
First, thanks for support
Second, If it's intresting for somebody - there is solution
assuming that domain is somename.com
- create email box
[email protected]
- put the next string in the /etc/valiases/somename.com file
me
[email protected]: &| /home/somename/pager.php&
pager.php looks like
#!/usr/bin/php -q
&&??
?
$fp1=fopen(&/home/somename/pager.log&,&a&

;
fputs($fp1,&Loaded\n&

;
$fp = fopen(&php://stdin&,&r&

;
$s = &&;
while( substr($s,0,1)!=&\n& && !feof($fp) )
{
$s=fgets($fp,160);
}
$mess=&&;
while(!feof($fp))
{
$s=fgets($fp,160);
$mess.=$s;
}
fputs($fp1,$mess);
fclose($fp);
if (strlen($mess)&0)
{
if ( mail(&
[email protected]&,&123456&,$mess,&From:
[email protected]\nReply-To:
[email protected]&

)
fputs($fp1,&\nSended\n&

;
}
fclose($fp1);
?&