Re: Debian jessie - new setup, missing data directory
On Tue, 10 Nov 2015 10:45:03 + Phil Reynoldswrote: > On Mon, 9 Nov 2015 13:23:04 + > Phil Reynolds wrote: > > > I have recently transferred all of my email system to a new machine, > > but spamassassin is not yet fully functional. > > > > It seems that it is trying to use /var/mail/.spamassassin as a data > > directory - this is fine, but it does not appear to be correctly set > > up. > Furthermore, my claws-mail setups do not have the SpamAssassin plugin > set to process received mail, only the reporting function. I can see > why that bit is not currently working - spamd only listening on > loopback. I am pleased to say it's now all sorted. Much of the problem was caused by permissions on /var/mail - I know to watch for that now. Some of the setup it seems I had never had right on the old setup either - so, although it was a bit of a steep learning curve, this experience has been useful. -- Phil Reynolds mail: phil-spamassas...@tinsleyviaduct.com
Re: Debian jessie - new setup, missing data directory
On 11/10/2015 5:45 AM, Phil Reynolds wrote: On Mon, 9 Nov 2015 13:23:04 + Phil Reynoldswrote: I have recently transferred all of my email system to a new machine, but spamassassin is not yet fully functional. It seems that it is trying to use /var/mail/.spamassassin as a data directory - this is fine, but it does not appear to be correctly set up. I purged all spamassassin setup and started again, just to prove what was going on. There's no real change. I have put syslog output generated by spamd at http://paste.debian.net/330559/ and /var/mail/.spamassassin has not been created, but spamd still wants to use it. Is /var/mail the home directory of your "mail" user? That would explain why SA is looking there for a .spamassassin directory. -- Bowie
Re: Debian jessie - new setup, missing data directory
On Tue, 10 Nov 2015 10:55:38 + Phil Reynolds wrote: > On Tue, 10 Nov 2015 10:45:03 + > Phil Reynoldswrote: > > > On Mon, 9 Nov 2015 13:23:04 + > > Phil Reynolds wrote: > > > > > I have recently transferred all of my email system to a new > > > machine, but spamassassin is not yet fully functional. > > > > > > It seems that it is trying to use /var/mail/.spamassassin as a > > > data directory - this is fine, but it does not appear to be > > > correctly set up. > > > > I purged all spamassassin setup and started again, just to prove > > what was going on. There's no real change. I have put syslog output > > generated by spamd at http://paste.debian.net/330559/ : spamd: connection from localhost [127.0.0.1]:47762 to port 783, fd 5 : spamd: setuid to mail succeeded > > and /var/mail/.spamassassin has not been created, but spamd still > > wants to use it. > > It turned out /var/mail had permissions unsuitable... have made it > writable by the mail group now. There are two common ways to use spamd with spamc: 1. with per unix user data/settings. spamd runs as root and the spamd child process drops privileges per email to the unix user running spamc. This allows spamd to access unix home directories without running as root. 2. with global (or virtual user) data/settings spamd starts as root and permanently drops to the unix user specified by the spamd -u argument - typically called "spamd". Any per user data is then for virtual users and the files are own by the unprivileged unix user. You appear to running spamd as (1) but then running spamc with the user "mail". Unless you need spamd to access the home directories of login users, you should be running as (2) starting spamd with -u.
Re: Debian jessie - new setup, missing data directory
On Tue, 10 Nov 2015 10:45:03 + Phil Reynoldswrote: > On Mon, 9 Nov 2015 13:23:04 + > Phil Reynolds wrote: > > > I have recently transferred all of my email system to a new machine, > > but spamassassin is not yet fully functional. > > > > It seems that it is trying to use /var/mail/.spamassassin as a data > > directory - this is fine, but it does not appear to be correctly set > > up. > > I purged all spamassassin setup and started again, just to prove what > was going on. There's no real change. I have put syslog output > generated by spamd at http://paste.debian.net/330559/ > and /var/mail/.spamassassin has not been created, but spamd still > wants to use it. It turned out /var/mail had permissions unsuitable... have made it writable by the mail group now. > Furthermore, my claws-mail setups do not have the SpamAssassin plugin > set to process received mail, only the reporting function. I can see > why that bit is not currently working - spamd only listening on > loopback. Not yet found the setting to fix this. -- Phil Reynolds mail: p...@tinsleyviaduct.com Web: http://phil.tinsleyviaduct.com/
Re: Debian jessie - new setup, missing data directory
On Mon, 9 Nov 2015 13:23:04 + Phil Reynoldswrote: > I have recently transferred all of my email system to a new machine, > but spamassassin is not yet fully functional. > > It seems that it is trying to use /var/mail/.spamassassin as a data > directory - this is fine, but it does not appear to be correctly set > up. I purged all spamassassin setup and started again, just to prove what was going on. There's no real change. I have put syslog output generated by spamd at http://paste.debian.net/330559/ and /var/mail/.spamassassin has not been created, but spamd still wants to use it. Furthermore, my claws-mail setups do not have the SpamAssassin plugin set to process received mail, only the reporting function. I can see why that bit is not currently working - spamd only listening on loopback. -- Phil Reynolds mail: p...@tinsleyviaduct.com Web: http://phil.tinsleyviaduct.com/
Debian jessie - new setup, missing data directory
I have recently transferred all of my email system to a new machine, but spamassassin is not yet fully functional. It seems that it is trying to use /var/mail/.spamassassin as a data directory - this is fine, but it does not appear to be correctly set up. Errors like these are appearing in my syslog: Nov 9 12:02:30 fitzalan spamd[8916]: config: cannot create user preferences file /var/mail/.spamassassin/user_prefs: Permission denied Nov 9 12:02:30 fitzalan spamd[8916]: spamd: failed to create readable default_prefs: /var/mail/.spamassassin/user_prefs What can I do to get this directory right and working? Also, what do I need to do to enable access to spamd from my other machines, where the mail is actually read? -- Phil Reynolds mail: phil-spamassas...@tinsleyviaduct.com
Re: Debian jessie - new setup, missing data directory
On Monday 09 November 2015 at 14:23:04, Phil Reynolds wrote: > I have recently transferred all of my email system to a new machine, > but spamassassin is not yet fully functional. > > It seems that it is trying to use /var/mail/.spamassassin as a data > directory - this is fine, but it does not appear to be correctly set up. > > Errors like these are appearing in my syslog: > > Nov 9 12:02:30 fitzalan spamd[8916]: config: cannot create user > preferences file /var/mail/.spamassassin/user_prefs: Permission denied > Nov 9 12:02:30 fitzalan spamd[8916]: spamd: failed to create readable > default_prefs: /var/mail/.spamassassin/user_prefs Well, what are the ownership & permissions on: /var/mail/,spamassassin /var/mail/.spamassassin/user_prefs and which user does spamassassin run as on your system? > What can I do to get this directory right and working? Also, what do I > need to do to enable access to spamd from my other machines, where the > mail is actually read? You said "I have recently transferred all of my email system to a new machine" and yet now you are saying there are other machines involved... I suggest you describe your setup so we can understand what you're doing a bit better. In the subject you said this was Debian Jessie, but are you running Debian's standard MTA Exim4, or another one? Is "this machine" acting as a mail gateway, performing all filtering on inbound mail, and what are the other machines "where the mail is actually read" doing? What email applications run on those? How is spamassassin being called in order to give its opinion on email? Antony. -- You can tell that the day just isn't going right when you find yourself using the telephone before the toilet. Please reply to the list; please *don't* CC me.
Re: Debian jessie - new setup, missing data directory
On 2015-11-09 16:42 +0100, Antony Stone wrote: > What did Jessie install it as? > > > > /var/mail/.spamassassin/user_prefs This is very strange. Are you really sure it is not operator error? I run wheezy, so I can't flat out exclude it, but it flies in the face of too much Debian tradition. /var/mail is just for the spool mailboxes. > 1. I seriously doubt that on a Debian system exim is running as root. Indeed: [6+0]~$ ps axl | fgrep 'exim4 -bd' 5 101 3230 1 20 0 46824 2860 ? Ss ? 0:06 /usr/sbin/exim4 -bd -q30m 0 1000 8368 8311 20 0 7800 1760 - S+ pts/1 0:00 fgrep exim4 -bd [7+0]~$ awk 'BEGIN { FS=":" } ( $3 == "101" ) { print $0 }' < /etc/passwd Debian-exim:x:101:103::/var/spool/exim4:/bin/false > 2. It sounds like we're talking slightly at cross-purposes here. Exim may be > calling spamassassin (PS: how?) It matters a good deal. If it's called from the content filtering hook or the ACLs, spamassassin runs as the exim UID (unless it is itself setuid, of course). But if it's called as a "transport filter", it runs as the destination user. -- Please *no* private copies of mailing list or newsgroup messages. Rule 420: All persons more than eight miles high to leave the court.
Re: Debian jessie - new setup, missing data directory
On Mon, 9 Nov 2015 16:27:22 + RWwrote: > > > and which user does spamassassin run as on your system? > > > > root - which I'm slightly surprised at. > > You're probably looking at the main process, rather than child > processes that scan the mail. > > When you look at the output of ps, take a look a the child processes > and also look at the arguments to the parent processes. A case of running ps when there is one to look at... > > claws-mail's plugin is supposed to allow spamassassin to be trained > > as to what is spam and what is ham, on those occasions it decides > > incorrectly. > > AFAIK the purpose of the claws-mail plugin is to scan mail by passing > it to spamc, not to train it. I'm wondering if the errors in the logs > are caused by the plugin calling spamc, rather than exim calling it. There's facility for both. I only use the training. -- Phil Reynolds mail: phil-spamassas...@tinsleyviaduct.com
Re: Debian jessie - new setup, missing data directory
On Mon, 9 Nov 2015 16:42:43 +0100 Antony Stonewrote: > On Monday 09 November 2015 at 16:23:52, Phil Reynolds wrote: > > > On Mon, 9 Nov 2015 15:11:16 +0100 Antony Stone wrote: > > > > > > What are the ownership & permissions on: > > > > > > /var/mail/,spamassassin > > > > Tried root.root and debian-spamd.debian.spamd, 755. > > What did Jessie install it as? Not at all. > > > /var/mail/.spamassassin/user_prefs > > > > Not there at all. > > Have you tried creating it, to let spamd look in it? > > > > and which user does spamassassin run as on your system? > > > > root - which I'm slightly surprised at. > > How did you identify this? See below - it looks like I'm missing some information. All one package but different bits of it. > > > How is spamassassin being called in order to give its opinion on > > > email? > > > > exim is calling it. The results also appear in syslog. > > 1. I seriously doubt that on a Debian system exim is running as root. > > What do you see in the first column of output from "ps aux | grep > exim"? Debian-+ - likely really Debian-exim > 2. It sounds like we're talking slightly at cross-purposes here. > Exim may be calling spamassassin (PS: how?), but that's not spamd, > providing a network service to other machines. As for the "how?", I can't rightly say - but it's actually spamd that's giving the opinion. > What do you see in the first column of output from "ps aux | grep > spamd"? root -- Phil Reynolds mail: phil-spamassas...@tinsleyviaduct.com
Re: Debian jessie - new setup, missing data directory
On Mon, 9 Nov 2015 08:12:20 -0800 Ian Zimmermanwrote: > On 2015-11-09 16:42 +0100, Antony Stone wrote: > > > What did Jessie install it as? > > > > > > /var/mail/.spamassassin/user_prefs > > This is very strange. Are you really sure it is not operator error? > > I run wheezy, so I can't flat out exclude it, but it flies in the face > of too much Debian tradition. /var/mail is just for the spool > mailboxes. Definitely not an error on my part - and I must admit I was surprised at this. -- Phil Reynolds mail: phil-spamassas...@tinsleyviaduct.com
Re: Debian jessie - new setup, missing data directory
On Monday 09 November 2015 at 16:23:52, Phil Reynolds wrote: > On Mon, 9 Nov 2015 15:11:16 +0100 Antony Stone wrote: > > > > What are the ownership & permissions on: > > > > /var/mail/,spamassassin > > Tried root.root and debian-spamd.debian.spamd, 755. What did Jessie install it as? > > /var/mail/.spamassassin/user_prefs > > Not there at all. Have you tried creating it, to let spamd look in it? > > and which user does spamassassin run as on your system? > > root - which I'm slightly surprised at. How did you identify this? > > How is spamassassin being called in order to give its opinion on > > email? > > exim is calling it. The results also appear in syslog. 1. I seriously doubt that on a Debian system exim is running as root. What do you see in the first column of output from "ps aux | grep exim"? 2. It sounds like we're talking slightly at cross-purposes here. Exim may be calling spamassassin (PS: how?), but that's not spamd, providing a network service to other machines. What do you see in the first column of output from "ps aux | grep spamd"? Antony. -- Users don't know what they want until they see what they get. Please reply to the list; please *don't* CC me.
Re: Debian jessie - new setup, missing data directory
On Mon, 9 Nov 2015 15:23:52 + Phil Reynolds wrote: > > /var/mail/.spamassassin/user_prefs spamd seems to be treating /var/mail/ as a home directory. I would have expected .spamassassin to be in a directory owned by the spamd user. > Not there at all. > > > and which user does spamassassin run as on your system? > > root - which I'm slightly surprised at. You're probably looking at the main process, rather than child processes that scan the mail. When you look at the output of ps, take a look a the child processes and also look at the arguments to the parent processes. > claws-mail's plugin is supposed to allow spamassassin to be trained as > to what is spam and what is ham, on those occasions it decides > incorrectly. AFAIK the purpose of the claws-mail plugin is to scan mail by passing it to spamc, not to train it. I'm wondering if the errors in the logs are caused by the plugin calling spamc, rather than exim calling it. > > How is spamassassin being called in order to give its opinion on > > email? > > exim is calling it. The results also appear in syslog.
Re: Debian jessie - new setup, missing data directory
On 09.11.15 13:23, Phil Reynolds wrote: I have recently transferred all of my email system to a new machine, but spamassassin is not yet fully functional. It seems that it is trying to use /var/mail/.spamassassin as a data directory - this is fine, but it does not appear to be correctly set up. Is spamd running under the "mail" userid? Why? What can I do to get this directory right and working? Also, what do I need to do to enable access to spamd from my other machines, where the mail is actually read? you need to connect spamd from machines that accept/deliver and thus spam filter your mail. -- Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/ Warning: I wish NOT to receive e-mail advertising to this address. Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu. Linux - It's now safe to turn on your computer. Linux - Teraz mozete pocitac bez obav zapnut.
Re: Debian jessie - new setup, missing data directory
On Mon, 9 Nov 2015 15:11:16 +0100 Antony Stonewrote: > On Monday 09 November 2015 at 14:23:04, Phil Reynolds wrote: > > > I have recently transferred all of my email system to a new machine, > > but spamassassin is not yet fully functional. > > > > It seems that it is trying to use /var/mail/.spamassassin as a data > > directory - this is fine, but it does not appear to be correctly > > set up. > > > > Errors like these are appearing in my syslog: > > > > Nov 9 12:02:30 fitzalan spamd[8916]: config: cannot create user > > preferences file /var/mail/.spamassassin/user_prefs: Permission > > denied Nov 9 12:02:30 fitzalan spamd[8916]: spamd: failed to > > create readable default_prefs: /var/mail/.spamassassin/user_prefs > > Well, what are the ownership & permissions on: > > /var/mail/,spamassassin Tried root.root and debian-spamd.debian.spamd, 755. > /var/mail/.spamassassin/user_prefs Not there at all. > and which user does spamassassin run as on your system? root - which I'm slightly surprised at. > > What can I do to get this directory right and working? Also, what > > do I need to do to enable access to spamd from my other machines, > > where the mail is actually read? > > You said "I have recently transferred all of my email system to a new > machine" and yet now you are saying there are other machines > involved... > > I suggest you describe your setup so we can understand what you're > doing a bit better. > > In the subject you said this was Debian Jessie, but are you running > Debian's standard MTA Exim4, or another one? Yes, exim4, from Debian. > Is "this machine" acting as a mail gateway, performing all filtering > on inbound mail, and what are the other machines "where the mail is > actually read" doing? What email applications run on those? Yes, this is the mail gateway, filtering, and providing the services needed for the MUAs to use. The other machines are my desktop/general purpose machine, and my laptop, both running claws-mail with the spamassassin plugin, and my phone, running K9Mail. My other users either use a .forward directive to forward their mail elsewhere or use mutt, on the general purpose machine. claws-mail's plugin is supposed to allow spamassassin to be trained as to what is spam and what is ham, on those occasions it decides incorrectly. > How is spamassassin being called in order to give its opinion on > email? exim is calling it. The results also appear in syslog. -- Phil Reynolds mail: phil-spamassas...@tinsleyviaduct.com