Sendmail configuration.

Is it possible to configurate sendmail so it gives root al mail with wrong adress. (For exampel mail to users which not exist) Instead of replying with the MailerDemoan message???

How do I get it to work this way???
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.

Define the postmaster as root.
puckoAuthor Commented:
It's probably a good ansver, but can you tell me how to do that??? I don't know what to change, and where.

Check your aliases file, in this place you define alias for addresses. By the way, there is usually a rule that re-routes all the MailerDaemon message to somebody of your choice already included in this file. MOre info in your man pages for sendmail and aliases
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

puckoAuthor Commented:
You can se my aliasesfile here. What is wrong in in???
And the man-pages for aliases doesn't say a ****!
(Have tou cheked them ??)

#      @(#)aliases      8.2 (Berkeley) 3/5/94
#  Aliases in this file will NOT be expanded in the header from
#  Mail, but WILL be visible over networks or from /bin/mail.
#      >>>>>>>>>>      The program "newaliases" must be run after
#      >> NOTE >>      this file is updated for any changes to
#      >>>>>>>>>>      show through to sendmail.

# Basic system aliases -- these MUST be present.
MAILER-DAEMON:      postmaster
postmaster:      root

# General redirections for pseudo accounts.
bin:            root
daemon:            root
games:            root
ingres:            root
nobody:            root
system:            root
toor:            root
uucp:            root
webmaster:      root

# trap decode to catch security attacks
decode:            root

# Person who should get root's mail
root:            pucko       abcdef
It's not a good idea to alias root (root: pucko abcdef).

In your /etc/ set:



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
Yes I checked it, and I agree with ahoffman, but before you modify get rid of the alias for root and give it a try.
puckoAuthor Commented:
Just a line with OPpstmaster????

It doesn't work!
puckoAuthor Commented:
OK! I have a # before root: pucko now....

It doesn't work anyway...
Please, get rid of the alias for root, you have to restart your sendmail daemon and make sure it reads the correct files, also that it rebuilds the aliases database, if you try using the -v option (verbose) you can follow what is happening and maybe find out what is going on.
puckoAuthor Commented:
I have removet the alias a loong time ago...
puckoAuthor Commented:
How do I Kill and restart my sendmaildeamon whithout doing a reboot????
About the aliases part. just postmaster: root in the file don't work.
if you have a SYS-V style UNIX:

  kill -9 'ps -ef | grep sendmail | awk '{print $2}'`

or if BSD style UNIX:

  kill -9 'ps -ax | grep sendmail | awk '{print $1}'`

then restart senmail as it will do by your rc* scripts.

It's less cryptic if you hace a rc script (usually in /etc/rc.d/) which starts and stops sendmail, then you can do:

  cd /etc/whereever_your_script_are
  ./sendmail_script stop
  ./sendmail_script start
puckoAuthor Commented:
But that you sai about set OPpostmaster.
Do you mean that I just shall have a row OPpostmaster ??
Nothing more???
(It doesn't eork for me...)
Do you have the ErrorMode option set in your, like:

puckoAuthor Commented:
Don't think so. I put my in

Mabe it easier for you to answer my question if you see it.

  #O ErrorMode=print
  #O Postmaster=root
  O ErrorMode=mail
  O Postmaster=root

I'm not shure (for now) if
  #O PostMasterCopy=Postmaster
must also be enabled (by removing the initial #).

TAKE CARE, your was generated by m4. So there is a master file, probaly sendmail.m4, where was generated from. You should make changes there too.
puckoAuthor Commented:
It dosn't work. The O Postmaster=root that was in the file was something I tested before and sendmail doesn't like it.....

But anyway, The problem is solved. I took a look at

And figured it out by my self.

Thank's for trying!

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

From novice to tech pro — start learning today.