Sorry if this has been asked before, but...
It seems that email that I have aliased or forwarded via /etc/aliases
as opposed to being delivered locally, like my SmartList mailing
lists, do not get processed by recipes I have in /etc/procmailrc. It
seems that only locally delivered email gets processed by
/etc/procmailrc, is there a way around this?
You can wrap your aliases with procmail:
alias : "/usr/bin/procmail -m TARGET='joebob(_at_)example(_dot_)com'
/etc/mail/procmailrc.alias
/etc/mail/procmailrc.alias:
INCLUDE="/etc/mail/procmailrc.knownspam"
INCLUDE="/etc/mail/procmailrc.security"
...
# preserve envelope like .forward/alias does
:0
* ^From \/[^ ]+[ ]+
| $SENDMAIL -f$MATCH $TARGET
# no envelope, must be a bounce or something, so no need to preserve
:0
! $TARGET
/etc/procmailrc:
INCLUDE="/etc/mail/procmailrc.knownspam"
INCLUDE="/etc/mail/procmailrc.security"
The only real difference is the uid that things run under (root for
/etc/procmailrc (unless DROPPRIVS is specified, in which case everything
else is run as the recipient) and whatever the default user is for your
MTA for the alias-centric version).
Chris