[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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).


Main Index | Thread Index
Match: Format: Sort by:
Search: