FAQ
Hi,

I installed a Redhat rpm mailman-2.1.5-23 on a Redhat enterprise server.
The mailman appears to be working, but I'm having problems with cron.
When the job run root posts to the 'mailman' list I created the following:

/bin/sh: line 1: mailman: command not found

I have no errors with 'check_perms' and /etc/cron.d/mailman looks fine.
I can run:

#su - mailman -c "/var/mailman/cron/gate_news"

without errors.

Any Ideas?

Jon

Search Discussions

  • Brad Knowles at Mar 9, 2005 at 8:52 pm

    At 12:07 PM -0700 2005-03-09, Jon Jacobsen wrote:

    I installed a Redhat rpm mailman-2.1.5-23 on a Redhat enterprise server.
    The mailman appears to be working, but I'm having problems with cron. When
    the job run root posts to the 'mailman' list I created the following:

    /bin/sh: line 1: mailman: command not found
    Have you looked at
    <http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq04.025.htp>
    and
    <http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq04.057.htp>?

    --
    Brad Knowles, <brad at stop.mail-abuse.org>

    "Those who would give up essential Liberty, to purchase a little
    temporary Safety, deserve neither Liberty nor Safety."

    -- Benjamin Franklin (1706-1790), reply of the Pennsylvania
    Assembly to the Governor, November 11, 1755

    SAGE member since 1995. See <http://www.sage.org/> for more info.
  • Jon Jacobsen at Mar 9, 2005 at 9:40 pm
    Yes. I believe the 'mailman' list it setup correctly. I am trying to
    figure out why I am getting a bash error when then python script runs. I
    even put .bashrc in mailman's home directory. I run:

    su mailman -c "/usr/bin/python -S -v /var/mailman/cron/disabled"

    and don't see any errors in the dump to standard IO.
    /var/log/mailman/error does not show errors either

    Thanks

    Brad Knowles wrote:
    At 12:07 PM -0700 2005-03-09, Jon Jacobsen wrote:

    I installed a Redhat rpm mailman-2.1.5-23 on a Redhat enterprise server.
    The mailman appears to be working, but I'm having problems with cron.
    When
    the job run root posts to the 'mailman' list I created the following:

    /bin/sh: line 1: mailman: command not found

    Have you looked at
    <http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq04.025.htp>
    and <http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq04.057.htp>?
  • Brad Knowles at Mar 9, 2005 at 10:49 pm

    At 2:40 PM -0700 2005-03-09, Jon Jacobsen wrote:

    Yes. I believe the 'mailman' list it setup correctly. I am trying to
    figure out why I am getting a bash error when then python script runs.
    I even put .bashrc in mailman's home directory.
    Weird. There shouldn't be any invocation of bash, at least not
    by Mailman or Python when trying to send e-mail to a list.

    Are you sure that you've got a Python executable where the
    Mailman scripts are expecting it?

    --
    Brad Knowles, <brad at stop.mail-abuse.org>

    "Those who would give up essential Liberty, to purchase a little
    temporary Safety, deserve neither Liberty nor Safety."

    -- Benjamin Franklin (1706-1790), reply of the Pennsylvania
    Assembly to the Governor, November 11, 1755

    SAGE member since 1995. See <http://www.sage.org/> for more info.
  • John Dennis at Mar 9, 2005 at 9:45 pm

    On Wed, 2005-03-09 at 12:07 -0700, Jon Jacobsen wrote:
    Hi,

    I installed a Redhat rpm mailman-2.1.5-23 on a Redhat enterprise server.
    The mailman appears to be working, but I'm having problems with cron.
    When the job run root posts to the 'mailman' list I created the following:

    /bin/sh: line 1: mailman: command not found

    I have no errors with 'check_perms' and /etc/cron.d/mailman looks fine.
    I can run:

    #su - mailman -c "/var/mailman/cron/gate_news"

    without errors.

    Any Ideas?
    There is a difference between the format of cron jobs created with
    crontab vs. what is the system cron files located in /etc/cron.d. That
    difference is the insertion of the username (uid) that the cron job is
    to be run as. The username is inserted after the 5 time fields and
    before the command. Look at the file /etc/cron.d/mailman, you'll see
    lines that look something like this:

    0 5 1 * * mailman /usr/lib/mailman/cron/mailpasswds

    Note that the 6th field is the username "mailman" which is the user the
    command is supposed run with the privileges of. ONLY files
    in /etc/cron.d have this extra field. If you installed the cron jobs
    using the command "crontab" using a file that has this format (recall
    that crontab files DO NOT have the username in them, its specified as an
    argument to crontab (e.g. -u) then cron will be confused into thinking
    the command is "mailman" because the 6th entry in a crontab file is the
    command (its the 7th entry in a system cron file).

    This is the most likely cause of the symptom you report. The rpm is
    supposed to correctly handle the cron installation and is aware of the
    difference between "system cron files" and files passed to crontab (of
    course there might be an rpm bug, especially if you didn't manually try
    to modify what the rpm installation did).

    I just spoke with the cron maintainer here who said there were some
    versions of cron in RHEL3 (which is the distribution your mailman rpm
    came from) that had some bugs. You could try updating your version of
    cron and see if that helps, but it really sounds to me like a mismatch
    of the cron formats.

    --
    John Dennis <jdennis at redhat.com>
  • Jon Jacobsen at Mar 9, 2005 at 9:59 pm
    It seems that /var/mailman/cron/crontab.in gets copied to
    /etc/cron.d/mailman when mailman is started. These files are the same
    and I have not modified them. It does appear that the Redhat cron is
    having a problem executing the script as mailman user.

    John Dennis wrote:
    On Wed, 2005-03-09 at 12:07 -0700, Jon Jacobsen wrote:

    Hi,

    I installed a Redhat rpm mailman-2.1.5-23 on a Redhat enterprise server.
    The mailman appears to be working, but I'm having problems with cron.
    When the job run root posts to the 'mailman' list I created the following:

    /bin/sh: line 1: mailman: command not found

    I have no errors with 'check_perms' and /etc/cron.d/mailman looks fine.
    I can run:

    #su - mailman -c "/var/mailman/cron/gate_news"

    without errors.

    Any Ideas?

    There is a difference between the format of cron jobs created with
    crontab vs. what is the system cron files located in /etc/cron.d. That
    difference is the insertion of the username (uid) that the cron job is
    to be run as. The username is inserted after the 5 time fields and
    before the command. Look at the file /etc/cron.d/mailman, you'll see
    lines that look something like this:

    0 5 1 * * mailman /usr/lib/mailman/cron/mailpasswds

    Note that the 6th field is the username "mailman" which is the user the
    command is supposed run with the privileges of. ONLY files
    in /etc/cron.d have this extra field. If you installed the cron jobs
    using the command "crontab" using a file that has this format (recall
    that crontab files DO NOT have the username in them, its specified as an
    argument to crontab (e.g. -u) then cron will be confused into thinking
    the command is "mailman" because the 6th entry in a crontab file is the
    command (its the 7th entry in a system cron file).

    This is the most likely cause of the symptom you report. The rpm is
    supposed to correctly handle the cron installation and is aware of the
    difference between "system cron files" and files passed to crontab (of
    course there might be an rpm bug, especially if you didn't manually try
    to modify what the rpm installation did).

    I just spoke with the cron maintainer here who said there were some
    versions of cron in RHEL3 (which is the distribution your mailman rpm
    came from) that had some bugs. You could try updating your version of
    cron and see if that helps, but it really sounds to me like a mismatch
    of the cron formats.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupmailman-users @
categoriespython
postedMar 9, '05 at 7:07p
activeMar 9, '05 at 10:49p
posts6
users3
websitelist.org

People

Translate

site design / logo © 2022 Grokbase