Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am running a basic iredmail install with amavis, postfix, dovecot. I want to use the declaimer feature to automatically append a disclaimer (in our case a signature).

The reasoning for this is that clients (ipad, outlook, etc) don’t have to be configured with signature settings, and that we have corporate control over the actual signatures that are posted.

Instead of:

'boss@domain.com' => 'boss.domain.com.txt'

I am trying to get to

%mailbox + ‘@’ + %domain =>  %mailbox + “.” + %domain + ‘.txt’

This way we can simply use a script to generate the .txt / .htm signature files using just mysql / php.

THANKS IN ADVANCE

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

Solved on Amavis Users Group... Thanks Mark Martinec Requires two changes:

In /etc/amavis/conf.d/50-user add this:

################## ---- CUSTOM SIGNATURES AS DISCLAIMERS ------- ###############################
# uses altermime to insert a different signatue per users
# signatures are located in teh /etc/postfix/signatures/ directory
# also needs a small change to amavisd code:
# nano /usr/sbin/amavisd-new  - $disclaimer_options = untaint($opt);  (add the "untaint" word before ($opt)
# each user needs two signatures (html / txt)   user.domain.com.txt user.domain.com.html


  $altermime = '/usr/bin/altermime';

  $defang_maps_by_ccat{+CC_CATCHALL} = [ 'disclaimer' ];
  @disclaimer_options_bysender_maps = ( { '.' => '$3.$5' } );
  @altermime_args_disclaimer = qw(--disclaimer=/etc/postfix/signatures/_OPTION_.txt --disclaimer-html=/etc/postfix/signatures/_OPTION_.html --force-for-bad-html);


################## ---- END CUSTOM SIGNATURES AS DISCLAIMERS ------- ###############################

Make sure allow disclaimer is not commented out and => 1

$policy_bank{'MYNETS'} = {   # mail originating from @mynetworks
  originating => 1,  # is true in MYNETS by default, but let's make it explicit
  os_fingerprint_method => undef,  # don't query p0f for internal clients
  allow_disclaimers => 1,  # enables disclaimer insertion if available
};

Make a minor change to Altermime:

nano /usr/sbin/amavisd-new  - $disclaimer_options = untaint($opt);  (add the "untaint" word before ($opt)

Restart Amavis (might have to kill the process)

share|improve this answer
    
Still trying to figure out how to avoid duplicate signatures. I cannot give the bounty to myself, so if anyone wants it... please lets get this resolved!!!! –  Frank Jun 30 '12 at 14:56
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.