Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

On one of my systems I run a secondary mail server which gets all mail from a primary server. However the primary server has an annoying tendency of attaching text to the end of the mails when forwarding (similar to the "confidentiality notices" you see sometimes).

Since this secondary server is mostly for archival purposes I'd like to get rid of this text. The text is fairly identifiable because it always starts with five dashes at the end of the message.

Is such a thing possible with Postfix or should I do this further downstream (e.g., sieve)?

A few notes about the setup:

  • Postfix
  • Dovecot (1.x) with virtual mailboxes
  • Amavisd + Spamassassin for spam / virus checking
  • openDKIM for DKIM checking
  • Sieve enabled

It's my own server so I can modify whatever configuration as needed.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Personally I would do it by modifying my custom "before_send" hook in Amavis config (just because I am using it already). Another (easier?) option would be to replace dovecot-lda in Postfix config with your own simple script which would take the message text from stdin, filter out the lines you don't want and send the result to the real dovecot-lda.

share|improve this answer
    
Thanks, will give it a shot. –  Einar Mar 6 '13 at 10:57
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.