[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [vps-mail] Aliased Emails Avoid Procmail/Spamassassin?
- Subject: RE: [vps-mail] Aliased Emails Avoid Procmail/Spamassassin?
- From: "Bennett Lanford" <ben@xxxxxxxxxxxxx>
- Date: Tue, 20 Apr 2004 15:39:49 -0000
Ron Pero <rpero@xxxxxxxxxxxx> said:
> I have finally gotten around to implementing your suggestion. It almost
> works well. There is only one problem: when I send a message to
> testlist@xxxxxxxxxx, where I'm on the recipient list of the alias file, I
> receive 14 copies of the email.
>
> >From the information below, can you tell why this "circular" behavior
> happens? The best clue is probably from the procmail log, but I don't know
> what it means.
>
> (I did not try your suggestion to set up a user 'testlist', because I have
> about 25 lists like this, and I don't want to maintain 25 copies of the
> procmailrc file. Sensible? Or is there a way for each procmailrc file to
> "include" a main procmailrc file that filters spam and virii?)
>
> Thank you,
>
> Ron
>
> PROCMAILRC CONTAINS THIS
> :0 H:
> * ^TO_testlist@xxxxxxxxxx
> !testreallist
I wonder if the above rule might be causing the loop. How many of the
subscribers to testlist are on your mail server? Here is one possible
scenario:
1. The initial message arrives, with a header "To: testlist@xxxxxxxxxx". It
is mailed to testrealist (in your aliases file).
2. The _testlist_list.txt file has at least one subscriber whose mailbox is
on your server. The mail is sent to that subscriber (on your server).
3. The post arrives, (still) with the header "To: testlist@xxxxxxxxxx", which
matches the above procmailrc rule. It is mailed to testrealist.
4. Go to 2. [This is the look ...]
I'm not sure if that is what is happening, but it seems plausible to me.
Ben
>
> ALIASES CONTAINS THIS
> testlist: |"/usr/home/username/usr/local/bin/procmail -m
> /usr/home/username/etc/procmailrc"
> testreallist: :include:/usr/home/username/etc/mail/lists/_testlist_list.txt
>
> _TESTLIST_LIST.TXT CONTAINS THIS
> rpero@xxxxxxxxxxxxxx
> axarchivetest@xxxxxxxxxx
>
> IN PROCMAILRC I ALSO HAD THIS, BUT COMMENTED IT OUT. IT STILL SENDS ME 14
> COPIES, SO THE SPAMASSASSIN THING WAS NOT THE PROBLEM
> #:0fw: spamassassin.lock
> #* < 250000
> #* ^TO_testlist@xxxxxxxxxx
> #|/usr/local/bin/spamassassin
>
> AND FINALLY, IN A PROCMAIL LOG FILE, THERE ARE MANY LINES LIKE THIS
> procmail: Couldn't determine implicit lockfile from "/usr/sbin/sendmail"
> >From username Tue Apr 20 02:44:48 2004
> Subject: test5
> Folder: /usr/sbin/sendmail -oi testreallist
> 3908
> procmail: Couldn't determine implicit lockfile from "/usr/sbin/sendmail"
> >From username Tue Apr 20 02:44:48 2004
> Subject: test5
> Folder: /usr/sbin/sendmail -oi testreallist
> 4057
>
> THE HEADERS IN THE 14 EMAILS CONTAIN LINES LIKE THESE, EACH ADDITIONAL
EMAIL
> ADDING AN ADDITIONAL LINE LIKE THESE
> Received: (from domain12@localhost)
> by www12.domain.com (8.12.11/8.11.2) id i3K7ijE2080266
> for testreallist; Tue, 20 Apr 2004 02:44:45 -0500 (CDT)
> Received: (from domain12@localhost)
> by www12.domain.com (8.12.11/8.11.2) id i3K7ij4d080262
> for testreallist; Tue, 20 Apr 2004 02:44:45 -0500 (CDT)
> Received: from www1.domain.com (www1.domain.com [161.58.230.220])
> by www12.domain.com (8.12.11/8.11.2) with ESMTP id i3K7ii9V080258
> for <testlist@xxxxxxxxxx>; Tue, 20 Apr 2004 02:44:44 -0500 (CDT)
>
> > -----Original Message-----
> > From: owner-vps-mail@xxxxxxxxxxxx [mailto:owner-vps-mail@xxxxxxxxxxxx]On
> > Behalf Of Scott Wiersdorf
> > Sent: Thursday, March 25, 2004 6:12 AM
> > To: vps-mail@xxxxxxxxxxxx
> > Subject: Re: [vps-mail] Aliased Emails Avoid Procmail/Spamassassin?
> >
> >
> > On Wed, Mar 24, 2004 at 10:08:35PM -0800, Ron Pero wrote:
> > > I'm running VPS1, with procmail and spamassassin
> > >
> > > Is it true that if an email goes to an alias in sendmail, it
> > does not get
> > > checked by procmail or spamassassin?
> > >
> > > For example, for testlist@xxxxxxxxxx, there is this entry in
> > the etc/aliases
> > > testlist:
> > > :include:/usr/home/domainwhatever/etc/mail/lists/_testlist_list.txt
> > >
> > > Does all email sent to testlist@xxxxxxxxxx get sent to the mail
> > addresses in
> > > _testlist_list.txt, without getting filtered by procmail or
> > spamassassin?
> > >
> > > If so, any ideas on how to get around this?
> >
> > http://www.technoids.org/procmailfilter.html
> >
> > > My understanding is when mail arrives at the server, first stop is
> > > procmailrc, then virtmaps, then aliases. So procmail should be
> > processing
> > > it.
> >
> > No, aliases/forwards are processed first. If sendmail determines after
> > processing aliases and forwards that the mail will not be delivered
> > locally, procmail (the "LOCAL delivery agent") will never be run.
> >
> > > Does it not work on aliased emails?
> >
> > You could change your alias to pipe to procmail (untested):
> >
> > testlist: |/usr/local/bin/procmail -m /path/to/procmailrc
> >
> > and in your procmailrc file:
> >
> > :0
> > * virus checks
> > /dev/null
> >
> > :0
> > !newtestlist
> >
> > where newtestlist is an alias:
> >
> > newtestlist: :include:/path/to/your/list
> >
> > Another (preferred) way would be to set up a user 'testlist' on your
> > server. Remove the alias and create a .procmailrc file for the
> > testlist user. Filter your mail there and when all done filtering send
> > it to the list in the same way as above (create a newtestlist alias,
> > etc.)
> >
> > These last two method rely on the alias name staying secret, which is
> > fallible (but there are ways to help, such as putting a ", null" after
> > the listname and where "null" is an alias for /dev/null). The link
> > provided above will truly filter all incoming mail (and outgoing,
> > if you want that), but is considered "advanced usage" for sendmail.
> >
> > Scott
> > --
> > Scott Wiersdorf
> > scott@xxxxxxxxxxxx
> > ======================================================================
> > This is <vps-mail@xxxxxxxxxxxx> <http://www.perlcode.org/lists/>
> > Before posting a question, please search the archives (see above URL).
> >
> >
>
> ======================================================================
> This is <vps-mail@xxxxxxxxxxxx> <http://www.perlcode.org/lists/>
> Before posting a question, please search the archives (see above URL).
>
--
Bennett Lanford
ben@xxxxxxxxxxxxx
======================================================================
This is <vps-mail@xxxxxxxxxxxx> <http://www.perlcode.org/lists/>
Before posting a question, please search the archives (see above URL).
Main Index |
Thread Index