masqmail
annotate admin/rmail @ 239:31ee44f45787
refactored alias.c heavily
especially substituted the loop-based alias_expand()
with a recursive approach. Now alias_expand() wraps
alias_one() which recursively expands aliases.
In principle the ``data processing'' is the same but
now it's clearer structured and thus easier to understand
IMO.
The loop might have been faster but I don't care for
speed -- the most simple solution is the best. It's fast
enough, that is sufficient.
author | markus schnalke <meillo@marmaro.de> |
---|---|
date | Mon, 25 Oct 2010 15:35:28 -0300 |
parents | 92673a185add |
children |
rev | line source |
---|---|
meillo@86 | 1 #!/bin/sh |
meillo@86 | 2 # |
meillo@86 | 3 # Dummy UUCP rmail command for postfix/qmail systems |
meillo@86 | 4 # |
meillo@86 | 5 # written by luciano l. mannucci <luke@nameron.smd.sublink.org> |
meillo@86 | 6 # improved by Wietse Venema <wietse@porcupine.org> |
meillo@86 | 7 # see: |
meillo@86 | 8 # List: postfix-users |
meillo@86 | 9 # Subject: Rmail: very small fix |
meillo@86 | 10 # From: luke@nameron.smd.sublink.org (luciano l. mannucci) |
meillo@86 | 11 # Date: 2000-09-13 14:31:30 |
meillo@86 | 12 # URL: http://marc.info/?l=postfix-users&m=96885536302087 |
meillo@86 | 13 # |
meillo@86 | 14 # taken from postfix-2.5.5/auxiliary/rmail/rmail |
meillo@86 | 15 |
meillo@86 | 16 |
meillo@86 | 17 SENDMAIL="/usr/sbin/sendmail" |
meillo@86 | 18 IFS=" " read junk from junk junk junk junk junk junk junk relay |
meillo@86 | 19 |
meillo@86 | 20 case "$from" in |
meillo@86 | 21 *[@!]*) ;; |
meillo@86 | 22 *) from="$from@$relay";; |
meillo@86 | 23 esac |
meillo@86 | 24 |
meillo@86 | 25 exec $SENDMAIL -i -f "$from" -- "$@" |