Summary: | mail-mta/nullmailer-1.13-r4 : (1) nullmailer-send has wrong permission, (2) nullmailer-inject sets wrong permission | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | d. paddy <d0.paddy> |
Component: | Current packages | Assignee: | Robin Johnson <robbat2> |
Status: | RESOLVED WORKSFORME | ||
Severity: | normal | CC: | jlec, net-mail+disabled |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
d. paddy
2014-06-12 19:46:02 UTC
I don't see the problem. I can send mails as a normal user with following groups $ id justin uid=2069(justin) gid=2069(justin) groups=2069(justin),10(wheel),18(audio),19(cdrom),27(video),35(games),80(cdrw),85(usb),100(users),101(colord),102(dropbox),250(portage),989(wireshark),992(realtime),998(vboxusers),2070(libvirt),2073(fw) $ ll /usr/sbin/nullmailer-send -rwxr-xr-x 1 root root 36K Mar 23 05:19 /usr/sbin/nullmailer-send* It is already 755 so no need to go for grp=nullmail ll /var/nullmailer/queue -d drwxrwx--- 2 nullmail nullmail 4.0K Jun 14 21:02 /var/nullmailer/queue/ your directory has different permissions. Please check that first. The permissions are the same (and not the issue): ll /usr/sbin/nullmailer-send -rwxr-xr-x 1 root nullmail 39704 Jun 12 14:19 /usr/sbin/nullmailer-send ll /var/nullmailer/queue -d drwxrwx--- 2 nullmail nullmail 4096 Jun 19 09:07 /var/nullmailer/queue The problem is messages get installed into the queue with permissions like so: -rw------- 1 nullmail joe_user 411 Jun 21 06:57 1403348227.7046 Consequently, when joe_user attempts to send his mail... joe_user> /usr/sbin/nullmailer-send Rescanning queue. Starting delivery, 1 message(s) in queue. Can't open file '1403348227.7046' Delivery complete, 1 message(s) remain. ...the result is that the message never gets sent: joe_user> ls -l /var/nullmailer/queue total 4 -rw------- 1 nullmail joe_user 411 Jun 21 06:57 1403348227.7046 However, if root changes permissions... root> chmod 660 /var/nullmailer/queue/1403348227.7046 root> ls -l /var/nullmailer/queue total 4 -rw-rw---- 1 nullmail joe_user 411 Jun 21 06:57 1403348227.7046 then when joe_user attempts to send his mail... joe_user> /usr/sbin/nullmailer-send Rescanning queue. Starting delivery, 1 message(s) in queue. Starting delivery: protocol: smtp host: smtp.gmail.com file: 1403348227.7046 smtp: Succeeded: 250 2.0.0 OK 1403349058 k66sm19384332yhg.39 - gsmtp Sent file. Delivery complete, 0 message(s) remain. ...the message does get sent: joe_user> ls -l /var/nullmailer/queue total 0 So joe_user cannot send his mail unless root changes permissions or root executes nullmailer-send or magic happens. My conjecture is that magic happens for you, but not for me, since you can send mails as a normal user... What does one do to enable such magic? Why don't you send your mails though /usr/bin/mail? > Why don't you send your mails though /usr/bin/mail?
Not sure what you are getting at (it's been a long day, week, month, year...).
If you're hinting "don't use nullmailer, problem gone", then I suppose you have a point... but I'ld rather have nullmailer work without root intervention.
If you're hinting "here's a clue: getting things to work has something to do with /usr/bin/mail", then I (and others stumbling across this) do appreciate the hint... but explicit details would be nice ;)
If you look for information on how to send mail from the shell on linux (e.g. google) you are getting pointed to a command named "mail". My question is, why don't you use this, but instead use nullmailer directly? |