On Nov 21, 2004, at 7:14 AM, [EMAIL PROTECTED] wrote:
Greg Earle writes:

Hmmn, OK.  I *did* read dot-courier(5), from head to toe, and am
looking at it now, again.  All I saw was
   RUNNING AN EXTERNAL PROGRAM
      Lines that begin with a single | character run  an  external
      program.  The  rest  of the line specifies the command to be
      executed by the shell. Long commands  can  be  continued  on
      another  line  by  terminating  the previous line with the \
      character.
I was assuming that I needed the single-quotes in there to
protect the double-quoted environment variables, but I guess not.

You do need it.

But NOT before the | character itself.

<Smacks forehead> D'oh! I totally missed that typo. Sorry Sam ...

It clearly says that "lines that begin with a single | character", and
not the ' character.

Yeah, I know - I was riding the short bus, apparently. Fixed.

Furthermore: "the rest of the line specifies the command to be executed
by the shell".

Therefore, if you need apostrophes to protect environment variables in
the shell command, then that's where you stick them.

OK ... I hate to sound retarded, but I'm still not getting it right:

If I change aliasdir/.courier-x500-default (and re-run "makealiases")
to be

|'/usr/local/sbin/mail500 -f "$SENDER" -h "$HOST" -m [EMAIL PROTECTED] "$RECIPIENT"'

it looks like "bash" gets that fed as a single argument (guess that's
not too surprising), which of course it doesn't like:

Nov 21 13:26:54 isolar courierlocal: [ID 702911 mail.info] id=0000C2EA.41A1081E.0000132D,from=<[EMAIL PROTECTED]>,addr=<x500- [EMAIL PROTECTED]>: /bin/bash: /usr/local/sbin/mail500 -f "$SENDER" -h "$HOST" -m [EMAIL PROTECTED] "$RECIPIENT": No such file or directory...

If I remove the single-quotes completely (and re-run "makealiases"):

isolar:1:45 [/] # cat /opt/courier/etc/aliasdir/.courier-x500-default
|/usr/local/sbin/mail500 -f "$SENDER" -h "$HOST" -m [EMAIL PROTECTED] "$RECIPIENT"


Now I get a barf-back instead:

----------------------------------------------------------------------
The following errors occurred when trying to deliver the attached mail:

[EMAIL PROTECTED]@isolar.DynDNS.ORG: User unknown

------- The original message sent:

[... header stuff elided ...]
To: Gregory Earle <[EMAIL PROTECTED]>
From: Greg Earle <[EMAIL PROTECTED]>
Subject: Yet Another Test to [EMAIL PROTECTED]/"mail500"
Date: Sun, 21 Nov 2004 13:29:40 -0800
X-Mailer: Apple Mail (2.619)

Testing
----------------------------------------------------------------------

Is "$RECIPIENT" really set to "[EMAIL PROTECTED]"?

If so, should I be using something like "$USER"@"$LOCAL" instead (to get
just-plain "[EMAIL PROTECTED]" fed to the external X.500
mailer)?  Or perhaps "$EXT"@"$LOCAL"?  (I'm a bit confused by the
"EXT"/"EXT2"/"EXT3"/"EXT4" stuff in dot-courier(5), to be honest -
perhaps an example usage in the man page would be useful?)

Thanks,

        - Greg



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to