Submitted by ice on Sat, 05/11/2013 - 19:10
Hi,
I am running the last virtualmin.
I've enabled "Create spamtrap and hamtrap aliases?" but i realize that emails send to these addresses are not processed.
After a short research I found out that spamtrap cron jobs was not added.
I have these cron jobs on other servers and everything is fine:
53 0 * * * /etc/webmin/virtual-server/spamclear.pl 49 * * * * /etc/webmin/virtual-server/spamtrap.pl 19 * * * * /etc/webmin/virtual-server/spamconfig.pl
What I should to for these to be enabled and not needed to add them manually?
Thank you.
Status:
Active
Comments
Submitted by JamieCameron on Sat, 05/11/2013 - 23:57 Comment #1
As of Virtualmin 3.99, those old-style cron jobs no longer exist - instead the functionality has been moved into the Webmin server process.
If you go to Webmin -> Webmin -> Webmin Configuration -> Scheduled Functions, you should see jobs that run spamclear.pl and spamtrap.pl
Submitted by ice on Sun, 05/12/2013 - 04:14 Comment #2
Hi Jamie,
The files from /var/virtualmin-traps/spam was not processed:
-rw-rw-rw- 1 root root 23K May 12 01:25 13360830084902
dateSun May 12 11:03:17 CEST 2013
Something is not working. How I can check why the cron jobs are not running?
I've pressed on Run Selected Functions Now for spamtrap.pl and nothing was happen.
When I've run manually with: perl /etc/webmin/virtual-server/spamtrap.pl everything was fine.
So I guess, that, just the cron job is not run this. Is there a way or a log where I can see why cron jobs from webmin are not running/
Thank you.
Submitted by JamieCameron on Sun, 05/12/2013 - 13:43 Comment #3
So are you saying that if you run
/etc/webmin/virtual-server/spamtrap.pl
manually from the command line, spam does get processed OK?Submitted by ice on Sun, 05/12/2013 - 14:38 Comment #4
Hi Jamie,
Yes. exactly. If I run it manually everything is processed.
But the scheduled jobs are not working. I've upgraded today another servers and now are the latest CentOS software and webmin/virtualmin. I saw the these cron jobs was moved to webmin scheduled functions and again, from over 10 hours, virtualmin traps are not processed.
So its clear that these Scheduled Functions are not working.
Submitted by JamieCameron on Sun, 05/12/2013 - 19:50 Comment #5
Ok, try this :
/etc/webmin/webmincron/crons
echo "arg1=--debug" >> `grep -l spamtrap *.cron`
spamtrap.pl
command and post the output here.Submitted by ice on Sun, 05/12/2013 - 21:40 Comment #6
Submitted by ice on Sun, 05/12/2013 - 21:40 Comment #7
Hi Jamie,
I've did what you told me and here is the output fom Scheduled Functions:
Running function run_cron_script in Virtualmin Virtual Servers (GPL) ..
srv0.domain.com: processing spam file .. done
Here is the output when I am running manually the script:
# /etc/webmin/virtual-server/spamtrap.pl --debug
srv0.domain.com: processing spam file
srv0.domain.com: 0 messages in /var/virtualmin-traps/spam/133608228332714
srv0.domain.com: processing ham file
srv0.domain.com: 0 messages in /var/virtualmin-traps/ham/133608228332714
whmcs.domain.com: processing spam file
whmcs.domain.com: 0 messages in /var/virtualmin-traps/spam/13360832257904
whmcs.domain.com: processing ham file
whmcs.domain.com: 0 messages in /var/virtualmin-traps/ham/13360832257904
emails.domain.com: processing spam file
emails.domain.com: 0 messages in /var/virtualmin-traps/spam/135750281129330
emails.domain.com: processing ham file
emails.domain.com: 0 messages in /var/virtualmin-traps/ham/135750281129330
projects.domain.com: spam filtering is not enabled
beta.domain.com: processing spam file
beta.domain.com: 0 messages in /var/virtualmin-traps/spam/13360830755741
beta.domain.com: processing ham file
beta.domain.com: 0 messages in /var/virtualmin-traps/ham/13360830755741
domain.com: processing spam file
domain.com: 1 messages in /var/virtualmin-traps/spam/13360830084902
domain.com: processing ham file
domain.com: 0 messages in /var/virtualmin-traps/ham/13360830084902
domain.com: id=<20130513034351.Horde.oP2_utktI__A3P6phW4vBA1@mail.domain.com>
domain.com: user=email@domain.com what=from
domain.com: email@domain.com: Invalid received by srv0.domain.com (Postfix, from userid 48) id E1F8C32B; Mon, 13 May 2013 03:43:51 +0200 (CEST)
monitoring.domain.com: processing spam file
monitoring.domain.com: 0 messages in /var/virtualmin-traps/spam/13360831707175
monitoring.domain.com: processing ham file
monitoring.domain.com: 0 messages in /var/virtualmin-traps/ham/13360831707175
smts.domain.com: processing spam file
smts.domain.com: 0 messages in /var/virtualmin-traps/spam/13360831316505
smts.domain.com: processing ham file
smts.domain.com: 0 messages in /var/virtualmin-traps/ham/13360831316505
It seams that, from Scheduled, the script cannot detect all domains. Only the first one. However the content of file was not processed:
-rw-rw-rw- 1 root root 7.4K May 13 04:30 133608228332714
Regards.
Submitted by JamieCameron on Sun, 05/12/2013 - 23:03 Comment #8
It actually looks like the script is crashing when processing the first domain.
Does anything get logged to
/var/webmin/miniserv.error
when you run spamtrap.pl via Scheduled Functions , or when it runs on schedule?Submitted by ice on Sun, 05/12/2013 - 23:44 Comment #9
There is nothing on miniserv.error or any system logs.
Submitted by JamieCameron on Mon, 05/13/2013 - 14:46 Comment #10
If there any chance I could login to your Virtualmin system to see what is going wrong here?
If so, email me directly at jcameron@virtualmin.com
Submitted by bernardo on Mon, 05/13/2013 - 18:05 Comment #11
I got the same error. the script does not run automatically
when rotating manually: script processed mx1.mxdomain.com.br.
# /etc/webmin/virtual-server/spamtrap.pl --debug
domain.com.br: processing spam file
domain.com.br: 5 messages in /var/virtualmin-traps/spam/134446039819927
domain.com.br: processing ham file
domain.com.br: 0 messages in /var/virtualmin-traps/ham/134446039819927
domain.com.br: id=<be2bba26d22ea33c62062313203fde8c@domain.com.br>
domain.com.br: user=contato@domain.com.br what=from
domain.com.br: contato@domain.com.br: Invalid received by mx1.mxdomain.com.br (Mx1, from userid 33) id 8ED0C1914175; Sat, 11 May 2013 12:49:29 -0300 (BRT)
domain.com.br: id=<d79f932664db288ff978562577a6e2c3@domain.com.br>
domain.com.br: user=contato@domain.com.br what=from
domain.com.br: contato@domain.com.br: Invalid received by mx1.mxdomain.com.br (Mx1, from userid 33) id 108261914082; Sat, 11 May 2013 12:55:18 -0300 (BRT)
I use mx external.
DNS:
domain.com.br MX 5 mx1.mxdomain.com.br
domain.com.br MX 10 mx1b.mxdomain.com.br
domain.com.br MX 15 mx1c.mxdomain.com.br
webmail.domain.com.br CNAME mx1.mxdomain.com.br
message forwarding was done by webmail.
Submitted by bernardo on Mon, 05/13/2013 - 18:27 Comment #12
Look, wait. This seems to only work with attachment forwarding. "Eml" and a pop or imap account.
Webmail does not seem to work. Is that right?
Submitted by bernardo on Mon, 05/13/2013 - 20:24 Comment #13
really is not working automatically. I waited 2 hours and nothing.
manual processing works!
/etc/webmin/virtual-server/spamtrap.pl
domain.com.br: contato@domain.com.br: Auth received from [10.0.2.15] (222-222-222-222.user.veloxzone.com.br [187.126.253.27]) (Authenticated sender: contato@domain.com.br) by mx1.mxdomain.com.br (Mx1) with ESMTPSA id B8FAA191407D for <spamtrap@domain.com.br>; Mon, 13 May 2013 20:31:18 -0300 (BRT)
domain.com.br: contato@domain.com.br: subject=Lembrete de fatura
domain.com.br: contato@domain.com.br: OK netset: illegal network address given: 'mx1b.mxdomain.com.br' Learned tokens from 1 message(s) (1 message(s) examined)
domain.com.br: Adding email@live.com to blacklist_from
There is some problem in creating a cron to run this script
"/etc/webmin/virtual-server/spamtrap.pl"
Submitted by JamieCameron on Mon, 05/13/2013 - 22:00 Comment #14
Spam processing only works if the entire message is forwarded as an attachment - otherwise the original headers are lost.
Submitted by ice on Tue, 05/14/2013 - 00:21 Comment #15
Hi Jamie,
I cannot give you access on any product server. I can set a test server in the next days only.
But, I can bet that this will be the same on any of your test servers.
This was happen only after the last upgrade. Everything was fine before. And if spamtrap.pl script is added on crontab as usual, everything is fine.
Regards.
Submitted by JamieCameron on Tue, 05/14/2013 - 18:38 Comment #16
A test server that shows this issue would be great - unfortunately none of our systems are showing the problem.
Submitted by Dim Git on Fri, 07/05/2013 - 05:25 Comment #17
Hi Jamie,
I am running :-
CentOS Linux 5.9
Webmin version 1.630
Virtualmin version 4.01 Pro
And I have remarkably similar symptoms.
I can give you access and have emailed you off forum.
(my chance to give something back) :o)
Tim
Submitted by JamieCameron on Wed, 07/10/2013 - 05:41 Comment #18
Ok, I found the cause of Tim's problem here - it was due to some old DBM format cache files that Virtualmin couldn't read properly. The quick fix was to delete these with :
rm -f /etc/webmin/mailboxes/*trap*{dir,pag}
I will include a proper fix in the next Virtualmin release.