-
Notifications
You must be signed in to change notification settings - Fork 4
/
README
141 lines (99 loc) · 4.73 KB
/
README
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
E-MailRelay Readme
==================
Introduction
------------
E-MailRelay is a lightweight SMTP store-and-forward mail server with POP access
to spooled messages. It can be used as a personal internet mail server using
SpamAssassin spam filtering and DNSBL connection blocking, with incoming e-mail
delivered to maildir mailboxes. Store-and-forward operation is normally to a
fixed smarthost but DNS MX routing can also be configured. External scripts can
be used for address validation and for processing e-mail messages as they
are received.
E-MailRelay runs as a single process using the same non-blocking i/o model as
Squid and nginx giving excellent scalability and resource usage.
Quick start
-----------
E-MailRelay can be run straight from the command-line, and on Windows you can
run "emailrelay.exe" or "emailrelay-textmode.exe" from the zip file without
going through the installation process.
To use E-MailRelay in store-and-forward mode use the "--as-server" option to
start the storage daemon in the background, and then do delivery of spooled
messages by running with "--as-client".
For example, to start a storage daemon in the background listening on port 10025
use a command like this:
emailrelay --as-server --port 10025 --spool-dir /tmp
On Windows use "c:/temp" for testing, rather than "/tmp".
Or to run it in the foreground:
emailrelay --log --no-daemon --port 10025 --spool-dir /tmp
And then to forward the spooled mail to "smtp.example.com" run something
like this:
emailrelay --as-client smtp.example.com:25 --spool-dir /tmp
To forward continuously you can add the "--poll" and "--forward-to" options to
the server command-line:
For example, this starts a server that also forwards spooled-up e-mail every
minute:
emailrelay --as-server --poll 60 --forward-to smtp.example.com:25
Or for a server that forwards each message as soon as it has been received, you
can use "--forward-on-disconnect":
emailrelay --as-server --forward-on-disconnect --forward-to smtp.example.com:25
To edit or filter e-mail as it passes through the server specify your filter
program with the "--filter" option, something like this:
emailrelay --as-server --filter /tmp/set-from.js
Look for example filter scripts in the "examples" directory.
E-MailRelay can also be used as a personal internet mail server:
Use "--remote-clients" ("-r") to allow connections from outside the local
network, define your domain name with "--domain" and use an address verifier as
a first line of defense against spammers:
emailrelay --as-server -v -r --domain=example.com --address-verifier=account:
Then enable POP access to the incoming e-mails with "--pop", "--pop-port" and
"--pop-auth":
emailrelay ... --pop --pop-port 10110 --pop-auth /etc/emailrelay.auth
Set up the POP account with a user-id and password in the "--pop-auth" secrets
file. The secrets file should contain a single line of text like this:
server plain <userid> <password>
For more information on the command-line options refer to the reference guide
or run:
emailrelay --help --verbose
Autostart
---------
To install E-MailRelay on Windows run the "emailrelay-setup" program and choose
the automatic startup option on the last page so that E-MailRelay runs as a
Windows service. Use the Windows "Services" utility to configure the E-MailRelay
service as automatic or manual startup.
To install E-MailRelay on Linux from a RPM package:
sudo rpm -i emailrelay*.rpm
Or from a DEB package:
sudo dpkg -i emailrelay*.deb
To get the E-MailRelay server to start automatically you should check the
configuration file "/etc/emailrelay.conf" is as you want it and then run the
following commands to activate the "systemd" service:
systemctl enable emailrelay
systemctl start emailrelay
systemctl status emailrelay
On other Linux systems try some combination of these commands to set up and
activate the E-MailRelay service:
cp /usr/lib/emailrelay/init/emailrelay /etc/init.d/
update-rc.d emailrelay enable
rc-update add emailrelay
invoke-rc.d emailrelay start
service emailrelay start
tail /var/log/messages
tail /var/log/syslog
On BSD systems add this line to /etc/rc.conf:
emailrelay_enable="YES"
Documentation
-------------
The following documentation is provided:
* README -- this document
* COPYING -- the GNU General Public License
* INSTALL -- generic build & install instructions
* AUTHORS -- authors, credits and additional copyrights
* userguide.txt -- user guide
* reference.txt -- reference document
* ChangeLog -- change log for releases
Source code documentation will be generated when building from source if
"doxygen" is available.
Feedback
--------
To give feedback, including reviews, bug reports and feature requests, please
use the SourceForge project website at https://sourceforge.net/projects/emailrelay