You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Karsten Bräckelmann <gu...@rudersport.de> on 2011/03/11 20:26:59 UTC

Re: [Q] SA mis-configuration question: Empty dirs username being created in /var/mail

On Fri, 2011-03-11 at 13:00 +0100, J4K wrote:
>     I wonder if I have some misconfiguration in my SA set-up, and if
> someone would be able to send me off in the right direction, or has seen
> it before.  As shown below, some messages are scanned by SA with just
> the user name, while others are scanned using the full login.

That should be the username as passed to spamd. Note they are all using
the same UID 5002, your global 'spamd' user.

> Fri Mar 11 11:28:56 2011 [2252] info: spamd: clean message (0.0/6.0) for
> bob.pieters:5002 in 1.2 seconds, 22828 bytes.
> Fri Mar 11 11:28:57 2011 [2253] info: spamd: clean message (-0.0/5.0)
> for bob.pieters@klunky.co.uk:5002 in 1.1 seconds, 22390 bytes.

> SA runs with these options (taken from the /etc/default/spamassassin
> file on Debian Squeeze):-
> 
> OPTIONS="--create-prefs -x -q --max-children 3 --sql-config 
> --nouser-config --username spamd --helper-home-dir ${SAHOME} -s
> /var/log/spamd.log --virtual-config-dir=${SAHOME}/users/%d/%u"

If spamd would create dirs, it should be in the virtual config dir.

> I noticed that erroneous directories are created via dovecot in
> /var/vmail like:
> /var/vmail/bob.pieters@klunky.co.uk/
> /var/vmail/bob.pieters/
> 
> however, all directories created sans the domain name (user name only)
> remain empty. I have deleted these now and again, and eventually these
> are re-created.  I imagine that its dovecot that is responsible for
> creating these directories, but is it SA that is passing the wrong email
> address?  SA runs as a milter, and as a pipe from postfix into dovecot:

SA does not pass any email address or username to other processes later
in your chain.

> # grep spam /etc/postfix/master.cf
> dovecot-spamass   unix  -       n       n       -       -       pipe
>     flags=DRhu user=vmail:vmail argv=/usr/bin/spamc -u ${recipient} -e
> /usr/lib/dovecot/deliver -d ${recipient}
> 
> Does anyone know why this would happen. I've noticed it for quite
> sometime, but never got around to sorting it out.  I dpn't know if this
> is really a problem with my SA set-up, or a postfix or dovecot
> mis-configuration.  Apologies for one of those long-winded questions on
> a Friday afternoon.

I'd guess it's either a postfix issue, or an issue with your Dovecot
deliver LDA. Since the ones without the domain are erroneous, and even
though created always empty (that is, no mail delivered), I'd first
check your postfix config.


-- 
char *t="\10pse\0r\0dtu\0.@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4";
main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1:
(c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}