You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by bill parducci <bi...@parducci.net> on 2003/01/24 06:33:04 UTC

james and SMART_HOST (DH)

i have been trying to setup james as a mail exchange similar to some existing sendmail servers i have running. in a nutshell, i am looking for the equivalent of sendmail's 'SMART_HOST' capabilities ('forward all incoming mail to host X'). since i don't see anything that would indicate a way to do this configurationally, am i correct in assuming that this would be handled in james by creating a mailet that forwarded all mail (once it was determined to be addressed to a local domain) to another host that is specficied in the mailet?

thanks

b


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: james and SMART_HOST (DH)

Posted by bill parducci <bi...@parducci.net>.
great, thanks.

b

Serge Knystautas wrote:
> http://james.apache.org/provided_mailets_2_1.html
> 
> Check out the RemoteDelivery mailet... you add the optional <gateway> 
> parameter.
> 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: james and SMART_HOST (DH)

Posted by Danny Angus <da...@apache.org>.

> -----Original Message-----
> From: bill parducci [mailto:bill@parducci.net]
> Sent: 24 January 2003 15:32
> To: James Users List
> Subject: Re: james and SMART_HOST (DH)
> 
> 
> Serge Knystautas wrote:
> > This sounds like just a case of configuring two instances of 
> > RemoteDelivery (one that does gateway to the other box) and one that 
> > sends using standard MX record lookups.  Then just put the appropriate 
> > matchers in front of them so the right emails use the 
> appropriate remote 
> > delivery approach.  Make sense?
> 
> yes, it is starting to! having to relearn mail processing concepts (not 
> used to the bucket brigade approach). getting the hang of it now i think 
> and i can't say that i am missing m4 much at the moment :o)
> 
> thanks
> 
> b
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> <ma...@jakarta.apache.org>
> For additional commands, e-mail: 
> <ma...@jakarta.apache.org>
> 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: james and SMART_HOST (DH)

Posted by "Noel J. Bergman" <no...@devtech.com>.
> and i can't say that i am missing m4 much at the moment :o)

ROFLMAO!  And people think I'm crazy when I say that I initially picked
James because of the ease of administration.  :-)

	--- Noel


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: james and SMART_HOST (DH)

Posted by Danny Angus <da...@apache.org>.
> yes, it is starting to! having to relearn mail processing concepts (not 
> used to the bucket brigade approach). getting the hang of it now i think 
> and i can't say that i am missing m4 much at the moment :o)

Oh good, and this gets easier as you get used to it, focus on the fact that James is essentially ignorant of your goals and that you can plug *all* of the functionality in yourself. 

d.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: james and SMART_HOST (DH)

Posted by bill parducci <bi...@parducci.net>.
Serge Knystautas wrote:
> This sounds like just a case of configuring two instances of 
> RemoteDelivery (one that does gateway to the other box) and one that 
> sends using standard MX record lookups.  Then just put the appropriate 
> matchers in front of them so the right emails use the appropriate remote 
> delivery approach.  Make sense?

yes, it is starting to! having to relearn mail processing concepts (not 
used to the bucket brigade approach). getting the hang of it now i think 
and i can't say that i am missing m4 much at the moment :o)

thanks

b




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: james and SMART_HOST (DH)

Posted by bill parducci <bi...@parducci.net>.
i'll start with a few simple graphics and we can go from there. i'll try 
to get something out tonight.

Noel J. Bergman wrote:
 >
> Note about load balancing.  James doesn't have to refuse connections to
> cause load balancing to occur.  By setting up a number of MX records with
> the same priority, the RFC mandates that they be chosen randomly, thus
> assuring load balancing behavior over peers.

right. i was just referring to your example where load balancing was 
demonstrated with same priority MX records; asymmetric MX entries will 
'load balance' (failover) when the lower MX record host refuses 
connections.  not an optimum solution but it will work if a secondary 
server is off site for example, although only really practical for 
traffic bursts as all sorts of queuing issues will arise.

b


---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org


Re: james and SMART_HOST (DH)

