Operating System - Linux
1753368 Members
5106 Online
108792 Solutions
New Discussion юеВ

Re: generate /var/log/maillog on another machine

 
SOLVED
Go to solution
monu_1
Regular Advisor

generate /var/log/maillog on another machine

Hi Gurus,

I have two mail servers like mail1(192.168.0.1) and mail2(192.168.0.2) and i want to generate mail2's maillog on mail1 server.

I have changed mail2's /etc/syslog.conf file as
# Log all the mail messages in one place.
mail.* @mail1
and mail1's /etc/rc.d/init.d/syslog scripts as
daemon syslogd -m 0 to daemon syslogd -r

but it's not working.

Thanks & Regards,
MKS
4 REPLIES 4
Stuart Browne
Honored Contributor
Solution

Re: generate /var/log/maillog on another machine

You HUP'd syslogd on both servers?

You've got working DNS/Hosts-file entries for 'mail1' on 'mail2' ?

You aren't blocking UDP port 514 on 'mail2' with a firewall (iptables) ?

I run a cluster of 22 servers, using this method. I run syslogd with '-m0 -r'. It works beautifully.. ;) I do use an IP address in the server's syslog.conf though, not a machine name, but if the resolver is working there shouldn't be an issue there.
One long-haired git at your service...
monu_1
Regular Advisor

Re: generate /var/log/maillog on another machine

>You HUP'd syslogd on both servers?
i hv done it on both servers.

>You've got working DNS/Hosts-file entries for 'mail1' on 'mail2' ?
mail1's /etc/hosts==============>
# Do not remove the following line, or various programs
# that require network functionality will fail.
::1 localhost.localdomain localhost
192.168.0.2 mail2
*****************************************
mail2's /etc/hosts============>
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
192.168.0.1 mail1

>You aren't blocking UDP port 514 on 'mail2' with a firewall (iptables) ?
iptables off on both servers.

I have also changes /etc/syslog.conf on mail2
# Log all the mail messages in one place.
mail.* @192.168.0.1

still not transfering the mail2's maillog on mail1 server....:(
Stuart Browne
Honored Contributor

Re: generate /var/log/maillog on another machine

Well, arc up 'tcpdump -ni eth0 udp port 514' on 'mail2', and restart syslogd on both servers.

See what you get.
One long-haired git at your service...
monu_1
Regular Advisor

Re: generate /var/log/maillog on another machine

Thanks

but above command is not working perhaps tcpdump without option is working.

Regards,
MKS