Title: Send proxy logs by emails Post by: lyxus on Tuesday 07 July 2009, 05:16:21 am Hello ,
i am using Endian Firewall Community release 2.2.rc3. I have a VPN proxy do you know if there is an option to receive the daily logs by emails ? Thanks Title: Re: Send proxy logs by emails Post by: npeterson on Friday 10 July 2009, 07:37:15 am Sure just need to add a directive to logrotate
The main config file is /etc/logrotate.conf if you want all the rotated logs emailed to you add it there otherwise you will need to find the directive in one of the included files in /etc/logfilerotate.d and add it between that files brackets{} mail user@host.com Also a trick if you get tired of a million logfiles in the directories create a central archive folder, ex /var/log/archive and add this directive to the /etc/logrotate.conf: olddir /var/log/archive Title: Re: Send proxy logs by emails Post by: lyxus on Tuesday 11 August 2009, 06:35:45 am Hello here is the content of my /etc/logrotate.conf
But i am not receiving any emails ??? why Running Transaction Operating system is CentOS Linux daily # keep 366 days worth of backlogs rotate 366 # create new (empty) log files after rotating old ones dateext create compress missingok dateext include /etc/logrotate.d /var/log/wtmp { create 0664 root utmp lastaction rotate_persistent /var/log/wtmp endscript mail myadresse@gmail.com } Title: Re: Send proxy logs by emails Post by: blobbi on Friday 11 September 2009, 05:34:45 pm Hi,
think you need to convert the attachment with MIME Type, after that you can send attachments with the Endian Firewall. Look at the endian Firewall Monitor this is the same function. greets Title: Re: Send proxy logs by emails Post by: npeterson on Thursday 08 October 2009, 01:20:30 am Sorry didnt catch this before, but i think the problem lies with the rotate_persistent
It appears to move the file to a different location after the log rotation. the mail command will occur after the lastaction(no matter where it is in the script), so since logrotate doesnt know where the file went (it called an outside program for cleanup, aka rotate_persistent) it cannot mail the file to the user. I dont know why efw does its rotation this way, but i would set the olddir directive and remove the rotate_* command. User be warned. |