spamass-milt-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Initial Installation Problems


From: Steve
Subject: Initial Installation Problems
Date: Wed, 24 Jun 2009 12:08:12 +0100

I could really use a little help in getting the milter up and running on
Postfix 2.5.5 running on Ubuntu 8.10 server.

I have Spamassassin installed and have been using it as an 'after queue'
filter. My traffic is light and I would prefer to use it before queue
and hence I have been pointed to spamass-milter.

Steps I've taken;

1. Download and compile (noted lots of complaining like this;
spamass-milter.cpp:566: warning: deprecated conversion from string
constant to ‘char*’
spamass-milter.cpp:477: warning: ignoring return value of ‘int
asprintf(char**, const char*, ...)’, declared with attribute
warn_unused_result
spamass-milter.cpp:503: warning: ignoring return value of ‘size_t
fwrite(const void*, size_t, size_t, FILE*)’, declared with attribute
warn_unused_result
spamass-milter.cpp: In function ‘sfsistat mlfi_envfrom(SMFICTX*,
char**)’:
spamass-milter.cpp:804: warning: deprecated conversion from string
constant to ‘char*’
spamass-milter.cpp:807: warning: deprecated conversion from string
constant to ‘char*’

But did not fail (I note they are only warnings).

I've edited the start up script to;

PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/local/sbin/spamass-milter
SOCKET=/home/mail/email/private/samilter
DESC="Sendmail milter plugin for SpamAssassin"

And this is where my first question kicks in. I'm guessing the socket is
created on the fly and Postfix will use that to communicate with the
milter? It's an area that I'm unfamiliar with. I've heard the phrase
'unix socket' but in practical use I've not paid enough attention to
them. Is my assumption correct?

I can start the milter and ps aux it, and can see a single instance
running; (I note it is running as root... Mmmmm is that bad?)

ps aux | grep spamass-m
root     30572  0.0  0.1  11328  1156 ?        Sl   15:33
0:00 /usr/local/sbin/spamass-milter -p /home/mail/email/private/samilter

I note the socket it has created is owned by root, when all the others
relevant to Postfix are owned by Postfix. My main.cf in Postfix has been
set following the Postfix docs on milter support,
(http://www.postfix.org/MILTER_README.html). It's chrooted so the path
is relative;

smtpd_milters = unix:/private/samilter 
milter_default_action = tempfail

Running it up I get:

Jun 24 11:40:30 mx1 postfix/smtpd[3880]: connect from
unknown[91.195.159.107]
Jun 24 11:40:30 mx1 postfix/smtpd[3880]: warning: connect to Milter
service unix:/private/samilter: Permission denied
Jun 24 11:40:30 mx1 postfix/smtpd[3880]: NOQUEUE: milter-reject: CONNECT
from unknown[91.195.159.107]: 451 4.7.1 Service unavailable - try again
later; proto=SMTP
Jun 24 11:40:30 mx1 postfix/smtpd[3880]: disconnect from
unknown[91.195.159.107]

So try this;
chown postfix:postfix /home/mail/email/private/samilter
(naturally I'll need to find a way to get this to create with the right
permissions on start)

And we seemed to get some sane output in syslog for messages blocked on
connecting IP;
Jun 24 11:42:56 mx1 postfix/smtpd[3946]: connect from
11-38-132-95.pool.ukrtel.net[95.132.38.11]
Jun 24 11:42:56 mx1 spamass-milter[3603]: Could not retrieve sendmail
macro "i"!.  Please add it to confMILTER_MACROS_ENVFROM for better
spamassassin results
Jun 24 11:42:56 mx1 postfix/smtpd[3946]: NOQUEUE: reject: RCPT from
11-38-132-95.pool.ukrtel.net[95.132.38.11]: 554 5.7.1
<address@hidden>: Sender address rejected: spoofing of domain;
from=<address@hidden> to=<address@hidden> proto=ESMTP
helo=<11-38-132-95.pool.ukrtel.net>
Jun 24 11:42:56 mx1 postfix/smtpd[3946]: disconnect from
11-38-132-95.pool.ukrtel.net[95.132.38.11]


However an allowed message seems to break it. Here it's been accepted
and passed to clamav, but when clam tries to inject it back in something
ugly happens and the logs can no longer find the socket?


Jun 24 11:46:17 mx1 postfix/smtpd[4086]: connect from
localhost[127.0.0.1]
Jun 24 11:46:17 mx1 postfix/smtpd[4086]: warning: connect to Milter
service unix:/private/samilter: No such file or directory
Jun 24 11:46:17 mx1 postfix/smtpd[4086]: NOQUEUE: milter-reject: CONNECT
from localhost[127.0.0.1]: 451 4.7.1 Service unavailable - try again
later; proto=SMTP
Jun 24 11:46:17 mx1 postfix/smtpd[4086]: NOQUEUE: milter-reject: EHLO
from localhost[127.0.0.1]: 451 4.7.1 Service unavailable - try again
later; proto=SMTP helo=<mail.munged.null>
Jun 24 11:46:18 mx1 postfix/smtpd[4086]: NOQUEUE: milter-reject: MAIL
from localhost[127.0.0.1]: 451 4.7.1 Service unavailable - try again
later; from=<address@hidden> proto=ESMTP helo=<mail.munged.null>
Jun 24 11:46:18 mx1 postfix/smtp[4084]: 90FDBAC8CE:
to=<address@hidden>, relay=127.0.0.1[127.0.0.1]:10025, delay=1.6,
delays=1.6/0.01/0.08/0, dsn=4.7.1, status=deferred (host
127.0.0.1[127.0.0.1] said: 451 4.7.1 Service unavailable - try again
later (in reply to MAIL FROM command))

Check the socket is still there;
srwxr-xr-x  1 postfix postfix    0 2009-06-24 11:33 samilter

Check it's still running;
:~# ps aux | grep spamass-m
root      3603  0.0  0.1  19524  1252 ?        Sl   11:33
0:00 /usr/local/sbin/spamass-milter -p /home/mail/email/private/samilter







reply via email to

[Prev in Thread] Current Thread [Next in Thread]