Current time: 04-23-2014, 01:00 AM Hello There, Guest! (LoginRegister)

Post Reply 
Anybody using Procmail?
06-29-2001, 04:18 AM
Post: #1
Anybody using Procmail?
DreamFolks...

I think I've asked this here before (in the old forums), but I never heard anything definitive...

Is anyone successfully using procmail at DH? I'd like to be able to use it for various things like web publishing, response processing (list- and database-building), etc.

The Kbase entry for procmail says it can be used, but that Dreamhost "can't promise that you won't have temporary problems if the filer is unmounted for a little bit."

That doesn't sound awfully encouraging... So-- how often does a cluster's filer typically get unmounted? How long does it typically last? And what happens during a disconnect? I'm guessing that the problem is that mail that arrives while the filer is unmounted won't be processed using the .procmailrc file, and won't be processed even after the filer is remounted. Zatsound about right? I suppose that I could set up a mail client to catch any mail that falls through the cracks so that it can be processed later, but letting the host take care of business is much more grooviful.

In short, how reliable is procmail for filtering and processing at DH?

Enquiring minds, and all that...

TIA!

...Bob
Find all posts by this user
Quote this message in a reply
06-29-2001, 06:28 PM
Post: #2
Anybody using Procmail?
I know of at least 5 or 6 customers (I'm sure there are many more) who use this on DH2. I haven't heard of any complaints yet. I was overly cautious when wording that faq, as I don't want to promise that nothing bad will happen. I'd say that, yeah, there's a chance an email or two will slip through but it shouldn't be a significant problem; if there is, definitely contact support, and they'll try to get things worked out for you.

The benefits definitely outweigh possible problems - I don't know what I'd do without procmail...

Another approach is to forward your email (from the web panel) to username@machine.dreamhost.com, and to remove the .forward file in your home directory. However if you are moved to a different machine, this has the potential to mess things up, so I'd say the other is a better longterm solution.
Visit this user's website Find all posts by this user
Quote this message in a reply
06-29-2001, 06:58 PM
Post: #3
Anybody using Procmail?
Hi, Will...

You wrote:

Quote:I know of at least 5 or 6 customers (I'm sure there are many more) who use
this on DH2. I haven't heard of any complaints yet.

<snip>

Quote:The benefits definitely outweigh possible problems - I don't know what I'd
do without procmail...

Thanks for the info!

Quote:Another approach is to forward your email (from the web panel) to
username@machine.dreamhost.com, and to remove the .forward file in your
home directory.

Hmmm... I'm not sure I follow that... Are you referring to just using procmail for forwarding to a specific user, or...? (My confusion is probably due to the fact that I don't yet know how to use procmail, and that I'm not much of a 'nix head anyway <g> ) And there aren't any .forward files in any of my users' home directories as of yet. I take it those are not affected by/controlled by the control panel settings, and have to be manually created via the shell, si?

Quote:However if you are moved to a different machine, this has
the potential to mess things up, so I'd say the other is a better longterm
solution.

Ah... Then I'll opt for the procmail path, since I'm confused enough as it is. <g>

Thanks...

...Bob
Find all posts by this user
Quote this message in a reply
06-29-2001, 07:12 PM
Post: #4
Anybody using Procmail?
Ok maybe that wasn't clear; both of my ideas were referring how to get procmail working.

A few points:

1) Right now, your user (web) machine is configured to send mail out through the mail server. Also, there is a .forward file in each user's home directory (owned by root but removable since it's in the user's directory) which forwards to user@mailmachine. If you were to direct mail to your user machine for processing via procmail there, you'd start a mail loop unless that .forward file were removed.

2) We use procmail as a local delivery agent (as mentioned in the FAQ) so you don't need to use a .forward to pipe your mail to procmail. Putting a .procmailrc is enough. The difference is that if you redirect your mail to the user machine (which, again, I wouldn't recommend), the local machine will be doing the procmail filtering; otherwise the mail machine would be doing it. Since your home directory is NFS mounted on the same filer from both machines, the .procmailrc would work either way. Wow that sounds much more complex than it really is. I hope that sorta makes sense.

The links mentioned in the FAQs should get you started; while procmail can look pretty confusing at first it's actually pretty simple.

Make sure to use -w if you're using pico to edit your procmail files (or any other text files); I'd recommend using emacs or vi if you know how. Since we use sendmail and not Qmail it is a good idea to lock files, so you'd use:
:0:
instead of
:0
to start a recipe.

All the other necessary variables should be mentioned in the Kbase article; there are a number of ways to do this; the defaults mentioned in there are simply the ones I use (ie some people include their recipes in the .procmailrc; others (like one of our other admins) have like 50 billion different little rc files which are all included.)

It's very useful to use the log feature when testing recipes or troubleshooting, but you might want to make sure to delete it every once in a while, or else turn logging off so the file doesn't get too big. Alternatively you could setup a cron job to remove it every once in a while.
Visit this user's website Find all posts by this user
Quote this message in a reply
06-29-2001, 07:59 PM
Post: #5
Anybody using Procmail?
Hey, Will...

You wrote:

<snip>

Quote:Also, there is a .forward file in each user's
home directory (owned by root but removable since it's in the user's
directory) which forwards to user@mailmachine.

Well, there are none in mine, but I take it that's because I haven't created them yet.

Quote:If you were to direct mail
to your user machine for processing via procmail there, you'd start a mail
loop unless that .forward file were removed.

Got it...

<snip>

Quote:The difference is that if you redirect your mail to
the user machine (which, again, I wouldn't recommend)

Uhhh... I'm not even sure what you mean by that. The only control over mail that I've seen (in the CP) allows me to alias or assign delivery to a certain mailox, but to my understanding, all mail is still picked up via mail.example.com (on the mail machine). I didn't know there was a way to tell mail to go to an inbox in a user's home directory... But that's probably more info than my pea brain needs at the moment.

Or are you referring to sending mail to a user's machine for database processing and such? If we can't do that on a user's machine, then how can it be done?

Quote:, the local machine
will be doing the procmail filtering; otherwise the mail machine would be
doing it.

That's kind of interesting; I would think that you would want processing tasks to be offloaded to the user machine rather than the mailserver... Hmmm...

Quote:Since your home directory is NFS mounted on the same filer from
both machines, the .procmailrc would work either way.

Man, could I ever use a primer on how your clusters / filer work...

If I have this straight, the filer unites the two machines as a single virtual machine, so processes don't have to worry about .hosts permissions and such, and can see all of both machines at once / as one? Or has my brain just blown a fuse? <g>

Quote:Wow that sounds much
more complex than it really is. I hope that sorta makes sense.

You tell me if it did. Heheheh...

<snip>

Quote:Make sure to use -w if you're using pico to edit your procmail files (or
any other text files); I'd recommend using emacs or vi if you know how.

I almost always edit text files locally on my Mac and FTP them... Much quicker for me.

<other very useful info snipped>

Thanks for all of that...

I need to read the tutorials and such, so posting any more tips right now might totally overload me. I'll post again if I get stuck.

Thanks again!

...Bob
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: