[milters] Archive

Lists Index Date Thread Search

Article: 1656
From: Anthony Howe
Date: 2007-08-27 08:37:06 -0400
Subject: Re: milter-spamc changing to recipient's userid

Removal...........: milters-request@milter.info?subject=remove
More information..: http://www.milter.info/#Support
--------------------------------------------------------

Michael Grant wrote:
> I set as spamd-user=spamass, and it's not even setting the userid to
> spamass, it seems to be using user 'nobody'.
> 
> Does milter-spamc run the recipient through alias and virtusertable
> expansion to try and find the true user?

No. Alias and virtusertable are NOT consulted. Everything comes via 
sendmail macros. The value of the {rcpt_addr} macro is used, which has 
typically undergone mailertable expansion as I recall. Normally the 
default list of macros include {rcpt_addr}, but if they have been 
changed for any reason I suggest reading this article on the matter of 
sendmail macros passed to milters:

http://www.snert.com/Software/ecartis/index.php?go=/milters/2006-06/959

Quickly reading the source code, the choice of SpamAssassin user is made 
thus:

a) Use the local part of an email address if it corresponds to an 
account on the machine. For a message aimed at multiple recipient 
addresses, the local part (ie. stuff before the @-sign) of the LAST 
recipient specified is used. See also is-gateway option which also 
influences selection.

b) If spam-user is specified and there are multiple recipient, then the 
spam-user value is used instead.

c) If spam-user specified and +no-user-config, then spam-user will 
ALWAYS be used overriding all of the above.

To see what is being sent to SpamAssassin set

	verbose=info,trace,dialog

and restart the milter.

-- 
Anthony C Howe          Skype: SirWumpus                    SnertSoft
+33 6 11 89 73 78         ICQ: 7116561      Sendmail Milter Solutions
http://www.snert.com/                 
     http://www.snertsoft.com/

Lists Index Date Thread Search