Koozali.org: home of the SME Server

Where does clamav get its Email address ??

Offline steve288

  • *
  • 336
  • +0/-0
Where does clamav get its Email address ??
« on: April 27, 2007, 04:37:38 PM »
1. Im trying to find out the place that clamav gets its email address that emails messages like the one at the bottom of this email.

I asumed that it was the administrator that is set up in the panel under Users. However after following these instructions :

From server-manager
1. Click Users
2. Click to modify the admin account
3. Under Email Delivery change to Forward email to address below
4. Enter the new address you want (new@abc.com)
5. Save changes

However this does not work. When we reboot the computer the below message is sent not to old@abc.com. (for some reasons it often happens when we reboot)

Does anyone know how to change the email address that clamav sends messages to.

2. Does anyone know how to resolve the problem refered to in the email.
You should know that this message I think started when I backed up my sme6 server/gateway and restored it to the sme7 server/gateway. I used the backup utility in SME6 and 7.

Thank you.

Error Message:
2007-04-27 09:09:16.716175500 ClamAV update process started at Fri Apr 27 09:09:16 2007
2007-04-27 09:09:36.722112500 WARNING: Can't query current.cvd.clamav.net
2007-04-27 09:09:36.722120500 WARNING: Invalid DNS reply. Falling back to HTTP mode.
2007-04-27 09:09:36.722126500 Reading CVD header (main.cvd): ERROR: Can't get information about db.local.clamav.net: Temporary DNS error
2007-04-27 09:09:56.735269500 main.cvd is up to date (version: 43, sigs: 104500, f-level: 14, builder: sven)
2007-04-27 09:09:56.735275500 Reading CVD header (daily.cvd): ERROR: Can't get information about db.local.clamav.net: Temporary DNS error
2007-04-27 09:10:16.740620500 daily.inc is up to date (version: 3165, sigs: 7990, f-level: 15, builder: ccordes)
2007-04-27 09:20:25.658581500 ERROR: Can't lock database directory: /var/clamav

Offline mrjhb3

  • *
  • 1,188
  • +0/-0
    • John Bennett Services
Where does clamav get its Email address ??
« Reply #1 on: April 27, 2007, 07:53:42 PM »
Could what you are looking for be in /etc/freshclam.conf?  Look at the OnErrorExecute line, then look at the script that is referenced.

John
......

Offline steve288

  • *
  • 336
  • +0/-0
Where does clamav get its Email address ??
« Reply #2 on: April 27, 2007, 09:32:58 PM »
Thank you for your response.
Well you did answer the question unfortunetely it didnt solve the problem.

In examining the files that you pointed me to they basically say to email the error message to admin eg.

mail -s 'freshclam: Update failed' admin

I want to change the admin address. I cant seem to do this. I have checked /etc/e-smith/db/accounts and my name is there as admin but the other person is still getting the email.

Offline mrjhb3

  • *
  • 1,188
  • +0/-0
    • John Bennett Services
Where does clamav get its Email address ??
« Reply #3 on: April 27, 2007, 09:54:45 PM »
Quote from: "steve288"
Thank you for your response.
Well you did answer the question unfortunetely it didnt solve the problem.

In examining the files that you pointed me to they basically say to email the error message to admin eg.

mail -s 'freshclam: Update failed' admin

I want to change the admin address. I cant seem to do this. I have checked /etc/e-smith/db/accounts and my name is there as admin but the other person is still getting the email.


Correct, change the admin in that file to the user you want to use.  I believe when you use the mail -s command this way, it doesn't use qpsmtpd so it doesn't look at your aliases.

JB
......

Offline steve288

  • *
  • 336
  • +0/-0
Where does clamav get its Email address ??
« Reply #4 on: April 27, 2007, 10:09:39 PM »
Thank again.

I may have to do this. However I suppose I was hoping that the User panel would resolve this. I dont like to change things as, if Im not with the organization any longer they will not be able to change this through the panel which I think ?? it should.  

Besides what about other messages that are sent from the computer eg not freshclam messages I asume they will go to the other address I dont want things sent to.  There "should" be a global solution that will change everything.

Thoughts ??
Regards.

Offline haymann

  • *
  • 212
  • +0/-0
