Solved

Email auto-reply problem (vacation program)

Posted on 2002-07-04
23
2,564 Views
Last Modified: 2013-12-17
I believe that here's the right place to put this question, most of the mail experts are here.

Here's my situation:

All the staff in the organization has a standard email address, eg: yuzh@abc.com and the mailhost of the orgnization  maintains the email aliases and foward the emails to the REAL mail servers.

The department has it own subnet (sun domain), it is use NIS+ (mainly Solaris boxes) and it has its own mail server. the mail server is running on Solaris 7 (SPARC) use sendmail.

My problem:
I try to setup mail auto reply use "vacation" program, and I find that I only work when people in the NIS+  domain send mail to the user,  but it will not work when the organization email address is used.

eg, let say the department mail server is tiger.mm.abc.com, yuzh@abc.com is an aliases point to yuzh@tiger.mm.abc.com.

The vacation program will not work if people send email to yuzh@abc.com, but it works with yuzh@tiger.mm.abc.com

Any idea how to fix it.

Alternative solutions are welcome, eg, shell script etc, I just want this email  auto-reply to work.

PS: I have also tried  the vacation.pl (perl script), same problem.

0
Comment
Question by:yuzh
  • 8
  • 5
  • 5
  • +2
23 Comments
 
LVL 40

Expert Comment

by:jlevie
Comment Utility
I'm slightly mystified as to why it behaves the way it does. From what I see in the question it looks like there is a top level mail server that handles the mapping of user@domain.tld to user@mailhost.sub.domain.tld. In that case there should be no difference in mail sent to user@mailhost.sub.domain.tld from within the subnet and that forwarded from the top level mail server. Which in turn makes me wonder about the configuration of the local mailhost. Is it configured such that mail reaching it for user@domain.tld will be forwarded to the top level mailhost (i.e., it uses the top level mail server as a Smart Host)? And that it has been told via local-host-names that it is only to handle mail for sub.domain.tld and not domain.tld? That's really the only configuration of sendmail that makes sense to me in this mail topology.

I'd think that procmail would solve the problem as it operates at a low enough level to handle all mail that reaches a user, regardless of the path the mail took getting there.
0
 
LVL 38

Author Comment

by:yuzh
Comment Utility
I just cann't understand why "vacation" have the problem, all the other mail operations are working fine. eg, if I put .forward (without pine to vacation program), it works.
0
 
LVL 51

Expert Comment

by:ahoffmann
Comment Utility
see man vacation, -a option
0
 
LVL 38

Author Comment

by:yuzh
Comment Utility
I have tried it before, when I initialized the vacation program, I did:
  vacation -a yuzh@abc.com
It doesn't help, unless my syntax was wrong.
0
 
LVL 51

Expert Comment

