Per-email procmail?


#1

Is the procmail access for my hosting account global for all email sent to anything my domain? In other words, are the rules in my .procmailrc file consulted before email is dispatched to individual mailboxes, or can I somehow setup separate .procmailrc files on a per-email-account basis?


#2

They are on a “per user” basis for each machine user (ftp/shell/etc) as opposed to each “account” or “mailbox” (as there are mailbox only “users”)

If you create a full “machine-user” for each email account, each can have their own procmail. :wink:

–rlparker


#3

Cool, thanks for your quick and helpful response!

So to be sure I get this right… The sequence of events would look something like this:

  • email sent to anything@mydomain.com comes in to dreamhost’s incoming mail server
  • procmail evaluates my .procmailrc file and processes mail accordingly
  • lack of procmail matches that would process it otherwise result in it being dispatched to specific mailbox (i.e. foo@mydomain.com goes to the “foo” mailbox, and anything not matched goes to my “catch-all” mailbox)

Is this correct?

Also, where/when does SpamAssassin fit into this picture (if enabled)? Before procmail is executed? Between procmail and the default dispatch to mailboxes? Or is procmail itself used to dispatch run SpamAssassin (and thus I must add some entries to my .procmailrc file to do so)?


#4

I think that is “pretty much right” except that, in step one, there is a machine user associated with “domain.com” and it is that user whose .procmail is evaluated for requisite processing (irrespective of the mailbox) … it’s a subtle difference, but given your post in the other thread (which I didn’t answer because I don’t know the answer!) I think that might be relevant for your plan.

Someone else will have to speak up about SA, as I don’t use it an don’t know for sure when it “doos its voodoo” :wink:

–rlparker


#5

The decision about whether the catch-all mailbox is used is made by the incoming mail server. In your example, the server would look up "anything@mydomain.com" to decide whether to forward or deliver locally. If the address is unknown and if “mydomain.com” has a catch-all address that is used, otherwise the recipient would be rejected.

As far as SpamAssassin goes, if you are using DHs junk filtering it is done before the normal incoming mail server. (Turning on junk filtering changes which mail servers are used to receive mail for your domain.) You can also install your own version of SA and run it from a procmail recipe.

Larry


#6

Ah, that makes sense.

So does funning DHs junk filtering interfere with the normal operation of procmail on an account? For my primary email account (which is also a shell account) I want to run (am running) procmail, but if the junk filtering uses a different mail server perhaps that also means I cannot use procmail?

Finally, it looks to me like it is impossible to use procmail on a catch-all address (since procmail only works for shell account, and a catch-all cannot be a shell account, right?), but can junk filtering at least be enabled for catch-all accounts?

Thanks for your patience with these newbie questions… I am very familiar with procmail (it was the only available way to multiplex email addresses at my last ISP), but not DHs mail sequence and infrastructure…


#7

It doesn’t interfere at all. They are 2 entirely different steps in the whole process.

A catch-all address can be a shell account; I do this right now. But you cannot use DH’s junk mail filtering on a domain with a catch-all.

Larry