On Wed, 24 Apr 2002, Reidar Nordin wrote:
Hi!
Can anyone tell me how to set date in .procmailrc to only send autoreply
at specific times??
When someone sends email to office(_at_)domainname(_dot_)com he or she gets an
automatic reply, but now I only want this autoreply to be sent after
16.00 and before 09.00, Is there a way to do this without having to use
telnet/ftp and removing the file ????
I suggest you to save the messages in /some/where/wait folder.
The crontab(1) will work on the folder:
1 9-16 * * * formail -s procmail /some/where/procmailrc < /some/where/wait
The /some/where/procmailrc will make the action command instead
of the /etc/procmailrc. (good for performance too)
Bye,
Udi
This is my .procmailrc file:
PATH=/bin:/usr/bin:/usr/local/bin
DEFAULT=/var/mail/kulpol
SHELL=/bin/sh
SENDMAIL=/usr/lib/sendmail
NULL=/dev/null
LOGFILE=$HOME/procmail.logging
VERBOSE=off
COMSAT=no
:0 h c
* !^FROM_DAEMON
* !^X-Loop: user.loop
* ^TOoffice@
| (formail -t -r -i "From:office(_at_)domainname(_dot_)com" -A"Precedence:
junk" \
-A"X-Loop: kulpol.loop" -I"Subject:" -A"Subject:Autoreply from "; \
cat $HOME/autosvar/autosvar.txt) | $SENDMAIL -t
Change the rule to be:
:0 h c
* !^FROM_DAEMON
* !^X-Loop: user.loop
* ^TOoffice@
/some/where/wait
In /some/where/procmailrc put the rule:
:0
| (formail -t -r -i "From:office(_at_)domainname(_dot_)com" -A"Precedence:
junk" \
-A"X-Loop: kulpol.loop" -I"Subject:" -A"Subject:Autoreply from "; \
cat $HOME/autosvar/autosvar.txt) | $SENDMAIL -t
Bye,
Udi
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail