Solved

Vacation mail configuration in linux

Posted on 2003-11-11
8
1,865 Views
Last Modified: 2007-02-13
Is the any tool for vacation mail or automail reply tool for linx.Now Iam using vacation mail in linux is not working properly.
0
Comment
Question by:belranjan
8 Comments
 
LVL 45

Expert Comment

by:sunnycoder
ID: 9721612
0
 
LVL 38

Expert Comment

by:yuzh
ID: 9727413
Vacation doesnt come included as standard with most linux distros. You can get the rpm at
http://www.tuxfan.homeip.net:8080/rpms/vacation-1.2.6-1.i386.rpm 

If you want to setup autoreplay for yourself, you do:
vacation -I
then following the screen instatruction and fill in the information.

To disable the auto-reply, just remove the .forward file under the  home dir.

If you want more details, have a look at:

http://www.udel.edu/topics/e-mail/vacation-only.html

man vacation

If you want to setit up for other users:
cd ~login-name
su - login-name -c vacation -I

then following the screen instatruction and fill in the information.

To disable the auto-reply, just remove the .forward file under the usr's home dir.

also:
http://www.enme.umd.edu/it/autoreply.htm
0
 

Author Comment

by:belranjan
ID: 9728197
Iam already did this same vacation configuration on my linux server.But .vacation.db is not creating by default.And it also working with one user account only.I did the same to another user is not working .
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
LVL 38

Expert Comment

by:yuzh
ID: 9728547
Did you type in:

vacation -I

To initialize your vacation setup?

0
 
LVL 38

Expert Comment

by:yuzh
ID: 9728554
In your version of vercation, it might be:

vacation -i

man vacation to find it out
0
 
LVL 20

Expert Comment

by:Gns
ID: 9730715
If youhave it, you could rather easily set a procmail rule to act as an autoresponder...
Just remember that well-nigh all autoresponders are evil:-).

-- Glenn
0
 
LVL 20

Expert Comment

by:Gns
ID: 9730716
If youhave it, you could rather easily set a procmail rule to act as an autoresponder...
Just remember that well-nigh all autoresponders are evil:-).

-- Glenn
0
 
LVL 20

Accepted Solution

by:
Gns earned 50 total points
ID: 9730808
One "Submit" resulting in two messages... Spooky:-).

Anyway, -forward file and procmail rule for a user to autorespond to everything:
~user/.forward (if procmail isn't used "globally", gets it to invoke for the specific user)
"|IFS=' '&&p=/usr/bin/procmail&&test -f $p&&exec $p -Yf-||exit 75 #YOUR_USERNAME"

fragment from ~user/.procmailrc (this is snipped from the procmailex manpage)
---------------- Begin snip
A  more  complicated  autoreply recipe that implements the
       functional equivalent of the well known  vacation(1)  pro­
       gram.   This recipe is based on the same principles as the
       last one (prevent `ringing' mail).  In  addition  to  that
       however,  it  maintains  a vacation database by extracting
       the name of the sender  and  inserting  it  in  the  vaca­
       tion.cache  file  if  the name was new (the vacation.cache
       file is maintained by formail which will make sure that it
       always  contains  the  most  recent names, the size of the
       file is limited to a maximum of approximately 8192 bytes).
       If the name was new, an autoreply will be sent.

       As  you can see, the following recipe has comments between
       the conditions.  This is allowed.  Do not put comments  on
       the same line as a condition though.

              SHELL=/bin/sh    # for other shells, this might need adjustment

              :0 Whc: vacation.lock
               # Perform a quick check to see if the mail was addressed to us
              * $^To:.*\<$\LOGNAME\>
               # Don't reply to daemons and mailinglists
              * !^FROM_DAEMON
               # Mail loops are evil
              * !^X-Loop: your@own.mail.address
              | formail -rD 8192 vacation.cache

                :0 ehc         # if the name was not in the cache
                | (formail -rI"Precedence: junk" \
                     -A"X-Loop: your@own.mail.address" ; \
                   echo "I received your mail,"; \
                   echo "but I won't be back until Monday."; \
                   echo "-- "; cat $HOME/.signature \
                  ) | $SENDMAIL -oi -t
--------------- End snip

... What I meant to say in the previous comment was "all autoresponders are potentially evil"... Mostly because you can't be sure that all mailinglists will be caught as such... and because there is very little real value to automatic reponses:-). Some users always seem to think they need it though.

-- Glenn
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

The purpose of this article is to demonstrate how we can use conditional statements using Python.
Fine Tune your automatic Updates for Ubuntu / Debian
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

776 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