Posted by bill parducci <bi...@parducci.net>.
attached are the first swacks at the graphics. thoughts?

b

Noel J. Bergman wrote:
> Bill,
> 
> If you are willing to do the graphics, and keep them relatively small, I
> don't see any reason why we wouldn't add them to the site.  Right now we are
> doing the collaborative editing in the Wiki, but eventually, I think that
> we'd move the primary content into the main part of the web site, and use
> that Wiki page for additional commentary.  It really depends upon what
> happens with the Wiki technology used here in the future.  Right now it
> doesn't resemble the rest of the web site look and feel at all, and it is
> technically disjoint (runs on a separate host).


RE: james and SMART_HOST (DH)

Posted by "Noel J. Bergman" <no...@devtech.com>.
Bill,

If you are willing to do the graphics, and keep them relatively small, I
don't see any reason why we wouldn't add them to the site.  Right now we are
doing the collaborative editing in the Wiki, but eventually, I think that
we'd move the primary content into the main part of the web site, and use
that Wiki page for additional commentary.  It really depends upon what
happens with the Wiki technology used here in the future.  Right now it
doesn't resemble the rest of the web site look and feel at all, and it is
technically disjoint (runs on a separate host).

In any event, getting back to the topic at hand ...

I agree with you that "internal" might be the right name for the SMART_HOST
example.  What you might do, which I think you're starting to do, is
introduce the SMART_HOST and Secondary MX ideas as illustrative examples,
talk about setting up RemoteDelivery with a gateway and a matcher, then go
back to each example separately, and show how to implement it.

Perhaps something like:

 Implementing SMART_HOST, Secondary MX, or Load Balancing

 Basic overview of the issue.

 Configuring RemoteDelivery to use a gateway
  - mention the need for setting up the spool

 Configuring James as a SMART_HOST
  - detailed example
  - the role of the different RemoteDelivery instances

 Configuring James as a Secondary MX
  - detailed example
  - setting up DNS, and role of MX preference

 Configuring James for Load Balancing
  - detailed example
  - setting up the DNS.  How load balancing works

 Combinations
  - examples

 Summary

This probably shouldn't go all on one page.  We'd start on one page, and
have links to details.  But the nice thing about the Wiki is that we can
play with the structure as we go.

Note about load balancing.  James doesn't have to refuse connections to
cause load balancing to occur.  By setting up a number of MX records with
the same priority, the RFC mandates that they be chosen randomly, thus
assuring load balancing behavior over peers.

	--- Noel


---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org


Re: james and SMART_HOST (DH)

Posted by bill parducci <bi...@parducci.net>.
perhaps the term 'downstream' would be better suited to our purposes 
than 'internal'? i was just using this since it is a common installation 
configuration.

there are many ways we can expand on the implementational issues if, as 
below, you wish to include dns entries. in that situation i would 
suggest that we use a graphic because i think will be necessary to 
include configuration information on a number of servers (dns, mail); 
something along the lines of this would do the trick i think:

[MX]
james config

