On 22 Aug 2016, at 16:14, Joe Acquisto-j4 wrote:

Any chance of assistance here with alterMIME?

A slim chance, but it's worth a shot...

There is a need to add disclaimers to outgoing mail.

Someone won't listen to reason, huh? That's unfortunate.

You might try pointing them at http://apps.americanbar.org/litigation/committees/technology/articles/winter2013-0213-do-email-disclaimers-really-work.html but only you can judge whether pushing back is a better or worse strategy in your circumstance than just doing a small bit of useless work.

I have it configured (one supposes) to be complaint free on restart of postfix and can see from /var/log/mail that is does act on the specific email addresses (senders) that I intended. At least it was processed by "filter". I am a bit puzzled that "relay" shows as "filter" for all users. But mail does ultimately deliver via the normal route

Evidence of what exactly this all means would help make it easier to help. I'd bet that most people here don't use alterMIME, but that's not entirely dooming: many of us use tools that modify mail as it passes through Postfix and generally speaking that works in a limited number of ways. The fact that you're trying to use alterMIME specifically is not as important as how you have configured Postfix to use it, what your log is actually saying about the handling of messages, and what the raw input and output messages look like.

However, the received mail does not actually contain the disclaimer message. Google has not been my friend today with no results that seem to apply.

Based on these being the top "how to" hits for altermime disclaimers:

https://www.howtoforge.com/how-to-automatically-add-a-disclaimer-to-outgoing-emails-with-altermime-postfix-on-debian-squeeze
https://www.gypthecat.com/how-to-add-different-disclaimers-using-altermime-and-postfix-based-on-domain

I'm guessing that you're using a similar setup: a script run as a pipe transport due to a content_filter directive in the smtpd line in master.cf, which runs altermime on messages selectively and reinjects them with sendmail. That's a bit inflexible and inefficient, but I guess it would be OK for very modest volume and not needing the disclaimer on mail generated on the server itself. That approach pipes *all* mail arriving by SMTP into the filter script, avoiding loops because local 'sendmail' submission doesn't use SMTP. This would explain why your log shows all mail going to "filter".

Assuming that guess is correct... I'd start by making sure that the script that runs altermime is run by a user that can write to wherever it tries to do its work. Once you confirm this isn't a permissions problem (which I expect because that would likely cause no delivery at all,) add diagnostic lines to the script so you can see what exactly it is actually doing when it runs.

And for what it's worth: if you really must do this, consider using a better tool. One option: the MIMEDefang milter. MIMEDefang is maybe overkill if this is just an outbound system and you don't need robust filtering capabilities, but it is a mature, actively maintained, and well-documented piece of software that can manipulate MIME messages correctly, including adding silly disclaimers selectively without damaging message structure. As a milter, it acts on a message as it passes through a Postfix smtpd process rather than as a next hop transport and Postfix can be configured to also use it for non-SMTP injections. There may be other milters available strictly for adding disclaimers, but I'm not aware of any.

Reply via email to