On 2/17/2014 11:13 AM, Adam Thompson wrote:
I'm looking for recommendations on what works well for people, since this doesn't appear to be covered by the FAQ or AOBSD2E. I know several ways to accomplish what I'm after, but none of them seem to have any clear advantage over the other.

1. I have about a dozen OpenBSD systems running (5.4-RELEASE), all of which share a common list of users, all of which generate email automatically. 2. Only one of those systems is the designated mail server. I would like all the other systems to immediately relay any and all email to the mail server. 3. I don't want to have to manually maintain /etc/mail/aliases on each and every system for each and every user; sooner or later I'll miss one. 4. I'd prefer to use smtpd(8) instead of sendmail(8), but I'm even willing to run software from ports, if it's clearly better/cleaner/smaller/etc.

So, I know I can achieve the effect I want by putting every user on every machine in /etc/aliases with something like:
    athompso    athom...@central.mail.server
Or I can achieve the same effect by putting a .forward file in every home directory on every machine, but both of these options are laborious and thus error-prone.

I know how to do this with Postfix, but installing Postfix from ports just to forward mail to a central mailhost seems like... overkill? I think I might be able to remember how to do this with Sendmail, but I'm not sure. I've stayed as far away from sendmail as I can.
And I'm not at all clear on how to accomplish this with smtpd.

I assume *someone* here must have a similar situation - what worked (or didn't) for you?

Hi,

In the sendmail world, the "smarthost" functionality is what you would leverage. It will forward all email to the host specified for it to process. It makes for a very tiny sendmail.cf file.

I'm sure there is just as easy of a way in smtpd.

From /usr/share/sendmail/cf/openbsd-proto.mc

divert(0)dnl
VERSIONID(`@(#)openbsd-proto.mc $Revision: 1.12 $')dnl
OSTYPE(openbsd)dnl
dnl
dnl If you have a non-static IP address you may wish to forward outgoing mail
dnl through your ISP's mail server to prevent matching one of the dialup
dnl DNS black holes.  Just uncomment the following line and replace
dnl mail.myisp.net with the hostname of your ISP's mail server.
dnl
dnl define(`SMART_HOST', `mail.myisp.net')dnl
dnl

Cheers,
Steve W.

Reply via email to