On Thu 26/Feb/2015 02:40:57 +0100 Sam Varshavchik wrote: 
> Mark Constable writes:
> 
>> I have a 3rd party app that produces a reply-to address like this...
>>
>> [email protected]
>>
>> What would be the best alias method to land this in the mailbox of
>> [email protected]? If not an alias, any possible workarounds like pipe
>> to command or smtp/rcptfilter suggestions?
> 
> Well, $sysconfdir/aliasdir/.courier-default will receive all mail for
> nonexistent mailboxes. You could use that to look at the original recipient,
> and redirect it accordingly.
> 
> Of course, that now means that Courier will accept all mail. It should be
> possible to set up $sysconfdir/aliasdir/.mailfilters/rcptfilter-default, and 
> do
> some work there.

IMHO, the most easily maintainable thing is to invoke the same
address-correction script from both recipes.

It is also possible to use an alternative localmailfilter program.  Using one
similar to the one published at http://www.tana.it/sw/rcptfilter/ , I arrange
for the same "rcptfilter.sh" shell script to be called twice: once online (with
an "RCPT" parameter, see line 273 in that page), and once offline, for
delivery, as the result of having a .courier-default recipe with a double-pipe
to the same shell script.

At mine, rcptfilter.sh prints a corrected address and exits 0, or leaves an
exit code higher than 50, e.g. 64 or 99.  In the latter case, rcptfilter leaves
an exit code of 1, so the shell script will never get the 2nd call.

HTH

Ale
-- 































------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to