On 26 Oct 2008, at 01:43, Charles Darwin wrote:
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?
I'm surprised to read you asking this. I meant "this is what your
mydomain would or should be". I'm afraid I'm too inexperienced to
answer that question - I have always configured them manually on my
Linux systems.
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?
You can do.
Can postfix authenticate to gmail too?
Yes.
See http://www.postfix.org/SASL_README.html#client_sasl
My ISP's SMTP is smtp1.sympatico.ca , if that helps.
I would probably relay via this server (set it as "relayhost" in
main.cf), as most ISP's will normally just allow anyone on their
network to send mail through their SMTP servers without
authenticating. In Mail.app you could use this instead of the Gmail
SMTP server. But if your machine is a laptop, then it will not be
allowed to relay through smtp1.sympatico.ca when you're visiting your
cousin who uses another ISP, so in that case Gmail would make sense.
Note though that Gmail reformat outgoing addresses, so even if you
wanted the from: address to read "[EMAIL PROTECTED]" it would be
altered to [EMAIL PROTECTED]
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 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?
Ok, when postfix receives a message destined for mydestination it puts
it ~addressee/home_mailbox, where `postconfig | grep home_mailbox`.
Often one will run a POP3 or IMAP server, and when a client connects
via POP3 or IMAP the server configuration tells it to get the messages
from there.
Unix mailclients like pine, mutt & Thunderbird have an option to read
the mails directly from a store directory (i.e. home_mailbox), and
perhaps this is what you mean by your "pickup directory". If Mail.app
had this facility I think it must have been before I started using it,
10.3
The problem with the way Mail.app stores its mail is that it has
separate store directories for each account, e.g. ~/Library/Mail/[EMAIL PROTECTED]
/INBOX.imapmbox/Messages/ (where mail.stroller.uk.eu.org is my IMAP
server) and there's no way to know - and tell postfix - of a full
valid mailbox directory for any given user, so if you try shoving
messages directly into there with postfix then things will break when
you add a new user to the system & try delivering mail to [EMAIL PROTECTED]
instead of [EMAIL PROTECTED] An alternative might be to run cron
jobs to move them from the store directory to there, but this too is
prone to breakage. Oh, you might be able to tell Mail.app to read from
a store directory by hacking Mail's plist file, but you'd have to do
this manually for each user on the system.
A more elegant way to do things - since you ask about sending mail
"p2p" - is to run a POP server on your main machine (with .maildir as
the home_mailbox name, so that it's hidden in Finder, or just using
virtual mailboxes) and just tell Mail.app to connect to localhost and
get the mail through the POP protocol. Honestly, this is why I have a
Linux box in the cupboard under the stairs, so that I can run Unixy
stuff without the headaches.
The best way would probably to have all machines relay through
smtp1.sympatico.ca (perhaps relaying first through a "master" postfix
server on the LAN) and simply address messages to your gmail account
or whatever.
Stroller.