

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
11 messages in net.sourceforge.lists.courier-users[courier-users] Re: Can Courier call ...| From | Sent On | Attachments |
|---|---|---|
| Greg Earle | Nov 19, 2004 9:35 pm | |
| cour...@gmx.net | Nov 20, 2004 2:35 am | |
| Sam Varshavchik | Nov 20, 2004 6:58 am | |
| Greg Earle | Nov 21, 2004 6:22 am | |
| Sam Varshavchik | Nov 21, 2004 7:46 am | |
| Greg Earle | Nov 21, 2004 2:12 pm | |
| Sam Varshavchik | Nov 21, 2004 3:10 pm | |
| Greg Earle | Nov 23, 2004 2:57 pm | |
| Sam Varshavchik | Nov 23, 2004 4:31 pm | |
| Greg Earle | Nov 24, 2004 11:57 am | |
| Greg Earle | Nov 24, 2004 4:26 pm |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | [courier-users] Re: Can Courier call external mailers for certain outgoing addresses? | Actions... |
|---|---|---|
| From: | Greg Earle (ear...@isolar.DynDNS.ORG) | |
| Date: | Nov 21, 2004 2:12:33 pm | |
| List: | net.sourceforge.lists.courier-users | |
On Nov 21, 2004, at 7:14 AM, mrs...@courier-mta.com 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 MAIL...@isolar.DynDNS.ORG "$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=<ear...@isolar.DynDNS.ORG>,addr=<x500- Greg...@isolar.DynDNS.ORG>: /bin/bash: /usr/local/sbin/mail500 -f "$SENDER" -h "$HOST" -m MAIL...@isolar.DynDNS.ORG "$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 MAIL...@isolar.DynDNS.ORG "$RECIPIENT"
Now I get a barf-back instead:
---------------------------------------------------------------------- The following errors occurred when trying to deliver the attached mail:
x500...@isolar.DynDNS.ORG@isolar.DynDNS.ORG: User unknown
------- The original message sent:
[... header stuff elided ...] To: Gregory Earle <Greg...@isolar.DynDNS.ORG> From: Greg Earle <ear...@isolar.DynDNS.ORG> Subject: Yet Another Test to Greg...@isolar.DynDNS.ORG/"mail500" Date: Sun, 21 Nov 2004 13:29:40 -0800 X-Mailer: Apple Mail (2.619)
Testing
----------------------------------------------------------------------
Is "$RECIPIENT" really set to "x500...@isolar.DynDNS.ORG"?
If so, should I be using something like "$USER"@"$LOCAL" instead (to get just-plain "Greg...@isolar.DynDNS.ORG" 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







