procmail
[Top] [All Lists]

Re: problem with .forward (vacation)

2001-05-07 08:06:37
Christian Leitner asked,

| some of my users receive their own vacation message about 12000(!) times.
| does anyone of you know how this can happen?
| 
| the .forward file looks like this:
| 
| username, "|/usr/bin/vacation -a firstname.lastname username"

You can't put your own username into .forward that way; you'll be sending
a copy to yourself, which will send a copy to you, which will send a copy
to you, et cetera.  On every loop vacation will be invoked again.

The way around that in most MTAs is to put a single backslash in front of
the username in .forward to tell the MTA to deliver directly to that person's
spool instead of going through the regular mail routines (which would come
back to .forward again):

 \username, "|/usr/bin/vacation -a firstname.lastname username"

In some MTAs, you do this, where the characters "real-" are literal:

 real-username, "|/usr/bin/vacation -a firstname.lastname username"

That way, when a message comes in, the MTA will read .forward and send one
copy directly to the user's spool (not going through .forward again) and one
copy into the vacation program.  (Of course that works only for unqualified
local usernames, not for addresses on other sites nor for aliases.)

The other part of the problem is that your vacation program is broken.  It 
should never send another copy of the vacation message to an address that has
already been sent it during the current absence.

= =

While the question isn't directly related to procmail, the answer is.  If
you're experimenting with some procmail routines and you want all incoming
mail saved to your spool just in case something goes wrong with your recipes
or with invoking procmail and the copy fed to procmail is lost, you can do
something like this in your .forward:

 \yourusername, "|exec /usr/local/bin/procmail"

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>