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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sendmail Help

Status
Not open for further replies.

gallows

Technical User
Jun 12, 2004
223
0
0
US
We have the latest version/patches of Sendmail, Solaris 9.
Currently, we use a relay set up to send to our Exchange server.
What we would like to do is for all incoming mail to be routed back out to a different email address on the Exchange Server. In other words, we do not want to have to log into our Unix servers to check mail. Is this possible to do?

Thanks,
Gallows
 
Have a look at the following:
man sendmail
man forward


I hope that helps.

Mike
 
Gallows,

I believe if you edit /etc/mail/aliases you can achieve the desired results. The syntax would look something like this for accounts named testuser and sgreen:

testuser bobjones@hotmail.com
sgreen bonecrusher@gmail.com

If for some reason my syntax is wrong just do a man page on aliases and it should have more information. Also, after you edit the file don't forget to run the newaliases command so that it can update the user database.

Good luck!
bp
 
Thanks bp.
I have an alias for me set up, but that is for outgoing mail. I send the results of cronjobs to myself that way. I didn't see where it would be for incoming mail.
 
I think it works for incoming and outgoing mail, but could be mistaken. Anyone else have any experience with using the /etc/mail/aliases file?
 
/etc/mail/aliases are only in play if the machine thinks the mail is for itself, typically /etc/mail/local-host-names.

If you are using NIS, you could generate an alias map, say map each user account:

myunixaccount: first.lastname@exchange.mydomain.com

So for each Unix Machine, local mail would forward to your exchange server. This could also be accomplished by individual .forwards on all your homedirs.

Is ALL your mail going through the Unix Gateway or only unix based mail?
 
Do you have Sendmail up and running at all times? You might be able to write a re-write rule to send all mail to a specified address.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top