On 25-Oct-08, at 2:54 PM, Stroller wrote:


On 25 Oct 2008, at 17:01, Charles Darwin wrote:
...
In layman terms, what do mydomain and relayhost stand for? I am running 9.5.0 Darwin (think BSD) and I would like to setup my postfix to send messages to other machines on my network and/or over the Internet.


In your case, from the headers of your email, mydomain is dsl.bell.ca
Your "myhostname" would be bas2-montreal45-1279494405.dsl.bell.ca, although you would probably JUST use relayhost and ignore these settings.

#Yes indeed. Very nice.
$ postconf |grep bell
mydomain = dsl.bell.ca
myhostname = bas2-montreal45-1242554840.dsl.bell.ca
$ curl -s http://checkip.dyndns.org/ |sed 's/^.*ss:\ \(.*[0-9]\)\<.*$/ \1/'
74.15.225.216

Now question is who puts it into postconf's output. Does postfix gets it from my network settings automatically? If so why would I bother defining it as indicated in many places on the Internet?
<http://www.stepwise.com/Articles/Workbench/eart.1.3.1.html>
<http://www.macosxhints.com/article.php?story=20031025022626398>
Especially when my IP is dynamic (or is that relative here?). Now it gets a little confusing for me as we go further. I understand the following will return my network name; network being up to one of bell's server (I am thinking maybe this is the domain that I am in).
$ uname -n
bas2-montreal45-1242554840.dsl.bell.ca
# and if I host that
$ host bas2-montreal45-1279494405.dsl.bell.ca
bas2-montreal45-1279494405.dsl.bell.ca has address 76.67.137.5
# which is certainly not my real IP since
$ curl -s http://checkip.dyndns.org/ |sed 's/^.*ss:\ \(.*[0-9]\)\<.*$/ \1/'
74.15.225.216
# In my head I get my real IP (74.15.225.216) from bells gateway or router (76.67.137.5); is that correct? (excuse me if don't get the terminology right)



I don't really know how to explain the domain stuff better - if you're really using just 9.5.0 Darwin then I'm surprised it's not obvious.


If you're using a Mac then just say so - that way we'll know (if you ask more questions) to take account of your package management system and that you're liable to be running a version of postfix which is a little out of date.

Yes, I am using Mac:
$ system_profiler SPSoftwareDataType |grep Version
      System Version: Mac OS X 10.5.5 (9F33)
      Kernel Version: Darwin 9.5.0
I have had this experience before where I found unix people preferred to deal with darwin rather that the GUI part of the OS X. Postfix (and sendmail) that ships with OS X has some modifications made by Apple into its main.cf that makes it emasculated if you will (for security reasons I suppose). However I am using macprots version of postfix which should be closer to unix standards:
$ port installed postfix
The following ports are currently installed:
  postfix @2.5.4_0+darwin_9+ldap+tls (active)



I'm going to assume you are using a Mac & recommend these resources:
http://en.wikipedia.org/wiki/Domain_name
http://en.wikipedia.org/wiki/Domain_Name_System
and also the first couple of chapters of O'Reilly's "DNS and BIND" by Liu & Albitz. I found this explanation of the workings of DNS delegation and lower-level domains to be excellent, enlightening and surely a joy to read for any person with the least technological curiosity. Older editions of this book may be out of date with respect to the mechanics of the BIND software, but are available very cheaply indeed and are surely worth a punt just for this delightful overview.

Setting relayhost in main.cf will tell postfix "always send my mail via this other server", and one might commonly use it to send mail via one's ISP's SMTP server.

I use, for example, smtp.gmail.com when I use my gmail account and there Apple's Mail.app takes care of authentication and the rest of it. Do I have to setup postfix to do that as well? Can postfix authenticate to gmail too? and what about the network mailing question? How do I send mail p2p? and how does sendmail, BSD's `mail' and pickup directory factor into all of this? Not from my home ISP but at university I have had with with pickup directory (who is hosting that I wish I knew) and permissions there. My ISP's SMTP is smtp1.sympatico.ca , if that helps.



I'm not sure your purpose in sending messages to other machines on your network - usually an email program (like Outlook, Apple Mail or Thunderbird) will get its messages from a POP3 or IMAP server (of which one would typically have one on a small network) and not "directly" via postfix.

Stroller.

I am supervising 10 other macs and I want them to mail their IPs as soon as they get one (and report some other parameter of the machine). I have it all scripted and just need a mail agent that I can script. Plus sending mail from command line is cool. BTW Apple's Mail.app used to handle unix type mail accounts. It is no longer an option. Do you know how I can set it up to work with `mail' or postfix again?

Charles

Reply via email to