OSDN Git Service

Fix no pic
[uclinux-h8/uClinux-dist.git] / user / pop3proxy / acp.pop3
1 #!/bin/akanga -p
2 #
3 # Sample access control program for pop3.proxy
4 #
5
6 #
7 # Simply allow connections from outside.
8 #
9 if (~ $PROXY_INTERFACE 140.77.194.1)
10         exit 0
11
12 #
13 # Important users have the IP numbers 192.168.1.10,11,45, allow them.
14 #
15 if (~ $PROXY_CLIENT *.10 *.11 *.45)
16         exit 0
17
18 #
19 # Get the current hour.
20 #
21 now = `{ date +'%H' }
22
23 if (~ $PROXY_SERVER *.yahoo.com *.hotmail.*) {
24         #
25         # Private usage, restriced to lunch breaks from 12:00 to 13:00.
26         #
27         if (! ~ $now 12) {
28                 echo -ERR try later again
29                 echo private usage: $PROXY_SERVER >[1=2]
30                 exit 1
31                 }
32         }
33
34 #
35 # For some reason the outgoing POP3 proxy is only available during working
36 # hours.
37 #
38 if (! ~ $now 08 09 10 11 12 13 14 15 16 17 18) {
39         echo -ERR server not available
40         echo out of time window >[1=2]
41         exit 1
42         }
43
44 exit 0
45