DaemonForums  

Go Back   DaemonForums > Miscellaneous > Guides

Guides All Guides and HOWTO's.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 1st May 2008
robbak's Avatar
robbak robbak is offline
Real Name: Robert Backhaus
VPN Cryptographer
 
Join Date: May 2008
Location: North Queensland, Australia
Posts: 366
Thanked 40 Times in 39 Posts
Default 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)


Code:
define(`SMART_HOST', `smtp.yourisp.net') 
MASQUERADE_AS(`yourisp.net')
FEATURE(`masquerade_envelope')
FEATURE(`accept_unresolvable_domains')
these lines:
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.
Reply With Quote
Reply

Tags
email, mail, send-pr, sendmail

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
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


All times are GMT. The time now is 03:05 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick