File: VIRTUALS

package info (click to toggle)
solid-pop3d 0.15-21
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 884 kB
  • ctags: 448
  • sloc: ansic: 6,085; sh: 4,682; makefile: 527
file content (72 lines) | stat: -rw-r--r-- 2,211 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
There are 2 types of virtual hosting implemented in this server:

    - IP based virtual hosting: read spop3d(5).conf manual for details.
    - non-IP based virtual hosting: user is logged as username@host.name.com
      or username%host.name.com if POP3 client doesn't allow to use '@'
      in username. host.name.com is called "virtual domain name".


Virtual hosting is available only if you support for configuration file
is compiled in (./configure --enable-configfile). If you want to have support
for non-IP based virtual hosting, run ./configure with --enable-nonip option.


Configuration file is parsed before authentication state (VirtualHosts blocks
with right IP address are parsed). If in authentication state user specifies
virtual domain name (username%host.name.com) and non-IP based virtual hosting
is allowed (AllowNonIP option), configuration is parsed second 
time (VirtualHosts blocks with right virtual domain name are parsed too).




User names mapping:

User names mapping file contains username:maptousername pairs.
Each pair in separate line. Example (stupid):

jurek:jurekb
balamut:jurekb
ktostam:jakis

You can enable user names mapping through DoMapping option.
You can use user name and mapped user name in MailDropName option (and others
too). Example (non-IP and based virtual hosting, user names mapping):



/usr/local/etc/spop3d.conf:



<Global>
	AllowNonIP	true
</Global>

<VirtualHost 192.168.1.1 jakis.tam.host.w.pl>
	MailDropName	/var/mail/%m-%s
	MailDropType	mailbox
	AllowNonIP	false
	DoMapping	true
	MapUserFile	/usr/local/etc/pop3/mapped.users
</VirtualHost>


/usr/local/etc/pop3/mapped.users:


jurek:jurekb
balamut:jurekb
ktostam:jakis


If you are connected to 192.168.1.1, you can't use non-IP based virtual hosting
(AllowNonIP false), but if you are connected to other adress, you can
specify virtual domain name. For example: if you log in as
balamut%jakis.tam.host.w.pl, maildrop name will be /var/mail/jurekb-balamut
If you connect to 192.168.1.1, and log in as balamut, maildrop name will be
/var/mail/jurekb-balamut too.


Some options (APOPServerName) have no effect in non-IP based virtual hosting,
because they are parsed after authentication state.