Penguin
Blame: POPbeforeSMTP
EditPageHistoryDiffInfoLikePages
Annotated edit history of POPbeforeSMTP version 5, including all changes. View license author blame.
Rev Author # Line
3 CraigBox 1 [POP|POP3] before [SMTP] is a way of allowing hosts to relay through you for a set period of time. This is useful when you host domains for people who are not on the same local network as you, and need to send mail coming from these domains.
1 BlairHarrison 2
3 This assumes you use some kind of POP server on the same server as you use for SMTP. You'll want a piece of software that listens on your POP daemon's log file for any connections, and when it sees a valid connection, will add the IP address to a file. You configure your MTA to check this file as a list of allowed relay IP addresses.
4
3 CraigBox 5 One such piece of software is called [exact|http://www.britishsteal.com/dist/exact/] , and it works great with [Exim], provided you make a small modification to your exim startup script after following the installation instructions for exact.
1 BlairHarrison 6
7 For me, running debian, I had to edit /etc/init.d/exim , and just under the line that says
8 echo -n "Starting MTA: "
9 put something like
10 /usr/local/sbin/exact
11
12 and just after the lines where it says
13 start-stop-daemon --stop --pidfile /var/run/exim/exim.pid \
14 --oknodo --retry 30 --exec $DAEMON
15 put
16 kill `cat /var/run/exact/exact.pid`
17
18 Note, I could never get it going properly on sendmail using the provided instructions.
2 DanielLawson 19
20 ----
21
3 CraigBox 22 For [Cyrus] 2.x under [Debian], I had to change the logfile regex a bit:
2 DanielLawson 23
24 It used to read:
25
26 # Cyrus
27 # =====
28 order address,username
3 CraigBox 29 match (login): \[[([[0-9\.]*)\] ([[^ ]*)
2 DanielLawson 30
31 Which is fine, except it matches on text like:
3 CraigBox 32 ..... login: [[ip.ad.dr.ess] someusername ...
2 DanielLawson 33
34 Whereas, the cyrus 2.x logfiles (under Debian anyway, backported from unstable), look more like:
3 CraigBox 35 ..... login: some.host.name[[ip.ad.dr.ess] someusername ...
2 DanielLawson 36
37
38 The following like will naively match. It works for me :)
3 CraigBox 39 match (login): .*\[[([[0-9\.]*)\] ([[^ ]*)
4 DanielLawson 40
41 If you have ipv6 enabled cyrus, it seems you need some extra magic in your regex to deal with this. 'normal' ipv4 addresses are reported as
5 CraigBox 42
43 Sep 16 09:22:49 hydrogen cyrus/pop3d[[16212]: login: dsl33-66.world-net.co.nz \
44 [[::ffff:210.54.33.66] monkey__feet_net_nz plaintext
45
4 DanielLawson 46
47 The ::ffff: here screws things up - so I added :f to the inner regex above:
48 match (login): .*\[[([[:f0-9\.]*)\] ([[^ ]*)
49
50 This probably wont match on any real ipv6 addresses yet, but i'll cross that bridge when I get to it.
51
2 DanielLawson 52
53 --DanielLawson
1 BlairHarrison 54
55 See also EximSmtpAuth for an alternative method of achieving the same end.