|
List Info
Thread: Multiple down-stream POs
|
|
| Multiple down-stream POs |
  United States |
2007-02-20 20:09:12 |
Hi,
Anyone using Maia to filter mail for more than a single
downstream PO?
Any clues?
I have constructed a filter appliance with Amavis+SA+Maia
on a single
machine. Now I want to deliver mail to more than one
downstream PO
depending on the mail domain name. I have set up two entries
in
/etc/postfix/transport like this:
foo.org 192.168.1.50
bar.org 192.168.1.100
but how to specify the downstream mailer in Maia??
Dave
_______________________________________________
Maia-users mailing list
Maia-users renaissoft.com
http://www.renaissoft.com/mailman/listinfo/maia-users
|
|
| Re: Multiple down-stream POs |
  United States |
2007-02-20 20:59:47 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Feb 20, 2007, at 8:09 PM, David Sims wrote:
>
> but how to specify the downstream mailer in Maia??
You can still specify your appliance as the downstream, and
then let
it deliver via the appropriate transport table.
David Morton
Maia Mailguard http://www.maiamailguard
.com
mortonda dgrmm.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFF27WjUy30ODPkzl0RAue+AKClTTxlE0rn1aTr39lo/J3bMYtrlgCd
EC1u
mMRTJRIWA7mxVhRPZjKl3rc=
=k6du
-----END PGP SIGNATURE-----
_______________________________________________
Maia-users mailing list
Maia-users renaissoft.com
http://www.renaissoft.com/mailman/listinfo/maia-users
|
|
| Re: Multiple down-stream POs |
  United States |
2007-02-20 21:54:47 |
David,
At a high-level, this is the idea:
Internet -> postfix (1) -> maia/amavis ->
postfix(2) -> downstream server(s).
In order to filter mail for multiple domains and deliver
mail to different
destinations depending on the destination domain, you just
need to create
your transport file like you already have and the
"postfix(2)" in my fancy
picture above will handle the downstream delivery
accordingly. As David
already said, just configure Maia to deliver mail to
postfix(2), which in
most setup instructions will be localhost:10025 or some
such
configuration. This setting is found under Admin ->
System Configuration
-> Paths & Ports as Downstream SMTP server (MTA-TX):
and Downstream SMTP
port number:.
Ryan
> Hi,
>
> Anyone using Maia to filter mail for more than a
single downstream PO?
> Any clues?
>
> I have constructed a filter appliance with
Amavis+SA+Maia on a single
> machine. Now I want to deliver mail to more than one
downstream PO
> depending on the mail domain name. I have set up two
entries in
> /etc/postfix/transport like this:
>
> foo.org 192.168.1.50
> bar.org 192.168.1.100
>
> but how to specify the downstream mailer in Maia??
>
> Dave
> _______________________________________________
> Maia-users mailing list
> Maia-users renaissoft.com
> http://www.renaissoft.com/mailman/listinfo/maia-users
>
_______________________________________________
Maia-users mailing list
Maia-users renaissoft.com
http://www.renaissoft.com/mailman/listinfo/maia-users
|
|
| Re: Multiple down-stream POs |
  United States |
2007-05-17 06:04:24 |
Ryan said:
Internet -> postfix (1) -> maia/amavis ->
postfix(2) -> downstream server(s).
Can maia handle 2 independent servers?
where each server is independent and hosts is set of virtual
domains?
For what I can tell the configuration setting for the
downstream
server/port only allows 1 entry. how would I tell maia to
send it back to
the same server it got the email from?
Internet -> postfix (1) -> maia/amavis ->
postfix(1) and
Internet -> postfix (2) -> maia/amavis ->
postfix(2) .
Sergio
_______________________________________________
Maia-users mailing list
Maia-users renaissoft.com
http://www.renaissoft.com/mailman/listinfo/maia-users
|
|
| Re: Multiple down-stream POs |
  Canada |
2007-05-17 13:39:03 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Sergio P. Cesar wrote:
> Ryan said:
>
> Internet -> postfix (1) -> maia/amavis ->
postfix(2) -> downstream server(s).
>
> Can maia handle 2 independent servers?
> where each server is independent and hosts is set of
virtual domains?
> For what I can tell the configuration setting for the
downstream
> server/port only allows 1 entry. how would I tell maia
to send it back to
> the same server it got the email from?
>
> Internet -> postfix (1) -> maia/amavis ->
postfix(1) and
> Internet -> postfix (2) -> maia/amavis ->
postfix(2) .
No, that would result in an infinite mail loop--you don't
want to do
that
You also shouldn't allow mail directly from the Internet to
be
processed by your downstream MTA (i.e. postfix(2) in this
example),
otherwise such mail would bypass your filters.
Look at Ryan's example again, and you'll see that postfix(1)
is upstream
from amavisd-maia. It accepts unfiltered mail from the
Internet and
feeds it to your filter (amavisd-maia). The filtered mail
gets relayed
to postfix(2), which can then determine where to relay the
mail from there.
The server/port entry on the Maia System Configuration page
tells
amavisd-maia how to find postfix(2), that's all. Postfix(2)
determines
how the mail gets delivered from there, so if you have more
complicated
mail routing needs, you can configure these in postfix(2).
- --
Robert LeBlanc <rjl renaissoft.com>
Renaissoft, Inc.
Maia Mailguard <http://www.maiamail
guard.com/>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFGTKFHGmqOER2NHewRAlKtAJ40GFUQoVMMKcc5zqj5x7j6F8IAOQCe
MzPb
sYSTuyCI5EyuO7An7WGjAJ8=
=Nvy+
-----END PGP SIGNATURE-----
_______________________________________________
Maia-users mailing list
Maia-users renaissoft.com
http://www.renaissoft.com/mailman/listinfo/maia-users
|
|
| Re: Multiple down-stream POs |
  United States |
