This is on a SunOS4.1.3 machine with sendmail 8.6.8.1.
I need to make a backup of email sent to a certain user and thought
procmail can do it. So I configured procmail as local mailer in sendmail.cf
Mlocal, P=/usr/local/bin/procmail, F=lsDFMAw5:/|@qSPfhn9, S=10/30,
R=20/40,
T=DNS/RFC822/X-Unix,
A=procmail -Y -a $h -d $u
(taken from cf/mailer/procmail.m4 from sendmail-8.8.7) and created
/etc/procmailrc
:0c
* ^TO_user
/path/to/backup
Now, with this setup mail to user is stored in the backup file,
but mail to all other users fails to deliver. I figured that
I need to set DEFAULT, but how to? Mail for user goes
to /var/spool/mail/user. How do I pass the "user" part to procmail?
Can I just say
DEFAULT=/var/spool/mail/$2
in /etc/procmailrc? I couldn't find anything useful in the man page.
Thanks for any insights.