This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
QUEUEID (?:[A-F0-9]+|NOQUEUE) | |
EMAILADDRESSPART [a-zA-Z0-9_.+-=:]+ | |
EMAILADDRESS %{EMAILADDRESSPART:local}@%{EMAILADDRESSPART:remote} | |
RELAY (?:%{HOSTNAME:relayhost}(?:\[%{IP:relayip}\](?::%{POSREAL:relayport})?)?) | |
POSREAL [0-9]+(.[0-9]+)? | |
DELAYS %{POSREAL:a}/%{POSREAL:b}/%{POSREAL:c}/%{POSREAL:d} | |
DSN %{POSINT}.%{POSINT}.%{POSINT} | |
STATUS sent|deferred|bounced|expired | |
PERMERROR 5[0-9]{2} | |
MESSAGELEVEL reject|warning|error|fatal|panic |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//if $fork is true, each time daemon got a job, fork a child to handle it | |
$fork = true; | |
$redis = init_redis(); | |
while (true) //loops infinitely | |
{ | |
echo "start loop @ " . date("H:i:s" ,time()) . "\n"; | |
$job = $redis->lPop("queue"); |