Configure sendmail for SMTP relay with your ISP
2009-09-26
709 words
4 mins read
http://cri.ch/linux/docs/sk0009.html
I have copied the document from the above link without modifications
Author: Sven Knispel
Updated: 05-01-2005
Feedback welcome: <a href="mailto:linux@cri.ch">linux@cri.ch
Free service provided by: <a set="yes" linkindex="2" href="http://cri.ch/">www.cri.ch
The following article explains the setup of sendmail for forwarding mails to your ISP’s smtp server.
It is assumed that you have sendmail up-to-date and configured properly.
_Note: this setup does not work properly for smtp-server using
1
|
(e.g. like
1
|
)
Most of the commands must be executed with the corresponding rights (using
1
|
).
1. configure your smtp-server
(this requires that you have the package
1
|
installed)
1.1. changes to
1
|
Uncomment the definition
1
|
and add the correspondign
1
|
to it:
1
|
Note: Please note, that these are ”oriented” quotes.
1.2. create the new
1
|
Stop sendmail by issuing the command
1
|
and log on as
1
|
to issue this command.
1
|
1
|
1.3. Define the account information for connecting to the smtp-server
Edit/create
1
|
and add the following line:
1
|
_Note:_The
1
|
may vary depending on the capabilities of the smtp-server (e.g.
1
|
).
Create
1
|
:
1
|
and finally restart sendmail:
1
|
1.4. Configure header rewriting (optional)
Header rewriting consists in replacing the
1
|
and
1
|
in the header of an outgoing mail in order for the recipient to reply to a valid address.
This can be set by editing the file
1
|
:
1
|
E.g.:
1
|
Finally create the corresponding database:
1
|
… and finally restart sendmail:
1
|
1.5. Test your settings
Issue following commands and check the trace for verifying the delivery path:
1
|
Should show a ”local” delivery.
1
|
Should show a delivery path through your ISP.
For troubleshooting you should check the mail-log:
1
|
2. Forwarding
Forward can be defined in
1
|
. (just enter the e-mail addressto forward to). _Note:_The permissions of that file must be adjusted correspondingly in order to avoid sendmail ignoring it (see
1
|
in case of problems).
3. References
For further information I recommend to check following link:
- <a linkindex="3" href="http://www.pl-berichte.de/work/server/mailserver.html">http://www.pl-berichte.de/work/server/mailserver.html
- <a linkindex="4" href="http://www.sendmail.org/%7Eca/email/auth.html">http://www.sendmail.org/~ca/email/auth.html
Related Articles:
- 2009/09/26 Script to generate a html file with link to all files in directory
- 2009/09/17 top command with rc to make it more useful and beautiful.
- 2009/09/17 Diff Linux command — Find the difference in files the easier way.
- 2009/08/12 Consider your account to be for you then use Linux
- 2009/07/20 bash tutorial for begineer and experienced.
Authored By Amit Agarwal
Amit Agarwal, Linux and Photography are my hobbies.Creative Commons Attribution 4.0 International License.