where : ibrtses linux
Smtp - Sendmail
The outgoing mail is sent through smtp (simple mail transfer protocol), through an smtp server.
Usually the ISP provides an smtp, but they appear to have no idea, since I got the 'relaying denied' error message at an increasing rate. No surprise since they lay employees off at an increasing rate.
I happened to have a spare Linux machine that was mostly idle anyway, so I set to install an smtp server myself. I admit it wasn't possible without the help of seasoned colleague.
There are books, such as 'Me and Sendmail' with 800+ pages and I didn't have the time, as usual.
Other smtp servers are said to be even more complex to handle than Sendmail. Though basically it is a service waiting on port 25 for emails. With the help of a DNS it figures out where the message is going to be sent to and sends it there.
The Task
Boundary conditions of my Sendmail installation are
- spare always running, very low power { approx 8W } linux machine
- local area network
- connected to the Internet through an ADSL router
- assume the linux machine has the IP : 192.168.x.y, fill x and y
Installing Sendmail
Sendmail is part of the current Suse 8.0 distribution, so from the KDE start the YAST2 Control Center under root access. There : Software, Install/Remove software shows a list of categories.
There select Productivity/Networking/Email/Servers, and make sure Sendmail is installed
or gets installed.
Then also in the YAST2 Control Center goto Networking/Basic and select mail.
After specifiying Permanent Connection go through everything, accepting default values.
Then also in the YAST2 Control Center and still in Networking/Basic, make sure
under Start/Stop Services, Sendmail is not yet running.
Goto another machine and use webmin to configure Sendmail.
So http://192.168.x.y:10000 brings you there.
Goto Servers, Sendmail configuration.
- Sendmail Options : no changes
- Mail Aliases : no changes
- Local Domains : just 'localhost'
- Domain Masquerading : nothing
- Trusted Users : I added the standard user(s), perhaps not necessary
- Address Mapping : none
- Domain Routing : nothing
- Outgoing Addresses : none
- Outgoing domains : add the local network as 192.168.x. { x filled } plus add you pop domain, since your from address has this domain, here in my case now dplanet.ch.
Otherwise you get a relaying denied error when trying to send.
- Domain Mapping : not enabled
- Spam Control : add Mailsource = Network enter 192, choose allow relaying. This means the whole 192.whatever domain can use this server. Since this smtp is behind a router, none from outside can use it, and it can be considered safe. So source = 127 and source = 192 can both relay.
- Relay Domains : none
- Sendmail M4 Configuration : no changes
- Mail Queue : is to check the input queue of emails to be sent, usually empty
- User Mailboxes : Mails can be checked here
Good, so far. Stop Sendmail with the button on the Sendmail configuration page.
Start Sendmail with the same button after it changed the caption.
It should work now.
Running Sendmail
Again in the webmin, goto System, goto Bootup/Shutdown and make sure
Sendmail is there and has a yes in the start at boot column.
Other machines need now the IP of this machine 192.168.x.y { x and y filled } as smpt (or outgoing mail) server, no username, no authentication.
Further this machine's own email prog, such as kmail have to be configured to the same IP,
otherwise it is not sent through this smtp, but direct.
Further, now send an email from this machine to yourself. Any possible error message will be sent to itself and is visible at Webmin, Servers, Sendmail Configuration, User Mailboxes.
Next goto another machine and send an email to yourself. A possible error message will be sent to
itself and is also visible at Webmin, Servers, Sendmail Configuration, User Mailboxes.
This is it.
feedback welcome
sponsored links
Linux stuff
home
last updated 15.Jan.03
Copyright (99,2002) Ing.Büro R.Tschaggelar