![]() | ![]() | ![]() | ![]() |
|
faq search add article cool-stuff how-to main tips |
Posted by Santhosh Joseph on Monday January 21, @06:28AMfrom the dept. Setup your machine as mail server Here's a simple way to setup your machine as e-mail server. For receiving mails though, you need POP/IMAP Servers like qpopper. For the sake of brevity and to avoid confusion, this howto deals with only the sending part. Setting up qpopper on a LAN and fetching mails from outside world etc. will be dealt with later (any volunteers ?). I have choosen source-code installation method As with other chucktips posts, this howto is intended for the uninitiated. It is assumed that you have FreeBSD installed and have a dial-up connection to the Internet (Cable, DSL etc. are perfectly acceptable). Here, Mail Server means the machine where this installation is done. Mail client means a software such as Kmail on the same machine or on a different machine on the LAN (with any OS ) Warning : If you have another MTA (like sendmail, qmail etc.) running, do take necessary precautions and please read the relevent portion of the postfix manual before you proceed ! Pre-Installation Make sure that the hostname has been specified in rc.conf file. # ee /etc/rc.conf For eg. mine looks like : hostname="bsdbox.bsdfarm.den" In the same file, ensure that sendmail_enable is set to "YES" : sendmail_enable="YES" Installation Download the postfix source code (postfix-1.1.0.tar.gz - 1.1MB), from mirrors on http://www.postfix.com Login as root and open a terminal window and move to the directory where postfix-1.1.0.tar.gz is and type # tar -zxvf postfix-1.1.0.tar.gz # cd postfix-1.1.0 # make Create a group - 'postdrop' followed by a user - 'postfix'. Do not assign a password to this account. We will use FreeBSD's sysinstall utility for the purpose (you can use any method of your choice). # /stand/sysinstall Select Configure -> User Management -> Group Add Add the group name as postdrop and select OK. Next, Select Configure -> User Management -> User Add the Login ID as postfix and select OK. Ignore any warnings. Go back to the directory where the postfix sources are and type # make install This will be followed by series of questions. Accept the defaults by pressing the enter key. At the end of the installation, you'll be asked to configure /etc/postfix/main.cf. For now, ignore it an type # /usr/bin/newaliases If you are on a dial up line (like me), your mail has to be queued on the server until the next connection is made to the Internet. This means that postfix should not attempt to send the mail to the remote destination as soon as it receives it (i.e, when the send button of the mail client is clicked). On a dial-up connection , the mail has to be send from the server to it's destination, only after the internet connection has been established. For this, edit /etc/postfix/main.cf and add this line: defer_transports = smtp (not required for 'Internet - always connected situations' like, Cable, DSL etc) Postfix is now ready to roll. Start the postfix mailer system by typing : # postfix start Note :Postfix will start automatically on next reboot. Testing Open your favorite mail client and set the smtp server as localhost (if on the server machine else give the ip number of server machine) at port 25. Type a test message, say your yahoo! id and click send. Your mail client would indicate that the mail has been sent. Actually, it's been queued on your machine and has not been send yet. To send all queued messages, connect to the Internet and as root and type : # sendmail -q Note: I prefer setting the /usr/sbin/sendmail permission to 'root only execute' Your mail should now be sent to your indicated email address. Check the manual for more advanced configuration. Do post your comments and feed back.
< | >
|
|
|||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||
| "You never know how many friends you have until you own a Condo on the beach." -- Jason's Postulate |
|
| All trademarks and copyrights on this page are owned by their respective companies. Comments are owned by the Poster. The Rest ©2001 Jason Neumann. |