Getting vacation to work in Linux

Posted on 2007-08-03
Last Modified: 2013-12-16
I'm attempting to use vacation, but nothing is working. I've checked serveral other posts and I haven't found one that got it working. Maybe it just doesn't work, but I thought I'd check with the experts.

I am using Linux 2.4.29 Slackware distribution. I don't see a version option for vacation, but doing an ident give me 8.142 2004/11/02 on the vacation.c version.

In the account I want to "vacation", I ran: vacation -i, and it created vacation.db. I created a .vacation.msg file. I created a .forward file:

\ar, "|/usr/bin/vacation"

When I send a message to the ar user, it does save the message in ar's mailbox, but nothing is returned to the user. I see no info in syslog. I don't even know where to start looking.
Question by:jmarkfoley
    LVL 3

    Accepted Solution

    look in /etc/syslog.conf on your mailserver.  There should be a line starting like mail.*  then a file name this is your maillog (/var/log/maillog on my system).  from the command line type "tail -f /you/maillog |grep ar", then in a different console send your test message again.

    If this doesn't give you enough info to figure it out, post the output from the command, and I'll translate for you.
    LVL 1

    Author Comment

    Checking maillog showed a group writable .forward complaint, so I removed that group permission and ran it again. This time, I received an error email that said:

       ----- The following addresses had permanent fatal errors -----
        (reason: Command line usage error)
        (expanded from: <>)

    You can see my vacation command above. No command arguments. The relavant mailllog entry was:

    Aug  3 19:34:41 server vacation[17596]: uid 701: usage: vacation [-a alias] [-C cfpath] [-d] [-f db] [-i] [-j] [-l] [-m msg] [-R returnaddr] [-r interval] [-s sender] [-t time] [-U] [-x] [-z] login

    which impiled that I had to specify 'login', so I changed my .forward specification to "|/usr/bin/vacation ar" and that worked!

    I'm going to experiment with this a bit. I would like the response to be on every message, but it looks like I can only do -r 1 which is one per day. -r 0 appears to mean once EVER. Any suggestions on this?

    Also, I have several aliases for this account, but I don't see from the man page that I can specify more that one. Can I do -a alias1,alias2,alias3? Or: -a alias1 -a alias2 -a alias3? Or should I just do -j? Will -j do what I want?

    (Frankly having to say "vacation ar" seem redundant. What other possibility could there be for 'login'?

    I'll post my test results, but please give me some feedback on the above. THX
    LVL 3

    Expert Comment

    There are reasons why it you don't want to respond to every message, what whould happen if two people were responding to every message, then one of them sent a message to the other.(I'll give you a hint, it involves a lot of work for the mail server admin)

    If you don't care and want to respond any way you can look here:
    and  replace this line of his procmail recipe:
    | formail -rD 8192 vacation.cache
    with this
    | formail -rD 8192 /dev/null

    I'm not sure about the aliases...

    Why "vacation ar"?  the reason for this is so you can use vacation in the alias file and similar places- like if you had a generic "permanent" vacation message for deleted accounts.  I don't think it gets a lot of use, but it must have seemed like a good idea when the first wrote it.

    LVL 1

    Author Comment

    Well, I can forego the response to every message thing. Daily will be OK.

    What about the alias question and the use of -j?

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
    rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
    Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
    Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

    779 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