Koozali.org: home of the SME Server

qpsmtpd config question

Offline d6hq

  • **
  • 52
  • +0/-0
qpsmtpd config question
« on: March 29, 2008, 03:29:16 PM »
For a specific reason I need to bind qpsmtpd to a partular IP address on SME7.3 box. Digging around here and also on the qpsmtpd wiki I have determined (I think) that the SME implementation uses qpsmtpd-forkserver but I cannot work out which of the apparently many config files the system is using

we have

etc/sysconfig/qpsmtpd-forkserver
this declares -l 127.0.0.1
but also refers to

etc/qpsmtpd/config - where IP = 0 (ie all interfaces)

then we have

/var/service/qpsmtpd/config - where IP = 0 again

So guru's the question is this if I wish to force qpsmtpd to listen on one (or many) specifc IP address(es) only which file needs changing

You are bound to ask why

192.168.0.2 = fully functional qmail / SME (domain1.com local, domain2.com delegated to 192.168.0.3)
192.168.0.3 = domino (domain2.com) installed on same box

We used to be able to do this very easily in SME 6.x but the introduction of qpsmtpd in 7 has hitherto eluded our efforts to do this

Ideally we need
qpsmtpd listening on external IF - lets call it 172.16.1.2
qpsmtpd listening on internal IF - 192.168.0.2
domino listening on internal IF - 192.168.0.3

horde modified to connect not to localhost but to 192.168.0.2 instead

We shall worry about other services in due course but 25 is the main issue for now
Not new to SME - we hack IBM Lotus Domino into it on a regular basis - but new to Sail

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: qpsmtpd config question
« Reply #1 on: March 29, 2008, 03:45:19 PM »
192.168.0.2 = fully functional qmail / SME (domain1.com local, domain2.com delegated to 192.168.0.3)
192.168.0.3 = domino (domain2.com) installed on same box

Don't bother with reconfiguring qpsmtpd. Run domino on port 26, and use iptables SNAT to redirect incoming traffic directed to 192.168.0.3:25 to 192.168.0.3:26.

Offline d6hq

  • **
  • 52
  • +0/-0
Re: qpsmtpd config question
« Reply #2 on: March 29, 2008, 03:51:46 PM »
Thanks Charlie

Is a SNAT preferable to a declared smtproute of

/var/qmail/comtrol/smtproutes
domain1.co:[192.168.0.2]
domain2.com:192.168.0.2or3:26

?
Not new to SME - we hack IBM Lotus Domino into it on a regular basis - but new to Sail

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: qpsmtpd config question
« Reply #3 on: March 29, 2008, 04:28:04 PM »
Is a SNAT preferable to a declared smtproute of

/var/qmail/comtrol/smtproutes
domain1.co:[192.168.0.2]
domain2.com:192.168.0.2or3:26

?

That depends on whether you want to avoid qpsmtpd/qmail handling the mail on its way to domino. Using smtproutes is simple and should work nicely. Try it. I don't even think you need a custom template or IP alias - just do:

db domains domain2.com MailServer localhost:27

You'll want to use a port other than 26, since 26 may be used for the smtp auth proxy (for outbound authentication).

Update: I've checked and you will need to use a custom template - The MailServer property doesn't allow a non-standard port to be specified. You should post a New Feature Request in the Bug Tracker to have that limitation removed.
« Last Edit: March 29, 2008, 05:22:28 PM by CharlieBrady »