Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: [SOLVED] zimbra+altermime does not append disclaimer on outgoing emails

  1. #1
    Join Date
    Oct 2009
    Posts
    42
    Rep Power
    6

    Default [SOLVED] zimbra+altermime does not append disclaimer on outgoing emails

    Hi there,

    i followed this guide

    Domain Disclaimer Extension Admin UI - Zimbra :: Wiki

    to make zimbra to append a disclaimer on all outgoing emails.
    Everything seems fine, no errors, services all up&running, all permissions on files are ok (according to the guide).

    But when i send an email the disclaimer not appear, simply the email is send as it is.

    I'm testing on a fresh install of zimbra with ubuntu 8.04 and only zimbra installed on the server.

    Nothing either into logs.

    Could someone help me please?

  2. #2
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    24

    Default

    Did you restart amavisd after making the changes ?

  3. #3
    Join Date
    Oct 2009
    Posts
    42
    Rep Power
    6

    Default

    no, only postfix as described on the guide, let me try and i'll give you feedback

  4. #4
    Join Date
    Oct 2009
    Posts
    42
    Rep Power
    6

    Default

    nothing, also after the restart of amavis the disclaimer not appears.

    Into logs i see "(delivered via dfilt service)" so i guess that all is going right, isn't it?

    thank you

  5. #5
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    24

    Default

    Permissions okay ? Can you post a extract from /var/log/zimbra.log when you send a email through.

  6. #6
    Join Date
    Oct 2009
    Posts
    42
    Rep Power
    6

    Default

    all permissions seems ok, if you can specify some particular files to check i'll check them out too.

    Feb 24 14:53:18 mail postfix/pickup[6929]: 0CAA9398229: uid=1001 from=<admin@domain.tld>
    Feb 24 14:53:18 mail postfix/pipe[21282]: 4D84C39821F: to=<someone@otherdomain.tld>, relay=dfilt, delay=1.7, delays=0.05/0.03/0/1.7, dsn=2.0.0, status=sent (delivered via d
    filt service)
    Feb 24 14:53:18 mail postfix/qmgr[16128]: 4D84C39821F: removed
    Feb 24 14:53:18 mail postfix/cleanup[21281]: 0CAA9398229: message-id=<1281006702.331267019596059.JavaMail.root@domai n.tld>
    Feb 24 14:53:18 mail postfix/qmgr[16128]: 0CAA9398229: from=<admin@domain.tld>, size=756, nrcpt=1 (queue active)
    Feb 24 14:53:18 mail amavis[20977]: (20977-01) ESMTP::10024 /opt/zimbra/data/amavisd/tmp/amavis-20100224T145318-20977: <admin@domain.tld> -> <someone@otherdomain.tld>
    SIZE=756 Received: from mail.domain.tld ([127.0.0.1]) by localhost (mail.domain.tld [127.0.0.1]) (amavisd-new, port 10024) with ESMTP for <someone@otherdomain.tld>; Wed,
    24 Feb 2010 14:53:18 +0100 (CET)
    Feb 24 14:53:18 mail amavis[20977]: (20977-01) Checking: aCTMmebLXd4E <admin@domain.tld> -> <someone@otherdomain.tld>
    Feb 24 14:53:18 mail clamd[13983]: SelfCheck: Database status OK.
    Feb 24 14:53:18 mail postfix/smtpd[21535]: connect from localhost[127.0.0.1]
    Feb 24 14:53:18 mail postfix/smtpd[21535]: 72E1A39821F: client=localhost[127.0.0.1]
    Feb 24 14:53:18 mail postfix/cleanup[21281]: 72E1A39821F: message-id=<1281006702.331267019596059.JavaMail.root@domai n.tld>
    Feb 24 14:53:18 mail postfix/smtpd[21535]: disconnect from localhost[127.0.0.1]
    Feb 24 14:53:18 mail postfix/qmgr[16128]: 72E1A39821F: from=<admin@domain.tld>, size=1196, nrcpt=1 (queue active)
    Feb 24 14:53:18 mail amavis[20977]: (20977-01) FWD via SMTP: <admin@domain.tld> -> <someone@otherdomain.tld>,BODY=7BIT 250 2.6.0 Ok, id=20977-01, from MTA([127.0.0.1]
    :10025): 250 2.0.0 Ok: queued as 72E1A39821F
    Feb 24 14:53:18 mail amavis[20977]: (20977-01) Passed CLEAN, <admin@domain.tld> -> <someone@otherdomain.tld>, Message-ID: <1281006702.331267019596059.JavaMail.root@domain.t ld>, mail_id: aCTMmebLXd4E, Hits: 3.263, size: 756, queued_as: 72E1A39821F, 434 ms
    Feb 24 14:53:18 mail postfix/smtp[21532]: 0CAA9398229: to=<someone@otherdomain.tld>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.52, delays=0.08/0.01/0.01/0.43, dsn=2.0.0, st
    atus=sent (250 2.0.0 Ok: queued as 72E1A39821F)
    Feb 24 14:53:18 mail postfix/qmgr[16128]: 0CAA9398229: removed
    Feb 24 14:53:18 mail amavis[20977]: (20977-01) extra modules loaded: /opt/zimbra/zimbramon/lib/x86_64-linux-gnu-thread-multi/auto/Net/SSLeay/autosplit.ix, /opt/zimbra/z
    imbramon/lib/x86_64-linux-gnu-thread-multi/auto/Net/SSLeay/randomize.al, IO/Socket/SSL.pm, Net/LDAP/Extension.pm, Net/SSLeay.pm
    Feb 24 14:53:18 mail postfix/smtp[21536]: 72E1A39821F: to=<someone@otherdomain.tld>, relay=mta.otherdomain.tld[xxx.xxx.xxx.xxx]:25, delay=0.08, delays=0.05/0.01/0.01/0.01, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as DCEA2784092)
    Feb 24 14:53:18 mail postfix/qmgr[16128]: 72E1A39821F: removed

  7. #7
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    24

    Default

    In the wiki the disclaimer script has been split; so did you add
    Code:
    $SENDMAIL -i "$@" < in.$$
      
      exit $?
    to the end of it ?

  8. #8
    Join Date
    Oct 2009
    Posts
    42
    Rep Power
    6

    Default

    Code:
    zimbra@mail:~/postfix/conf$ cat disclaimer
    #!/bin/sh
    INSPECT_DIR=/opt/zimbra/var/spool/filter
    SENDMAIL=/opt/zimbra/postfix/sbin/sendmail
    ZIMBRA_HOME="/opt/zimbra"
    POSTFIX_HOME="$ZIMBRA_HOME/postfix/conf"
    DISCLAIMER_HOME="$POSTFIX_HOME/disclaimers"
    
    # Exit codes from <sysexits.h>
    EX_TEMPFAIL=75
    EX_UNAVAILABLE=69
    
    # Clean up when done or when aborting.
    trap "rm -f in.$$" 0 1 2 3 15
    
    # Start processing.
    cd $INSPECT_DIR || { echo $INSPECT_DIR does not exist; exit $EX_TEMPFAIL; }
    
    cat > in.$$ || { echo Cannot save mail to file; exit $EX_TEMPFAIL; }
    
    # obtain domain name From
    domain=`grep "From:" in.$$ | cut -d "@" -f 2 | cut -d ">" -f 1`
    
    # check for attribute "zimbraDomainPrefMailSignatureEnabled"
    enable=`/opt/zimbra/bin/zmprov gd $domain | grep zimbraDomainPrefMailSignatureEnabled | awk '{print $2}'`
    
    if [ ! -z $enable ]; then                    # if not empty
         if [ $enable == "TRUE" ]; then          # if value = TRUE
            echo "TRUE"
            # Add a disclaimer to the mail
            /usr/bin/altermime --input=in.$$ --disclaimer=$DISCLAIMER_HOME/$domain \
               --disclaimer-html=$DISCLAIMER_HOME/$domain.html \
               --xheader="X-Copyrighted-Material: Please visit http://www.$domain/privacy.htm" || { echo Message content rejected; exit $EX_UNAVAILABLE; }
         else
                 echo "FALSE"                    # value is FALSE
         fi
    else
         echo "NONE"                             # domain doesn't have LDAP attributes
    fi
    
    
    $SENDMAIL -i "$@" < in.$$
    
    exit $?
    i changed the path to altermime because apt-get on ubuntu installs it on a different path than the guide.

    Code:
    zimbra@mail:~/postfix/conf$ ls -l /opt/zimbra/var/spool/      
    total 4
    drwxr-x--- 2 zimbra zimbra 4096 Feb 24 15:18 filter
    Code:
    zimbra@mail:~/postfix/conf$ ls -l
    total 260
    -rw-r--r-- 1 root   postfix 11942 Jun  2  2009 LICENSE
    -rw-r--r-- 1 root   postfix  1629 Jun  2  2009 TLS_LICENSE
    -rw-r--r-- 1 root   postfix 17869 Jun  2  2009 access
    -rw-r--r-- 1 root   postfix  8829 Jun  2  2009 aliases
    -rw-r--r-- 1 root   postfix  3548 Jun  2  2009 bounce.cf.default
    -rw-r--r-- 1 root   postfix 11681 Jun  2  2009 canonical
    -rwxr-xr-x 1 root   postfix  1580 Feb 24 11:49 check_disclaimers.sh
    -rwxr-xr-- 1 zimbra zimbra   1451 Feb 24 15:18 disclaimer
    drwxr-xr-- 2 zimbra zimbra   4096 Feb 24 12:04 disclaimers
    -rw-r--r-- 1 root   postfix  9904 Jun  2  2009 generic
    -rw-r--r-- 1 root   postfix 17439 Jun  2  2009 header_checks
    -rw-r--r-- 1 zimbra zimbra   2057 Feb 24 14:52 main.cf
    -rw-r--r-- 1 root   postfix 18426 Jun  2  2009 main.cf.default
    -rw-r--r-- 1 root   postfix  3387 Jun  2  2009 makedefs.out
    -rw-r--r-- 1 root   postfix  5448 Feb 24 12:54 master.cf
    -rw-r--r-- 1 zimbra zimbra   5542 Feb 24 12:45 master.cf.in
    -rw-r--r-- 1 root   postfix  5269 Feb 24 11:48 master.cf.orig
    -rwxr-xr-x 1 root   postfix 22197 Jun  2  2009 post-install
    -rw-r--r-- 1 root   postfix 17588 Jun  2  2009 postfix-files
    -rwxr-xr-x 1 root   postfix  6647 Jun  2  2009 postfix-script
    -rw-r--r-- 1 root   postfix  1024 Feb 24 15:16 prng_exch
    -rw-r--r-- 1 root   postfix  2040 Feb 24 11:49 read_from_ldap.pl
    -rw-r--r-- 1 root   postfix  6816 Jun  2  2009 relocated
    -rw-r--r-- 1 root   postfix 12357 Jun  2  2009 transport
    -rw-r--r-- 1 root   postfix 12494 Jun  2  2009 virtual

  9. #9
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    24

    Default

    Okay; what I would try is to create a email file under /opt/zimbra/var/spool/filter with the correct From: address then as the zimbra user actually execute that script.

  10. #10
    Join Date
    Oct 2009
    Posts
    42
    Rep Power
    6

    Default

    i've create a file into the spool/filter directory with only "From:<admin@domain.tld>" (without quotes) into it. it's correct?

    then i've launched the script with "./disclaimer" and "./disclaimer someone@otherdomain.tld" but the script seems to hang up saying nothing, pressinc ctrl-c i obtain a "Cannot save mail to file"

    i tried to do the "grep" there's into the disclaimer script and it gives the correct domain.

Similar Threads

  1. [SOLVED] Important Mta Issue!!!!!!!!
    By borngunners in forum Migration
    Replies: 2
    Last Post: 01-05-2010, 05:44 AM
  2. Zimbra spam system
    By rajahd in forum Administrators
    Replies: 9
    Last Post: 04-16-2008, 07:25 PM
  3. Major Issue - 5.0RC2 NE to 5.0GA NE failed
    By DougWare in forum Installation
    Replies: 7
    Last Post: 01-06-2008, 08:56 PM
  4. Replies: 22
    Last Post: 12-02-2007, 04:05 PM
  5. huge log size
    By rmvg in forum Administrators
    Replies: 5
    Last Post: 01-02-2007, 09:39 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •