[Mailman-Users] footer

Simon White simon at mtds.com
Fri Jan 31 17:29:10 CET 2003

31-Jan-03 at 12:45, Fernando Schapachnik (fernando at schapachnik.com.ar) wrote :
> En un mensaje anterior, Jon Carnes escribió:
> > Forgive my lack of exact language.  To be more precise, you can turn on
> > personalization for a list using the Web-Admin. Once you do that certain
> > other features become available and you can then edit the Footer (using the
> > Web-Admin) and put in variables that will be recognized and replaced by
> > Mailman with things like the persons email address, the list name, the admin
> > address, etc.  There is no need to know anything except the names of the
> > variables to use in the footer.
> Sorry to be insistant, but this is not what I need. I don't need a different
> footer for each subscriber. I need a different footer for each post, but
> the same to all subscribers.
> I realize that I gain some extra footer variables if I turn personalization on,
> but fail to see how any of them relate to including the output from an external
> commands. Think about including the fortune output in the footer, for example.

Put a wrapper around the aliases, for example:

list-name at listserver.com	"|/usr/bin/mywrapper|/home/mailman/mail/mailman post list-name"

Then the script mywrapper could be like this:

while read line
echo "$line"


echo "-- "
echo $fortune

However, I'm not sure that double pipes are allowed in sendmail or
Postfix. This is just a quick idea. Maybe you can pipe the output from
mywrapper directly to the "mailman post" command, like this...

Aliases file:

list-name at listserver.com	"|/usr/bin/mywrapper"

# Simple filter to add footer to email read from stdin

# Define a temporary filename

# Delete the temporary file if it already exists
if [ -f $TMPFILE ]; then

# read from STDIN line by line, outputting to temp file
while read line
echo "$line" >> $TMPFILE

# Now get the output from Fortune ;-)

# Add RFC footer/signature delimiter
echo "-- " >> $TMPFILE

# Now add the fortune we got above
echo $fortune >> $TMPFILE

# Now use cat to redirect the output of $TMPFILE to mailman
/bin/cat $TMPFILE | /home/mailman/mail/mailman post list-name

--- END SCRIPT ---


- Please let me know if this was useful to anyone.
- This will break posts with attachments, it is ONLY good for plaintext
  posts. If you want to get cleverer with files with attachments your
  script will have to be MIME aware.


|-Simon White, Internet Services Manager, Certified Check Point CCSA.
|-MTDS  Internet, Security, Anti-Virus, Linux and Hosting Solutions.
|-MTDS  14, rue du 16 novembre, Agdal, Rabat, Morocco.
|-MTDS  tel +212.3.767.4861 - fax +212.3.767.4863

More information about the Mailman-Users mailing list