cancel
Showing results for 
Search instead for 
Did you mean: 

vacation program

enrico.nic
Regular Advisor

vacation program

Hi all
I am trying to set up the vacation program for a specific user.
I've tried to follow the manuals, but the procedure doesn't seem to work. We are using sendmail 8.11.1 on HP-UX 11.
1) I have created the file .vacation.msg with the following text (just to test the functionality):
From: mysql@gissi.marionegri.it
Subject: Vacation
X-Delivered-By-The-Graces-Of: the vacation program
Precedence: bulk

I will be out of the office until August 15, 2002.
EOF

The file is created in the home dir of the user "mysql". Permissions on the file are
-rwxr-xr-x (755)

2) Used the command
# vacation -i

3) created (as user mysql) a file .forward in the home dir with the following single line:
\mysql, "|/usr/bin/vacation -a mysql@gissi.marionegri.it mysql"
Permissions on the file are
-rw------- (600)

Unfortunately, a mail reply isn't sent to any sender.

Thank you for your help

Enrico
15 REPLIES
Paul Sperry
Honored Contributor

Re: vacation program

did you run the command vacation -i
as the user mysql?
enrico.nic
Regular Advisor

Re: vacation program

Yes, point 2) (vacation -i) was performed by user mysql.
Pete Randall
Outstanding Contributor

Re: vacation program

Enrico,

Does anything appear in "/var/adm/syslog/mail.log"?


Pete


Pete
Darren Prior
Honored Contributor

Re: vacation program

Hi Enrico,

You could try creating a .forward to send to another user account only, just to test the .forward without the vacation functionality. If that works, then move on to using vacation.

regards,

Darren.
Calm down. It's only ones and zeros...

Re: vacation program

I use the .forward file to ensure any incoming mail gets to use the vacation program:
cat .forward
\melvyn, | "/usr/bin/vacation melvyn "

I think your error may be you have the | inside the double quotes
HTH
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!

Re: vacation program

Interesting, I tried changing my .forward to the same syntax, i.e.
\melvyn, "|/usr/bin/vacation melvyn"
and this also worked.
Try leaving out the -a mysql@gissi..... section, i.e. try it as
\mysql, "|/usr/bin/vacation mysql" and at least get that working.
As per the man page, remember to run vacation -i BEFORE modifiying the .forward file
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Paul Sperry
Honored Contributor

Re: vacation program

Here's the .forward file I use

\pauls, "|vacation pauls"

and it works for me

enrico.nic
Regular Advisor

Re: vacation program

Hi
As of Melvyn's suggestion, I tried

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

as a .forward file.

The reply is not sent again: in addition, in the /var/adm/syslog/mail.log nothing about the vacation reply is present: just the receival of the message of the user mysql.
I really don't know what to do now ...
Thank you

Enrico
Shannon Petry
Honored Contributor

Re: vacation program

Im not on an hp-ux box at the moment, but what you did seemed like too much, so I looked at the Sun man pages.

vacation will create for you the .forward file, and .vacation.msg file.

It clearly states that running vacation when a .forward file will cause vacation to ask if you want it removed.

It also states that you can run "vacation -I" which will initialize the vacation.pag and vacation.dir files to log forwards. With no ability to log, vacation will fail.

Here's the interesting sniplets...

To install vacation, type it with no arguments on the com-
mand line. The program creates a .vacation.msg file, which
contains the message that is automatically sent to all
senders when vacation is enabled, and starts an editor for
you to modify the message. (See USAGE section.) Which editor
is invoked is determined by the VISUAL or EDITOR environment
variable, or vi(1) if neither of those environment variables
are set.

A .forward file is also created if one does not exist in
your home directory. Once created, the .forward file will
contain a line of the form:

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


If the string $SUBJECT appears in the .vacation.msg file, it
is replaced with the subject of the original message when
the reply is sent; thus, a .vacation.msg file such as


Subject: I am on vacation
I am on vacation until July 22.
Your mail regarding "$SUBJECT" will be read when I return.
If you have something urgent, please contact
Joe Jones (jones@fB0).
--John




Hope it helps!
Sincerely,
Shannon Petry
Microsoft. When do you want a virus today?
enrico.nic
Regular Advisor

Re: vacation program

Hi
Unfortunately the HP-UX version of vacation does not create a .forward nor a .vacation.msg file. But there is a usable template of the .vacation.msg file in /usr/share/lib.
And the manual is clear:
1) create .vacation.msg (eventually from template) - this is not mandatory
2) vacation -i
3) create .forward with
\user, "|/usr/bin/vacation -a user"

The absence of error logging is something that I really don't understand; if the problem persists I am thinking to try some freeware utility, like 'forward'.

Enrico
Shannon Petry
Honored Contributor

Re: vacation program

Does it create the vacation.pag and vacation.dir files? If so, it is supposed to log successfull forwards in these files.

Can you run vacation -I to initialize them?

Regards,
Shannon
Microsoft. When do you want a virus today?
Joerg Hinz
Occasional Advisor

Re: vacation program

Just to mention: You should include a "Auto-Submitted: auto-generated" in the header to prevent other autoanswers from other mailers which might cause a mail-loop...

Joerg
-- quote?
enrico.nic
Regular Advisor

Re: vacation program

Hi
Yes, all the files .vacation.* are correctly created.

I have a new small addition, for anybody that is so persistent to read something more about this subject:
trying with another user I've found (don't know why this didn't come out with the "mysql" user) an error message given as a reply from sendmail:

----- The following addresses had permanent fatal errors -----
"|vacation -a user"
(reason: 550 Unsafe for mailing to programs)
(expanded from: )


----- Transcript of session follows -----
550 5.7.1 /home/user/.forward: line 1: "|vacation -a user"... Address is unsafe for mailing to programs
Reporting-MTA: dns; gissi.marionegri.it

In sendmail the restricted sendmail shell (smrsh) was already enabled, and the vacation program had been already copied in the correct directory (sm.bin) where the restricted shell looks for executables.

In the sendmail configuration file I haven't found the phrase "is unsafe for mailing to programs"

Any idea ?

Thank you
Darren Prior
Honored Contributor

Re: vacation program

Hi Enrico,

That suggests to me that perhaps your file permissions are too wide. If it's only affecting this user I'd check the .forward, otherwise compare permissions on things like their home dirs.

regards,

Darren.
Calm down. It's only ones and zeros...
Marco_162
Occasional Contributor

Re: vacation program

Hello Enrico,
I have the same problem.
Do you find the solution?

Thanks in advance.
Marco