Solved

Where to set aliases / forward email to different user

Posted on 2004-08-25
11
185 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
Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

 
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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Suggested Solutions

Marketers need statistics and metrics like everybody else needs oxygen. In this article we explain how to enable marketing campaign statistics for Microsoft Exchange mail.
This process describes the steps required to Import and Export data from and to .pst files using Exchange 2010. We can use these steps to export data from a user to a .pst file, import data back to the same or a different user, or even import data t…
Familiarize people with the process of utilizing SQL Server stored procedures 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 Micr…
In this video we show how to create a User Mailbox 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 Recipients >> Mailb…

734 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