langille.org [NEW DOMAIN] <=== freebsddiary[MAIL SERVER] <== INTERNET <== fred.logic.com[ ANY FOREIGN CLIENT]
I use langille.org as an example domain.
Just registered this domain few days back.
My Mail server is freebsddiary.
As of now my sendmail doesnt know about that domain.
I will have to tell the server about this new domain.
My Mail server doesn't accept incoming mail for that domain(langile.org).However may mail is registered as the mail host for that domain.
Type the following command :
langille.org mail is handled (pri=5) by freebsddiary.yi.org
If someone tried to send mail to langille.org, it will arrive at freebsddiary.org(my mail server) but it will be refused.
Logs will report:
Oct 30 11:04:44 ducky sendmail: LAA98224: ruleset=check_rcpt,
Oct 30 11:04:44 ducky sendmail: LAA98224: from=
class=0, pri=0, nrcpts=0, proto=ESMTP,
Note that above example represents mail being sent to langille.org from an external domain. It is incoming mail.
To allow sendmail to receive mail for langille.org, I added the following entry to
/etc/mail/sendmail.cw (after sendmail version 8.10, this file is local-host-names).
Then I told sendmail to re-read it's configuration files by issuing the following commands.
# killall -hup sendmail
Your friend's domain is retch.org. You wish to allow your friend to use your mail server. The box he will be sending mail from is dry.retch.org.
You would add the following entries to the files on your mail server:
The above tells your mail server to accept outgoing mail from the host dry.retch.org.
The above tells your mail server to accept incoming mail for the domain retch.org (after sendmail version 8.10, this file is local-host-names).
/etc/mail/relay-domains contains a list of hosts which are allowed to relay mail through your mail server. This list may consist of either specific hosts or whole domains.
/etc/mail/sendmail.cw (after sendmail version 8.10, this file is local-host-names) contains a list of domains for which your mail server will accept mail. This list is usually the domains hosted by your machine.