Home | Docs | Forums | Lists | Bugs | Planet | Store | GMN | Get Gentoo!
View Bug Activity | Format For Printing | XML | Clone This Bug
dspam (with virtual-users USE flag) always adds the domain to the users which is not always what you want. The attached patch allows to add "StripRcptDomain on" to dspam.conf which will crop the domains. Credits and more info: http://archive.netbsd.se/?ml=dspam-users&a=2007-02&t=3231073 Reproducible: Always Steps to Reproduce:
Created an attachment (id=159878) [edit] Patch to support StripRcptDomain in dspam.conf
I've tested the patch with dspam-3.8.0-r11 on amd64.
I've just found a very nice side-effect of this setting: The dspam-web frontend is not able to show user details if dspam is used with virtual-users. The reason are lacking filesystem permissions as the dspam user (i.e. user@domain.com) is not identical to the OS user (i.e. user). With "StripRcptDomain = on" the dspam and OS user coincide and thus the filesystem permissions are not issue anymore thus obsoleting a common workaround: Adding dspam to the root group - ouch!
Your patch is incomplete. You should also patch man page and configuration file so users could know about the new option. Please improve the patch and I will add it to patch tarball.
Created an attachment (id=160313) [edit] Path to support StripRcptDomain in dspam.conf (including dspam.conf patch) I've patched dspam.conf as well (option and comment). There's no man page about the options in dspam.conf, so apparently the authors of dspam consider the very prosaic comments in dspam.conf part of dspam's documentation.
Fixed in 3.8.0-r12, thanks!
Created an attachment (id=165321) [edit] modified patch
first of all .. thanks for the nice patch. this option is exactly what i needed and after enabling it i stumbled over a problem with the current solution. on my setup dspam delivers the mail back to the mta after it was scanned .. the problem now is that 'StripRcptDomain' strips the domain not only from the username but realy from the rcpt field that the mta gets from dspam. so to keep it short what happens is: mail comes in for user@mydomain.com .. MTA delivers it to dspam .. dspam chops of the @mydomain.com part .. dspam delivers the mail back to the MTA with only user as recipient .. and my MTA has a problem with that. so here is my solution which only sets the user to the stripped value but leaves the recipient untouched.
I'm on the road right now and thus my boxes are off and I'm unable to test the patched patch from Holger until December. Maybe someone else could have a go?
The problem should be fixed in dspam-3.8.0-r14. Beside fixing the bug exposed in comment 8, I've decided to improve the original scriptrcptdomain.patch script in a more CPU/memory efficient manner. Thanks to both of ya for helping Gentoo improve itself!