by:ahoffmann
Comment Utility
never tried it before, and cannot test ('cause I have no subdomains) this Solaris special, but try:

vacation -a yuzh@abc.com -a yuzh@sub.abc.com

have no idea, but according the man-page, this should do the trick.
If not, switch to procmail (as jlevie suggested).
0
 
LVL 38

Author Comment

by:yuzh
Comment Utility
No luck with:
  vacation -a yuzh@abc.com -a yuzh@sub.abc.com

It looks like I have to use something else to do the job, anyone know anything that  is easy to setup by the end user, not the sys adms.
0
 
LVL 16

Expert Comment

by:The--Captain
Comment Utility
OK, let's break this down - if you redirect mail to a file (using .forward), am I correct in assuming that *all* mail, to either address, winds up in that same file?  And am I also correct in assuming that when you replace the file redirection with a reference to 'vacation', it only winds up receiving mail for one of those addresses?  

Also, what does vacation tell you when using the '-d' argument and redirecting stdout to a file (i.e. 'vacation -d 1> /tmp/vacation.debug').

BTW, I rarely use vacation, but I do muck about with sendmail from time to time.

Cheers,
-Jon

P.S.  Can you post your .forward file here?  That may help.

P.P.S.  ahoffamn - we've conversed many times, but I still don't know your name - I would LOL if it was Abbie, but unless you faked your own death, I doubt it.


0
 
LVL 51

Expert Comment

by:ahoffmann
Comment Utility
P.P.S. Jon, you asked sevaral times, and I answered sometimes, qid=20269112, seems that you don't read PAQs (for obvious, or whatever, reason :-)
Achim
0
 
LVL 16

Expert Comment

by:The--Captain
Comment Utility
>for obvious, or whatever, reason

You mean obviously lazy?  I thought that was understood hehe...

Actually, email notif problems have prevented me from seeing that (or at least forgetting it) until now.  I guess you didn't fake you own death, unless you changed your name as well hehe...

Cheers,
-Jon
0
 
LVL 38

Author Comment

by:yuzh
Comment Utility
Hi The--Captain,

my .forward file looks like the followings:
\yuzh, "|/usr/bin/vacation yuzh"


0
 
LVL 38

Author Comment

by:yuzh
Comment Utility
I end up write a sh script to do this job, and it works.

I would like to know how the others solve this problem.

Points will be awarded when I happy the the answer!
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 51

Expert Comment

by:ahoffmann
Comment Utility
if you found the answer/solution yourself, I recommend to make this a 0 points PAQ(you refund the points).
Probably you post your own solution.
0
 

Accepted Solution

by:
ComTech earned 0 total points
Comment Utility
As per request, this question will be placed in PAQ.

Thanks all,
ComTech
CS Admin @ EE
0
 
LVL 16

Expert Comment

by:The--Captain
Comment Utility
GRRRR - Email notifs (or rather, the lack thereof) screwed me again!  I as going to ask the poster to answer *all* my questions, not just the last one, and see where we could go from there.

Sigh.
-Jon
0
 

Expert Comment

by:ComTech
Comment Utility
Sorry Jon, had I known, it could have waited. We are all frustrated at the lack of notifs, as it deeply hinders everyone.

I did call Austin regarding the problems we have been having, and he says it is the ISP they are using.  I suggested a change.  And quickly as possible, I like you need to know where I stand on Experts and Users problems I am helping with, but also all the people who have lost their password, or have changed email accounts, or thieir account has errors in it.

Sorry, I got angry when I called him, as he didn't see is as such a big deal as I did, but I was wrong, he is just more calm about it, as he is not in the trenches with us.

Thanks,
CT : >
0
 
LVL 38

Author Comment

by:yuzh
Comment Utility
ok, I gave up with the vacation program, here's the litter script I wrote to replace the vacation program, it seems to work (not fancy) with my situation.

#!/bin/ksh
# This is a replacement for vacation program
# Written by: Greg YU
# Date: 08/07/2002
#
# standard input - is passed as file arg for this script
# We save a copy of the mail
# usage: autoreply - username
#
# Format of .forward file
# yuzh, "|/home/yuzh/bin/autoreply - yuzh"

TEMP=/home/${2}/forward.tmp
MAILADD=/home/${2}/vac.add

/usr/bin/cat $1 > ${TEMP}
FROM=`/usr/bin/head -1 ${TEMP} | awk '{print $2}'`
SUBJECT=`/usr/bin/grep "^Subject" ${TEMP} | cut -c10-`

#==================================================================================
# if the user send an email to himself then do nothing
# and don't reply email to "root"
#==================================================================================
SENDER=`echo ${FROM} | cut -f1 -d"@"`
if [ ${SENDER} = "root" ] ; then
   exit 0
fi

if /usr/bin/grep -i "$SENDER" ${MAILADD} ; then
   # Do nothing
   exit 0
fi

# Reply to sender
/usr/bin/mailx -s"${SUBJECT}--Auto reply" ${FROM} </home/${2}/vac.mess

exit
# END OF AUTOREPLY

Comments are welcome for improvement.
0
 
LVL 40

Expert Comment

by:jlevie
Comment Utility
I've complained a number of times about the email notification problems and it's been like talking to a signpost. And it's not like there aren't any folks around that know about how to set up high volume mail servers (or figure out where the problem is with the current setup).

My guess is that the general lack of response on questions is just another symptom of the problem. If we, as experts, see the notif problem I'd bet it is worse for the typical questioner. May be if we all go to Community Support and start posting questions about what's wrong with mail somebody might eventually take notice of the problem.
0
 
LVL 51

Expert Comment

by:ahoffmann
Comment Utility
> .. might eventually take notice ..
rm $TEMP

# probably saves you soe disk space ;-)
0
 
LVL 38

Author Comment

by:yuzh
Comment Utility
Good point, but you cann't do rm $TEMP, you can only do,
cat /dev/null >$TEMP, $TEMP must be world writeable, otherwise it wouldn't work.

0
 
LVL 16

Expert Comment

by:The--Captain
Comment Utility
Jim muses:

>May be if we all go to Community Support and start posting questions about what's wrong with mail

Indeed - this has already been going around in the lounge:

http://www.experts-exchange.com/lounge/Q_20317526.html

I guess it just wouldn't be EE if email notifs worked flawlessly hehe.

yuzh - glad to hear you got it working - did you ever get a chance to try to narrow down the point of failure (which my original post was getting at...)?

Cheers,
-Jon

0
 
LVL 38

Author Comment

by:yuzh
Comment Utility
I'm a lasy sys adm. I think that is  the limitation of vacation program. I am in a large org (have about 30k people, and domain-> sub-domain and sub-sub-domain, vacation get confuse about when should it run. It should not care about how the mail is getting in the mailbox, it should just worry about if something new get in, and give it a reply, that what my little script does.

Thanks
    Greg
0
 
LVL 16

Expert Comment

by:The--Captain
Comment Utility
>I think that is  the limitation of vacation program

Glad to see we're on the same page - any additional info (regarding my suggested tests) would be great!

Cheers,
-Jon

0
 

Expert Comment

by:ComTech
Comment Utility
Hello all, as I am subscribed here, we have had serious lags on email, and notifications. but lookin at all of your posts since mine yesterday are only running 2-5 minutes of the time stamp on EE versus my Cable ISP.

Some one thime this post, but that was during off-peak here, we now have a load on the servers, and I bet thier will be a delay.  It is now 9:12am PST

Regards,

ComTech
Community Support Administrator  
Experts-Exchange  


If we can prove to them, pehaps they will change their ISP, it as I said yesterday, is crippleing to all of us, Experts notif, the users notif back to you.  People from my end, where I average 350-600 emails per day.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Microsoft has released various new features which are capable of handling various tasks. One of these tasks is ‘Migration from pop3 to Exchange Server’. Pop3 data stores various data along mailboxes like contacts, tasks, etc. So, it becomes the need…
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.
In this video we show how to create an Address List 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 Organization >> Ad…
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…

744 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now