Where does clamav get its Email address ??
« Reply #5 on: April 27, 2007, 10:42:57 PM »
It sounds to me like something is wrong somewhere (that helps a lot, I know :wink: ). I have no problem changing the admin properties to forward the mail to another account, I even have them delivering to different domains so it doesn't have to be a local user.

Did you set the email to Forward to Address below (as indicated in step 3 of your first post), or it is set to Both Deliver Locally and Forward? Are you getting any system messages to your email account that you want the admin messages sent to? I usually get a couple a day...
Ryan

Offline steve288

  • *
  • 336
  • +0/-0
Where does clamav get its Email address ??
« Reply #6 on: April 27, 2007, 10:59:15 PM »
Yes I have set up point 3, just double checked.

We have not recieve any other messages just these messages. And the only messages so far we have recived are those that I have mentioned. I dont have it scan every day I will turn this on which I think should send messages.

I think that some of the problem is the transfer from SME6 to 7. I installed 7 then did a backup of my 6 box and restored it to 7. Using the backup software on the sme computers. Im guesing that if where the admin info is stored has changed between the sme6 and 7 and it has on the panal (at least thats what one helpfull soul said) then this info is put somewhere different between 6 and 7 and has screwed something up ?

Im gong home for the weekend and will pick this up again on mondy for those who would like to help.

Regards

Offline dmay

  • *
  • 450
  • +0/-0
    • http://myezserver.com
Where does clamav get its Email address ??
« Reply #7 on: April 27, 2007, 11:31:35 PM »
Something like this should work:
Code: [Select]
ADMIN=$(/sbin/e-smith/db /home/e-smith/db/accounts getprop admin ForwardAddress)

tac /var/log/freshclam/current | sed -n '/Downloading/d;1,/process started/p;/process started/q' | tac | tai64nlocal | \
     mail -s 'freshclam: Update failed' ${ADMIN:-admin}

exit 0

Good ahead and make this a NFR in the bug tracker if you feel it might be useful.

Darrell

Offline steve288

  • *
  • 336
  • +0/-0
Where does clamav get its Email address ??
« Reply #8 on: April 30, 2007, 02:12:40 PM »
Um whats a NFR ??

Offline steve288

  • *
  • 336
  • +0/-0
Where does clamav get its Email address ??
« Reply #9 on: April 30, 2007, 03:28:38 PM »
Regarding the code you have kindly provided.

Should I put both portions into the /var/log/freshclam as you have typed it replacing the existing code in the /var/log/freshclam

I guess being that this is run every once and a while it would automatically mean that any admin message from any program would be sent to the new administrator new@abc.com, since it sets up the variable for Admin. Although I cant remember if it is run like this (in a an Xcutable Script)is it only good for the time the script is run or will it be exported (?if thats the right word) so all programs can use it.

Again I would like all admin emails to be changed not just clam.

thank you.
Regards.

Offline Franco

  • *
  • 1,171
  • +0/-0
    • http://contribs.org
Where does clamav get its Email address ??
« Reply #10 on: April 30, 2007, 04:08:19 PM »
If you want all admin emails changed, then go into the admin account properties and forward all emails to the account you want to receive them.

Offline steve288

  • *
  • 336
  • +0/-0
Where does clamav get its Email address ??
« Reply #11 on: April 30, 2007, 04:26:24 PM »
Thank you stutshell for your respones, However if I understand you correctly this is exactly what does not work. If you check out my very first post I said .....

>However this does not work. When we reboot the computer the below
>message is sent not to old@abc.com. (for some reasons it often happens
>when we reboot)

Regards

Offline Franco

  • *
  • 1,171
  • +0/-0
    • http://contribs.org
Where does clamav get its Email address ??
« Reply #12 on: April 30, 2007, 05:22:14 PM »
Then you have a problem, this works fine and you should report your problem to the bugtracker:

db accounts set admin ForwardAddress youremail@here

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Where does clamav get its Email address ??
« Reply #13 on: May 01, 2007, 12:50:36 AM »
Quote from: "steve288"

From server-manager
1. Click Users
2. Click to modify the admin account
3. Under Email Delivery change to Forward email to address below
4. Enter the new address you want (new@abc.com)
5. Save changes

However this does not work.


Then clearly you should report the issue via the Bug Tracker.