Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

vacation program and sendmail

Status
Not open for further replies.

michael1973

Programmer
Oct 6, 2003
9
0
0
DE
Hi!

I have a huge problem with installing the vacation program. I setup the program with YaST. After that I initialised
the vacation program with vacation -I in the user's home directory. A vacation.db was built. Then I started vacation and a file vacation.msg was created by the program. After that I put the following line in the .forward file:

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

gwenn is the name of the user and the name of his home
directory as well. All files are readable for all.

Then I tried to send a mail via Outlook, but nothing happenend. My mail hasn't been received by the receipient, but it can be found in the /var/spool/mqueue. I didn't get an auto-reply message.

Has anybody an idea what to try or what to do? I really don't know what's going on...help!



System: Linux SuSE 8.1 as local mailserver with sendmail 8.7 and procmail (looks like it in the sendmail.cf)...


 
I found out that the mails in the mqueue have been delivered. But still I didn't get a reply message by the vacation program. What's wrong?
 
alright, finally i got an auto-reply message by the vacation program yesterday.

but there is still one problem left:

the mails that will be sent or delivered have a wrong timestamp. i recognized that the system time was wrong.
i fixed the problem with "date" and "hwclock". then i tested the new time by creating a new file and it got the right timestamp.

now the problem:
the timestamp in local e-mails is still wrong, for ex. 11:00 instead of 12:00. it's a local problem...but why is that so?

any ideas?

 
Okay, I solved my problems. If somebody is interested in it...ask me :)
 
maybe you can write down what you did to make it work. that would help a lot ;)
Thanx,
MacSebi
 
Did ya learn about the -a option for aliases?
 
yes. I am aware of that... but I am sending to usernames anyway. so that shouldn't make a difference....
 
Alright, I try to explain how i solved my problem with the vacation program.


1. chmod settings:

"chmod 644" for ".forward" and maybe for the home directory

2. chown:

change owner of the file, for ex. from "nouser" to "gwenn-200"

3. chgrp:

change group, for ex. from " to "users"

4. edit the .forward:
example entry:

\gwenn-200, "|/usr/bin/vacation –j gwenn-200"

gwenn-200 is the username.


summary of the steps before doing the things above:


first step:

setting up vacation with "vacation -i"

second step:

create a reply message in "vacation.msg"

third step: the entry in ".forward" (see above)

that's all...

some questions that will help you, if vacation doesn't work:

1. Is your home directory owned by you and writable only by you?
2. Is you ".forward" owned by you and writable only by you?
 
Just as an aside, I have found that using a procmail recipe in a users home directory is a lot easier than using the vacation program. If anyone wants this recipe let me know and I will post it.

Cogito Ergo Sum - Non Compos Mentis
 
Hello Rhinokiller,

Could you post your procmail recipe?

I have successfully use the Vacation rpm on my RH7.3 box for auto-response. However, it requires that the user to have a bash rather than /bin/false (which I used for all of my mail only users). Is it possible to keep the shell as /bin/false and still get the auto-reponse to work? Thanks!
 
nine97,
Here it is, I stripped it down to its barebones but I left in another recipe I use to strip malicious attachments and send them to a temp dir$ at the bottom.

FORMAIL=/usr/bin/formail
SENDMAIL=/usr/sbin/sendmail
SHELL=/bin/sh
MAILDIR=/var/spool/mail/mail_user

### Vacation Recipe ###
:0 Whc: user.lock
# Check to see if mail was addressed to user
* $^To:.*mail_user
# Don't Reply To Daemons and mailling lists
* !^FROM_DAEMON
* !^X-Loop: mail_user@mydomain.com
| FORMAIL -rD 8192 user.cache
:0c eh # if the name was not in the cache
| (formail -rI"Precedence: junk" -I "From: Auto Responder <autoresponder@mydomain.com>" ; -A"X-Loop: mail_user@mydomain.com" ; echo

"Your email has been delivered to mail_user , however mail_user will be out of the office until December 8th." ; echo "Thank you.") |

sendmail -oi -t


### Check for multipart header ###
### Strip malicious attahcments and send them to /tmp/filter ###
:0 H
* ^Content-Type: multipart
# check body for executable filenames
{
:0 B
* .*\/name=.*\.(com|bat|exe|mmc|pif|scr|vbs|zip)(")?(\ *|\t*)$
/tmp/filter
}


Cogito Ergo Sum - Non Compos Mentis
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top