Re: [Mailman-Users] aliases assistant
Diana Huang wrote: Thanks all, you guys really give me some hints on my problem. Let me show you permission of the script and the commands the script executes. snip -rw-r--r--1 root root 81 Jun 7 12:41 /usr/local/sbin/mailman.aliases -rwxr-xr-x1 root root47988 Oct 30 2003 /bin/cp -rw-rw1 mailman mailman 1110 Jun 15 15:11 /usr/local/mailman/data/aliases -rw-r--r--1 root root 685 Jun 7 13:42 /etc/mailman.aliases lrwxrwxrwx1 root root 32 Apr 7 2003 /usr/bin/newaliases - /etc/alternatives/mta-newaliases I create a mailman user, which is in the mailman group. The mailman group only has a mailman user. I suppose the problems are caused by: 1. user mailman has no execute permission to run /usr/local/sbin/mailman.aliases (causes command not found) Actually, no one has permission to execute this file. It's root that needs permission because it's run by sudo as root. chmod +x /usr/local/sbin/mailman.aliases or chmod 755 /usr/local/sbin/mailman.aliases 2. user root has no read permission to see /usr/local/mailman/data/aliases (causes status: 1, Operation not permitted) That's correct. chmod o+r /usr/local/mailman/data/aliases or chmod 664 /usr/local/mailman/data/aliases -- Mark Sapiro [EMAIL PROTECTED] The highway is for gamblers, San Francisco Bay Area, Californiabetter use your sense - B. Dylan -- Mailman-Users mailing list Mailman-Users@python.org http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/archive%40jab.org Security Policy: http://www.python.org/cgi-bin/faqw-mm.py?req=showamp;file=faq01.027.htp
Re: [Mailman-Users] aliases assistant
Hi Mark, Pretty thanks. I followed your steps to change the perssion. /usr/local/mailman/bin/newlist works pretty well. After I create a list by using bin/newlist, /etc/mailman.aliases has aliases for that list. However, when I create a list in the web (http://mydomain.com/mailman/create), I got some errors (See the following). And /etc/mailman.aliases doesn't have aliases for the list I created, but /usr/local/mailman/data/aliases file does have aliases for that list My web server runs as 'www', so my /etc/sudoers file is like this www All= NOPASSWD: /usr/local/sbin/mailman.aliases mailman ALL=NOPASSWD: /usr/local/sbin/mailman.aliases Is it still file permission problem? (looks like...but I did change the permission ) Thanks, Diana Traceback: Traceback (most recent call last): File /usr/local/mailman/scripts/driver, line 87, in run_main main() File /usr/local/mailman/Mailman/Cgi/create.py, line 55, in main process_request(doc, cgidata) File /usr/local/mailman/Mailman/Cgi/create.py, line 226, in process_request sys.modules[modname].create(mlist, cgi=1) File /usr/local/mailman/Mailman/MTA/Postfix.py, line 232, in create _update_maps() File /usr/local/mailman/Mailman/MTA/Postfix.py, line 53, in _update_maps raise RuntimeError, msg % (acmd, status, errstr) RuntimeError: command failed: /usr/bin/sudo /usr/local/sbin/mailman.aliases /usr/local/mailman/data/aliases (status: 1, Operation not permitted Python information:Variable Value sys.version 2.2.2 (#1, Feb 24 2003, 19:13:11) [GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-4)] sys.executable /usr/bin/python sys.prefix /usr sys.exec_prefix /usr sys.path /usr sys.platform inux2 Environment variables:Variable Value HTTP_ACCEPT text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 CONTENT_TYPE application/x-www-form-urlencoded HTTP_REFERER http://testbed.majitek.com/mailman/create SERVER_SOFTWARE Apache/1.3.19 (Unix) PYTHONPATH /usr/local/mailman SCRIPT_FILENAME /usr/local/mailman/cgi-bin/create SERVER_ADMIN [EMAIL PROTECTED] SCRIPT_NAME /mailman/create SERVER_SIGNATURE Apache/1.3.19 Server at testbed.majitek.com Port 80 REQUEST_METHOD POST HTTP_HOST testbed.majitek.com HTTP_KEEP_ALIVE 300 SERVER_PROTOCOL HTTP/1.1 QUERY_STRING REQUEST_URI /mailman/create CONTENT_LENGTH 132 HTTP_ACCEPT_CHARSET ISO-8859-1,utf-8;q=0.7,*;q=0.7 HTTP_USER_AGENT Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4 HTTP_CONNECTION keep-alive SERVER_NAME testbed.majitek.com REMOTE_PORT 1145 REMOTE_ADDR 192.168.0.192 HTTP_ACCEPT_LANGUAGE en-us,en;q=0.5 SERVER_PORT 80 GATEWAY_INTERFACE CGI/1.1 HTTP_ACCEPT_ENCODING gzip,deflate SERVER_ADDR 192.168.0.104 DOCUMENT_ROOT /usr/local/apache/share/htdocs -- Mailman-Users mailing list Mailman-Users@python.org http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/archive%40jab.org Security Policy: http://www.python.org/cgi-bin/faqw-mm.py?req=showamp;file=faq01.027.htp
Re: [Mailman-Users] aliases assistant
Hi Mark, Pretty thanks. I followed your steps to change the perssion. /usr/local/mailman/bin/newlist works pretty well. After I create a list by using bin/newlist, /etc/mailman.aliases has aliases for that list. However, when I create a list in the web (http://mydomain.com/mailman/create), I got some errors (See the following). And /etc/mailman.aliases doesn't have aliases for the list I created, but /usr/local/mailman/data/aliases file does have aliases for that list My web server runs as 'www', so my /etc/sudoers file is like this www All= NOPASSWD: /usr/local/sbin/mailman.aliases mailman ALL=NOPASSWD: /usr/local/sbin/mailman.aliases I fixed it. I checked httpd.conf and found my web server runs 'magicrock'. Doh.. Thanks, Diana -- Mailman-Users mailing list Mailman-Users@python.org http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/archive%40jab.org Security Policy: http://www.python.org/cgi-bin/faqw-mm.py?req=showamp;file=faq01.027.htp
Re: [Mailman-Users] aliases assistant
On Wed, Jun 15, 2005 at 03:06:32PM +1000, Diana Huang wrote: Thx for your email. Actually I tried that method, but I got some errors File /usr/local/mailman/Mailman/MTA/Postfix.py, line 53, in _update_maps raise RuntimeError, msg % (acmd, status, errstr) if you use postfix look at mailman FAQ, there is a guide step-by-step to configure it. I use postfix, and now I have (with a line changed in mm.cfg and one in main.cf) a totally automated aliases -- Sythos - http://www.sythos.net () ASCII Ribbon Campaign - against html/rtf/vCard in mail /\- against M$ attachments -- Mailman-Users mailing list Mailman-Users@python.org http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/archive%40jab.org Security Policy: http://www.python.org/cgi-bin/faqw-mm.py?req=showamp;file=faq01.027.htp
Re: [Mailman-Users] aliases assistant
On Wed, 2005-06-15 at 15:06 +1000, Diana Huang wrote: Hi Mark, Thx for your email. Actually I tried that method, but I got some errors /usr/bin/sudo: /usr/local/sbin/mailman.aliases: command not found Traceback (most recent call last): File /usr/local/mailman/bin/genaliases, line 116, in ? main() File /usr/local/mailman/bin/genaliases, line 106, in main MTA.create(mlist, nolock=True, quiet=quiet) File /usr/local/mailman/Mailman/MTA/Postfix.py, line 232, in create _update_maps() File /usr/local/mailman/Mailman/MTA/Postfix.py, line 53, in _update_maps raise RuntimeError, msg % (acmd, status, errstr) RuntimeError: command failed: /usr/bin/sudo /usr/local/sbin/mailman.aliases /usr/local/mailman/data/aliases (status: 1, Operation not permitted) Any comments? I suspect /usr/local/sbin/mailman.aliases is either not executable or not executable by the user/group the command is running under (what user/group that is depends on how you did your installation) What does ls -l /usr/local/sbin/mailman.aliases say? -- John Dennis [EMAIL PROTECTED] -- Mailman-Users mailing list Mailman-Users@python.org http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/archive%40jab.org Security Policy: http://www.python.org/cgi-bin/faqw-mm.py?req=showamp;file=faq01.027.htp
Re: [Mailman-Users] aliases assistant
John Dennis wrote: On Wed, 2005-06-15 at 15:06 +1000, Diana Huang wrote: Hi Mark, Thx for your email. Actually I tried that method, but I got some errors /usr/bin/sudo: /usr/local/sbin/mailman.aliases: command not found Traceback (most recent call last): File /usr/local/mailman/bin/genaliases, line 116, in ? main() File /usr/local/mailman/bin/genaliases, line 106, in main MTA.create(mlist, nolock=True, quiet=quiet) File /usr/local/mailman/Mailman/MTA/Postfix.py, line 232, in create _update_maps() File /usr/local/mailman/Mailman/MTA/Postfix.py, line 53, in _update_maps raise RuntimeError, msg % (acmd, status, errstr) RuntimeError: command failed: /usr/bin/sudo /usr/local/sbin/mailman.aliases /usr/local/mailman/data/aliases (status: 1, Operation not permitted) Any comments? I suspect /usr/local/sbin/mailman.aliases is either not executable or not executable by the user/group the command is running under (what user/group that is depends on how you did your installation) This is somewhat puzzling. /usr/bin/sudo: /usr/local/sbin/mailman.aliases: command not found seems to indicate that there is a problem with /usr/local/sbin/mailman.aliases as John suggests, but RuntimeError: command failed: /usr/bin/sudo /usr/local/sbin/mailman.aliases /usr/local/mailman/data/aliases (status: 1, Operation not permitted) seems to say that the commands in /usr/local/sbin/mailman.aliases, the first of which is presumably /bin/cp /usr/local/mailman/data/aliases /etc/mailman.aliases are being executed and it is this first command which fails, but since this is executed via sudo as root, why would it be 'not permitted'? I don't know the answer. -- Mark Sapiro [EMAIL PROTECTED] The highway is for gamblers, San Francisco Bay Area, Californiabetter use your sense - B. Dylan -- Mailman-Users mailing list Mailman-Users@python.org http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/archive%40jab.org Security Policy: http://www.python.org/cgi-bin/faqw-mm.py?req=showamp;file=faq01.027.htp
Re: [Mailman-Users] aliases assistant
On Wed, 2005-06-15 at 08:13 -0700, Mark Sapiro wrote: RuntimeError: command failed: /usr/bin/sudo /usr/local/sbin/mailman.aliases /usr/local/mailman/data/aliases (status: 1, Operation not permitted) seems to say that the commands in /usr/local/sbin/mailman.aliases, the first of which is presumably /bin/cp /usr/local/mailman/data/aliases /etc/mailman.aliases are being executed and it is this first command which fails, but since this is executed via sudo as root, why would it be 'not permitted'? I agree with Mark, it could permission problems either with the script or with the commands the script executes. I sometimes get fooled by the misconception root can do anything too, but in fact it can't, permissions are still checked. The most common example of this is a file whose permissions are granted only to a non-root owner. Root is denied in this case. However root can su to that owner and then perform the operation. Also, the complete absence of execute permission is not something root can compensate for. -- John Dennis [EMAIL PROTECTED] -- Mailman-Users mailing list Mailman-Users@python.org http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/archive%40jab.org Security Policy: http://www.python.org/cgi-bin/faqw-mm.py?req=showamp;file=faq01.027.htp
Re: [Mailman-Users] aliases assistant
Thanks all, you guys really give me some hints on my problem. Let me show you permission of the script and the commands the script executes. I agree with Mark, it could permission problems either with the script or with the commands the script executes. I sometimes get fooled by the misconception root can do anything too, but in fact it can't, permissions are still checked. The most common example of this is a file whose permissions are granted only to a non-root owner. Root is denied in this case. However root can su to that owner and then perform the operation. Also, the complete absence of execute permission is not something root can compensate for. -rw-r--r--1 root root 81 Jun 7 12:41 /usr/local/sbin/mailman.aliases -rwxr-xr-x1 root root47988 Oct 30 2003 /bin/cp -rw-rw1 mailman mailman 1110 Jun 15 15:11 /usr/local/mailman/data/aliases -rw-r--r--1 root root 685 Jun 7 13:42 /etc/mailman.aliases lrwxrwxrwx1 root root 32 Apr 7 2003 /usr/bin/newaliases - /etc/alternatives/mta-newaliases I create a mailman user, which is in the mailman group. The mailman group only has a mailman user. I suppose the problems are caused by: 1. user mailman has no execute permission to run /usr/local/sbin/mailman.aliases (causes command not found) 2. user root has no read permission to see /usr/local/mailman/data/aliases (causes status: 1, Operation not permitted) Am I right? Cheers, Diana -- Mailman-Users mailing list Mailman-Users@python.org http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/archive%40jab.org Security Policy: http://www.python.org/cgi-bin/faqw-mm.py?req=showamp;file=faq01.027.htp
[Mailman-Users] aliases assistant
Hi All, I am a novince to Mailman. I followed the steps to install Mailman 2.1.5 in RH Linux 9. It works pretty well except I have to add a bunch of aliases for a list to /etc/aliases. I tried David Champion's mm-handler method to save my manual work, but I got unknown user when I try to send a email. I use sendmail. My configuration: 1. copy mm-handler to /etc/mail 2. set $MMWRAPPER=/usr/local/mailman/mail/mailman set $MMLISTDIR=/usr/local/mailman/lists 3. make some changes in sendmail.mc a.. change define(`ALIAS_FILE', `/etc/aliases,/etc/lists') to define(`ALIAS_FILE', `/etc/aliases,/etc/lists') b.. add Mmailman, P=/etc/mail/mm-handler, F=rDFMhlqSu, U=mailman:mailman, S=EnvFromL, R=EnvToL/HdrToL, A=mm-handler $h $u 4. make some changes in virtusertable @testbed.majitek.com [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED][EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] 5. make some changes in mailertable testbed.majitek.com mailman:testbed.majitek.com 6. make all these map by running make then restarting sendmail services 7. modify mm_cfg.py DEFAULT_EMAIL_HOST='mit.majitek.com' add_virtualhost(DEFAULT_URL_HOST,DEFAULT_EMAIL_HOST) MTA=None Am I in the right track? really need help!! Thanks, Diana -- Mailman-Users mailing list Mailman-Users@python.org http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/archive%40jab.org Security Policy: http://www.python.org/cgi-bin/faqw-mm.py?req=showamp;file=faq01.027.htp
Re: [Mailman-Users] aliases assistant
Diana Huang wrote: I am a novince to Mailman. I followed the steps to install Mailman 2.1.5 in RH Linux 9. It works pretty well except I have to add a bunch of aliases for a list to /etc/aliases. I tried David Champion's mm-handler method to save my manual work, but I got unknown user when I try to send a email. I use sendmail. I can't help you with configuring mm-handler, but see http://www.python.org/cgi-bin/faqw-mm.py?req=showfile=faq04.049.htp for an alternate way of doing this that might be easier for you. -- Mark Sapiro [EMAIL PROTECTED] The highway is for gamblers, San Francisco Bay Area, Californiabetter use your sense - B. Dylan -- Mailman-Users mailing list Mailman-Users@python.org http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/archive%40jab.org Security Policy: http://www.python.org/cgi-bin/faqw-mm.py?req=showamp;file=faq01.027.htp
Re: [Mailman-Users] aliases assistant
Hi Mark, Thx for your email. Actually I tried that method, but I got some errors /usr/bin/sudo: /usr/local/sbin/mailman.aliases: command not found Traceback (most recent call last): File /usr/local/mailman/bin/genaliases, line 116, in ? main() File /usr/local/mailman/bin/genaliases, line 106, in main MTA.create(mlist, nolock=True, quiet=quiet) File /usr/local/mailman/Mailman/MTA/Postfix.py, line 232, in create _update_maps() File /usr/local/mailman/Mailman/MTA/Postfix.py, line 53, in _update_maps raise RuntimeError, msg % (acmd, status, errstr) RuntimeError: command failed: /usr/bin/sudo /usr/local/sbin/mailman.aliases /usr/local/mailman/data/aliases (status: 1, Operation not permitted) Any comments? Thanks, Diana -- Mailman-Users mailing list Mailman-Users@python.org http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/archive%40jab.org Security Policy: http://www.python.org/cgi-bin/faqw-mm.py?req=showamp;file=faq01.027.htp