[MX']
james config

[DNS]
MX records

[downstream/internal]
james config

then repeat for load balancing (although load balancing will occur with 
the same configuration provided james will refuses connections when 
fully occupied...maybe overload balancing would be a better term :o)

then repeat for the combination.

i can whip out some PNGs easily if wiki will support it. (if not, then 
we can try to fake it with text, but i think that some simple visuals 
would be helpful).

thoughts?

b

Noel J. Bergman wrote:
> Thank you, Kind Sir.
> 
> I corrected a couple of spelling errors, but otherwise that's it.  I do
> wonder if we might want to elaborate more, for example on setting up
> secondary MX servers.  And I don't think that it  is right to refer to the
> eventual target in that example as an internal server, but I didn't change
> it because I wasn't sure what you had in mind.
> 
> What I'm thinking is something like, let's say that you wanted me to act as
> a Secondary MX for parducci.net.  You would simply add:
> 
>          IN      MX      20 mail.devtech.com.
> 
> to your zone file.  On my end, I'd have to setup a <mailet> to select
> messages intended for parducci.net, and run them through RemoteDelivery,
> using mail.parducci.net as the gateway.  When your system would be
> unavailable, mine would be used to queue up messages until your server
> became available again.
> 
> Load balancing is a bit different.  That would be something like:
> 
>          IN      MX      10 mail1.parducci.net.
>          IN      MX      10 mail2.parducci.net.
>          IN      MX      10 mail3.parducci.net.
> 
> We would randomly select a server.  An useful combination could be:
> 
>          IN      MX      10 mail1.parducci.net.
>          IN      MX      10 mail2.parducci.net.
>          IN      MX      10 mail3.parducci.net.
>          IN      MX      20 mail.parducci.net.
> 
> All e-mail should go through mail[1,2,3], where they do front-end work,
> e.g., spam filtering, and in turn forward only legitimate e-mail to the real
> mail server.
> 
> 	--- Noel


---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org


RE: james and SMART_HOST (DH)

Posted by "Noel J. Bergman" <no...@devtech.com>.
Thank you, Kind Sir.

I corrected a couple of spelling errors, but otherwise that's it.  I do
wonder if we might want to elaborate more, for example on setting up
secondary MX servers.  And I don't think that it  is right to refer to the
eventual target in that example as an internal server, but I didn't change
it because I wasn't sure what you had in mind.

What I'm thinking is something like, let's say that you wanted me to act as
a Secondary MX for parducci.net.  You would simply add:

         IN      MX      20 mail.devtech.com.

to your zone file.  On my end, I'd have to setup a <mailet> to select
messages intended for parducci.net, and run them through RemoteDelivery,
using mail.parducci.net as the gateway.  When your system would be
unavailable, mine would be used to queue up messages until your server
became available again.

Load balancing is a bit different.  That would be something like:

         IN      MX      10 mail1.parducci.net.
         IN      MX      10 mail2.parducci.net.
         IN      MX      10 mail3.parducci.net.

We would randomly select a server.  An useful combination could be:

         IN      MX      10 mail1.parducci.net.
         IN      MX      10 mail2.parducci.net.
         IN      MX      10 mail3.parducci.net.
         IN      MX      20 mail.parducci.net.

All e-mail should go through mail[1,2,3], where they do front-end work,
e.g., spam filtering, and in turn forward only legitimate e-mail to the real
mail server.

	--- Noel


---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org


Re: james and SMART_HOST (DH)

Posted by bill parducci <bi...@parducci.net>.
ok, i polished it up a little, lemme know what you think.

b

Noel J. Bergman wrote:

> 
> I've given you a head start on the Smart Host / Secondary MX page by pretty
> much copying your message, and doing some minor edits with the Wiki's text
> formatting rules.
> 
> See: http://nagoya.apache.org/wiki/apachewiki.cgi?James/SmartOrSecondaryHost
> 
> I'm sure that there is quite a bit more elaboration that can be done, both
> on the smart host example, and the secondary MX example.
> 
> 	--- Noel


---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org


Re: james and SMART_HOST (DH)

Posted by bill parducci <bi...@parducci.net>.
ok, i'll give it a shot.

b

Noel J. Bergman wrote:
>>no problemo... now, what is the wiki site? :o)
> 
> 
> See my other message.  :-)
> 
> I've given you a head start on the Smart Host / Secondary MX page by pretty
> much copying your message, and doing some minor edits with the Wiki's text
> formatting rules.
> 
> See: http://nagoya.apache.org/wiki/apachewiki.cgi?James/SmartOrSecondaryHost
> 
> I'm sure that there is quite a bit more elaboration that can be done, both
> on the smart host example, and the secondary MX example.
> 
> 	--- Noel
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: james and SMART_HOST (DH)

Posted by "Noel J. Bergman" <no...@devtech.com>.
> no problemo... now, what is the wiki site? :o)

See my other message.  :-)

I've given you a head start on the Smart Host / Secondary MX page by pretty
much copying your message, and doing some minor edits with the Wiki's text
formatting rules.

