Using mail(1) and send-pr(1) from dial-up and private address machines.
When I asked this question, I got one very useful response - mail(1) uses your preferred mail backend (default sendmail, also postfix etc.) to send the message.
The problem is that most mail servers require that the sending machine's stated hostname is valid, resolves to the hosts IP address, and (in many cases) agrees with the reverse lookup. A dial up user, and a system in a private network, fulfills none of these requirements.
However, your ISP is running a mail server that does. So you have to use that one. And doing this is simple. It requires two functions - MASQUERADE_AS to hide your invalid local domain name, and SMART_HOST to direct it to use their mail server. "masquerade envelope" and "accept unresolvable domains" also help things along.
I used to think that sendmail was a nightmare to configure. Well, maybe I'm wrong, but the current system seemed dead easy to me. So here we go -
In this example, I have used the following information. Replace it with yours wherever it appears.
ISP's domain name yourisp.net
ISP's mail server smtp.yourisp.net
Your machine's hostname hostname
Local domain domain.local
1. # cd /etc/mail
2. # cp freebsd.mc hostname.domain.local.mc
3. edit hostname.domain.local.mc to include the following lines. (For more information, check out the README file indicated in the first few lines of that file)
define(`SMART_HOST', `smtp.yourisp.net') MASQUERADE_AS(`yourisp.net') FEATURE(`masquerade_envelope') FEATURE(`accept_unresolvable_domains')
1.Tell sendmail to always send mail through you isp's mail server
2.Use your isp's domain name when sending email
3.Use that name in most places
4.Accept emails even if DNS is failing at the moment. (say, if you are not connected yet)
4. # make install restart (that should `compile' the config file into the .cf file, copy it to sendmail.cf, and restart sendmail)
The only dumb question is a question not asked.
The only dumb answer is an answer not given.
|email, mail, send-pr, sendmail|
|Thread||Thread Starter||Forum||Replies||Last Post|
|send files to email||milo974||OpenBSD General||7||1st September 2008 02:03 PM|
|Send email to all local users||cajunman4life||FreeBSD General||8||15th June 2008 10:52 AM|
|What do do with these machines?||billousek||Off-Topic||8||11th June 2008 01:04 PM|
|Importing private messages?||BSDfan666||Feedback and Suggestions||2||2nd May 2008 09:22 PM|