procmail
[Top] [All Lists]

Re: transferring mail to a subnet

2002-06-07 14:49:54
On Fri, 2002-06-07 at 15:22, Professional Software Engineering wrote:

/etc/hosts won't do you much good if someone is trying to email you from 
the outside world.

Yes, I understand. I should have mentioned that I am running DNS and
have MX records pointing to my machine.. 

Perhaps you diagram a message coming into your system from the outside 
world, and what you want to happen with it?

Wan(internet) > LAN of pc.com starts with major.pc.com (which handles
DNS, MX of FQDN and has internal subnet using hosts of 192.168.0.1-255)

Some other puters on the LAN are 192.168.0.10  minor.pc.com
                                 192.168.0.15  middle.pc.com

Mail comes in directly from the MX records on major.pc.com.  I have
aliases in postfix set up to catch all mail (for the monent) of the FQDN
"pc.com" to send to gary(_at_)pc(_dot_)com, which is my $HOME and procmail 
sends it
there through my local rc file. 

Since I also have other mail boxes from my ISP, etc, that has nothing to
do with my FQDN, and when I fetchmail, procmail also puts them in their
mbox in my $HOME dir, from my recipes. This works perfectly, and always
has. 

Now with the addition of the other boxes, with hostnames, i.e. minor,
and middle and obviously the same domain names, each of these other
hostnames have a mail user on their box as well.  Now all can SMTP mail
from their box to major.pc.com and out to the world.  However, I thought
I could use procmail to forward their mail to their machines, (hosthame)
minor and middle.

Crude diagram would be WAN sends mail to mark(_at_)minor(_dot_)pc(_dot_)com So, 
I want it
to  WAN > major.pc.com > mark(_at_)minor(_dot_)pc(_dot_)com  

I was thinking that procmail on major.pc.com could ! or pipe to mark on
his machine at minor.pc.com


Now, my question is how do I write recipes, (or maybe postfix should
handle this altogether), for putting mail in the various machines? How
do I make sure Mark(_at_)minor(_dot_)pc(_dot_)com will get his, or 
gary.pc.com will get
his?  Do I need a global .procmailrc file, or should postfix handle
this?

This is an MX config issue (and thus a matter for DNS and your SMTP agent) 
- if mail is delivered to different hosts, those hosts should have MX 
records in *DNS* (and DNS is the only way the outside world will know of 
your domain anyway).  If you set the MX config properly for your hosts, and 
whatever postfix's local-host-names config is, mail will appear at the 
various hosts.

I am beginning to see.  

Set the MX for your base domain to point to whichever host handles mail for 
the base domain.

This has been accomplished.  "major.pc.com" is the machine

Don't forget that you can make use of aliases on the base mail host to 
redirect messages to other hosts.  Again, that's within the scope of your 
MTA, not procmail.  In fact, you shouldn't use procmail for this, since 
procmail isn't an MTA - once you deal with BCC'd and multiple-recipient 
messages, you'll understand that procmail isn't intended for this - it's an 
LDA.

Sean, this clears it up for me, and I can see where using aliases in
Postfix would do this.  Thank you for your quick response. 

-- 
Best regards,
Gary   

Today's thought: Why don't sheep shrink when it rains?

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>