Operating System - HP-UX
1827286 Members
1666 Online
109717 Solutions
New Discussion

Auto Reply with sendmail 8.8.6 ??

 
SOLVED
Go to solution
someone_4
Honored Contributor

Auto Reply with sendmail 8.8.6 ??

Is there a way to to make sendmamil
Version 8.8.6 (PHNE_17190) auto reply.
Like if an email gets send to a specific email address like support@thisdomain.com it will send an email saying something like "Your email message is now on its way to the appropriate Customer Service Representative."
thanks for your help

Richard
13 REPLIES 13
Brian Hackley
Honored Contributor

Re: Auto Reply with sendmail 8.8.6 ??

Hi,
You'd do this out of an email program alias that would submit the mail reply and take other actions. O'Reilly sendmail book is the place to look for the general "how to".

http://www.sendmail.org/faq/ will give you a couple of more tips about keeping this program alias secure.

Hope this helps,
-> Brian Hackley
Ask me about telecommuting!
Frank Li
Trusted Contributor
Solution

Re: Auto Reply with sendmail 8.8.6 ??

You can use the "vacation" tool with the sendmail :

If you want the "user1@abc.com" to autoreply any mail sent to him , you can do :
1. %vacation -i
First issue the above command to initiate the datebase
2. Edit the ~/.forward file with the content:
\user2@abc.com,"|/usr/bin/vaction user1"
3. Edit the file .vacation.msg
Put anything you want to autoreply to the sender here !

Now if a mail is sent to user1@abc.com , the sender will receive an autoreply mail from you whose content is just the file ~/.vacation.msg .
Also the mail is forward to user2@abc.com .

Frank.
Hi Friend
Frank Li
Trusted Contributor

Re: Auto Reply with sendmail 8.8.6 ??

Another thing should be mentioned !

Be sure the user's shell is include in the file /etc/shells , or you get the error ( no shell )
Hi Friend
someone_4
Honored Contributor

Re: Auto Reply with sendmail 8.8.6 ??

Hey there here is what i get when i do the command.
# %vacation -i
sh: %vacation: not found.
what dir does it sit in?

Richard
James R. Ferguson
Acclaimed Contributor

Re: Auto Reply with sendmail 8.8.6 ??

Hi Richard:

The man pages for 'vacation' provide some good information. The full path is /usr/bin/vacation. The percent sign (%) is the default c-shell prompt for non-root users.

...JRF...
Frank Li
Trusted Contributor

Re: Auto Reply with sendmail 8.8.6 ??

Hi,

the "%" is the csh prompt !
the vacation command is in /usr/bin .
Hi Friend
Dave Kelly_1
Respected Contributor

Re: Auto Reply with sendmail 8.8.6 ??

The vacation program is no use for an autoreply of the type that you are asking about.

This is because only one message per week is sent to each unique sender.

You should remember that sendmail is only a transport and not an e-mail program.

I agree with Brian's response.
Frank Li
Trusted Contributor

Re: Auto Reply with sendmail 8.8.6 ??

You can change the default " one week " to "one day" or sometime by using the option "-r" of vacation . use this option in the ~/.forward file.
Hi Friend
Dave Kelly_1
Respected Contributor

Re: Auto Reply with sendmail 8.8.6 ??

But if you send multiple e-mails, you will only get an autoreply once a day. This does not appear to meet the original requirements as stated.
Frank Li
Trusted Contributor

Re: Auto Reply with sendmail 8.8.6 ??

In fact , you can add something so that every mail have been autoreplied ! I have a test on the following line in the ~/.forward file !

%vi ~/.forward
\user1,"|/usr/bin/vacation public","|/usr/bin/rm /home/user1/.vacation.dir","|/usr/bin/rm /home/user1/.vacation.pag"

For now , every mail sent to user1 , an autoreply mail will be received !

I have tested on hpux10.20.
Hi Friend
Dave Kelly_1
Respected Contributor

Re: Auto Reply with sendmail 8.8.6 ??

I'm not too sure where you got the -r parameter from. It is not documented in the man page on HPUX 10.20 or HPUX 11.00.

I found a man page for (I think) SUSE Linux which uses a -t parameter but using either -r or -t on HPUX gives an illegal option error.
Frank Li
Trusted Contributor

Re: Auto Reply with sendmail 8.8.6 ??

Hi,I use the "vacation" program included with the sendmail , the default " vacation " program in hp does't contain the "-r" option .

In fact , if you edit the .forward file like this :

\user1,"|/usr/bin/vacation user1","|/usr/bin/rm /home/user1/.vacation.dir","|/usr/bin/rm /home/user1/.vacation.pag"

that is ,every time a mail is coming , you autoreply it and also delete the database(vacation) , so next time if the same person sends email to you , he will also get the autoreply email from you .

Frank.
Hi Friend
E. Wong
Frequent Advisor

Re: Auto Reply with sendmail 8.8.6 ??

HPUX 10.20 S800
PHNE_24496 vacation patch

Just for the benefit of the ITRC Forum members, here is what I did to get vacation to reply to each e-mail received:

I have set chmod 444 $USERDIR/.vacation.*

This way the .vacation.pag never gets written and will default send .vacation.msg to each e-mail received. As simple as that.

I too did not see the -r option in vacation man pages.
compute, therefore you are