Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
mailx permission denied
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
kai.scorpio
n00b
n00b


Joined: 01 Sep 2011
Posts: 46

PostPosted: Sun Jan 22, 2012 2:53 pm    Post subject: mailx permission denied Reply with quote

Hi all, I am trying to send an automated email using mailx, however when testing it I get this error:

Code:
Jan 22 15:51:19 kai-gentoobase sendmail[14832]: q0MEpJwj014832: from=kai, size=53, class=0, nrcpts=1, msgid=<201201221451.q0MEpJwj014832@kai-gentoobase.speedport.ip>, relay=root@localhost
Jan 22 15:51:19 kai-gentoobase sm-mta[14833]: q0MEpJ0t014833: SYSERR(root): collect: Cannot write ./dfq0MEpJ0t014833 (bfcommit, uid=0, gid=209): Permission denied
Jan 22 15:51:19 kai-gentoobase sm-mta[14833]: q0MEpJ0t014833: from=<kai@kai-gentoobase.speedport.ip>, size=374, class=0, nrcpts=1, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]
Jan 22 15:51:19 kai-gentoobase sendmail[14832]: q0MEpJwj014832: to=[DESTADDR], ctladdr=kai (1000/1000), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30053, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: 421 4.3.0 collect: Cannot write ./dfq0MEpJ0t014833 (bfcommit, uid=0, gid=209): Permission denied


I am not sure what is going on here - most tutorials for mailx don't mention any necessary setup of sendmail/mailx, so perhaps I've just missed a step. The part confusing me is the "permission denied" even when running as root. Thanks for any help!


Kai
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1611
Location: U.S.A.

PostPosted: Tue Jan 24, 2012 9:11 am    Post subject: Reply with quote

Doesn't look like a mailx problem to me. Looks like a sendmail problem.

But I can't help you with that, since I don't use sendmail. You probably need to put sendmail in your subject line. I suspect you have sendmail improperly configured.

Sendmail is a great thing, but it's complex and uses a somewhat arcane configuration format. Unless you're actually intending to operate a mail server (rather than to just be able to send mail from the system), you probably don't need it. You can probably use something like ssmtp, nbsmtp, or esmpt, etc. (light, "relay only" or "send only" MTAs).

There is a lot of information out there about configuring sendmail. If you don't need a full-blown mail server, you an also find information about configuring ssmtp and other tools like it.

Also, if you're only sending automated messages, you probably don't even need mailx. You can send mail directly using sendmail (and many programs, such as cron, do so). To see how, check the sendmail man page. As I recall, there are a few packages that require mailx, though (such as smartmontools, if you done use USE="minimal"). Also, mailx may be easier to work with for scripting (I don't know).

I was putting mailx on my systems for years, along with a light mta (I use esmtp, because it can do local delivery as well as sending mail out to an SMTP server for relay), and I did use mailx to test the mail system. But eventually I figured out that it wasn't actually being used by anything and had nothing depending upon it, so I got rid of it. Your situation may be entirely different (i.e., you may be hosting mailboxes for multiple people and need a full-blown mail server).
_________________
patrix_neo wrote:
The human thought: I cannot win.
The ratbrain in me : I can only go forward and that's it.
Back to top
View user's profile Send private message
kai.scorpio
n00b
n00b


Joined: 01 Sep 2011
Posts: 46

PostPosted: Tue Jan 24, 2012 4:20 pm    Post subject: Reply with quote

Ah, you're probably right, that's just the first set of packages I came across. I'll try the others and see if they work.

If anybody knows how to fix this, post here anyway :)

Kai
Back to top
View user's profile Send private message
trigggl
Apprentice
Apprentice


Joined: 26 Aug 2007
Posts: 239
Location: Arkansas

PostPosted: Sun Jun 10, 2012 2:08 am    Post subject: Reply with quote

Since this is the first post that Google brings up for the search, I think it's important to answer the question.

https://forums.gentoo.org/viewtopic-p-6748182.html#6748182

Apparently the ownership of /var/spool/mqueue needs to be root, or at least that fixed the problem for me. It was owned by smmsp.
_________________
Greg
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum