sendmail aliases not being honored


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users sendmail aliases not being honored
# 1  
Old 01-10-2006
sendmail aliases not being honored

Running sendmail Version 8.12.10+Sun on Solaris 9.

I need to send mail from this server (serverA) to the mail server (Mserver), which will relay the message to the correct user. If I specify the user specifically, as in:
Code:
mailx -s"test" John.Doe@company.com
test
.

It works perfectly and the message is delivered. But if I try to use an alias, sendmail never expands the alias and just tries to send the mail as the alias. For example, in /etc/mail/aliases I have an entry that says:

Quote:
root: John.Doe@company.com,Jim.Bob@company.com
But it gets sent out like this:

Quote:
serverA:/etc/mail# root... Connecting to Mserver.company.com. via relay...
220 Mserver.company.com ESMTP Sendmail 8.13.3+Sun/8.13.3; Tue, 10 Jan 2006 15:19:50 -0500 (EST)
>>> EHLO Mserver.company.com
250-Mserver.company.com Hello serverA.company.com [192.168.0.4], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-EXPN
250-VERB
250-8BITMIME
250-SIZE 10485760
250-DSN
250-ETRN
250-DELIVERBY
250 HELP
>>> MAIL From:<Jim@serverA.company.com> SIZE=53
250 2.1.0 <Jim@serverA.company.com>... Sender ok
>>> RCPT To:<root@serverA.company.com>
>>> DATA
550 5.7.1 <root@serverA.company.com>... Relaying denied
503 5.0.0 Need RCPT (recipient)
>>> RSET
250 2.0.0 Reset state
# 2  
Old 01-10-2006
Probably you have already doen this, but did you remember to rebuild the alias database after updating the aliases file?
# 3  
Old 01-10-2006
Quote:
Originally Posted by reborg
Probably you have already doen this, but did you remember to rebuild the alias database after updating the aliases file?
Yes, I have run newaliases.
# 4  
Old 01-11-2006
Check your access database (/etc/mail/access*) - you probably have to 'tell' sendmail you will accept mail from serverA. You can verify this by running the same command you posted and use harrypotter@notrealdomain.com as the rcpt (I doubt that is in your /etc/mail/access file since it isn't a real domain)

From some old notes I have, you would update the /etc/mail/access file, then run makemap hash /etc/mail/access < /etc/mail/access to build the /etc/mail/access.db. Then restart sendmail. This would be done on your Mserver.

Last edited by RTM; 01-11-2006 at 06:38 AM..
# 5  
Old 01-11-2006
Quote:
Originally Posted by RTM
Check your access database (/etc/mail/access*) - you probably have to 'tell' sendmail you will accept mail from serverA. You can verify this by running the same command you posted and use harrypotter@notrealdomain.com as the rcpt (I doubt that is in your /etc/mail/access file since it isn't a real domain)

From some old notes I have, you would update the /etc/mail/access file, then run makemap hash /etc/mail/access < /etc/mail/access to build the /etc/mail/access.db. Then restart sendmail. This would be done on your Mserver.
I dont have access to the mail relay server. But I do know that it accepts email from my server (serverA), because if I send an email to a specific address, such as John.Doe@company.com, it works. The only problem is the aliases. My server doesnt honor aliases and instead tries to send to Mserver as root@company.com.
# 6  
Old 01-11-2006
One update:

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

So I can see that the problem is on my machine, serverA. I just can't figure out why the aliases wont work.
# 7  
Old 01-11-2006
What does "ls -l /etc/mail/alias* /usr/lib/sendmail" give you?
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