procmail
[Top] [All Lists]

RE: Procmail before .forward

2001-07-14 07:34:08
I wouldn't do it that way. I'd just use their .procmailrc to do *both*
messing with the mail headers (or whatever action you desire) *and* then
sending it onward to the internal mail server.
This is after all the power of procmail, and one of its many uses.
I want to be able to use some of my procmail filters for the users that
have mail forwarded off of the server via a .forward file.   I
know that I
can put a command before the address to be forwarded to, but what
would the syntax of that look like?

In the following scenario the .forward must not exist.

The .forward files now are just the standard, but what I am
looking for is something like:
"somecommandtocallprocmail", user(_at_)server(_dot_)domain(_dot_)name

Depending on what it is you want to accomplish this could be done in
/etc/procmailrc. I don't know if the users have shells on the first mail
server, I assume it's a gateway and therefore probably not, so doing it at
the global level serves multiple purposes. If you wanted to get really
sophisticated you could make your /etc/procmailrc modular and INCLUDERC
departmental rc_files, individual user rc_files...the possibilities are
endless.

Anyway in the complete absence of any other information, pseudo code to
accomplish some "stuff" and then send the mail to the user on the internal
mail server:

:0 some_set_of_flags
* ^To: user(_at_)gateway_box(_dot_)tld
some_header_action_or_other_stuff
        {

                :0
                ! user(_at_)internal_mail_server(_dot_)tld
        }

Umm, well this should accomplish the goals you set forth.
Remember to set verbose=ON when testing anything! Logfiles tell all if
logging is verbose, and for debugging it is absolutely essential.

(In case you are wondering, this case involves users that have mail
forwarded from the external mail server to an internal exchange server
((cross myself twice)) that I want to do header manipulation and other
procmail type stuff on, but currently the .foward file moves the mail off
of the server before procmail ever knew it was there).

HTH!
Regards,
-Colin
--
Colin J. Raven.

_______________________________________________
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>