Solved

Where to set aliases / forward email to different user

Posted on 2004-08-25
11
186 Views
Last Modified: 2013-12-18
For some reason I set up mail going to one user to be forwarded to root a long time ago. Now I can't find where I set this up at. I have checked the aliases files but there was no entry for mail to be forwarded to root.

I also looked for a .forward file in the user's home directory but couldn't find one.

Where else could this be set, to forward email for one user to another?
0
Comment
Question by:jsfald
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
11 Comments
 
LVL 34

Expert Comment

by:PsiCop
ID: 11894201
Well, what OS, version and MTA? We're Experts, not mindreaders.
0
 
LVL 1

Author Comment

by:jsfald
ID: 11895975
My expectations of your mind reading powers have been greatly diminished. =)

Sendmail (obviously) 8.12.10
Redhat Linux
procmail
0
 
LVL 34

Expert Comment

by:PsiCop
ID: 11896054
OK, sendmail v8.12.10. Not bad. I assume you inherited this server?

sendmail can be configured to look for .forward files in almost any place on the local machine (and, I imagine, in remote-mounted filesystems as well).

If you use the .mc file method of sendmail configuration (and you should), then the confFORWARD_PATH definition defines what places sendmail checks for .forward files. My point here is that just checking the user's Home Directory is not sufficient if the sendmail daemon has been told to look other places.

Such redirection can be accomplished with a VirtualUser table as well. Look for FEATURE(`virtualusertable') in the sendmail.mc

Also, this can be done with an aliases file (generally found at /etc/mail/aliases)
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 34

Expert Comment

by:PsiCop
ID: 11938663
Hello?
0
 
LVL 1

Author Comment

by:jsfald
ID: 11942739
I looked at aliases and the virtualuser table and didn't find anything. There also was not a confFORWARD_PATH definition in the .mc file. The forwarding doesn't always take place now, only for the cron and log file emails. Is root always suppose to get those emails even if there is an entry in aliases for root to forward to another user? The other user also gets an amail.
0
 
LVL 34

Expert Comment

by:PsiCop
ID: 11943146
OK, without a confFORWARD_PATH entry in sendmail.mc (assuming that is the sendmail.mc that was used to build the *current, running* sendmail.cf), sendmail will only look for ~/.forward. Altho if an alternative delivery agent is used, such as FEATURE(LOCAL_PROCMAIL), then sendmail doesn't handle final delivery and the rules that apply are whatever ones the local delivery agent uses.

cron job outputs are supposed to be sent to whichever user owns the cron job. Exactly how delivery is accomplished I'm not sure, altho from the design standpoint, I note that cron cannot depend on sendmail to be running, so cron may be depositing the files directly into the user's mail queue (/var/mail/<username>) as opposed to using a delivery agent like sendmail. That would bypass any .forward or aliases.
0
 
LVL 1

Author Comment

by:jsfald
ID: 11943535
At the end of my .mc file I have a

MAILER(smtp)
MAILER(procmail)

Am I only suppose to have one of the two entries? Would this cause duplicate emails to be received? (This is another problem I just noticed. I sent an email from "localhost" from one user to root and two messages were received by the "alias" user.)
0
 
LVL 34

Accepted Solution

by:
PsiCop earned 100 total points
ID: 11943671
Ah. Well, that is a little off...or at least non-standard.

According to the sendmail docs I've read, the *minimum* entries should be:

MAILER(SMTP)dnl
MAILER(LOCAL)dnl

and they should appear at the end of the file.

Its my understanding, if ProcMail is to be used, the proper way to do it in sendmail v8.12.x is:

FEATURE(LOCAL_PROCMAIL)dnl

That assumes ProcMail is in /usr/local/procmail - if it is elsewhere, then use:

FEATURE(LOCAL_PROCMAIL,`/path/to/procmail')dnl

Note I'm doing this entirely from memory, so verify my syntax with your sendmail docs.

Since you lack

MAILER(LOCAL)dnl

I dunno how sendmail is resolving the local delivery. I suspect aliases and ~/.forwards are being ignored entirely in favor of /etc/.procmailrc and/or ~/.procmailrc
0
 
LVL 1

Author Comment

by:jsfald
ID: 11944712
My path to procmail is /usr/bin/procmail. The line in sendmail read, FEATURE(`local_procmail',`',`procmail -t -Y -a $h -d $u $f' )dnl
I changed it to just read FEATURE(`local_procmail') and re-compiled the configuration file.
My initial tests indicate that the problem is solved. Thanks for you help.

0
 
LVL 34

Expert Comment

by:PsiCop
ID: 11944970
If your ProcMail install is in /usr/bin/procmail and you put in the standard sendmail macro FEATURE(LOCAL_PROCMAIL) with no path spec, then you may have broken ProcMail. Just FYI.
0
 
LVL 1

Author Comment

by:jsfald
ID: 11945173
Thanks, I added and tested it just to be safe. Thanks again.
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Email signatures have numerous marketing benefits. Here are 8 top reasons to turn your email signature into a marketing channel.
This article outlines some of the reasons why an email message gets flagged as spam on a recipient's end.
To show how to create a transport rule in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Rules tab.:  To cr…
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…

729 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