Submitted by nicbaxter on Mon, 06/20/2016 - 21:02 Pro Licensee
Spamassassin doesn't appear to be learning from spamtrap. When I forward emails to spamtrap I can see them appended to /var/virtualmin-traps/spam/142267202818074
When I manually run
[root@nicbaxter crons]# /etc/webmin/virtual-server/spamtrap.pl --debug
xxxx.com.au: missing spamtrap aliases
yyyy.com.au: missing spamtrap aliases
zzz.com.au: processing spam file
Error: Failed to open /var/virtualmin-traps/spam/118291235110245 : No such file or directory
Error
-----
Failed to open /var/virtualmin-traps/spam/118291235110245 : No such file or directory
There appears to be a mismash between the IDs. Where do the IDs come from?
How does the redirection from spamtrap@xxx.com.au actually get to /var/virtualmin-traps/spam?
Cheers
Nic
Status:
Closed (fixed)
Comments
Submitted by JamieCameron on Mon, 06/20/2016 - 22:36 Comment #1
Those numbers are unique domain IDs - you can get the ID for a domain by running
virtualmin list-domains --domain whatever.com --id-only
For the error like
xxxx.com.au: missing spamtrap aliases
, does the domainxxxx.com.au
have an entry in /etc/aliasesthat delivers to a file under
/var/virtualmin-traps` ?Submitted by nicbaxter on Tue, 06/21/2016 - 02:25 Pro Licensee Comment #3
I think I have worked it out. Only 2 domains had spam/ham trap activated and those domains are listed in /etc/aliases. Domain 1 was listed followed by domain 2. However only the ID for domain 2 was shown in /var/virtualmin-trap/spam. Which meant when the script ran it stopped when it could find the ID in spam. So I logged in to domain 1 and forwarded a spamtrap email. Both IDs are now in /var/virtualmin-traps/spam and the script works. If I may suggest rather than stopping when the ID wasn't found, shouldn't the script continue to the other entries? Either that or when the spam/ham aliases are set up the system should create a blank ID file.
Cheers Nic
Submitted by andreychek on Tue, 06/21/2016 - 10:49 Comment #6
Thanks for sharing your findings! I unfortunately don't know the answer to how that should work, but Jamie will be getting back with you shortly regarding that.
Submitted by JamieCameron on Tue, 06/21/2016 - 21:15 Comment #7
Yes, it shouldn't crash out in this case. I'll fix this in the next VIrtualmin release.
Submitted by JamieCameron on Tue, 06/21/2016 - 21:15 Comment #8
Submitted by nicbaxter on Wed, 06/22/2016 - 02:51 Pro Licensee Comment #9
Thanks Jamie