include_once dirname(__FILE__) . '/framework/class.unix.inc'; include_once dirname(__FILE__) . '/ressources/class.smtp.sockets.inc'; define('EX_TEMPFAIL', 75); define('EX_UNAVAILABLE', 69); define(RM_STATE_READING_HEADER, 1); define(RM_STATE_READING_FROM, 2); define(RM_STATE_READING_SUBJECT, 3); define(RM_STATE_READING_SENDER, 4); define(RM_STATE_READING_BODY, 5); $GLOBALS["ROUTER-MODE"] = false; if (preg_match("#--verbose#", implode(" ", $argv))) { $GLOBALS["VERBOSE"] = true; echo "verbose=true;\n"; } if ($argv[1] == '--disclaimer-domain') { CheckDisclaimerTest($argv[2]); die; } if ($argv[1] == '--disclaimer-uid') { CheckDisclaimerTestUid($argv[2]); die; } if ($argv[1] == '--vacation-uid') { CheckOutOfOffice($argv[2], $argv[3]); die; } if ($GLOBALS["VERBOSE"]) { events("receive: " . implode(" ", $argv), "main", __LINE__); } $options = parse_args(array('s', 'r', 'c', 'h', 'u', 'i', 'z'), $_SERVER['argv']); //getopt("s:r:c:h:u:");
include_once(dirname(__FILE__).'/ressources/class.domains.diclaimers.inc'); include_once(dirname(__FILE__).'/ressources/class.mail.inc'); include_once(dirname(__FILE__).'/ressources/class.mysql.inc'); include_once(dirname(__FILE__).'/framework/class.unix.inc'); include_once(dirname(__FILE__).'/ressources/class.smtp.sockets.inc'); define( 'EX_TEMPFAIL', 75 ); define( 'EX_UNAVAILABLE', 69 ); define( RM_STATE_READING_HEADER, 1 ); define( RM_STATE_READING_FROM, 2 ); define( RM_STATE_READING_SUBJECT,3 ); define( RM_STATE_READING_SENDER, 4 ); define( RM_STATE_READING_BODY, 5 ); $GLOBALS["ROUTER-MODE"]=false; if(preg_match("#--verbose#",implode(" ",$argv))){$GLOBALS["VERBOSE"]=true;echo "verbose=true;\n";} if($argv[1]=='--disclaimer-domain'){CheckDisclaimerTest($argv[2]);die();} if($argv[1]=='--disclaimer-uid'){CheckDisclaimerTestUid($argv[2]);die();} if($argv[1]=='--vacation-uid'){CheckOutOfOffice($argv[2],$argv[3]);die();} if($GLOBALS["VERBOSE"]){events("receive: " . implode(" ",$argv),"main",__LINE__);} $options = parse_args( array( 's', 'r', 'c', 'h', 'u','i','z' ), $_SERVER['argv']); //getopt("s:r:c:h:u:"); if (!array_key_exists('r', $options) || !array_key_exists('s', $options)) { fwrite(STDOUT, "Usage is $argv[0] -s sender@domain -r recip@domain\n"); exit(EX_TEMPFAIL); } $tmpfname = tempnam( "/var/lib/artica/mail/filter", 'IN.' );