See: http://nagoya.apache.org/wiki/apachewiki.cgi?James/SmartOrSecondaryHost

I'm sure that there is quite a bit more elaboration that can be done, both
on the smart host example, and the secondary MX example.

	--- Noel


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


What is the James Wiki?

Posted by "Noel J. Bergman" <no...@devtech.com>.
> no problemo... now, what is the wiki site? :o)

I added the Wiki link to the left hand menu on the James web site
(http://james.apache.org), so you can find it readily.

A good starting point is: http://nagoya.apache.org/wiki/.  The "SandBox"
lets you edit a page that no one cares about, in case you're nervous.  The
sand box also has a reference to the text formatting rules page, so you can
see more detailed information on formatting pages.  One thing you can do is
"edit" the page (without posting a change) so that you can see the wiki
markup commands used.

Feel free to browse, search, and edit the Wiki.  One reason for creating it
was to encourage more participation from the ASF user communities.  We
actively encourage you to use the Wiki.

	--- Noel


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: james and SMART_HOST (DH)

Posted by bill parducci <bi...@parducci.net>.
no problemo... now, what is the wiki site? :o)

b

Noel J. Bergman wrote:
> Bill,
> 
> Hmmm ... seems to me that such a scheme could be extended nicely to
> configure James as a secondary MX for other sites.
> 
> Would you like to write this up on the wiki for us?
> 
> 	--- Noel
> 
> -----Original Message-----
> From: bill parducci [mailto:bill@parducci.net]
> Sent: Saturday, January 25, 2003 11:03
> To: James Users List
> Subject: Re: james and SMART_HOST (DH)
> 
> 
> ok, after much doinking around i believe that i have a workable config
> that allows a james server to act as a bidirectional MX (receives mail
> on behalf of internal servers and relays mail out for same) without
> being a spam ho. i figured that i would post this for reference should
> another noob happen along looking for this sort of thing.
> 
> notes:
> internal server is int.myfoo.com (ip: 192.168.251.204)
> below is configuration on MX (ext.myfoo.com)
> 
> <!-- the domain that is serviced by the site,
>       NOT the server -->
> <processor name="transport">
>   <mailet match="HostIs=myfoo.com" class="RemoteDelivery">
>    <outgoing> file://var/mail/relay/ </outgoing>
>    <delayTime> 21600000 </delayTime>
>    <maxRetries> 5 </maxRetries>
>    <deliveryThreads> 1 </deliveryThreads>
>    <gateway> int.myfoo.com </gateway>
>    <gatewayPort>25</gatewayPort>
>   </mailet>
> 
> <!-- remote addresses of internal server(s) -->
>   <mailet match="RemoteAddrNotInNetwork=127.0.0.1,192.168.251.204"
> class="ToProcessor">
>    <processor> spam </processor>
>    </mailet>
> 
>   <mailet match="All" class="RemoteDelivery">
>    <outgoing> file://var/mail/outgoing/ </outgoing>
>    <delayTime> 21600000 </delayTime>
>    <maxRetries> 5 </maxRetries>
>    <deliveryThreads> 1 </deliveryThreads>
>   </mailet>
> </processor>
> 
> thanks all for the assist on this. comments welcome.
> 
> b
> 
> Danny Angus wrote:
> 
>>It might be an idea to use different outgoing repositories, otherwise the
> 
> mail you just sorted could get mixed again!
> 
>>"turning off RemoteAddrNotInNetwork will create open  relay issues"
> 
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: james and SMART_HOST (DH)

Posted by "Noel J. Bergman" <no...@devtech.com>.
Bill,

Hmmm ... seems to me that such a scheme could be extended nicely to
configure James as a secondary MX for other sites.

Would you like to write this up on the wiki for us?

	--- Noel

-----Original Message-----
From: bill parducci [mailto:bill@parducci.net]
Sent: Saturday, January 25, 2003 11:03
To: James Users List
Subject: Re: james and SMART_HOST (DH)


