Sendmail Config


I've got my linux webserver working finally, using webmin and virtualmin,
and i am able to recieve emails for my domain.
My problem comes in when i try sending mail.....
I get an error saying that relaying is not allowed.
I've messed around with this but i cannot find where I can allow relaying for any domain hosted on the server...
(not just a specific mailbox or user)

(i'm not physically using the server to send the mail, its through another computer on the network).
So how do i configure sendmail?

if its possible through webmin then that would be even more helpfull...

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

you need to add entries for your clients in the access database.  This is usually located somewhere near /etc/mail/access.  You need to add rules for the clients who should be relayed:

localhost.localdomain     RELAY
localhost                       RELAY                      RELAY
192.168.                       RELAY

this will allow localhost and anyone with an ip of 192.168.*.* to send mail through the server.  Then you just have to remake the access database.  My /etc/mail directory has a Makefile in it so I just run "make" to remake the database, but you can do it by hand using: makemap hash access.db < access  inside the /etc/mail directory.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
This is a new security feature to prevent someone from using your email server for spam mail.

u have to follow these to make sure u do not get this error.
User's IP address most be added to the /etc/hosts file
Legal IP addresses or domain names must be added to /etc/mail/access file
To allow all IP's in starting with 192.168.1, enter 192.168.1 relay
To allow a domain name such as, enter relay
if u are using webmin
1. Allow relay from approved email addresses using the spam control feature

Relay Domains

If you have domain routing configured, you must list those domains as domains to which relaying is allowed. This is a spam control feature that prevents spammers from using your system as an open email relay. In addition, Sendmail will reject incoming mail messages that are not for local users and not for a listed domain, further strengthening your system against hostile spammers.

To allow relaying to a domain named, for example,, type its name into the list box and click the Save button (see Figure 10-56).

check this link.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Networking

From novice to tech pro — start learning today.