Solved

Sendmail configuration.

Posted on 1997-10-11
17
292 Views
Last Modified: 2013-12-15
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???
0
Comment
Question by:pucko
  • 9
  • 4
  • 4
17 Comments
 
LVL 4

Expert Comment

by:jlms
ID: 1630170
Define the postmaster as root.
0
 
LVL 1

Author Comment

by:pucko
ID: 1630171
It's probably a good ansver, but can you tell me how to do that??? I don't know what to change, and where.

0
 
LVL 4

Expert Comment

by:jlms
ID: 1630172
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
0
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 
LVL 1

Author Comment

by:pucko
ID: 1630173
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
0
 
LVL 51

Accepted Solution

by:
ahoffmann earned 50 total points
ID: 1630174
It's not a good idea to alias root (root: pucko abcdef).

In your /etc/sendmail.cf set:

OPpostmaster

0
 
LVL 4

Expert Comment

by:jlms
ID: 1630175
Yes I checked it, and I agree with ahoffman, but before you modify sendmail.cf get rid of the alias for root and give it a try.
0
 
LVL 1

Author Comment

by:pucko
ID: 1630176
Set???
Just a line with OPpstmaster????

It doesn't work!
0
 
LVL 1

Author Comment

by:pucko
ID: 1630177
OK! I have a # before root: pucko now....

It doesn't work anyway...
0
 
LVL 4

Expert Comment

by:jlms
ID: 1630178
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.
0
 
LVL 1

Author Comment

by:pucko
ID: 1630179
I have removet the alias a loong time ago...
0
 
LVL 1

Author Comment

by:pucko
ID: 1630180
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.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1630181
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
0
 
LVL 1

Author Comment

by:pucko
ID: 1630182
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...)
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1630183
Do you have the ErrorMode option set in your sendmai.cf, like:

Oem
0
 
LVL 1

Author Comment

by:pucko
ID: 1630184
Don't think so. I put my sendmail.cf in ftp://a201.ryd.student.liu.se/Incoming/

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

0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1630185
change
  #O ErrorMode=print
  #O Postmaster=root
to
  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 sendmail.cf was generated by m4. So there is a master file, probaly sendmail.m4, where sendmail.cf was generated from. You should make changes there too.
0
 
LVL 1

Author Comment

by:pucko
ID: 1630186
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
http://www.redhat.com/support/docs/rhl/Sendmail-Virtual-Hosts-Tips/Sendmail-Virtual-Hosts-Tips-4.html

And figured it out by my self.

Thank's for trying!


0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Linux Filesystems reporting faster growth than actual file growth... 7 60
php ssh2_scp_send 1 61
CentOS 7 Installation 7 75
SonarQube on Linux vs Windows 3 28
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question