At 09:53 PM 12/3/2003, Steve Bertrand wrote:
ie. In some cases, you could send a mail message to [EMAIL PROTECTED], and if the server is listening for incoming mail (sendmail) then it may pick it up and deliver it to a local user.
My lan is set up as follows. My workstation 192.168.0.1 runs windows xp and shares its dialup connection through ics. In its host file it maps my fbsd box 192.168.0.7 to the server name swamisalami. This allows me to ftp, ssh, and also browse to http://swamisalami from my workstation and afaik any other box on the lan.
I use eudora as my email client on the workstation and set up a personality for [EMAIL PROTECTED] I was able to successfully send the following
From [EMAIL PROTECTED] Thu Dec 4 15:12:30 2003 X-Mailer: QUALCOMM Windows Eudora Version 6.0.0.22 Date: Thu, 04 Dec 2003 15:13:12 -0500 To: [EMAIL PROTECTED], [EMAIL PROTECTED] From: Marty Landman <[EMAIL PROTECTED]> Subject: testing Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed
This is a test. If this were an actual email...
Ohhhhhhhhh.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
However, I don't know how to receive email from outside my lan on the fbsd box, nor how to send mail from the fbsd box to other locations.
Besides that I just managed to delete a user's mailbox and don't know how to recreate it. But that just seems to be an omen of how much trouble this is going to take overall. Just part of the learning hyperbola, uh curve -- yeah.
*update* - I received one of the test email msgs; apparently mail (or sendmail) created the /var/mail/marty file on the fly, then removed it again once I deleted the msg. btw, what is the cockamamie mbox thingie about and how do I manage it? uh, sorry about the value judgement implied in that stmt.
You can try this with the #dig command:
Thx, this seems a bit more informative in a way than #whois.
- the IP of your mail server is 192.168.0.10
How do I find out what sendmail's ip adr is? What about the mail server that Eudora uses on the winxp box, does that enter into this if I want to be able to send/receive email on the internet from the fbsd box?
- your default gateway for your network is 192.168.0.1
AFAIK that's right since this is the winxp/dialup shared box's ip.
- your mail server name is mail.example.com
Now I'm lost. Do you mean the name of my ISP's email server?
1> Set up DNS on the server # cd /etc/namedb # chmod 744 make-localhost # ./make-localhost
Question here since I'm so new. Looks like make-localhost's an exec that I've just executed. But when I created /tmp/scratch
FreeB ./tmp/scratch ./tmp/scratch: Command not found. FreeB more /tmp/scratch #!/bin/sh echo Hello World
# ee named.conf Add the following to the bottom of the file:
zone "example.com" { type master; file "example.com.zone"; allow-update { none; }; };
Stopped here since I'm unclear about how to sub for "example.com" but am leaving the rest of your instructions intact for followup.
Marty
Then, up near the top of the file, make the following changes to this section:
# Remove the // from this line: // forward only;
# and remove the /* and the */ from this section, and change the 127.0.0.1 to the IP address of your ISP DNS server: /* forwarders { 127.0.0.1; }; */
Now create a zone file for this zone:
# ee /etc/namedb/example.com.zone
Add the following information to this empty file:
--- start clip here ---
$TTL 360 ; Default cached time to live for all records
example.com. IN SOA ns.example.com. [EMAIL PROTECTED] ( 2003120401; Serial 172800 ; Refresh every 2 days 3600 ; Retry every hour 1728000 ; Expire every 20 days 172800 ); Minimum 2 days
@ IN NS ns.example.com.
; Set the Mail Exchange record
@ IN MX 10 mail.example.com.
ns IN A 192.168.0.10 mail IN A 192.168.0.10 client IN A 192.168.0.25 router IN A 192.168.0.1
--- end clip ---
Now, tell your name server to look to itself for resolution of names:
# echo "search example.com" > /etc/resolv.conf # echo "nameserver 127.0.0.1" >> /etc/resolv.conf
Now go configure your windows or whatever client computers to use 192.168.0.10 as it's DNS server.
2> Start the nameserver and load it at startup: # /usr/sbin/named
Now, add the following 2 lines to your /etc/rc.conf file:
named_enable="YES" named_program="/usr/sbin/named"
3> Configure sendmail # cd /etc/mail # echo "example.com" > relay-domains # echo "example.com" > local-host-names # echo "192.168.0 RELAY" > access
4> Reload sendmail # kill -HUP `cat /var/run/sendmail.pid` or just reboot
5> Add some users on the mail server # man adduser
6> Install qpopper # cd /usr/ports/mail/qpopperpop3 stream tcp nowait root /usr/local/libexec/qpopper qpopper -R -s -c -T 300 # make install clean
# ee /etc/inetd.conf Add the following line under the existing pop3 line in this file. Keep the existing one commented. (Note that if the mail line break breaks the line, it should be on a single line when entered in the file)
pop3 stream tcp nowait root /usr/local/libexec/qpopper qpopper -R -s -c -T 300
7> Reload inetd # kill -HUP `cat /var/run/inetd.pid` or just reboot
8> Try sending the user an email (whilst logged into the server console or ssh)
# mail -s "This is a test" [EMAIL PROTECTED] # This is the body of the message. The last line in a command # line mail will always be the '.' character to denote the end # of a message # .
9> Check to see if sendmail delivered it to the users mailbox. # ll /var/mail | grep user
If his file has more than 0 bytes in it, then he's got mail.
10> Configure your client machine to check email You can set up a new account in outlook or evolution, mozilla or what have you, just configure it with the account name the same as the user name, and the pop3 and smtp servers both as mail.example.com. This will resolve because as described in section 1, you have already configured this machine to look to your DNS server, who has authority to resolve the example.com domain.
11> Check && send email If you receive email for this user into the account, then thank god -- I didn't overlook anything, and you didn't miss any small things in this howto.
Now, using your main (real, outside) email account, send a message back to this list to tell us that things are working.(Don't forget to change the smtp server to the new box first)
YOU WILL NOT be able to send email to the outside world from the new test account, as when it gets to us, we will respond to someone who honestly owns the domain, which won't be you.
Please advise on any errors or omissions. All of this was done from memory (well, almost all).
Cheers,
Steve
> Marty Landman Face 2 Interface Inc 845-679-9387
> Sign On Required: Web membership software for your site
> Make a Website: http://face2interface.com/Home/Demo.shtml
>
> _______________________________________________
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
--
Steve Bertrand President/CTO, Northumberland Network Services
t: 905.352.2688 w: www.northnetworks.ca
_______________________________________________ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"