Re: Error running from procmail

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

 



On Fri, Feb 11, 2022 at 09:31:21AM +0100, Adrian van Bloois wrote:
> On Thu, Feb 10, 2022 at 11:39:13PM -0800, Sean Greenslade wrote:
> > On Tue, Feb 08, 2022 at 12:55:53PM +0100, Adrian van Bloois wrote:
> > > On Mon, Feb 07, 2022 at 10:10:47PM -0800, Sean Greenslade wrote:
> > > > On Mon, Feb 07, 2022 at 07:06:38PM +0100, Adrian van Bloois wrote:
> > > > > Hallo,
> > > > > I try to run a morse code program from procmail to produce an audible
> > > > > signal when mail arrives. My postfix(MTA) calls procmail(mail delivery
> > > > > agent) to deliver the mail. This obviously runs in the background.
> > > > > :rpocmail calls morse to give the signal that mail has arrived. However
> > > > > morse produces an error:
> > > > > ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused
> > > > > 
> > > > > I'm using CentOS-7 right now, earlier I used CentOS-6 and then it worked
> > > > > perfectly. I suspect it is a matter of permissions, but I can't figure
> > > > > out where it goes wrong.
> > > > > Do you experts have any ideas????
> > > > 
> > > > Are you logging in directly to the CentOS machine and keeping a session
> > > > active, or is it running headless?
> > >
> > > Both, one machine is running headless the other I keep logged in on a
> > > text-based console.
> > 
> > OK, so there are two separate machines? Is the machine that is going to
> > be producing the sound the one that always has the console logged in?
> Yes, correct
> > 
> > Also, are you trying to do any sort of networked pulseaudio setup? Like:
> > 
> > https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Network/
> > 
> No, this machiine is fully stand-allone.
> 
> > > > And just to sanity check, can you see if the pulseaudio and
> > > > pulseaudio-utils packages are installed:
> > > > 
> > > > $ rpm -q pulseaudio pulseaudio-utils
> > >
> > > Both are installed
> > > > 
> > > > ...and running:
> > > > 
> > > > $ ps aux | grep pulseaudio
> > >
> > > Is running, it has my own userid, probably caused by my listening to a
> > > radio station earlier.
> > 
> > OK, so presumably this means that your machine has pulseaudio set up
> > correctly. Perhaps your issue is that the morse program is not running
> > as your logged-in user, so it cannot connect to your session's pulse
> > socket?
> I'll look in to that. The morse program is started by procmail which is
> able to write with my own userid.

A few other things that jump to mind:

CentOS has selinux enabled by default. Perhaps check for any selinux
denials, since the context will likely be different between a user shell
and the procmail process.

Does procmail either run in a chroot or run subprocesses in one? If so,
you'll need to make sure that the pulse socket path is accessible. It's
typically in /run/user/<PID>/pulse/native.

--Sean




[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux