func AllowZipPayload(r *strings.Reader) error {
	reader, err := zip.NewReader(r, int64(r.Len()))
	if err != nil {
		return err
	}
	for _, f := range reader.File {
		FileExt := filepath.Ext(strings.ToLower(f.Name))
		if !AllowFilename(FileExt) {
			return EPayloadNotAllowed
		}
		if SupportedArchive(f.Name) {
			payload, err := f.Open()
			if err != nil {
				continue
			}
			slurp, err := ioutil.ReadAll(payload)
			if err := AllowPayload(FileExt, strings.NewReader(string(slurp))); err != nil {
				return err
			}
		}
	}
	return nil
}
/* AllowZipPayload inspects a zip attachment in email message and
returns true if no filenames have a blacklisted extension
package main
import (
	"archive/tar"
	"archive/zip"
	"github.com/nwaples/rardecode"
	"io"
	"io/ioutil"
	"path/filepath"
	"strings"
)
func SupportedArchive(name string) bool {
	ExtList := []string{"tar", "zip", "rar"}
	nameLower := strings.ToLower(name)
	for _, ext := range ExtList {
		if strings.HasSuffix(nameLower, ext) {
			return true
		}
	}
	return false
}
func AllowPayload(ext string, r *strings.Reader) error {
	switch ext {
	case ".tar":
		return AllowTarPayload(r)
	case ".zip":
		return AllowZipPayload(r)
	case ".rar":
		return AllowRarPayload(r)
	}
	return nil
}
func AllowTarPayload(r *strings.Reader) error {
	reader := tar.NewReader(r)
	for {
		header, err := reader.Next()
		if err == io.EOF {
			break
		} else if err != nil {
			return err
		}
		FileExt := filepath.Ext(strings.ToLower(header.Name))
		if !AllowFilename(FileExt) {
			return EPayloadNotAllowed
		}
		if SupportedArchive(header.Name) {
			slurp, err := ioutil.ReadAll(reader)
			if err != nil {
				continue
			}
			if err := AllowPayload(FileExt, strings.NewReader(string(slurp))); err != nil {
				return err
			}
		}
	}
	return nil
}