HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   HOWTO-Related Questions (http://www.howtoforge.com/forums/forumdisplay.php?f=2)
-   -   SpamSnake - missing /var/run/MailScanner/ (http://www.howtoforge.com/forums/showthread.php?t=36361)

mrtero 12th June 2009 11:13

SpamSnake - missing /var/run/MailScanner/
 
I seem to have some trouble with finding a folder that keeps coming up if some logs.

The following log is from /var/log/messages

Code:

tail -f /var/log/messages
Code:

Jun 12 10:18:19 postrens1 MailScanner: Cannot write pid file /var/run/MailScanner/MailScanner.pid, No such file or directory
Jun 12 10:18:19 postrens1 MailScanner: MailScanner setting GID to www-data (33)
Jun 12 10:18:19 postrens1 MailScanner: MailScanner setting UID to postfix (110)
Jun 12 10:18:20 postrens1 MailScanner: Cannot write pid file /var/run/MailScanner/MailScanner.pid, No such file or directory
Jun 12 10:40:26 postrens1 MailScanner: Cannot write pid file /var/run/MailScanner/MailScanner.pid, No such file or directory
Jun 12 10:40:26 postrens1 MailScanner: MailScanner setting GID to www-data (33)
Jun 12 10:40:26 postrens1 MailScanner: MailScanner setting UID to postfix (110)
Jun 12 10:40:27 postrens1 MailScanner: Cannot write pid file /var/run/MailScanner/MailScanner.pid, No such file or directory

This error accrue every time I restart the Mailscanner service
Code:

/etc/init.d/mailscanner restart
Anything I need to look into? or is there a way to remove this error/warning?

Any help would be much appreciated

falko 13th June 2009 10:36

Try this:
Code:

mkdir /var/run/MailScanner
chmod 777 /var/run/MailScanner


mrtero 14th June 2009 20:48

So i guess the folder has no other purpose than to hold the pid file then?

Thanks for the reply :D

[Edit]
Tryd it btw, and worked like a charm :D

mrtero 15th June 2009 07:26

Huuum .. got a strange thing going on here.

It seems that the error messages return every time I reboot the server :-/

Any clue?

falko 15th June 2009 14:45

What's the output of
Code:

ls -la /var/run/
after a reboot?

mrtero 15th June 2009 14:54

Code:

root@postrens1:~# ls -la /var/run/
total 44
drwxr-xr-x 12 root      root        480 2009-06-15 14:53 .
drwxr-xr-x 15 root      root      4096 2009-06-09 14:30 ..
drwxr-xr-x  2 root      root        40 2009-06-15 14:52 apache2
-rw-r--r--  1 root      root          5 2009-06-15 14:52 apache2.pid
-rw-r--r--  1 root      root          5 2009-06-15 14:52 atd.pid
drwxr-xr-x  3 root      root        60 2009-06-15 14:52 bind
drwxr-xr-x  2 clamav    clamav      100 2009-06-15 14:52 clamav
-rw-r--r--  1 root      root          5 2009-06-15 14:52 console-kit-daemon.pid
-rw-r--r--  1 root      root          5 2009-06-15 14:52 crond.pid
----------  1 root      root          0 2009-06-15 14:52 crond.reboot
drwxr-xr-x  2 messagebus messagebus  80 2009-06-15 14:52 dbus
drwxr-xr-x  2 dcc        dcc          40 2009-06-15 14:52 dcc
drwxr-xr-x  2 klog      klog        100 2009-06-15 14:52 klogd
-rw-r--r--  1 root      root          0 2009-06-15 14:53 mailq.lock
-rw-r--r--  1 root      root        433 2009-06-15 14:52 motd
drwxr-xr-x  2 mysql      root        80 2009-06-15 14:52 mysqld
drwxr-xr-x  2 root      root        60 2009-06-15 14:52 network
-rw-r--r--  1 root      root          4 2009-06-15 14:52 ntpd.pid
-rw-r--r--  1 root      root          2 2009-06-15 14:52 sendsigs.omit
drwxr-xr-x  2 root      root        40 2009-06-15 14:52 sendsigs.omit.d
drwxr-xr-x  2 root      root        40 2009-06-15 14:52 sshd
-rw-r--r--  1 root      root          5 2009-06-15 14:52 sshd.pid
-rw-r--r--  1 root      root          5 2009-06-15 14:52 syslogd.pid
-rw-rw-r--  1 root      utmp      3456 2009-06-15 14:52 utmp
root@postrens1:~#

:D

mrtero 16th June 2009 08:29

I guess i have overlooked something in the guide that might help,

- http://howtoforge.org/the-perfect-sp...ubuntu-8.04-p5

Quote:

9.17 Fix for Ubuntu 8.04 (kept removing directories upon reboot)
Edit /etc/rc.local and add the following before the exit line:
Code:

mkdir /var/run/MailScanner
mkdir /var/lock/subsys
mkdir /var/lock/subsys/MailScanner
chown -R postfix:www-data /var/run/MailScanner
chown -R postfix:www-data /var/lock/subsys/MailScanner
/etc/init.d/postfix restart
/etc/init.d/mailscanner restart


The reason I didn't even think to read this, is that its all strikethrough.

mrtero 17th June 2009 20:05

Just an update , this didn't solve my problem :P

I can refer to another with the same problem tho, although, I do not believe that the problem got solved there either ^^

- http://howtoforge.org/forums/showthr...ctories+reboot

What i did notice, was that Rocky made change to hes tutorial in that thread
Quote:

Harry,

Did you comment out the following in /etc/rc2.d/S20mailscanner?

Code:
Code:

#check_dir /var/spool/MailScanner      ${user:-mail} ${group:-mail}
#check_dir /var/lib/MailScanner        ${user:-mail} ${group:-mail}
#check_dir /var/run/MailScanner        ${user:-mail} ${group:-mail}
#check_dir /var/lock/subsys/MailScanner ${user:-mail} ${group:-mail}

If not, edit it so that it looks like the above and restart your system. Check your log and let me know if that worked.

Rocky

Rocky 30th June 2009 13:06

Hey,

Are you following the new guide or the old guide?

Rocky

mrtero 30th June 2009 14:34

This would be for the old guide :P sorry, this was posted before I knew that there where two SpamSnake guides.

I do however have a working version of SpamSnake with ubuntu 8.04 running today, with just a few minor problems.

Cant remember how I solved this issue tho :/

I will however reinstall this server at some point, and at the same time make a note of all the changes that I have to do to make it work : ) don't know if that would be to any interest for you : )


All times are GMT +2. The time now is 22:21.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.