sendmail aliases not being honored


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users sendmail aliases not being honored
# 8  
Old 01-11-2006
Code:
ls -l /etc/mail/alias* /usr/lib/sendmail
-rw-r--r--   1 root     bin          399 Jan 10 14:56 /etc/mail/aliases
-rw-r-----   1 root     smmsp      40960 Jan 10 14:55 /etc/mail/aliases.db
-r-xr-sr-x   1 root     smmsp     976724 Sep 23  2003 /usr/lib/sendmail*

# 9  
Old 01-11-2006
Then check /etc/mail/sendmail.cf - O AliasFile=/etc/aliases
or O AliasFile=/etc/mail/aliases

If it's /etc/aliases, make sure there is a link for it to /etc/mail/aliases.
# 10  
Old 01-11-2006
Those file permissions match what I have. How about:
grep aliases /etc/nsswitch.conf
# 11  
Old 01-11-2006
Quote:
Originally Posted by RTM
Then check /etc/mail/sendmail.cf - O AliasFile=/etc/aliases
or O AliasFile=/etc/mail/aliases

If it's /etc/aliases, make sure there is a link for it to /etc/mail/aliases.
I think youre onto something. I thought that sendmail checks the /etc/mail/aliases file by default. Anyways I looked and it was commented out, so I uncommented it and saved the file. Then I ran newaliases and got this. I must have something misconfigured.

Code:
/etc/mail/aliases: line 11: MAILER-DAEMON... cannot alias non-local names
/etc/mail/aliases: line 12: postmaster... cannot alias non-local names
/etc/mail/aliases: line 13: nobody... cannot alias non-local names
/etc/mail/aliases: line 15: root... cannot alias non-local names
/etc/mail/aliases: line 17: some-admins... cannot alias non-local names
/etc/mail/aliases: 0 aliases, longest 0 bytes, 0 bytes total

# 12  
Old 01-11-2006
Quote:
Originally Posted by Perderabo
Those file permissions match what I have. How about:
grep aliases /etc/nsswitch.conf
# grep aliases /etc/nsswitch.conf
aliases: files
# 13  
Old 01-11-2006
OK so I found this on the sendmail FAQ:
Quote:
Subject: Q4.10 -- How can I solve "cannot alias non-local names" errors?
Date: March 24, 1997

I upgraded from my vendor's sendmail to the latest version and now I'm getting these error messages when I run "newaliases":

/etc/aliases: line 13: MAILER-DAEMON... cannot alias non-local names
/etc/aliases: line 14: postmaster... cannot alias non-local names

How can I solve this problem?

Your local mailer doesn't have the "A" flag specified. Edit the Mlocal line in sendmail.cf and add "A" to the flags listed after "F=".

Better yet, if you're running a recent version of sendmail that uses m4 to generate .cf files from .mc files, regenerate your sendmail.cf and see if that fixes the problem. Remember to install the new sendmail.cf and restart the sendmail daemon.
So I added A to the flags after F=.

It now looks like this:

Code:
Mlocal,         P=/bin/mail, F=lsDFM5qPrmn9A, S=EnvFromL/HdrFromL, R=EnvToL/HdrToL,
                T=DNS/RFC822/X-Unix,
                A=mail -d $u

Ran newaliases and it worked fine. Sent an email to root and I got the same error. However:

Code:
 /usr/lib/sendmail -bv root
John.Doe@company.com... deliverable: mailer relay, host Mserver.company.com, user John.Doe@company.com
Jim.Bob@company.com... deliverable: mailer relay, host Mserver.company.com, user Jim.Bob@company.com

# 14  
Old 01-11-2006
Replying to myself once again.

I was reading up on sunsolve and found that I cannot use aliases unless I am running the sendmail daemon. I neglected to mention earlier on in the thread that I was not running the daemon, which probably would have tipped you guys off. My apologies for that. Here's a link to the Sunsolve article
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Clarifying sendmail configuration - sendmail-client offline

Hi all, I have read about sendmail running as 2 separate process. 1 as a MSP, and the other as the real daemon or MTA. In my current configuration, the sendmail-client is disabled. Both submit.cf and sendmail.cf are left as default untouch I do not specified any mailhost... (3 Replies)
Discussion started by: javanoob
3 Replies

2. Red Hat

/etc/aliases & Sendmail

I've recently migrated a Solaris 10 server, to Redhat. I've migrated all my crons & scripts and now I'm attempting to set all the aliases, to send to the appropriate accounts. I have a particular user defined in /etc/aliases, however, when a particular script is ran in cron, I do not receive any... (2 Replies)
Discussion started by: Nvizn
2 Replies

3. UNIX for Advanced & Expert Users

sendmail: trusted-users or aliases?

For a project that I have been assigned to, I need to send emails to a business partner (business_partner.com) from one production server. However, my emails neither reach their destination nor bounce back to me. Working with our business partner's IT support, the following error was discovered... (1 Reply)
Discussion started by: alan
1 Replies

4. Shell Programming and Scripting

Using Aliases in a script

Hi all, I have and alias set in .profile like alias ll='ls -la' I am writing a shell script in which i am using "ll" but it gives command not found . Can anyone please tell me how source aliases in the script we write do i need to define it again in every script i write is there any oher... (1 Reply)
Discussion started by: firestar
1 Replies

5. UNIX for Dummies Questions & Answers

Aliases In Unix

Hi, I am new to Unix. I want to know how to setup aliases in Unix. Mean if i write a particular word say scripts then it should take me to scripts directory. Kindly help. (2 Replies)
Discussion started by: amritansur
2 Replies

6. UNIX for Dummies Questions & Answers

Setting aliases

How come if I set an alias as such: alias dt 'date "+%Y-%m-%d %H:%M:%S"' it will work as intended, ie the command 'dt' does prompt the date and time, but not when invoked through a script as such: #!/bin/sh alias dt 'date "+%Y-%m-%d %H:%M:%S"' The OS is FreeBSD 7.1. Thanks in advance (4 Replies)
Discussion started by: figaro
4 Replies

7. Shell Programming and Scripting

etc aliases

Hello: i have several server with own etc aliases. right now i want to combine it all into a general etc aliases in a new freebsd server. cause it consist hundred thousand of record user inside how to make a shell script to combine it or configure it. all etc aliases record example: ... (0 Replies)
Discussion started by: peterLfs
0 Replies

8. UNIX for Dummies Questions & Answers

aliases

Is there a way to view what aliases are running on a given session? (1 Reply)
Discussion started by: BG_JrAdmin
1 Replies

9. Programming

aliases

Hi. I have a C program that is using the **environ pointer and I am trying to set up aliases for a system("/bin/ksh") call. This works for other environment variables but not for the aliases. Does anyone know if this can be done? Thanks ahead of time. (1 Reply)
Discussion started by: mluey61
1 Replies

10. UNIX for Dummies Questions & Answers

Sendmail / Aliases

I'm trying to make a script that will automatically read incoming mail, parse the recipient, then send a file off to the recipient. (Name of file = mail.pl) #!/usr/bin/perl $mailDir = "/var/spool/mail/" $user = print `cat <STDIN> | grep To: | cut -b5-`; print `elm -s Awaiting Mail $user <... (1 Reply)
Discussion started by: ComTec
1 Replies
Login or Register to Ask a Question