-
Notifications
You must be signed in to change notification settings - Fork 6
/
Readme.txt
4412 lines (2968 loc) · 133 KB
/
Readme.txt
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
NAME
XMail - Internet/Intranet mail server.
[top]
LICENSE
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation (<http://www.gnu.org>); either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
[top]
OVERVIEW
XMail is an Internet and Intranet mail server featuring an SMTP server,
POP3 server, finger server, multiple domains, no need for users to have
a real system account, SMTP relay checking, RBL/RSS/ORBS/DUL and custom
(IP based and address based) spam protection, SMTP authentication (PLAIN
LOGIN CRAM-MD5 POP3-before-SMTP and custom), a POP3 account synchronizer
with external POP3 accounts, account aliases, domain aliases, custom
mail processing, direct mail files delivery, custom mail filters,
mailing lists, remote administration, custom mail exchangers, logging,
and multi-platform code.
XMail sources compile under GNU/Linux, FreeBSD, OpenBSD, NetBSD, OSX,
Solaris and NT/2K.
This server was born due to the need of having a free and stable Mail
Server to be used inside my old company, which used a Windows Network. I
don't like to reinvent the wheel but the need of some special features
drive me to start a new project. Probably if I could use a Linux server
on my net, I would be able to satisfy my needs without writing code, but
this is not the case. It should be also portable to other OSs, like
Linux and other Unixes.
Another reason that drove me to write XMail is the presence of the same
steps in setting up a typical mail server, i.e.:
sendmail + qpopper + fetchmail
if one needs SMTP, POP3 and external synchronization, or:
sendmail + qpopper
for only SMTP and POP3 (I've quoted sendmail, qpopper and fetchmail, but
there are many other packages you can use to reach these needs). With
XMail you get an all-in-one package with a central administration that
can simplify the above common steps.
The first code of XMail Server is started on Windows NT and Linux, and
now, the FreeBSD and Solaris version ready. The compilers supported are
gcc for Linux, FreeBSD, OpenBSD and Solaris and M$ Visual C++ for NT/2K.
[top]
VERSION
current
1.26
release type
Gnu Public License <http://www.gnu.org>
release date
Jan 4, 2008
project by
Davide Libenzi <davidel@xmailserver.org> <http://www.xmailserver.org/>
credits
Michael Hartle <mhartle@hartle-klug.com>
Shawn Anderson <sanderson@eye-catcher.com>
Dick van der Kaaden <dick@netrex.nl>
Beau E, Cox <beau@beaucox.com>
warning
************************************************************
* <<WARNING>> *
* If you're upgrading an existing version of XMail it's *
* strongly suggested that you read all the ChangeLog *
* notes that range from existing version to the new one. *
************************************************************
[top]
DOCUMENTATION CONVENTIONS
This document contains various examples of entries you must make to the
XMail configuration tables. These examples are written in a
mono-spaced font like this.
The prototype statement is shown with explicit '[TAB]' and '[NEWLINE]'
characters:
"aliasdomain"[TAB]"realdomain"[NEWLINE]
while examples omit these characters:
"simpson.org" "simpson.com"
"*.homer.net" "homer.net"
'YOU MUST ALWAYS ENTER THE DATA EXACTLY AS SHOWN IN THE PROTOTYPE.'
When a prototype or example statement is too long to be easily shown on
the screen or printed, the line is split into multiple lines by showing
'=>' at the end of continued lines and indenting the continuation
line(s):
"domain"[TAB]"account"[TAB]"enc-passwd"[TAB]"account-id"[TAB]"account-dir"[TAB]=>
"account-type"[NEWLINE]
'DO NOT ENTER THE => CHARACTERS. ENTER THE ENTIRE ENTRY AS ONE LINE.'
[top]
FEATURES
* ESMTP/ESMTPS server
* POP3/POP3S server
* Finger server
* Multiple domains
* Users don't need a real system account
* SMTP relay checking
* Custom SMTP maps check
* SMTP protection over spammers (IP based and address based)
* SMTP authentication (PLAIN LOGIN CRAM-MD5 POP3/SMTP and custom)
* SMTP ETRN command support
* POP3 account synchronizer with external POP3 accounts
* Account aliasing
* Domain aliasing
* Mailing lists
* Custom mail processing
* Locally generated mail files delivery
* Remote administration
* Custom mail exchangers
* Logging
* Multi platform (any Windows and almost any Unix OSs)
* Fine grained message filters
* Custom (external) POP3/SMTP authentication
* TLS support for SMTP and POP3, both server and client side
[top]
PORTING STATUS
Right now the Linux and NT ports are stable, while the Solaris, FreeBSD,
OpenBSD and OSX ones have not been tested as well as the previous OSs.
[top]
REQUIREMENTS
* Any version of Linux that has glibc.
* Windows NT with ws2_32.dll correctly installed.
* A working DNS and gateway to the Internet (if you plan to use it).
* To build from source for Linux you need any version of gcc and glibc
installed.
* To build from source for Windows you need MS Visual C++ (makefile
included).
* -or- any other working compiler that provides support for the Win32
SDK.
[top]
OBTAINING THE SOURCE
Always get the latest sources at the XMail home page
<http://www.xmailserver.org/> because otherwise you may be using an old
version.
Use the correct distribution for your system and don't mix Unix files
with Windows ones because this is one of the most common cause of XMail
bad behavior.
When you unzip (or untar) the package you've to check that the MailRoot
directory contained inside the package itself is complete (look at the
directory tree listed below) because some unzippers don't restore empty
directories.
[top]
BUILD
XMail depends on OpenSSL to provide SSL support, so the development
package of OpenSSL (in Debian called libssl-dev) must be installed on
your system. For Windows, the XMail source already contains a pre-built
version of the OpenSSL libraries, include files, and executable. The
OpenSSL web site can be found here <http://www.openssl.org>.
[Windows]
You have to have the command line environment setup before (usually the vcvars32.bat
script inside the Visual C++ directory). You also need to copy the openSSL DLLs
(located in "win32ssl\dll") inside the same folder where the XMail.exe binary resides.
C:> nmake /f Makefile.win
If once you run the XMail binaries, Windows complains about missing DLLs, your system
is probably missing the Microsoft CRT redistributable package, that you can download
here L<http://www.xmailserver.org/vcredist_x86.exe>.
[Linux]
# make -f Makefile.lnx
[FreeBSD]
# setenv OSTYPE FreeBSD
# gmake -f Makefile.bsd
or (depending on the shell):
# OSTYPE=FreeBSD gmake -f Makefile.bsd
[OpenBSD]
# setenv OSTYPE OpenBSD
# gmake -f Makefile.bsd
or (depending on the shell):
# OSTYPE=OpenBSD gmake -f Makefile.bsd
[NetBSD]
# setenv OSTYPE NetBSD
# gmake -f Makefile.bsd
or (depending on the shell):
# OSTYPE=NetBSD gmake -f Makefile.bsd
[OSX]
# OSTYPE=Darwin make -f Makefile.bsd
or (depending on the shell):
# setenv OSTYPE Darwin
# make -f Makefile.bsd
[Solaris]
# make -f Makefile.sso
Under Linux an init.d startup script is supplied (xmail) to allow you to
run XMail as a standard rc? daemon. You must put it into /etc/init.d (it
depends on which distro you're using) directory and then create K??xmail
- S??xmail links into the proper directories.
Under Windows NT/2000/XP the XMail's executable is a Win32 service by
default and if you want to have it built like a standard executable
you've to comment the statement:
"#define SERVICE" in MainWin.cpp
When it's built as a service (default) you can run:
XMail --install
to install XMail as a manual startup service or:
XMail --install-auto
to install XMail as an automatic startup service.
If you run '--install' and you want XMail to run at NT boot, you must go
in ControlPanel->Services and edit the startup options of XMail. Once
you have the service version of XMail you can run it in a 'normal' way
by executing:
XMail --debug [options]
[top]
CONFIGURATION
Linux/Solaris/FreeBSD/OpenBSD
1. Build XMail.
2. Log as root.
3. Copy the supplied MailRoot directory where you want it to reside
(normally /var).
4. Do a # chmod 700 /var/MailRoot to setup MailRoot directory access
rights.
5. Strip XMail executables if you want to reduce their sizes (strip
filename).
6. Copy XMail executables to /var/MailRoot/bin.
7. If you have 'inetd' installed, comment out the lines of
'/etc/inetd.conf' that involve SMTP, POP3, and Finger. Restart
'inetd' (kill -HUP ...).
8. Since XMail uses syslog to log messages, enable syslogd if it's not
running.
9. Setup the 'SERVER.TAB' configuration file (after reading the rest of
this document well).
10. Add your users and domains (after reading the rest of this document
well).
11. Change or comment out (#) the example account in 'ctrlaccounts.tab'
by using a non-trivial username and password.
12. Copy the xmail startup script to your init.d directory (it's
position depends on your distro). If you've setup XMail to work in a
subdirectory other than '/var/MailRoot' you must edit the xmail
startup script to customize its boot parameters.
13. Use the 'sysv_inst.sh' shell script (from root user) to create SysV
boot script - unless your distro has other tools to do this.
14. To start XMail without reboot you can run (from root):
/etc/rc.d/init.d/xmail start otherwise reboot your machine.
15. Setup the file 'smtprelay.tab' if you want to extend mail relaying
to IPs outside of the internet's private IP blocks (or you want to
deny even those - that comes enabled by default with XMail).
16 Look at [SSL CONFIGURATION] for information about how to create the
required 'server.key' and 'server.cert' files.
For further configuration options, please see the [COMMAND LINE]
section.
[configuration] [top]
NT/Win2K/XP
1. Build XMail.
2. Copy the supplied MailRoot directory where you want it to reside
(normally 'C:\MailRoot').
3. Setup the MailRoot directory (and subdirectories and file)
permissions to allow access only to System and Administrators. Doing
this you can run XMail as a console startup only if you're
Administrator (service startup as System).
4. Copy XMail executables to 'C:\MailRoot\bin'. Also copy the OpenSSL
DLLs located in "win32ssl\dll" to 'C:\MailRoot\bin'.
5. With 'regedit', create 'GNU' key inside
'HKEY_LOCAL_MACHINE\SOFTWARE\' and then 'XMail' key inside
'HKEY_LOCAL_MACHINE\SOFTWARE\GNU'.
6. Create a new string value named 'MAIL_ROOT' inside
'HKEY_LOCAL_MACHINE\SOFTWARE\GNU\XMail\' with value 'C:\MailRoot'.
7. Optionally create a new string value named 'MAIL_CMD_LINE' inside
'HKEY_LOCAL_MACHINE\SOFTWARE\GNU\XMail\' to store your command line
options (read well the rest of this document).
8. Open an NT console (command prompt).
9. Go inside 'C:\MailRoot\bin' and run: XMail --install for a manual
startup, or: XMail --install-auto for an automatic startup.
10. If you have other services that provide the same functionality as
XMail, that is SMTP, POP3, or Finger servers, you must stop these
services.
11. Setup the 'SERVER.TAB' configuration option after reading the rest
of this document well.
12. Add your users and domains (after reading to the rest of this
document well).
13. Setup file permissions of the 'C:\MailRoot' directory to grant
access only to 'SYSTEM' and 'Domain Admins'.
14. Change or comment out (#) the example account in ctrlaccounts.tab by
using a non-trivial username and password.
15. To start XMail without reboot you can go to: ControlPanel ->
Services -> XMail server and start the service, otherwise reboot
your machine.
16. Setup the file 'smtprelay.tab' if you want to extend mail relaying
to IPs outside of the internet's private IP blocks (or you want to
deny even those - that comes enabled by default with XMail).
17 Look at [SSL CONFIGURATION] for information about how to create the
required 'server.key' and 'server.cert' files.
For further configuration options, please see the [COMMAND LINE]
section.
[configuration] [top]
Environment variables
[MAIL_ROOT]
If you want to start XMail as a simple test you must setup an
environment variable MAIL_ROOT that points to the XMail Server root
directory.
Linux/etc.:
export MAIL_ROOT=/var/XMailRoot
Windows:
set MAIL_ROOT=C:\MailRoot
[MAIL_CMD_LINE]
Allows the user to specify extra command line parameters (they will
be appended to the ones specified in the command line).
[XMAIL_PID_DIR]
Allows the user to specify the PID directory (Unix only ports). The
specified directory must NOT have the final slash (/) appended to
the path.
[configuration] [top]
MailRoot structure
Mail root directory contain these files:
aliases.tab <file>
aliasdomain.tab <file>
domains.tab <file>
dnsroots <file>
extaliases.tab <file>
mailusers.tab <file>
message.id <file>
pop3links.tab <file>
server.tab <file>
server.cert <file>
server.key <file>
smtpgw.tab <file>
smtpfwd.tab <file>
smtprelay.tab <file>
smtpauth.tab <file>
smtpextauth.tab <file>
userdef.tab <file>
ctrlaccounts.tab <file>
spammers.tab <file>
spam-address.tab <file>
pop3.ipmap.tab <file>
smtp.ipmap.tab <file>
ctrl.ipmap.tab <file>
finger.ipmap.tab <file>
filters.in.tab <file>
filters.out.tab <file>
filters.post-rcpt.tab <file>
filters.pre-data.tab <file>
filters.post-data.tab <file>
smtp.ipprop.tab <file>
smtp.hnprop.tab <file>
and these directories:
bin <dir>
cmdaliases <dir>
tabindex <dir>
dnscache <dir>
mx <dir>
ns <dir>
custdomains <dir>
filters <dir>
logs <dir>
pop3locks <dir>
pop3linklocks <dir>
pop3links <dir>
spool <dir>
local <dir>
temp <dir>
0 <dir>
0 <dir>
mess <dir>
rsnd <dir>
info <dir>
temp <dir>
slog <dir>
lock <dir>
mprc <dir>
froz <dir>
...
...
userauth <dir>
pop3 <dir>
smtp <dir>
domains <dir>
msgsync <dir>
and for each domain DOMAIN handled a directory (inside domains):
DOMAIN <dir>
userdef.tab <file>
mailproc.tab <file> [ optional ]
inside of which reside, for each account ACCOUNT:
ACCOUNT <dir>
user.tab <file>
mlusers.tab <file> [ mailing list case ]
mailproc.tab <file> [ optional ]
pop3.ipmap.tab <file> [ optional ]
and
mailbox <dir>
for mailbox structure, while:
Maildir <dir>
tmp <dir>
new <dir>
cur <dir>
for Maildir structure. The msgsync directory is used to store UIDL lists
for PSYNC accounts that require leaving messages on the server. Inside
the msgsync other directories will be created with the name of the
remote server, directories that will store UIDL DB files.
[configuration] [top]
Configuration tables
TAB ('something.tab') files are text files (in the sense meant by the OS
in use: <CR><LF> for NT and <CR> for Linux) with this format:
"value1"[TAB]"value2"[TAB]...[NEWLINE]
The following sections explain each file's structure and use.
"ALIASES.TAB"
"ALIASDOMAIN.TAB"
"DOMAINS.TAB"
"DNSROOTS"
"EXTALIASES.TAB"
"MAILUSERS.TAB"
"MESSAGE.ID"
"POP3LINKS.TAB"
"SERVER.TAB"
"SMTPGW.TAB"
"SMTPFWD.TAB"
"SMTPRELAY.TAB"
"SMTPAUTH.TAB"
"SMTPEXTAUTH.TAB"
"USERDEF.TAB"
"CTRLACCOUNTS.TAB"
"SPAMMERS.TAB"
"SPAM-ADDRESS.TAB"
"POP3.IPMAP.TAB"
"SMTP.IPMAP.TAB"
"CTRL.IPMAP.TAB"
"FINGER.IPMAP.TAB"
"USER.TAB"
"MLUSERS.TAB"
"MAILPROC.TAB"
"SMTP.IPPROP.TAB"
"SMTP.HNPROP.TAB"
"FILTERS.IN.TAB"
"FILTERS.OUT.TAB"
"FILTERS.POST-RCPT.TAB"
"FILTERS.PRE-DATA.TAB"
"FILTERS.POST-DATA.TAB"
[configuration] [top]
ALIASES.TAB
"domain"[TAB]"alias"[TAB]"realaccount"[NEWLINE]
Example:
"home.bogus" "davidel" "dlibenzi"
define 'davidel' as alias for 'dlibenzi' in 'home.bogus' domain.
"home.bogus" "foo*bog" "homer@internal-domain.org"
define an alias for all users whose name starts with 'foo' and ends with
'bog' that points to the locally handled account
'homer@internal-domain.org'.
"home.bogus" "??trips" "travels"
define an alias for all users whose names start with any two chars and
end with 'trips'. You can even have wildcards in the domain field, as:
"*" "postmaster" "postmaster@domain.net"
You 'CANNOT' edit this file while XMail is running because it is an
indexed file.
[table index] [configuration] [top]
ALIASDOMAIN.TAB
"aliasdomain"[TAB]"realdomain"[NEWLINE]
where 'aliasdomain' can use wildcards:
"simpson.org" "simpson.com"
"*.homer.net" "homer.net"
The first line defines 'simpson.org' as an alias of 'simpson.com' while
the second remaps all subdomains of 'homer.net' to 'homer.net'.
You 'CANNOT' edit this file while XMail is running because it is an
indexed file.
[table index] [configuration] [top]
DOMAINS.TAB
"domain"[NEWLINE]
defines domains handled by the server.
[table index] [configuration] [top]
DNSROOTS
host
This is a file that lists a root name server in each line (this is not a
TAB file). This can be created from a query via nslookup for type=ns and
host = '.'.
[table index] [configuration] [top]
EXTALIASES.TAB
"external-domain"[TAB]"external-account"[TAB]"local-domain"[TAB]"local-user"[NEWLINE]
Example:
"xmailserver.org" "dlibenzi" "home.bogus" "dlibenzi"
This file is used in configurations in which the server does not run
directly on Internet (like my case) but acts as internal mail exchanger
and external mail gateway. This file defines 'Return-Path: <...>'
mapping for internal mail delivery. If you are using an Mail client like
Outlook, Eudora, KMail ... you have to configure your email address with
the external account say 'dlibenzi@xmailserver.org'. When you post an
internal message to 'foo@home.bogus' the mail client puts your external
email address ('dlibenzi@xmailserver.org') in the 'MAIL FROM: <...>'
SMTP request. Now if the user 'foo' replies to this message, it replies
to 'dlibenzi@xmailserver.org', and then is sent to the external mail
server. With the entry above in 'EXTALIASES.TAB' file the 'Return-Path:
<...>' field is filled with 'dlibenzi@home.bogus' that leads to an
internal mail reply.
You 'CANNOT' edit this file while XMail is running because it is an
indexed file.
[table index] [configuration] [top]
MAILUSERS.TAB
"domain"[TAB]"account"[TAB]"enc-passwd"[TAB]"account-id"[TAB]"account-dir"[TAB]=>
"account-type"[NEWLINE]
(remember, enter as one line.) Example:
"home.bogus" "dlibenzi" "XYZ..." 1 "dlibenzi" "U"
defines an account 'dlibenzi' in domain 'home.bogus' with the encrypted
password 'XYZ...', user id '1' and mail directory 'dlibenzi' inside
'$MAIL_ROOT/domains/home.bogus'. To allow multiple domain handling the
POP3 client must use the entire email address for the POP3 user account;
for example, if a user has email user@domain it must supply:
user@domain
as POP3 account login.
The directory 'account-dir' 'must' case match with the field
'account-dir' of this file. Note that user id 'must' be unique for all
users (duplicate user ids are not allowed). The user id 0 is reserved by
XMail and cannot be used.
The last field 'U' is the account type:
"U" = User account
"M" = Mailing list account
The encrypted password is generated by 'XMCrypt' whose source is
'XMCrypt.cpp'. Even if external authentication is used (see "External
Authentication") this file 'must' contain an entry for each user handled
by XMail.
You 'CANNOT' edit this file while XMail is running because it is an
indexed file.
[table index] [configuration] [top]
MESSAGE.ID
A file storing a sequential message number. Set it at 1 when you install
the server and leave it be handled by the software.
[table index] [configuration] [top]
POP3LINKS.TAB
"local-domain"[TAB]"local-account"[TAB]"external-domain"[TAB]=>
"external-account"[TAB]"external-crypted-password"[TAB]"authtype"[NEWLINE]
(remember, enter as one line) where:
'authtype' = Comma-separated list of options:
CLR Use clear-text USER/PASS authentication
APOP
Use POP3 APOP authentication (that does not send clear-text
passwords over the wire). Fall back to 'CLR' if 'APOP' is not
supported
FAPOP
Use POP3 APOP authentication (that does not send clear-text
passwords over the wire).
STLS
Establish an SSL link with the server by issuing a POP3 STLS
command. Continue with the non-encrypted link if STLS is not
supported
FSTLS
Establish an SSL link with the server by issuing a POP3 STLS
command.
POP3S
Establish a full POP3S connection with the remote server.
Leave
Leave messages on the server, and download only the new ones. In
order for this functionality to work, the remote POP3 server must
support the UIDL command.
OutBind
Sets the IP address of the network interface that should be used
when connecting to the remote host. This configuration should be
used carefully, because XMail will fail if the selected IP of the
interface does not have a route to the remote host using such IP.
Examples:
"home.bogus" "dlibenzi" "xmailserver.org" "dlibenzi" "XYZ..."=>
"APOP"
This entry is used to synchronize the external account
'dlibenzi@xmailserver.org' with encrypted password 'XYZ...' with the
local account 'dlibenzi@home.bogus' using 'APOP' authentication. It
connects with the 'xmailserver.org' POP3 server and downloads all
messages for 'dlibenzi@xmailserver.org' into the local account
'dlibenzi@home.bogus'. The remote server must support 'APOP'
authentication to specify 'APOP' as authtype. Even if using APOP
authentication is more secure because clear usernames and password do
not travel on the network, when you're not sure about it, specify 'CLR'
as authtype. For non local POP3 sync you've to specify a line like this
one (@ as the first domain char):
"@home.bogus.com" "dlibenzi" "xmailserver.org:110" "dlibenzi" "XYZ..."=>
"CLR"
This entry is used to synchronize the external account
'dlibenzi@xmailserver.org' with encrypted password 'XYZ...' with the
account 'dlibenzi@home.bogus.com' using 'CLR' authentication. The
message is pushed into the spool having as destination
dlibenzi@home.bogus.com , so you've to have some kind of processing for
that user or domain in your XMail configuration (for example custom
domain processing). you can also have the option to setup a line like
this one:
"?home.bogus.com,felins.net,pets.org" "dlibenzi" "xmailserver.org"=>
"dlibenzi" "XYZ..." "CLR"
and messages are dropped inside the spool by following these rules:
1. XMail parses the message headers by searching for To:, Cc: and Bcc:
addresses.
2. Each address's domain is compared with the list of valid domains
(felins.net, pets.org).
3. For each valid address the username part is taken and joined with
the '@' and the masquerade domain name (the name following '?').
4. The message is spooled with the above built destination address.
Obviously the masquerade domain ('home.bogus.com') MUST be handled by
the server or MUST be a valid external mail domain. So if a message
having as To: address graycat@felins.net is fetched by the previous line
a message is pushed into the spool with address graycat@home.bogus.com.
Particular attention must be paid to prevent creating mail loops.
Another option is:
"&.local,felins.net,pets.org" "dlibenzi" "xmailserver.org" "dlibenzi"=>
"XYZ..." "CLR"
where a fetched message whose To: address is graycat@felins.net is
replaced with graycat@felins.net.local. You can avoid the matching
domain list after the masquerading domain but, in that case, you may
have bad destination addresses inside the spool. The list MUST be comma
separated WITHOUT spaces. XMail starts PSYNC session with a delay that
you can specify with the -Yi nsec command line parameter (default 120).
XMail also checks for the presence (inside MAIL_ROOT) of a file named
'.psync-trigger' and, when this file is found, a PSYNC session starts
and that file is removed.
[table index] [configuration] [top]
SERVER.TAB
"varname"[TAB]"varvalue"[NEWLINE]
This file contains server configuration variables. See "SERVER.TAB
variables" below for details.
[table index] [configuration] [top]
SMTPGW.TAB
"domain"[TAB]"smtp-gateway"[NEWLINE]
Examples:
"foo.example.com" "@xmailserver.org"
sends all mail for 'foo.example.com' through the 'xmailserver.org' SMTP
server, while:
"*.dummy.net" "@relay.xmailserver.org"
sends all mail for '*.dummy.net' through 'relay.xmailserver.org'.
The 'smtp-gateway' can be a complex routing also, for example:
"*.dummy.net" "@relay.xmailserver.org,@mail.nowhere.org"
sends all mail for '*.dummy.net' through
'@relay.xmailserver.org,@mail.nowhere.org', in this way:
relay.xmailserver.org --> mail.nowhere.org --> @DESTINATION.
[table index] [configuration] [top]
SMTPFWD.TAB
"domain"[TAB]"smtp-mx-list"[NEWLINE]
The "smtp-mx-list" is a semicolon separated list of SMTP relays, and can
also contain options as a comma-separated list (see [SMTP GATEWAY
CONFIGURATION] for more information).
Examples:
"foo.example.com" "mail.xmailserver.org:7001;192.168.1.1:6123,NeedTLS=1;mx.xmailserver.org"
sends all mail for 'foo.example.com' using the provided list of mail
exchangers, while:
"*.dummy.net" "mail.xmailserver.org,NeedTLS=1;192.168.1.1;mx.xmailserver.org:6423"
sends all mail for '*.dummy.net' through the provided list of mail
exchangers. If the port (:nn) is not specified the default SMTP port
(25) is assumed. you can also enable XMail to random-select the order of
the gateway list by specifying:
"*.dummy.net" "#mail.xmailserver.org;192.168.1.1;mx.xmailserver.org:6423"
using the character '#' as the first char of the gateway list.
[table index] [configuration] [top]
SMTPRELAY.TAB
"ipaddr"[TAB]"netmask"[NEWLINE]
Example:
"212.131.173.0" "255.255.255.0"
allows all hosts of the class 'C' network '212.131.173.XXX' to use the
server as relay.
[table index] [configuration] [top]
SMTPAUTH.TAB
"username"[TAB]"password"[TAB]"permissions"[NEWLINE]
is used to permit SMTP client authentication with protocols PLAIN,
LOGIN, CRAM-MD5 and custom. With custom authentication a file containing
all secrets (username + ':' + password) is passed as parameter to the
custom authentication program which tests all secrets to find the one
matching (if exist). For this reason it's better to keep the number of
entries in this file as low as possible. Permissions are a string that
can contain:
M open mailing features
R open relay features (bypass all other relay blocking traps)
V VRFY command enabled (bypass SERVER.TAB variable)
T ETRN command enabled (bypass SERVER.TAB variable)
Z disable mail size checking (bypass SERVER.TAB variable)
S ease SSL requirement for this user (bypass the "WantTLS" mail config
variable)
When PLAIN, LOGIN or CRAM-MD5 authentication mode are used, first a
lookup in 'MAILUSERS.TAB' accounts is performed to avoid duplicating
information with 'SMTPAUTH.TAB'. Therefore when using these
authentication modes a user must use as username the full email address
(the : separator is permitted instead of @) and as password his POP3
password. If the lookup succeeds, the 'SERVER.TAB' variable
'DefaultSmtpPerms' is used to assign user SMTP permissions (default MR).
If the lookup fails then 'SMTPAUTH.TAB' lookup is done.
[table index] [configuration] [top]
SMTPEXTAUTH.TAB
The 'SMTPEXTAUTH.TAB' file enables the XMail administrator to use
external authentication methods to verify SMTP clients. If the
'SMTPEXTAUTH.TAB' does not exist, or it is empty, XMail standard
authentication methods are used, and those will use either the
'MAILUSERS.TAB' or the 'SMTPAUTH.TAB' to verify account credentials. If
the file 'SMTPEXTAUTH.TAB' is not empty, then the XMail standard
authentication methods are not advertised in the AUTH response of the
EHLO SMTP command. Instead, only the ones listed inside the
'SMTPEXTAUTH.TAB' are reported to the SMTP client. The 'SMTPEXTAUTH.TAB'
file can contain multiple lines with the following format:
"auth-name"[TAB]"program-path"[TAB]"arg-or-macro"...[NEWLINE]
This file can contain multiple lines whose 'auth-name' are listed during
the EHLO command response. Where 'arg-or-macro' can be (see [MACRO
SUBSTITUTION]):
AUTH
authentication method (PLAIN, LOGIN, CRAM-MD5, ...)
USER
SMTP client supplied username (available in PLAIN, LOGIN and
CRAM-MD5)