Greetings. I have a couple of requests for suggestions, the first related
to MX lookups (and how to avoid them) and the second related to filtering of
mail.
1) I have a small cluster of Linux boxes (4), all of which are running qmail
1.03. One of these boxes is listed as the mail exchanger for the domain
that all four boxes are in. This MX box allows relaying for all of its
friends on the same net. The users of the 4 different linux boxes would
like to be able to send mail to the users of the other linux boxes,
bypassing the MX box if possible. The only method I have come up with is to
maintain control/smtproutes on each box. Eg:
box1.linux.net:box1.linux.net
box2.linux.net:box2.linux.net
box3.linux.net:box3.linux.net
box4.linux.net:box4.linux.net
This is silly, but otherwise we get bounces like:
Sorry. Although I'm listed as a best-preference MX or A for that host,
it isn't in my control/locals file, so I don't treat it as local. (#5.4.6)
Methinks of letting all the mail go through the MX anyway, and throw a
control/smtproutes on the MX box only. A new issue arises. Some of the
linux boxes have aliases (eg, CNAMES). My users interchange the real names
with the CNAMES depending on their mood, the phase of the moon, and how much
alcohol is in their blood. The issue is best illustrated by example (the
attached text file). I am not sure if the issue is normal behavior; please
take a look and I would appreciate your comments.
2) Filtering. Dave Sill had a suggestion posted somewhere (the URL escapes
me...) about how to implement filtering (ie virus scanning, etc) of
messages. The suggestion involved installing qmail twice on the same
machine. I would like to do filtering (at least of incoming messages) using
two installations of qmail, each installation being on one of two separate
machines. The first machine would do the filtering and then send the
message off to the second for final delivery if everything is "OK". If
everyting is not "OK", do something else. From what I understand this is
common practice out there in coporate land.
Trouble is I an very unclear as to how to attack this, considering that the
filter box would be relaying mail for multiple domains for which it would be
an MX. Any pointers on where to begin would be appreciated greatly!
Thanks much,
kw
/* Keith Warno
** Developer & Sys Admin
** http://www.HaggleWare.com/
*/
The issue is that two "deliveries" are required to deliver one message when the
message is sent
to an address that has, as the host, a CNAME and control/smtproutes contains route
info for
the host using its real name (as opposed to the CNAME).
Some notes:
0) Line numbers in square brackets (in mail log stuff below) inserted for
readability.
1) develop.muao-inc.net is an alias (CNAME) for muao-inc.net.
2) The MX box (mx.muao-inc.net, which is the same physical box as smtp.muao-inc.net)
has in its control/smtproutes:
muao-inc.net:muao-inc.net
3) I sent a message from my window$ box to ``[EMAIL PROTECTED]'' via
smtp.muao-inc.net [03]
4) Line 12 is where I say "erf?" Why is the MX connecting to itself? I assume a
lookup was done
on develop.muao-inc.net and someone noticed that it's really muao-inc.net and so
a new delivery
is started. Is this correct?
5) The second "delivery" is avoided if control/smtproutes contains, in addition to
that in (2),
develop.muao-inc.net:develop.muao-inc.net
This makes sense but I'd hate to have to throw every alias in there for every
machine to avoid the
extra tcpserver work as seen in [12]. Argh... a tradeoff.
Opions/comments as to what would be "proper" for this sort of situation are welcome.
Should we just throw
in the real names and let tcpserver do some extra work, or throw in every name & alias?
[01]May 31 12:20:06 curly smtp: 959790006.155003 tcpserver: status: 1/40
[02]May 31 12:20:06 curly smtp: 959790006.155684 tcpserver: pid 19753 from 10.1.10.158
[03]May 31 12:20:06 curly smtp: 959790006.158461 tcpserver: ok 19753
smtp.muao-inc.net:10.1.10.213:25 keith.muao-inc.net:10.1.10.158::1194
[04]May 31 12:20:06 curly qmail: 959790006.183068 new msg 30605
[05]May 31 12:20:06 curly qmail: 959790006.183228 info msg 30605: bytes 730 from
<[EMAIL PROTECTED]> qp 19754 uid 203
[06]May 31 12:20:06 curly smtp: 959790006.185391 tcpserver: end 19753 status 0
[07]May 31 12:20:06 curly smtp: 959790006.185829 tcpserver: status: 0/40
[08]May 31 12:20:06 curly qmail: 959790006.202205 starting delivery 7724: msg 30605 to
remote [EMAIL PROTECTED]
[09]May 31 12:20:06 curly qmail: 959790006.202376 status: local 0/10 remote 1/20
[10]May 31 12:20:06 curly smtp: 959790006.251671 tcpserver: status: 1/40
[11]May 31 12:20:06 curly smtp: 959790006.252497 tcpserver: pid 19756 from 10.1.10.210
[12]May 31 12:20:06 curly smtp: 959790006.254918 tcpserver: ok 19756
mx.muao-inc.net:10.1.10.210:25 mx.muao-inc.net:10.1.10.210::4246
[13]May 31 12:20:06 curly qmail: 959790006.264725 new msg 30606
[14]May 31 12:20:06 curly qmail: 959790006.264904 info msg 30606: bytes 932 from
<[EMAIL PROTECTED]> qp 19757 uid 203
[15]May 31 12:20:06 curly smtp: 959790006.266359 tcpserver: end 19756 status 0
[16]May 31 12:20:06 curly smtp: 959790006.266761 tcpserver: status: 0/40
[17]May 31 12:20:06 curly qmail: 959790006.286448 starting delivery 7725: msg 30606 to
remote [EMAIL PROTECTED]
[18]May 31 12:20:06 curly qmail: 959790006.286607 status: local 0/10 remote 2/20
[19]May 31 12:20:06 curly qmail: 959790006.286671 delivery 7724: success:
10.1.10.210_accepted_message./Remote_host_said:_250_ok_959790006_qp_19757/
[20]May 31 12:20:06 curly qmail: 959790006.286721 status: local 0/10 remote 1/20
[21]May 31 12:20:06 curly qmail: 959790006.286766 end msg 30605
[22]May 31 12:20:06 curly qmail: 959790006.307154 delivery 7725: success:
10.1.10.3_accepted_message./Remote_host_said:_250_ok_959790038_qp_31495/
[23]May 31 12:20:06 curly qmail: 959790006.307323 status: local 0/10 remote 0/20
[24]May 31 12:20:06 curly qmail: 959790006.307371 end msg 30606