Re: [SLUG] Postfix: relay inbound, deliver inbound.

From: Paul M Foster (paulf@quillandmouse.com)
Date: Wed Mar 07 2007 - 19:28:45 EST


Chris Mathey wrote:

> I am hoping any resident postfix gurus can help.
>
> I have a hosted virtual private server (fedora6) that I want to use as a
> SMTP relay(postfix).
>
> This VPS has minimal resources so it will do minimal processing incl.
> sanity checks and RBL's, possible spam\AV if I can pull it off. I also
> have root.

Don't know how to do RBLs and AV from postfix, but it doesn't take much
resources to accept and relay mail. Unless you have a helluva lot of it.

>
> 1. This external relay will be the primary MX and relay all inbound mail
> for example.com to a postfix server on my internal network for
> processing and local delivery
>

This is a fairly standard setup, if I'm reading you right. There's a
"smarthost" on the internet that accepts and relays mail for your
domain, example.com. Your LAN mail server goes and gets this mail,
usually via something like fetchmail, in a cron job if you like. The
cron job operates from the LAN mailserver and fetches the mail to that
server for distribution.

Am I missing something?

> 2. My local postfix server will send all non local email to the external
> relay for direct delivery.

For this, you set up the default transport in postfix to smtp for the
host you're relaying to. In the transports file in your /etc/postfix
directory,

alfa :
bravo :
charlie local:
* smtp:mail.delta.com

The first two above are machine on the local network which will accept
mail and smtp connections with the relaying machine, charlie. Charlie is
the machine on which you're doing this. The last line specifies that all
other mail uses the smtp protocol to connect to mail.delta.com to
deliver mail elsewhere (your LAN mailserver).

After writing this file, be sure to db-ify it by running something like:

postmap hash:/etc/postfix/transport

>
> Thanks for your help, I've been searching all afternoon for the best
> approach.

Sorry if I've missed the mark here. I'm not exactly sure what you're
asking for. From the sound of it, it sounds like what most people do.

Paul

-- 
Paul M. Foster
-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS).  Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 15:45:06 EDT