Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Jan 1996 19:40:45 +1000
From:      Stephen McKay <syssgm@devetir.qld.gov.au>
To:        "Christoph P. Kukulies" <kuku@gilberto.physik.rwth-aachen.de>
Cc:        syssgm@devetir.qld.gov.au, freebsd-hackers@freebsd.org
Subject:   Re: ctm prob (help)
Message-ID:  <199601180940.TAA02484@orion.devetir.qld.gov.au>

next in thread | raw e-mail | index | archive | help
"Christoph P. Kukulies" <kuku@gilberto.physik.rwth-aachen.de> wrote:

>I established a ctm user, and after the mail flow started running
>I'm getting bounces:
>   ----- Transcript of session follows -----
>Message delivered to mailing list <ctm@blues.physik.rwth-aachen.de>
>ctm_rmail: cannot log to 'ctm_log'
>ctm_rmail: cannot open '/a/ctm/pieces/p.011878' for writing
>554 "|/usr/sbin/ctm_rmail -p /a/ctm/pieces  -d /a/ctm/deltas -l ctm_log"... unknown mailer error 1
>
>/a/ctm is the home dir of ctm which is  drwxrwxr-x  ctm wheel.

As others have pointed out, you have a permissions problem, since sendmail
will run as uid daemon, gid daemon.  I avoid this by forwarding all the
incoming ctm mail through my personal account and processing it with procmail.

Here is an excerpt from my ~/.procmailrc:

    PATH=$HOME/bin:$PATH:/usr/local/bin

    # CTM stuff for src-cur, ports-cur, int-src-cur.
    :0 w
    * ^Subject: ctm-mail (src-cur|ports-cur|int-src-cur)
    | ctm_incoming


Here is ~/bin/ctm_incoming:

    #! /bin/sh
    PATH="$PATH:$HOME/bin:/usr/contrib/bin"
    export PATH

    cd $HOME/ctm || exit 1

    exec ctm_rmail -p pieces -d deltas -l log

(Note that my PATH is a bit odd.  This is because gzip is in /usr/contrib/bin
on that box.)

When all goes well, the subject line matches and ctm_incoming is run.  If
this works the deltas will end up in ~/ctm/deltas and procmail exits
successfully.  If ctm_rmail fails, procmail will try more rules until the
mail is delivered, usually into your regular mailbox.  This seems to work
better than the:

    ctm: ...
    owner-ctm: my.mail.address

contruct in /etc/aliases.  I've been meaning to touch up the ctm_rmail manual
to add this suggestion, but I've been bitten on the bum by procmail a couple
of times and I've hesitated to reveal my procmail ignorance to the world.

I think I've got it right now, but would recommend that any folks experimenting
with procmail be exceedingly cautious since the code is unreadable and the
config syntax is full of traps.  (Note the 'w' in ':0 w'.)  Who's for a
total rewrite? :-)

Stephen McKay.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199601180940.TAA02484>