LSTSRV-L Archives

LISTSERV Site Administrators' Forum

LSTSRV-L

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Eric Thomas <[log in to unmask]>
Sat, 26 Mar 2016 05:52:56 +0000
text/plain (123 lines)
The compiled spool path is a red herring, it is only used if you call "|/usr/local/bin/lsv_amin -t listserv".

I would forget Postfix and run lsv_amin from the command line logged in as 'listserv' and see what happens. If SELinux plays any part in this equation, I would forget suid bits and set up whatever ACLs or group permissions Postfix needs to write to the spool directory naturally. All else failing I would call lsv_amin with truss to see exactly what call is failing, but it's going to be fopen("/opt/listserv/spool/<tempfileid>", "w").

  Eric

-----Original Message-----
From: LISTSERV Site Administrators' Forum [mailto:[log in to unmask]] On Behalf Of Scott Kraczek
Sent: Friday, March 25, 2016 20:01
To: [log in to unmask]
Subject: Re: Postfix + Listserv Setup

When logged in As the listserv user, I can read all the parent directories

[listserv]$  ll /
drwxrwxr-x.   9 root root  4096 Feb 12 14:44 opt
[listserv]$ ll /opt
drwxrwxr-x.  5 listserv listserv  4096 Mar 24 17:17 listserv
[listserv]$  ll /opt/listserv/
drwxrwx--x. 2 listserv mail    4096 Mar 25 13:16 spool


I can also write to the system spool because I added listserv to the mail group trying to solve this error
[listserv]$  touch  /var/mail/test
[listserv]$ ll  /var/mail/test
-rw-rw-r--. 1 listserv listserv 0 Mar 25 16:07 /var/mail/test


For some reason, it looks like my compiled version of lsv_amin is breaking the spool path into 4 byte words, rather than a single string like yours. As such, it seems more likely lsv_amin is broken, even though I recompiled it yesterday because I  wanted to see why "strings" returned this funny broken path:

listserv]$ xxd  /usr/local/bin/lsv_amin  | grep -C 2 opt
0000f80: 34fb ffff 4889 4424 0866 c700 696e c640  4...H.D$.f..in.@
0000f90: 0200 bf14 0000 00e8 1cfb ffff 4989 c7c7  ............I...
0000fa0: 002f 6f70 74c7 4004 2f6c 6973 c740 0874  [log in to unmask]@.t
0000fb0: 7365 72c7 400c 762f 7370 c740 106f 6f6c  [log in to unmask]@.ool
0000fc0: 00ba 1000 0000 be01 0000 00bf 3e19 4000  ............>[log in to unmask]

For some reason there's a 3 byte incrementing pointer of some sort between each word 
c7c7 00
c740  04
c740  08
c740  0c
c740  10
ba10 00


Of course, that's getting off in the weeds. It seems like postfix is following the alias entry taking it to lsv_amin

listserv]$ grep lsv  /etc/aliases
listserv: "|/usr/local/bin/lsv_amin /opt/listserv/spool listserv"
owner-listserv: "|/usr/local/bin/lsv_amin /opt/listserv/spool owner-listserv"


"/usr/local/bin/lsv_amin /opt/listserv/spool listserv". Command output:
    lsv_amin: Unable to deliver mail to: listserv lsv_amin: **Error(13)** A   call to fopen() failed.

So I'm not clear why it still can't seem to write when it has permissions to do so.

Scott 
IT Engineer, BYU OIT
 


-----Original Message-----
From: LISTSERV Site Administrators' Forum [mailto:[log in to unmask]] On Behalf Of Valdis Kletnieks
Sent: Friday, March 25, 2016 11:02 AM
To: [log in to unmask]
Subject: Re: Postfix + Listserv Setup

On Fri, 25 Mar 2016 15:48:20 -0000, Scott Kraczek said:

> $ ll /opt/listserv/
> drwxrwx--x. 2 listserv mail    4096 Mar 22 23:00 spool

Out of curiosity, did you *also* check the permissions on /opt and /opt/listserv to make sure that the listserv userid can traverse them?  That's a common gotcha.. /opt was probably set up correctly by your distro, but /opt/listserv may be botched?

> $ strings /usr/local/bin/lsv_amin
> ??0;
> /opt
> /lis
> tser
> v/sp

I can't tell if your 'strings' binary is broken, or if it's your cut-n-paste, or if you have a funky 'strings' alias set.  Mine starts off:

[~] strings /usr/local/bin/lsv_amin
/lib/ld-linux.so.2
libldap-2.2.so.7
_DYNAMIC
_init

and the spooldir location is one string, but isn't until line 72 in the output..

[~] strings /usr/local/bin/lsv_amin | grep -n -C 3 spool
69-lsv_amin: **Error(%d)** %s
70-**Error** %s
71-lsv_amin: **Error** %s
72:/var/spool/listserv
73-LSV:lsv_amin
74-1.0c
75-%s release %s

############################

To unsubscribe from the LSTSRV-L list:
write to: mailto:[log in to unmask]
or click the following link:
http://peach.ease.lsoft.com/scripts/wa-PEACH.exe?SUBED1=LSTSRV-L&A=1

############################

To unsubscribe from the LSTSRV-L list:
write to: mailto:[log in to unmask]
or click the following link:
http://peach.ease.lsoft.com/scripts/wa-PEACH.exe?SUBED1=LSTSRV-L&A=1

############################

To unsubscribe from the LSTSRV-L list:
write to: mailto:[log in to unmask]
or click the following link:
http://peach.ease.lsoft.com/scripts/wa-PEACH.exe?SUBED1=LSTSRV-L&A=1

ATOM RSS1 RSS2