Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sendmail: Problem with aliases

Status
Not open for further replies.

TSch

Technical User
Jul 12, 2001
557
DE
Hi folks,

we're using several aliases under /etc/aliases on our machines for sending mails via sendmail (AIX "mail" command).

e.g.:

errpt_admins:user1@company.de,user2@company.de

Today the administrator of our external mailserver that's receiving all the mails from the AIX boxes found out that the AIX mail command - when using an alias - not only sends the mails to user1 and user2 but also tries to send the mails to a user errpt_admins@company.de that does not exist.

Is there any way to prevent sendmail from trying to send the mail not only to the users but also to the alias ??

Regards
Thomas
 
Use sendmail instead!

Code:
The sender of a message is not included when the sendmail command expands an alias address. For example, if amy sends a message to alias D998 and she is defined as a member of that alias, the sendmail command does not send a copy of the message to amy.


Regards,
Khalid
 
Thomas,

If you still want to use the mail command then you have to define your aliases in the .mailrc file!

Code:
To set aliases for two users and a distribution list that includes several users, enter the following in your .mailrc file: 

alias george george@thor.valhalla.dbm.comm
alias bill @odin.UUCP:@depta.UCCP:@deptb:bill@deptc
alias mygroup amy@cleo george bill
To send mail to user bill using his alias, enter: 

mail bill
To send mail to everyone in the mygroup list, enter: 

mail mygroup
When you complete and send the message, the mail command actually addresses it as follows: 

amy@cleo george@thor.valhalla.dbm.comm @odin.UUCP:@depta.UCCP:
@deptb:bill@deptc


Regards,
Khalid
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top