procmail
[Top] [All Lists]

Re: [pro] Emails delivered twice

2008-05-15 09:05:18
At 10:49 2008-05-15 -0400, Charles Gregory wrote:
On Thu, 15 May 2008, Alistair McDonald wrote:
.... I get them all forwarded to a single pop3 mailbox and pick them up
via fetchmail.

Begging pardon, but are 'TESTDIR/name' mailboxes or not? Doesn't really
change things, but this is a confusing comment to make when you are
clearly delivering to multiple mailboxes.... If you meant that all *input*
to procmail was from a single mailbox, that makes sense, but still doesn't
contribute to the issue.

Excepting that what he's saying is that all the mail for multiple people is 
coming in through a single email account (excernal to his host).

If you want to run your own mail server and process mail for multiple 
users, etc, you need to configure your mail server to accept mail for your 
domain, and set up a dynamic DNS configuration (unless your server runs on 
a static IP already), and set DNS for your domain to specify your mail 
server as the primary MX, and your upline ISP as a secondary.  Your upline 
ISP would be referred to whenever your own host couldn't be directly 
reached.  You also need to make your upline ISP aware that they're relaying 
mail for you, not maintaining a local mailbox, because they need to make 
appropriate config changes at their end for that.  This of course should be 
checked first, since if your current mailhost won't change things 
accordingly, then you'll need to find one that will.

If your connection is over a DHCP lease *AND* is intermittent (say, a 
dialup line), then you can use fetchmail to "tickle" a remote server to 
initiate a mail transfer - you'd add it to whatever script you run to 
establish your dialup connection.  This isn't to initiate a POP3 download, 
as you appear to do now, but rather to announce to the remote SMTP server 
that your system is online and that the other host should attempt to 
process mail which it has queued for you.  It should eventually do that on 
its own anyway, but tickling it improves the likelyhood that most of your 
mail will come in with some semblance of it's original sent order (since 
now that you're online, other hosts can connect directy to you to send mail).

Note that ALL of this is external to procmail.  Because PROCMAIL IS NOT AN 
MTA.  Trying to misuse it as one leads to the sort of problems being discussed.

1: the DEFAULT processing is hit, but it shouldn't be

I'm not an expert on those ?? condtions, but they look 'wrong' somehow.
I've no idea what the line of "^^^^" means....

^^ anchors to the beginning of the range of the search area (either, 
message or variable, depending upon what is to the left of this), and ^^ at 
the end of an expression anchors to the END of the search area.  So, ^^^^ 
means the search area is EMPTY.  The most frequent use of it that I see is 
looking for empty variables, as well as making sure variable comparisons 
are for the full string not matching against a possible substring.

See 'man procmailrc', where these things are documented...

Compare that to ^$ which would match at least ONE EMPTY LINE, but if the 
comparison is against a multi-line something, that doesn't mean it is blank.

---
  Sean B. Straw / Professional Software Engineering

  Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
  Please DO NOT carbon me on list replies.  I'll get my copy from the list.

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>