Welcome, Guest. Please login or register.
Did you miss your activation email?
Friday 22 November 2024, 07:53:39 am

Login with username, password and session length

The Latest Endian Firewall is now available for download HERE
14258 Posts in 4377 Topics by 6516 Members
Latest Member: DaveH
Search:     Advanced search
+  EFW Support
|-+  Support
| |-+  EFW SMTP, HTTP, SIP, FTP Proxy Support
| | |-+  Send proxy logs by emails
0 Members and 0 Guests are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: Send proxy logs by emails  (Read 15078 times)
lyxus
Jr. Member
*
Offline Offline

Posts: 5


« 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
Logged
npeterson
Full Member
***
Offline Offline

Posts: 90


« Reply #1 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
Logged
lyxus
Jr. Member
*
Offline Offline

Posts: 5


« Reply #2 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 Huh
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
}
           
Logged
blobbi
Full Member
***
Offline Offline

Gender: Male
Posts: 88


« Reply #3 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
Logged

german speaking Endian Community Forum at https://www.efw-forum.de
npeterson
Full Member
***
Offline Offline

Posts: 90


« Reply #4 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.
Logged
Pages: [1] Go Up Print 
« previous next »
Jump to:  

Page created in 0.094 seconds with 18 queries.
Powered by SMF 1.1 RC2 | SMF © 2001-2005, Lewis Media Design by 7dana.com