ok, after much doinking around i believe that i have a workable config
that allows a james server to act as a bidirectional MX (receives mail
on behalf of internal servers and relays mail out for same) without
being a spam ho. i figured that i would post this for reference should
another noob happen along looking for this sort of thing.

notes:
internal server is int.myfoo.com (ip: 192.168.251.204)
below is configuration on MX (ext.myfoo.com)

<!-- the domain that is serviced by the site,
      NOT the server -->
<processor name="transport">
  <mailet match="HostIs=myfoo.com" class="RemoteDelivery">
   <outgoing> file://var/mail/relay/ </outgoing>
   <delayTime> 21600000 </delayTime>
   <maxRetries> 5 </maxRetries>
   <deliveryThreads> 1 </deliveryThreads>
   <gateway> int.myfoo.com </gateway>
   <gatewayPort>25</gatewayPort>
  </mailet>

<!-- remote addresses of internal server(s) -->
  <mailet match="RemoteAddrNotInNetwork=127.0.0.1,192.168.251.204"
class="ToProcessor">
   <processor> spam </processor>
   </mailet>

  <mailet match="All" class="RemoteDelivery">
   <outgoing> file://var/mail/outgoing/ </outgoing>
   <delayTime> 21600000 </delayTime>
   <maxRetries> 5 </maxRetries>
   <deliveryThreads> 1 </deliveryThreads>
  </mailet>
</processor>

thanks all for the assist on this. comments welcome.

b

Danny Angus wrote:
> It might be an idea to use different outgoing repositories, otherwise the
mail you just sorted could get mixed again!
>
> "turning off RemoteAddrNotInNetwork will create open  relay issues"


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Spam filtering mailets wanted...

Posted by Aaron Knauf <ak...@xtra.co.nz>.
Hi Danny,

I have been receiving alot of spam from yahoo a/c's recently.  (Although 
yahoo tells me that their domain name was spoofed.)  The one thing in 
common between all of the accounts is that the end in a long number 
(like 5+ digits).  Perhaps a filter that tested senders from certain 
domains for more then 3 consequtive digits in the user name would get 
rid of some of this?  I don't know anyone with a legitimate email 
address that contains 3 consequtive digits (although I do know plenty 
with two).

Cheers

ADK

Danny Angus wrote:

>Hi,
>
>I run a number of James instances for a number of reasons.
>One in particular is having problems with a lot of spam being sent to a bona-fide account.
>I'd *really* appreciate anyone contacting me, or the list, with clever spam filtering mailets I could use.
>
>d.
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
>  
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Spam filtering mailets wanted...

Posted by Danny Angus <da...@apache.org>.
Hi,

I run a number of James instances for a number of reasons.
One in particular is having problems with a lot of spam being sent to a bona-fide account.
I'd *really* appreciate anyone contacting me, or the list, with clever spam filtering mailets I could use.

d.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: james and SMART_HOST (DH)

Posted by bill parducci <bi...@parducci.net>.
ok, after much doinking around i believe that i have a workable config 
that allows a james server to act as a bidirectional MX (receives mail 
on behalf of internal servers and relays mail out for same) without 
being a spam ho. i figured that i would post this for reference should 
another noob happen along looking for this sort of thing.

notes:
internal server is int.myfoo.com (ip: 192.168.251.204)
below is configuration on MX (ext.myfoo.com)

<!-- the domain that is serviced by the site,
      NOT the server -->
<processor name="transport">
  <mailet match="HostIs=myfoo.com" class="RemoteDelivery">
   <outgoing> file://var/mail/relay/ </outgoing>
   <delayTime> 21600000 </delayTime>
   <maxRetries> 5 </maxRetries>
   <deliveryThreads> 1 </deliveryThreads>
   <gateway> int.myfoo.com </gateway>
   <gatewayPort>25</gatewayPort>
  </mailet>

<!-- remote addresses of internal server(s) -->
  <mailet match="RemoteAddrNotInNetwork=127.0.0.1,192.168.251.204" 
