3 messages in net.sourceforge.lists.courier-users[courier-users] Re: postmaster aliasi...
FromSent OnAttachments
troutOct 17, 2002 1:52 pm 
Sam VarshavchikOct 17, 2002 7:02 pm 
Alessandro VeselyOct 18, 2002 4:18 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[courier-users] Re: postmaster aliasing to one address from multiple virtual domainsActions...
From:Alessandro Vesely (ves@tana.it)
Date:Oct 18, 2002 4:18:42 am
List:net.sourceforge.lists.courier-users

trout writes:

[...] is there a way to make postmaster@the_various_domains.abc go into one mailbox?

one way is to resort to aliasdir. I use it as follows:

mail-542# cd aliasdir mail-543# ls -lab total 20 drwxr-xr-x 2 courier courier 4096 Sep 26 09:24 . drwxr-xr-x 12 courier courier 4096 Sep 13 11:48 .. -rw-r----- 1 courier courier 43 Aug 5 2001 .courier-default -rwxr-x--- 1 courier courier 1443 Sep 28 11:07 courierdefault.sh ... mail-544# cat .courier-de* || /etc/courier/aliasdir/courierdefault.sh

where the relevant script does something like the following - check the dot-courier(7) page

#!/bin/sh # work with lowcase local name LCLOCAL=`echo $LOCAL | tr '[A-Z]' '[a-z]'`

# I can override the following by explicitely adding # a mailbox for webmaster under some domain, if not... case $LCLOCAL in webmaster|postmaster|admin|abuse|operator|sys|system|root) NEWADDR="theo@for.me";; *) NEWADDR="";; esac

# other domains can have different preferences # I fill them in by host, as I have a small number # of domains if [ "$NEWADDR" = "" ]; then case $HOST in such*|other*) case $LCLOCAL in frequentmisspell*) NEWADDR=`echo $LOCAL | sed ...` NEWADDR="$NEWADDR@correct.domain";; *) NEWADDR="defaultmailbox@foruser";; esac;; wrong.domain) NEWADDR="$LOCAL@correct.domain";; esac fi if [ "$NEWADDR" = "" ]; then # if not delivering, I can just drop it if [ somereason ]; then exit 99 fi # or I can bounce it exit 64 fi # otherwise I send it to the correct recipient

printf "$NEWADDR\n" exit 0