2019-09-20 - hschneider, Admin
Cookie Disclaimer: This forum uses only essential, anonymous session cookies (xmailforum*), nothing to be scared of.
![]() |
| XMail Forum · Newbies read here ! All about SMTP,MX-Records,DNS etc. |
Help
Search
Members
Calendar
|
| Welcome Guest ( Log In | Register ) | Resend Validation Email |
| pgs |
Posted: Mar 22 2005, 08:54 PM
|
|
Newbie ![]() Group: Members Posts: 16 Member No.: 1382 Joined: 1-November 04 |
Hi there,
I'm using XMail on my Debian Server. I'd like to catch XMails log messages with my syslog. Since XMail uses syslog, it has a log facility. But which? XMail does not log under the facility "mail" (which would be a better way, IMO). So does anybody know under what facility XMail does logging? Three hours of googling and manpaging weren't successfull... cu, pgs |
| hschneider |
Posted: Mar 22 2005, 09:43 PM
|
![]() No - I'm not an answering script ... Group: Admin Posts: 6631 Member No.: 195 Joined: 19-June 02 |
XMail cannot use syslog. It logs to /var/MailRoot/logs only.
-------------------- Bye,
Harald -- Download XMail Queue Manager 1.46 NOW: XMail Server Tools -- Cross platform remote queue management! -- Message analyzing on the fly! -- Builtin diagnostics knowledge base! -- Manages multiple mail queues! Sponsored by CD-Produktion und DVD-Produktion and Homestaging Saarland - Immobilien schneller verkaufen in der Region Saarland, Rheinland-Pfalz und Luxembourg |
| pgs |
Posted: Mar 22 2005, 09:49 PM
|
|
Newbie ![]() Group: Members Posts: 16 Member No.: 1382 Joined: 1-November 04 |
Hmm, but in the XMAil documentation is written:
"[...] Since XMail use syslog to log messages, enable syslogd if it's not running. [...]" So, if i understood right, XMail uses syslog, and when a process uses syslog, it has to do so under a facility? cu, pgs |
| hschneider |
Posted: Mar 22 2005, 11:24 PM
|
![]() No - I'm not an answering script ... Group: Admin Posts: 6631 Member No.: 195 Joined: 19-June 02 |
Oops you are right. But browsing its source code shows, that it just uses syslogd to log initial startup errors. All other errs are written to it's own logs. It's facility is 'XMail'. If it starts up well, you will never see anything in the syslogd logs ....
-------------------- Bye,
Harald -- Download XMail Queue Manager 1.46 NOW: XMail Server Tools -- Cross platform remote queue management! -- Message analyzing on the fly! -- Builtin diagnostics knowledge base! -- Manages multiple mail queues! Sponsored by CD-Produktion und DVD-Produktion and Homestaging Saarland - Immobilien schneller verkaufen in der Region Saarland, Rheinland-Pfalz und Luxembourg |
| pgs |
Posted: Mar 23 2005, 12:55 AM
|
|
Newbie ![]() Group: Members Posts: 16 Member No.: 1382 Joined: 1-November 04 |
OK, thanks a lot for searching the source. I tried to, but didn't know where and what and how :-(
I think I'm gonna use syslog-ng to extract the relevant data out of the existing logfiles. EOT, I think. cu, pgs |
| hschneider |
Posted: Mar 23 2005, 07:33 AM
|
![]() No - I'm not an answering script ... Group: Admin Posts: 6631 Member No.: 195 Joined: 19-June 02 |
A text search for 'syslog' did the trick
-------------------- Bye,
Harald -- Download XMail Queue Manager 1.46 NOW: XMail Server Tools -- Cross platform remote queue management! -- Message analyzing on the fly! -- Builtin diagnostics knowledge base! -- Manages multiple mail queues! Sponsored by CD-Produktion und DVD-Produktion and Homestaging Saarland - Immobilien schneller verkaufen in der Region Saarland, Rheinland-Pfalz und Luxembourg |
| voigt |
Posted: Jul 6 2008, 05:17 PM
|
|
Junior Member ![]() ![]() Group: Members Posts: 25 Member No.: 2942 Joined: 11-June 08 |
One of the things I use syslog for is real time monitoring of hacking attacks. Is there an easy way to feed the data going into the xmail logs into a program in realtime? I've seen a lot of pop3 password brute force attacks lately and I'd like to kill the IP while they are happening. Tail -F won't work because xmail creates a new filename.
what's the preferred way to mod xmail so that new versions are compatible? |
| hschneider |
Posted: Jul 6 2008, 05:27 PM
|
![]() No - I'm not an answering script ... Group: Admin Posts: 6631 Member No.: 195 Joined: 19-June 02 |
The logging can only be modified in its source code which has to be applied again manually with each update.
-------------------- Bye,
Harald -- Download XMail Queue Manager 1.46 NOW: XMail Server Tools -- Cross platform remote queue management! -- Message analyzing on the fly! -- Builtin diagnostics knowledge base! -- Manages multiple mail queues! Sponsored by CD-Produktion und DVD-Produktion and Homestaging Saarland - Immobilien schneller verkaufen in der Region Saarland, Rheinland-Pfalz und Luxembourg |
| voigt |
Posted: Jul 6 2008, 05:42 PM
|
|
Junior Member ![]() ![]() Group: Members Posts: 25 Member No.: 2942 Joined: 11-June 08 |
Thanks Harald. I just looked at the code and it looks like it will be pretty easy to send data to syslog. Most of the needed functions are already there just disabled if not in debug mode.
|
| voigt |
Posted: Jul 6 2008, 07:55 PM
|
||
|
Junior Member ![]() ![]() Group: Members Posts: 25 Member No.: 2942 Joined: 11-June 08 |
Actually, not true. Facilities in syslog are predefined. Thanks to Davide for open source, I now have XMail logging to facility "local0". Very minor changes needed to accomplish. |
||
| hschneider |
Posted: Jul 6 2008, 08:10 PM
|
![]() No - I'm not an answering script ... Group: Admin Posts: 6631 Member No.: 195 Joined: 19-June 02 |
Good job ... feel free to post your changes here if you want to share them.
-------------------- Bye,
Harald -- Download XMail Queue Manager 1.46 NOW: XMail Server Tools -- Cross platform remote queue management! -- Message analyzing on the fly! -- Builtin diagnostics knowledge base! -- Manages multiple mail queues! Sponsored by CD-Produktion und DVD-Produktion and Homestaging Saarland - Immobilien schneller verkaufen in der Region Saarland, Rheinland-Pfalz und Luxembourg |
| voigt |
Posted: Jul 6 2008, 08:11 PM
|
|
Junior Member ![]() ![]() Group: Members Posts: 25 Member No.: 2942 Joined: 11-June 08 |
What format would you want them posted in? My server is FreeBSD so the changes may be slightly unix-specific (though I wouldn't think it matters much.)
|
| voigt |
Posted: Jul 6 2008, 08:19 PM
|
|
Junior Member ![]() ![]() Group: Members Posts: 25 Member No.: 2942 Joined: 11-June 08 |
Here's the changes as unix "diff" output:
diff SysDep.h SysDep.h.sav 32d31 < #define LOG_LEV_POP3 9 diff POP3Svr.cpp POP3Svr.cpp.sav 361,369d360 < SysLogMessage(LOG_LEV_POP3, "\"%s\"" < "\t\"%s\"" < "\t\"%s\"" < "\t\"%s\"" < "\t\"%s\"" < "\t\"%s\"" < "\n", POP3S.szSvrFQDN, POP3S.szSvrDomain, SysInetNToA(POP3S.PeerInfo, szIP), < szTime, POP3S.szUser, POP3S.szPassword); < diff SysDepUnix.cpp SysDepUnix.cpp.sav 1567c1567 < syslog(LOG_LOCAL0 | LOG_INFO, "%s", szBuffer); --- > syslog(LOG_DAEMON | LOG_ERR, "%s", szBuffer); 1602d1601 < case LOG_LEV_POP3: Note that this change only logs POP3 login attempts to syslog. Also, these changes are for xmail 1.24 (still having troubles with 1.25). John |
| hschneider |
Posted: Jul 7 2008, 10:52 AM
|
![]() No - I'm not an answering script ... Group: Admin Posts: 6631 Member No.: 195 Joined: 19-June 02 |
Thanx!
-------------------- Bye,
Harald -- Download XMail Queue Manager 1.46 NOW: XMail Server Tools -- Cross platform remote queue management! -- Message analyzing on the fly! -- Builtin diagnostics knowledge base! -- Manages multiple mail queues! Sponsored by CD-Produktion und DVD-Produktion and Homestaging Saarland - Immobilien schneller verkaufen in der Region Saarland, Rheinland-Pfalz und Luxembourg |