class="ToProcessor">
   <processor> spam </processor>
   </mailet>

  <mailet match="All" class="RemoteDelivery">
   <outgoing> file://var/mail/outgoing/ </outgoing>
   <delayTime> 21600000 </delayTime>
   <maxRetries> 5 </maxRetries>
   <deliveryThreads> 1 </deliveryThreads>
  </mailet>
</processor>

thanks all for the assist on this. comments welcome.

b

Danny Angus wrote:
> It might be an idea to use different outgoing repositories, otherwise the mail you just sorted could get mixed again!
> 
> "turning off RemoteAddrNotInNetwork will create open  relay issues"


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: james and SMART_HOST (DH)

Posted by Danny Angus <da...@apache.org>.
It might be an idea to use different outgoing repositories, otherwise the mail you just sorted could get mixed again!

"turning off RemoteAddrNotInNetwork will create open  relay issues"

Yes it will.

d.


> -----Original Message-----
> From: bill parducci [mailto:bill@parducci.net]


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: james and SMART_HOST (DH)

Posted by bill parducci <bi...@parducci.net>.
well, this is sorta working so i think that i have an 'order' issue to 
resolve. per your suggestion i have the following configuration:

<mailet match="HostIs=internal.myfoo.com" class="RemoteDelivery">
  <outgoing> file://var/mail/outgoing/ </outgoing>
   <delayTime> 21600000 </delayTime>
    <delayTime> 21600000 </delayTime>
    <maxRetries> 5 </maxRetries>
     <deliveryThreads> 1 </deliveryThreads>
</mailet>

<mailet match="HostIsLocal" class="RemoteDelivery">
  <outgoing> file://var/mail/outgoing/ </outgoing>
  <delayTime> 21600000 </delayTime>
  <maxRetries> 5 </maxRetries>
  <deliveryThreads> 1 </deliveryThreads>
  <gateway> internal.myfoo.com </gateway>
  <gatewayPort>25</gatewayPort>
</mailet>

i can send mail outbound using this machine as a relay, but INBOUND it 
will only relay mail from those hosts listed in RemoteAddrNotInNetwork 
(otherwise they are sent to spam).

i am concerned that turning off RemoteAddrNotInNetwork will create open 
relay issues.  normally i would ask where the flaw in my logic is, but i 
am still at the level where there is at least 40% magic in the process. 
:o) can anyone spare some eye of newt over here?

thanks

b

Danny Angus wrote:
> You can emulate sendmail's "local relay" and "mail hub" by using the remote delivery mailet, as described by Serge, 
> with the...
> 
> "HostIs=localhost" for emulating DR
> and
> "HostIsLocal" for emulating DH
> 
> ...matchers respectively to forward all local mail to other machines, make sure they appear in this order, or "HostIs=localhost" (DR)will never be reached, the mail will be processed by HostIsLocal (DH). 
> 
> Be warned though that James creates qualified addresses from unqualified local addresses by appending @localhost, which might confuse the recipient "local relay" (DR).
> 
> d


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: james and SMART_HOST (DH)

Posted by Danny Angus <da...@apache.org>.
I saw it and added my 2c


