procmail
[Top] [All Lists]

Re: Virtual Site, keep 1 copy of all mail, leave mail in spool

2001-05-16 05:47:29
:0c
* ^To: .+(.+\.)*customer_domain.com
/home/sites/site3/siteadmin/mail

Will this *leave* mail for site3 in the spool to be grabbed by another
servers' fetchmail/(or whatever_form_of_retrieval)??
To my eyes procmail simply dumps a *copy* of all mail into the siteadmin
mail directory and does nothing else since it sees the recipe as a
non-delivering recipe.
Should a lockfile be used here in case there is any significant traffic
for the site and several instances of procmail might be running
concurrently????
Anyone?

You're about right.  Yes, you do want to use a lockfile - even with
insignificant traffic the laws of the universe insist that two mails to
that domain will arrive at the same time.

It will deliver a copy to that mailbox and deliver another copy to
wherever the mail would have gone if you didn't have any recipes.

In your regular expression the '(.+\.)*' is redundant as the previous
bit '.+' will already match against anything!

Do you *only* want to take copies of mails that have that domain
explicitly in a 'To:' header, or do you want to include 'Cc:' copies as
well?  If the latter, you probably want to use the '^TO_' macro.  And
whilst it is unlikely to matter, you probably want to escape that final
period in the domain name.  I'd suggest:

  :0c :
  * ^TO_customer_domain\.com
  /home/sites/site3/siteadmin/mail

Hope that helps,
Martin
-- 
Martin McCarthy                 /</                  PGP key available
    `Procmail Companion'        \>\  http://www.ancient-scotland.co.uk
     Addison Wesley             /</    http://www.ehabitat.demon.co.uk
_______________________________________________
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>