Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
We are using sendmail with cyrus-imapd. I want to give users the ability to set up a vacation message, and I believe that procmail is the correct tool.
Using my own account as a test , I set up the following files in my $HOME directory:
.forward:
|/usr/bin/procmail
.procmailrc
0: vac
| (formail -r -I"Subject: On vacation"; echo 'I am not really on vacation. I'm still here') | /usr/sbin/sendmail -t
When I send email to myself from an outside account, I do not get the vacation reply.
My /etc/mail/sendmail.cf has the following lines in it related to procmail:
You don't need to mess with procmail. Use the vacation program that comes with sendmail to send vacation messages.
Read the man page to see how to setup the .forward and the .vacation.msg files needed.
Thanks for your response. Before I started messing with 'procmail', I tried to get 'vacation' to work and did not have any success. Here are the files I used:
.forward:
\sstein, "|/usr/bin/vacation sstein"
.vacation.msg:
Subject: Away
From: Sanford Stein
I am testing my vacation message. I am really here.
Your subject is "$SUBJECT"
I ran 'vacation -I' and confirmed that .vacation.db was created. It still fails to send a vacation reply.
I don't really care which one works, and if you can tell me what I am doing wrong with 'vacation' that would be great.
I was told that it was non-standard and that Red Hat supports 'procmail', which is why I turned my attention there.
Since 'procmail' and 'vacation' are very similar, I still suspect that Cyrus is somehow standing in the way here.
Check if vacation is installed, because according to this looks like you need to compile it from sources.
If it's installed, you need to add it in /etc/smrsh restricted shell (see #6 in the link above)
I did compile 'vacation' from source -- my version is 1.2.7
I just redid it to make sure (make;make install), and added the link to /etc/smrsh, which was not there before.
I still get no vacation reply message.
I appreciate your help and don't want to take up too much of your time, but any more ideas?
Are you sure that the vacation binary is located in /usr/bin/vacation?
Delete .vacation/db and recreate it, before running any tests, because it keeps the recipients that got the vacation message.
Also check /var/log/maillog (or whatever logfile sendmail writes its logs) to see what happens
Yes, the binary is definitely in /usr/bin/vacation. I deleted $HOME/.vacation.db, ran 'vacation -I' to reinitialize, and tested again. Still no luck. There is nothing in /var/log/maillog. It looks like the message was sent, via Cyrus, with no reference at all to 'vacation'. So somehow it's still not getting recognized.
It looks like the message was sent, via Cyrus, with no reference at all to 'vacation'. So somehow it's still not getting recognized.
The mail is sent via smtp (sendmail in this case) not cyrus (the imap server). I don't know how cyrus-imapd works, but it's procmail that sends the vacation message once it sees a ~/.forward file with the vacation command in it.
Anyway searching a bit, looks like you need to write some sieve rules, if you want cyrus to deliver mail.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.