MailWatch Query

Steen, Glenn Glenn.Steen at AP1.SE
Mon Feb 7 11:35:20 GMT 2005


As said in the MW-list, you can change detail.php for pears
Mail::factory so that you pass an array of settings... and only set
the host.
With my changes you can have a line
define(QUARANTINE_MAIL_HOST, 'mail.example.com');
in conf.php, where you set the relevant name for your servers IF.

The relevant diff looks like this:
--- detail.php.old      2004-02-03 01:16:29.000000000 +0100
+++ detail.php  2005-02-07 12:34:42.024702556 +0100
@@ -259,9 +259,11 @@
      $mime->addAttachment($quarantined[$val]['path'],
$quarantined[$val]['type'
], $quarantined[$val]['file'], true);
     }
    }
+   // Fix by Glenn Steen, to set an arbitrary smtp host
+   $mail_param = array('localhost' => QUARANTINE_MAIL_HOST);
    $body = $mime->get();
    $hdrs = $mime->headers($hdrs);
-   $mail =& Mail::factory('smtp');
+   $mail =& Mail::factory('smtp',$mail_param);
    // Send to the original recipient(s) or to an alternate address
    if(($_GET['alt_recpt_yn'] == "y")) {
     $to = $_GET['alt_recpt'];

Cheers
-- Glenn
> -----Original Message-----
> From: MailScanner mailing list 
> [mailto:MAILSCANNER at JISCMAIL.AC.UK] On Behalf Of Carinus Carelse
> Sent: den 7 februari 2005 10:34
> To: MAILSCANNER at JISCMAIL.AC.UK
> Subject: MailWatch Query
> 
> 
> I do not want to release my quaratine messages from the 
> localhost where
> can I point MailWatch to the real interface address.
> 
> Warning: fsockopen(): unable to connect to 127.0.0.1:25 in
> /mailwatch/mailscanner2/pear/Net/Socket.php on line 108
> 
> 
> Carinus
> 
> ------------------------ MailScanner list ------------------------
> To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
> 'leave mailscanner' in the body of the email.
> Before posting, read the MAQ (http://www.mailscanner.biz/maq/) and
> the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).
> 
> Support MailScanner development - buy the book off the website!
> 

------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
'leave mailscanner' in the body of the email.
Before posting, read the MAQ (http://www.mailscanner.biz/maq/) and
the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).

Support MailScanner development - buy the book off the website!




More information about the MailScanner mailing list