webhosting recommendations with procmail

William R Ward bill at wards.net
Mon Jan 20 10:43:05 PST 2003


David Wolfskill writes:
>>Date: Mon, 20 Jan 2003 03:18:38 -0800
>>From: bill at wards.net (William R Ward)
>
>>I recommend using fetchmail on your home Linux box to pull the mail
>>from your POP/IMAP account, and then run procmail locally.  That's
>>what I do and it works great.
>
>Ummm....  Back when I was a dialup customer (with a static IP
>address) of an ISP that refused to deliver mail to dialup customers via
>SMTP or UUCP, I used that technique (well, except I was running SunOS
>4.1.1_U1 on my 3/60, vs. Linux... and it was easier for me to cobble up
>a Perl script to handle the local re-delivery than to figure out how to
>use procmail).
>
>It is my perception that the cited technique can be made to work within
>its inherent limitations, but I would definitely not recommend the
>technique without disclosure of the limitations.
>
>What is at issue (as far as I'm concerned) is that the technique involves
>picking up the mail after "final delivery" ahs been accomplished (and
>thus, after the envelope information has been discarded) and trying to
>go through the process of figuring out where the message should go once
>the envelope is gone.

Well, in my case, the envelope itself may be gone but enough
information remains - principally, since my ISP uses qmail, there is a
"Delivered-To:" header added which indicates what the envelope
recipient (at my domain) was.  This is what I use in my .procmailrc to
filter mail with.

>For "normal" messages, this can work out reasonably well.  You just need
>to be sure the re-delivery is only to local addresses.  (Had you been
>using the technique, and had I sent this message both to you and to the
>baylisa@ list, I would be rather perturbed (wearing the
>postmaster at baylisa.org hat) had your system sent a copy of the message
>to you, as well as re-injecting it to the baylisa at baylisa.org list.  I
>expect you would be less-than-thrilled about the results of that, as
>well.)

I don't re-deliver; I filter using the headers of the message.
Re-injecting it into sendmail would cause that problem, but I don't do
that - my .fetchmailrc calls procmail directly.

>Where things really get unpleasant is where all of the following hold:
>
>* You have multiple local recipients for messages.

That doesn't happen in my case, but if it did it would be fetchmailed
and procmailed twice.  If you have the entire domain's email go into a
single IMAP/POP folder and do any alias explosion with procmail, it's
less of a problem, but you could still have multiple local addresses
explicitly in the envelope of the message.

>* You use the same POP-box for at least 2 of the above.
>* A message arrives with at least 2 of the above as recipients.
>* At least one of the above recipients is specified as a Bcc:.

These are not an issue for me for the abovementioned reasons.

>The salient issue is that by their nature, Bcc: recipients are *only*
>specified in the envelope -- [...]

Since qmail puts the Delivered-To: header in, this isn't a problem.
My ISP is sasquatch.com, if anyone wants to give all this a try.

>Now, all of this isn't directly helpful for the person doing the
>original query.  Sorry about that.  As for me, I was lucky enough to get
>a static IP assignment from Pac*Bell when I got residential DSL, and I
>run my own SMTP server here at home.  I create new email aliases when
>the need becomes apparent, and Things Just Work.  And if I get too much
>spam from a domain or netblock, I can blacklist the domain or netblock
>-- at the MTA level (where I think it should be done, if it is done).

Static IP's are not necessary for this.  You can use Dynamic DNS
(www.dyndns.org) to get the appearance of static IP for any broadband
account.  I use AT&T Broadband, and even though technically it's not a
static IP, the IP has never changed except when my MAC address has
changed.  But I run a program that updates Dynamic DNS regularly just
in case.  So while I don't have a static IP, I do have
"wards.dyndns.org."

(While it's true that you can't use a CNAME for an MX record, if you
really want mail delivered to your home box, you don't actually need
to have an MX record...  Just have the domain's CNAME point to your
Dynamic DNS hostname with no MX.)

--Bill.

-- 
William R Ward            bill at wards.net          http://www.wards.net/~bill/
-----------------------------------------------------------------------------
"A foolish consistency is the hobgoblin of little minds, adored by
 little statesmen and philosophers and divines."        - Emerson



More information about the Baylisa mailing list