XMailforum is a readonly knowledge archive now.

Registering as a new user or answering posts is not possible anymore.

Might the force be with you, to find here what you are looking for.

2019-09-20 - hschneider, Admin

Cookie Disclaimer: This forum uses only essential, anonymous session cookies (xmailforum*), nothing to be scared of.

XMail Forum -> Xmail Logging - Which Facility?

Reply to this topicStart new topicStart Poll

> Xmail Logging - Which Facility?
pgs
Posted: Mar 22 2005, 08:54 PM
Quote Post


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
PMEmail Poster
Top
hschneider
Posted: Mar 22 2005, 09:43 PM
Quote Post


No - I'm not an answering script ...
Group Icon

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
PMEmail PosterUsers Website
Top
pgs
Posted: Mar 22 2005, 09:49 PM
Quote Post


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
PMEmail Poster
Top
hschneider
Posted: Mar 22 2005, 11:24 PM
Quote Post


No - I'm not an answering script ...
Group Icon

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
PMEmail PosterUsers Website
Top
pgs
Posted: Mar 23 2005, 12:55 AM
Quote Post


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
PMEmail Poster
Top
hschneider
Posted: Mar 23 2005, 07:33 AM
Quote Post


No - I'm not an answering script ...
Group Icon

Group: Admin
Posts: 6631
Member No.: 195
Joined: 19-June 02



A text search for 'syslog' did the trick wink.gif


--------------------
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
PMEmail PosterUsers Website
Top
voigt
Posted: Jul 6 2008, 05:17 PM
Quote Post


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?
PMEmail Poster
Top
hschneider
Posted: Jul 6 2008, 05:27 PM
Quote Post


No - I'm not an answering script ...
Group Icon

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
PMEmail PosterUsers Website
Top
voigt
Posted: Jul 6 2008, 05:42 PM
Quote Post


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.
PMEmail Poster
Top
voigt
Posted: Jul 6 2008, 07:55 PM
Quote Post


Junior Member
**

Group: Members
Posts: 25
Member No.: 2942
Joined: 11-June 08



QUOTE (hschneider @ Mar 22 2005, 11:24 PM)
... It's facility is 'XMail'. ...

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.

PMEmail Poster
Top
hschneider
Posted: Jul 6 2008, 08:10 PM
Quote Post


No - I'm not an answering script ...
Group Icon

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
PMEmail PosterUsers Website
Top
voigt
Posted: Jul 6 2008, 08:11 PM
Quote Post


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.)
PMEmail Poster
Top
voigt
Posted: Jul 6 2008, 08:19 PM
Quote Post


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
PMEmail Poster
Top
hschneider
Posted: Jul 7 2008, 10:52 AM
Quote Post


No - I'm not an answering script ...
Group Icon

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
PMEmail PosterUsers Website
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
« Next Oldest | XMail Server | Next Newest »

Reply to this topicStart new topicStart Poll