Bug 4714

Summary: Vpopmail handling of aliases fails
Product: Spamassassin Reporter: Jaime Herazo B. <jherazo>
Component: spamc/spamdAssignee: SpamAssassin Developer Mailing List <dev>
Severity: normal CC: lesha
Priority: P3    
Version: 3.1.0   
Target Milestone: Undefined   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 4568    
Attachments: Log excerpt showing the problem
Proposed patch to fix the problem

Description Jaime Herazo B. 2005-12-01 16:37:33 UTC
When trying to create user prefs or using the autowhitelist plugin, it fails. A 
cursory look at the logs indicates that it does check with the valias command, 
but the expected syntax is invalid, seems like it expects to receive the 
pathname directly when what it gets is the non-alias account it points to (i 
think it's that it expects something like "foo@domain -> /var/lib/vpopmail/
domains/domain/bar/Maildir" or something, gets "foo@domain -> bar@domain"). 
Excerpt from the logs, when delivering to jherazo@elheraldo.com.co which is an 
alias that points to jaime.herazo@elheraldo.com.co:

Thu Dec  1 09:23:29 2005 [8314] warn: config: oops! user_dirs don't match! 
'jherazo@elheraldo.com.co -> jaime.herazo@elheraldo.com.co' v
s ''
Thu Dec  1 09:23:29 2005 [8314] error: mkdir /var/lib/vpopmail/.spamassassin: 
Permiso denegado at /usr/share/perl5/Mail/SpamAssassin.pm 
line 1467
Thu Dec  1 09:23:29 2005 [8314] warn: util: cannot untaint path: 
"jherazo@elheraldo.com.co -> jaime.herazo@elheraldo.com.co/.spamassassi
Thu Dec  1 09:23:29 2005 [8314] error: Insecure dependency in open while running 
with -T switch at /usr/share/perl5/Mail/SpamAssassin.pm
 line 1505, <GEN6> line 2.
Comment 1 Jaime Herazo B. 2005-12-01 16:46:04 UTC
Created attachment 3285 [details]
Log excerpt showing the problem

Sorry to paste logs in a comment last time. 

The problem also shows itself with the autowhitelist plugin, only that then it
doesn't stop scanning. When it hits it because of create-prefs it just stops
scanning and returns the message unscored.
Comment 2 Jaime Herazo B. 2006-02-17 15:45:51 UTC
Created attachment 3377 [details]
Proposed patch to fix the problem

Here i took a patch for version 3.0.2 from bugreport 4051 and adapted it for
spamd in version 3.1. This one implements recursive alias searching, in case
you find an alias of an alias of an alias (limited to max. 20 iterations).
Please, if you find bugs or improvements post them, as i haven't extensively
tested the patch, i only know that it seems to work for me. Will keep it
working for a couple of days more to see how well it works, and we'll see.
Comment 3 Justin Mason 2006-10-19 06:29:42 UTC
*** Bug 4051 has been marked as a duplicate of this bug. ***
Comment 4 Justin Mason 2006-10-19 06:31:53 UTC
vpopmail note: if anyone who runs vpopmail would like to fix the assorted bugs
in spamd's support for it, and update the documentation to be correct, please
have at it.  We currently have a number of bugs: bug 2536, bug 4568, bug 4714,
bug 3120 and bug 2866, all related to vpopmail, and none of the dev team use
this code, so the various proposed fixes are untested. Basically, we need a
vpopmail maintainer.
Comment 5 Justin Mason 2008-07-02 13:07:22 UTC
buf 5798 has fixed this for 3.3.0.

*** This bug has been marked as a duplicate of bug 5798 ***