> I've added a page to the Wiki where we can dump these kind of howto's, 
> as a kind of scrathpad before getting them into formal docs and FAQs in 
> CVS 
> (http://nagoya.apache.org/wiki/apachewiki.cgi?JamesDocumentationNotes). 
>   I added my blurb about how to handle sendmail's SMART_HOST concept, 
> and if you have time to add the DR/DH, that'd be great as I don't know 
> sendmail that well.

> Also, whoever updates the James site next time, can we get a link to the 
> James Wiki in the nav bar? (not that big of a deal, but maybe at least 
> change the stylesheet for next time there's a change for propagating).

Yep.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: james and SMART_HOST (DH)

Posted by Serge Knystautas <se...@lokitech.com>.
Danny Angus wrote:
> You can emulate sendmail's "local relay" and "mail hub" by using the remote delivery mailet, as described by Serge, 
> with the...
> 
> "HostIs=localhost" for emulating DR
> and
> "HostIsLocal" for emulating DH
> 
> ...matchers respectively to forward all local mail to other machines, make sure they appear in this order, or "HostIs=localhost" (DR)will never be reached, the mail will be processed by HostIsLocal (DH). 
> 
> Be warned though that James creates qualified addresses from unqualified local addresses by appending @localhost, which might confuse the recipient "local relay" (DR).

Danny (et al),

I've added a page to the Wiki where we can dump these kind of howto's, 
as a kind of scrathpad before getting them into formal docs and FAQs in 
CVS 
(http://nagoya.apache.org/wiki/apachewiki.cgi?JamesDocumentationNotes). 
  I added my blurb about how to handle sendmail's SMART_HOST concept, 
and if you have time to add the DR/DH, that'd be great as I don't know 
sendmail that well.

Also I hope this weekend to go through some recent james-user traffic to 
capture some other questions... half the james-user questions I swear 
we've answered and got in the FAQ only to quickly realize they're not 
there.  I'm hoping this will help correct this situation over time and 
explode our FAQ so it's as rich as Lucene, HTTPD, and some of the other 
apache projects out there.

Also, whoever updates the James site next time, can we get a link to the 
James Wiki in the nav bar? (not that big of a deal, but maybe at least 
change the stylesheet for next time there's a change for propagating).

-- 
Serge Knystautas
Lokitech
Software - Strategy - Design
http://www.lokitech.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: james and SMART_HOST (DH)

Posted by Danny Angus <da...@apache.org>.
You can emulate sendmail's "local relay" and "mail hub" by using the remote delivery mailet, as described by Serge, 
with the...

"HostIs=localhost" for emulating DR
and
"HostIsLocal" for emulating DH

...matchers respectively to forward all local mail to other machines, make sure they appear in this order, or "HostIs=localhost" (DR)will never be reached, the mail will be processed by HostIsLocal (DH). 

Be warned though that James creates qualified addresses from unqualified local addresses by appending @localhost, which might confuse the recipient "local relay" (DR).

d

> -----Original Message-----
> From: Serge Knystautas [mailto:sergek@lokitech.com]
> Sent: 24 January 2003 13:56
> To: James Users List
> Subject: Re: james and SMART_HOST (DH)
> 
> 
> bill parducci wrote:
> > ok, i have had a chance to play with this and i believe that i misspoke 
> > slightly in my original question. by setting up a host in 
> RemoteDelivery 
> > all mail is forwarded to that host... including *oubound* (non local) 
> > mail. that is SMART_HOST behavior (DS, not DH), but to be able to get 
> > mail back out through the same path i need the MX to also act as a 
> > 'MAIL_HUB' (DH) so that outbound mail will be delivered. here's my 
> > config on mx.myfoo.bar:
> 
> This sounds like just a case of configuring two instances of 
> RemoteDelivery (one that does gateway to the other box) and one that 
> sends using standard MX record lookups.  Then just put the appropriate 
> matchers in front of them so the right emails use the appropriate remote 
> delivery approach.  Make sense?
> 
> -- 
> Serge Knystautas
> Lokitech
> Software - Strategy - Design
> http://www.lokitech.com
> 
> 
> --
> To unsubscribe, e-mail:   
> <ma...@jakarta.apache.org>
> For additional commands, e-mail: 
> <ma...@jakarta.apache.org>
> 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: james and SMART_HOST (DH)

Posted by Serge Knystautas <se...@lokitech.com>.
bill parducci wrote:
> ok, i have had a chance to play with this and i believe that i misspoke 
> slightly in my original question. by setting up a host in RemoteDelivery 
> all mail is forwarded to that host... including *oubound* (non local) 
> mail. that is SMART_HOST behavior (DS, not DH), but to be able to get 
> mail back out through the same path i need the MX to also act as a 
> 'MAIL_HUB' (DH) so that outbound mail will be delivered. here's my 
> config on mx.myfoo.bar:

This sounds like just a case of configuring two instances of 
RemoteDelivery (one that does gateway to the other box) and one that 
sends using standard MX record lookups.  Then just put the appropriate 
matchers in front of them so the right emails use the appropriate remote 
delivery approach.  Make sense?

-- 
Serge Knystautas
Lokitech
Software - Strategy - Design
http://www.lokitech.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: james and SMART_HOST (DH)

Posted by bill parducci <bi...@parducci.net>.
>> i have been trying to setup james as a mail exchange similar to some 
>> existing sendmail servers i have running. in a nutshell, i am looking 
>> for the equivalent of sendmail's 'SMART_HOST' capabilities ('forward 
>> all incoming mail to host X'). since i don't see anything that would 
>> indicate a way to do this configurationally, am i correct in assuming 
>> that this would be handled in james by creating a mailet that 
>> forwarded all mail (once it was determined to be addressed to a local 
>> domain) to another host that is specficied in the mailet?
> 
> 
> http://james.apache.org/provided_mailets_2_1.html
> 
> Check out the RemoteDelivery mailet... you add the optional <gateway> 
> parameter.

ok, i have had a chance to play with this and i believe that i misspoke slightly in my original question. by setting up a host in RemoteDelivery all mail is forwarded to that host... including *oubound* (non local) mail. that is SMART_HOST behavior (DS, not DH), but to be able to get mail back out through the same path i need the MX to also act as a 'MAIL_HUB' (DH) so that outbound mail will be delivered. here's my config on mx.myfoo.bar:

<gateway> int.myfoo.com </gateway>
<gatewayPort>25</gatewayPort>

SMART_HOST behavior is that all mail not destined for 'local' delivery is to be resolved and delivered as addressed.

for example, assume that i have domain myfoo.com with an MX (mx.myfoo.com) and an internal mail server (int.myfoo.com) setup so that both mx.myfoo.com and int.myfoo.com consider myfoo.com as a local (serviceable) domain. therefore, inbound mail should (and does) proceed like this:

mail from: <world@mybar.com >
rcpt to: <me...@myfoo.com>

mybar.com -----> mx.myfoo.com -------> int.myfoo.com

and outbound mail should  proceed like this:

mail from: <me...@myfoo.com>
rcpt to: <wo...@mybar.com>
 
int.myfoo.com -----> mx.myfoo.com -----> mybar.com

but instead it does this:
int.myfoo.com -----> mx.myfoo.com =====> int.myfoo.com

int.myfoo.com rejects the note because it is a relay (as it should, this note should be delivered to mybar.com by mx.myfoo.com).

does this make sense? it is hard to convey with simple text, but what i am looking for is the configuration of a simple MX that will accept inbound messages and pass them onto a defined [internal] host and relay outbound messages on behalf of the same defined host. i thought that using RemoteDelivery to handle the first requirement and RemoteAddrNotInNetwork to handle the latter, this would work. however, what i am seeing is that RemoteDelivery is overriding RemoteAddrNotInNetwork so the effect of the relay is to send the note back to the originating machine.

since RemoteAddrNotInNetwork only rejects, do i need to create a mailet that supercedes RemoteAddrNotInNetwork to deliver outbound mail before it can be redirected to the originating host?

thanks

b


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: james and SMART_HOST (DH)

Posted by Serge Knystautas <se...@lokitech.com>.
bill parducci wrote:
> i have been trying to setup james as a mail exchange similar to some 
> existing sendmail servers i have running. in a nutshell, i am looking 
> for the equivalent of sendmail's 'SMART_HOST' capabilities ('forward all 
> incoming mail to host X'). since i don't see anything that would 
> indicate a way to do this configurationally, am i correct in assuming 
> that this would be handled in james by creating a mailet that forwarded 
> all mail (once it was determined to be addressed to a local domain) to 
> another host that is specficied in the mailet?

http://james.apache.org/provided_mailets_2_1.html

Check out the RemoteDelivery mailet... you add the optional <gateway> 
parameter.

-- 
Serge Knystautas
Lokitech
Software - Strategy - Design
http://www.lokitech.com/



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>