Cannot get procmail to work
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: Mprocmail, P=/usr/bin/procmail, F=DFMSPhnu9, S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP/HdrFromSMTP, A=procmail -Y -m $h $f $u Mlocal, P=/usr/bin/procmail, F=lsDFMAw5:/|@qSPfhn9, S=EnvFromL/HdrFromL, R=EnvToL/HdrToL, A=procmail -t -Y -a $h -d $u What am I missing? Does something have to be configured in Cyrus? Thanks, Sanford Stein CyberTools Inc. |
Hi,
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. Regards |
Bathory,
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. Thanks, Sanford Stein CyberTools Inc. |
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) Cheers |
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.
|
Quote:
Anyway searching a bit, looks like you need to write some sieve rules, if you want cyrus to deliver mail. |
All times are GMT -5. The time now is 10:54 PM. |