I have a content filter in which I need the sasl_username. This works for most
of our outgoing email. The problem is sometimes locally generated email is
submitted without SASL (as they are in the mynetworks table). This leaves
sasl_username blank. So to get around this I have wrapped ${sasl_username} in
[] and in my scripts I check if "$4 == "[]". If I don't wrap it in something
it ordinal position of the arguments change which breaks the script. When the
script is completed, I replace $4 with -- and submit back to queue.
master.cf
tempsa unix - n n - 32 pipe
-o content_filter=
flags=Rq user=filter argv=/etc/postfix/scripts/tempsa.sh -f ${sender}
[${sasl_username}] ${recipient}
I was wondering if there is a better way to do this when we need to pass this
type of argument to a content filter?
Gary-