GrayHat wrote:
>> For outbound as example : 
>>
>> user -> mailserver -> ASSP -> same mailserver -> internet.
>>
>> Is this possible, won't this create email loops ?
> 
> No, it isn't possible (not as you described it), and yes, that
> would create a mail loop, the config is the following
> 
> user -> mailserver -> ASSP -> MTA (smarthost) -> internet

Actually it is possible. It takes a bit of "loopy" thinking at first, 
but, to me at least, it seems quite logical. And it is quite powerful 
and robust in a multiple server setup, as you can remove all but 1 
server and you will not lose email connectivity, in fact you can also 
lose the mailstore and your users can still send out emails.

user -> mailserver -> ASSP -> same mailserver -> internet
is how I have set it up on multiple locations and servers.

The user submits on port 587, the mailserver submits these emails to 
ASSP on a predefined port, say port 26. ASSP then submits this email on 
a predefined port on the same mailserver, say port 24.

Now comes the magic, that same mailserver (aka MTA) has been told to 
send email it receives on port 26 out to the internet, unless it's to 
local domains in which case it goes to the mailstore MTA. In exim the 
configuration is something like this (I included my comments, which 
reflect this setup). This allows for a "self contained" ASSP/MTA 
combination which can send and receive emails and is not depending on a 
mailstore and/or gateway to be up. Only emails for the local domain(s) 
will go to the mailstore MTA.

Make sure no ports except 25 and 587 (465) are exposed to the internet. 
Or you may create an open relay.

# When a user submits email it will go through ASSP first to
# allow auto-whitelisting (the smarthost: router below takes care of that).
# After processing ASSP in turn will submit the email to exim at port 24.
# The router below will send email received on port 24 directly
# to the internet instead of sending it through ASSP again.
#
# Begin
#
direct_outbound:
         debug_print = "R: dnslookup for $local_p...@$domain"
         driver = dnslookup
         domains = ! +local_domains
         transport = remote_smtp
         same_domain_copy_routing = yes
         # ignore private rfc1918 and APIPA addresses
         ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8 : 192.168.0.0/16 :\
                 172.16.0.0/12 : 10.0.0.0/8 : 169.254.0.0/16 :\
                 255.255.255.255
         condition = ${if =={$interface_port}{24}}
         no_more
#
# End

<This is a default exim4 debian configuration>

smarthost:
   debug_print = "R: smarthost for $local_p...@$domain"
   driver = manualroute
   domains = ! +local_domains
   transport = remote_smtp_smarthost
   route_list = * DCsmarthost byname
   host_find_failed = defer
   same_domain_copy_routing = yes
   no_more


Relevant ASSP configuration:
smtpDestination 127.0.0.1:24
relayHost 127.0.0.1:24
relayPort 127.0.0.1:26

------------------------------------------------------------------------------
_______________________________________________
Assp-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/assp-user

Reply via email to