--- Matt Johnson
Hi Thomas,
Thanks for your reply - it has made things clearer. The nullmailer makes a lot of sense, and I think I "get it".
Yes, they're useful.
I'd tried both, but yes - the workstation.
There are reasons why you might prefer to run the service on one and not the other -- you might find that the processing of the mail is best done away from your workstation, hence install and configure your MTA on the gateway machine. If you do that (and as I said before) it would be much "easier" for you to then goto your workstation(s) in turn, and install a nullmailer. There are several of these around [1]. I actually use the nullmailer called 'nullmailer'.
Seem to need:
# dpkg-reconfigure exim4-config
Yes, that was a mistake on my part. Sorry.
which seems unusual.
:) Debianites are mysterious people. It's not so unusual, when you realise that exim4-config as a package is dedicated purely to configuring exim. I might file a wishlist bug for debconf support to redirect to that package if called as: "dpkg-reconfigure exim4".
sitting). I now call it desktop.com in the dpkg-reconfigure dialogue and it works.
/etc/mailname
I don't think this will cause a problem for the real desktop.com domain as I'm only sending mail from and to myself, but what's the proper way round this problem? Am I allowed to send mail if I don't have a domain to send from?
But you do have a domain to send from -- what you don't have is a valid domain name resolved to that public IP. Am I correct in assuming that this gateway machine of yours is the only public-facing machine on the web? If it is, you'll be doing some form of NATing at least (ip-masquerading probably). (note that if it isn't, then it must be a proxy server). So I'm going to imagine a scenario (I might be way off-beam, but I like to exercise my brain once in a while :P). You have a setup like this (IP addresses are fictional): workstation ---> gateway ---> Internet (192.168.0.100) (192.168.0.1) (217.42.164.23) Where "gateway" has two IPs -- one internal, and the other assigned to it via the PPP session. I've used a dynamic IP address range here (typically), although you might have a static-IP, I don't know. Not that it matters. Your workstation will therefore appear to have the IP address of '217.42.164.23' - yet internally, all traffic is routed accordingly to 192.168.0.100. Of course, how does this help you send e-mails? Well, as you have already seen your "domain name" was invalid - and as you have it "desktop.com" is as well. You can't just make up domain names :), they need to be registered accordingly. Nor can you just hijack a domain name already in existance. Although if this is a dynamic IP, you could use a dyndns [1] account. Would make life much easier, certainly. So if you don't have a valid hostname (one that's routable on a *public* network) the only way I could send you an e-mail is by doing: matt@217.42.164.23 (or some equivalent user). Note that, like Sendmail, Exim allows you to define aliases for users. They're mapped in the /etc/aliases (and unlike Sendmail, you don't have to run the command 'newaliases' each time you change the file :P).
From Unix though, I might use the mailx(1) command:
mail matt@217.42.164.23 < ./foo.txt For historical reasons, when using the IP as the raw destination, it's better to put the IP in brackets [2]: mail matt@[217.42.164.23] < ./foo.txt Of course, all of this has been assuming that your workstation has not got a public IP assigned to it. If it does, then you have nothing to worry about, the above still applies - but it would make your "gateway" box redundant somewhat. So the best thing you can do? If it's a dynamic IP, get a dyndns account [1]. If it's a static IP, register a domain name. I realise that I might be preaching to the choir somewhat here, but I think I've understood the question you were asking.
I can now happily mail from either my desktop or gateway. I plan to get alerts from nagios now... A blinding bit of kit.
Nagios is useful, yes.
Thanks for you help.
You're welcome. -- Thomas Adam [1] http://www.dyndns.org [2] There are two reasons for this, but this e-mail is long enough already, without further ramblings from myself. :) ===== "The Linux Weekend Mechanic" -- http://linuxgazette.net "TAG Editor" -- http://linuxgazette.net "<shrug> We'll just save up your sins, Thomas, and punish you for all of them at once when you get better. The experience will probably kill you. :)" -- Benjamin A. Okopnik (Linux Gazette Technical Editor) ___________________________________________________________ ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.messenger.yahoo.com