2007-05-17 16:11:35 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On May 17, 2007, at 1:39 PM, Robert LeBlanc wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Sergio P. Cesar wrote:
>> Ryan said:
>>
>> Internet -> postfix (1) -> maia/amavis ->
postfix(2) -> downstream
>> server(s).
>>
>> Can maia handle 2 independent servers?
>> where each server is independent and hosts is set
of virtual domains?
>> For what I can tell the configuration setting for
the downstream
>> server/port only allows 1 entry. how would I tell
maia to send it
>> back to
>> the same server it got the email from?
>>
>> Internet -> postfix (1) -> maia/amavis ->
postfix(1) and
>> Internet -> postfix (2) -> maia/amavis ->
postfix(2) .
>
> No, that would result in an infinite mail loop--you
don't want to do
> that You also
shouldn't allow mail directly from the Internet
> to be
> processed by your downstream MTA (i.e. postfix(2) in
this example),
> otherwise such mail would bypass your filters.
>
> Look at Ryan's example again, and you'll see that
postfix(1) is
> upstream
> from amavisd-maia. It accepts unfiltered mail from the
Internet and
> feeds it to your filter (amavisd-maia). The filtered
mail gets
> relayed
> to postfix(2), which can then determine where to relay
the mail
> from there.
>
> The server/port entry on the Maia System Configuration
page tells
> amavisd-maia how to find postfix(2), that's all.
Postfix(2)
> determines
> how the mail gets delivered from there, so if you have
more
> complicated
> mail routing needs, you can configure these in
postfix(2).
>
I think the question was referring to a setup where two
separate
boxes handle email for separate domains. In that case, I
think
amavisd-maia has a setting to return to the same IP from
which it came..
From the reference amavisd-new sample file:
# To make it possible for several hosts to share one content
checking
daemon,
# the IP address and/or the port number in $forward_method
and
$notify_method
# may be spacified as an asterisk. An asterisk in the
colon-separated
# second field (host) will be replaced by the SMTP client
peer address,
# An asterisk in the third field (tcp port) will be replaced
by the
incoming
# SMTP/LMTP session port number plus one. This obsoletes the
previously used
# less flexible configuration parameter
$relayhost_is_client. An
example:
# $forward_method = 'smtp ';
$notify_method = 'smtp :10587';
The difficulty, though is in the rescue and digest
functions, as they
expect a single host to send to (and there is no way to tell
which is
needed)
You could set up a postfix instance that has a relay map for
all the
domains in both, which could relay to the appropriate
(downstream)
server. As Robert said, make sure you don't introduce the
email into
the upstream host, or it will get trapped again.
David Morton
Maia Mailguard http://www.maiamailguard
.com
mortonda dgrmm.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFGTMUKUy30ODPkzl0RAqmOAKCscPEeRvUcbyKJ1MyWwPXnTPOyfQCg
pmny
azz2XK7adlkT8Zrw8UOK3sM=
=3397
-----END PGP SIGNATURE-----
_______________________________________________
Maia-users mailing list
Maia-users renaissoft.com
http://www.renaissoft.com/mailman/listinfo/maia-users
|
|
| Re: Multiple down-stream POs |
  United States |
2007-05-22 10:09:05 |
> I think the question was referring to a setup where two
separate
> boxes handle email for separate domains. In that case,
I think
> amavisd-maia has a setting to return to the same IP
from which it came..
>
> From the reference amavisd-new sample file:
>
> # To make it possible for several hosts to share one
content checking
> daemon,
> # the IP address and/or the port number in
$forward_method and
> $notify_method
> # may be spacified as an asterisk. An asterisk in the
colon-separated
> # second field (host) will be replaced by the SMTP
client peer address,
> # An asterisk in the third field (tcp port) will be
replaced by the
> incoming
> # SMTP/LMTP session port number plus one. This
obsoletes the
> previously used
> # less flexible configuration parameter
$relayhost_is_client. An
> example:
> # $forward_method = 'smtp ';
$notify_method = 'smtp :10587';
>
>
> The difficulty, though is in the rescue and digest
functions, as they
> expect a single host to send to (and there is no way to
tell which is
> needed)
>
> You could set up a postfix instance that has a relay
map for all the
> domains in both, which could relay to the appropriate
(downstream)
> server. As Robert said, make sure you don't introduce
the email into
> the upstream host, or it will get trapped again.
I browsed the code a little and I think this could be an
easy fix. Here is
the idea... perhaps you can tell me if I am missing
something:
The places to make changes would be:
smtp.php line 108
$select = "SELECT smtp_server,
smtp_port FROM maia_config
WHERE id = 0";
send-quarantine-digests.pl line 301
my($smtp) = Net::SMTP->new($smtp_server, Port =>
$smtp_port);
send-quarantine-reminders.pl line 379
my($smtp) = Net::SMTP->new($smtp_server, Port =>
$smtp_port) ;
The changes I propose are something like below to preset
$smtp_server to
the value of the mx record returned based on the user email
address:
($uname,$udomain) = split(" ", $user_email) ;
my $res = Net: NS::Reso
lver->new;
my mx = mx($res, $udomain);
if ( mx) {
$smtp_server = mx[0]->exchange;
}
Of course smtp.php will have a similar code in php .
I Am assuming the mx record will point to a properly
configured server
listening on that port.
some logic can be written that will choose the mx record or
the predefined
server if no mx record is returned.
your input is appreciated.
Sergio
_______________________________________________
Maia-users mailing list
Maia-users renaissoft.com
http://www.renaissoft.com/mailman/listinfo/maia-users
|
|
[1-7]
|
|