Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Where to set aliases / forward email to different user

Posted on 2004-08-25
11
Medium Priority
?
189 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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 400 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

The new Gmail Phishing Scam going around is surprising even the savviest of users with its sophisticated techniques.
The main intent of this article is to make you aware of ‘Exchange fail to mount’ error, its effects, causes, and solution.
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Suggested Courses

610 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