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

From: Antonio De Leon (aldleonm@nemonico.org)
Date: Wed Mar 07 2007 - 23:06:17 EST


Antonio De Leon wrote:
> Paul M Foster wrote:
>> 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
>>
> Hi, first post.
>
> I have the same setup with postfix, i have my gmail account forward
> my mail to my local internal server running postfix, also having to
> server my own domain nemonico.org with SASL SMTP authentication , and
> was the most straight forward setup i had, compared to sendmail, which
> took me a lot of time and the insecurity of having having it in the
> internet didnt seem fair so i took
> postfix but running under openbsd to keep the thing more tight. The
> spam/av setup for me dosent seem to apply to me as i dont
> have much traffic. Im posting my conf "main.cf" to see if it works for
> you and to see if anyone sees a misconf or anything not supposed to be
> there.
>
> ------ main.cf ------
> queue_directory = /var/spool/postfix
> command_directory = /usr/local/sbin
> daemon_directory = /usr/local/libexec/postfix
> mail_owner = _postfix
> myhostname = kettle.nemonico.org
> mydomain = nemonico.org
> myorigin = nemonico.org
> inet_interfaces = $myhostname
> inet_protocols = all
> mydestination = $myhostname, localhost.$mydomain, localhost,
> $mydomain, zooth.zapto.org,
> kettle.zapto.org, zooth.$mydomain, $myhostname.$mydomain
> ####
> # since we use SASL ( non-unix accounts ) we must add every user that
> # receives mail here. Then run postmap hash:/etc/postfix/email_accounts
> #local_recipient_maps = hash:/etc/postfix/email_accounts
> unknown_local_recipient_reject_code = 550
> mynetworks = 192.168.1.0/24
> relay_domains = $mydestination zooth.zapto.org
> relay_recipient_maps = hash:/etc/postfix/relay_recipients
> in_flow_delay = 1s
> canonical_maps = hash:/etc/postfix/canonical
> alias_maps = hash:/etc/postfix/aliases
> #smtpd_banner = $myhostname ESMTP $mail_name (1.4.2)
> smtpd_banner = $myhostname ESMTP (1.4.2)
> #local_destination_concurrency_limit = 2
> #default_destination_concurrency_limit = 20
> sendmail_path = /usr/local/sbin/sendmail
> newaliases_path = /usr/local/sbin/newaliases
> mailq_path = /usr/local/sbin/mailq
> setgid_group = _postdrop
> html_directory = /usr/local/share/doc/postfix/html
> manpage_directory = /usr/local/man
> readme_directory = /usr/local/share/doc/postfix/readme
> ------ main.cf ------
>
>
> Hope it helps....
>
>
>
>
> -----------------------------------------------------------------------
> 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.
>

Funny, i thought i had SASL activated, i dont, back to the drawing
board :/, but it does the standard task of receiving the mail from gmail
and delivery of my local mail to the internet.

-----------------------------------------------------------------------
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:13 EDT