Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 25

Thread: [SOLVED] No disclaimers when sending messages with local client

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

    Default

    Hmmmm ... do you have the trace information from /var/log/zimbra.log to see how Postfix is handling the connection for both instances ? Am a bit baffled as it should be just fine.

  2. #12
    Join Date
    Oct 2009
    Posts
    42
    Rep Power
    5

    Default

    with disclaimer:

    Code:
    Mar  5 14:07:00 mail postfix/smtpd[7355]: connect from localhost[127.0.0.1]
    Mar  5 14:07:00 mail postfix/smtpd[7355]: AC6A4394221: client=localhost[127.0.0.1]
    Mar  5 14:07:00 mail postfix/cleanup[7358]: AC6A4394221: message-id=<549688336.111267794420485.JavaMail.root@mail.xxx.int>
    Mar  5 14:07:00 mail postfix/qmgr[15358]: AC6A4394221: from=<xxx@xxx.int>, size=617, nrcpt=1 (queue active)
    Mar  5 14:07:00 mail postfix/smtpd[7355]: disconnect from localhost[127.0.0.1]
    Mar  5 14:07:02 mail postfix/pickup[1701]: 378B6394224: uid=1001 from=<xxx@xxx.int>
    Mar  5 14:07:02 mail postfix/pipe[7359]: AC6A4394221: to=<xxx@xxx.it>, relay=dfilt, delay=1.5, delays=0.05/0.01/0/1.5, dsn=2.0.0, status=sent (delivered via dfilt service)
    Mar  5 14:07:02 mail postfix/qmgr[15358]: AC6A4394221: removed
    Mar  5 14:07:02 mail postfix/cleanup[7358]: 378B6394224: message-id=<549688336.111267794420485.JavaMail.root@mail.xxx.int>
    Mar  5 14:07:02 mail postfix/qmgr[15358]: 378B6394224: from=<xxx@xxx.int>, size=2916, nrcpt=1 (queue active)
    Mar  5 14:07:02 mail amavis[10561]: (10561-01) ESMTP::10024 /opt/zimbra/data/amavisd/tmp/amavis-20100305T140702-10561: <xxx@xxx.int> -> <xxx@xxx.it> SIZE=2916 Received: from mail.hermess.int ([127.0.0.1]) by localhost (mail.xxx.int [127.0.0.1]) (amavisd-new, port 10024) with ESMTP for <xxx@xxx.it>; Fri,  5 Mar 2010 14:07:02 +0100 (CET)
    Mar  5 14:07:02 mail amavis[10561]: (10561-01) Checking: tJ4irYnJ-vys <xxx@xxx.int> -> <xxx@xxx.it>
    Mar  5 14:07:02 mail postfix/smtpd[7414]: connect from localhost[127.0.0.1]
    Mar  5 14:07:02 mail postfix/smtpd[7414]: C3030394221: client=localhost[127.0.0.1]
    Mar  5 14:07:02 mail postfix/cleanup[7358]: C3030394221: message-id=<549688336.111267794420485.JavaMail.root@mail.xxx.int>
    Mar  5 14:07:02 mail postfix/smtpd[7414]: disconnect from localhost[127.0.0.1]
    Mar  5 14:07:02 mail postfix/qmgr[15358]: C3030394221: from=<xxx@xxx.int>, size=3351, nrcpt=1 (queue active)
    Mar  5 14:07:02 mail amavis[10561]: (10561-01) FWD via SMTP: <xxx@xxx.int> -> <xxx@xxx.it>,BODY=7BIT 250 2.6.0 Ok, id=10561-01, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as C3030394221
    Mar  5 14:07:02 mail amavis[10561]: (10561-01) Passed CLEAN, <xxx@xxx.int> -> <xxx@xxx.it>, Message-ID: <549688336.111267794420485.JavaMail.root@mail.xxx.int>, mail_id: tJ4irYnJ-vys, Hits: 1.203, size: 2913, queued_as: C3030394221, 562 ms
    Mar  5 14:07:02 mail postfix/smtp[7411]: 378B6394224: to=<xxx@xxx.it>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.7, delays=0.12/0.01/0.01/0.56, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as C3030394221)
    Mar  5 14:07:02 mail postfix/qmgr[15358]: 378B6394224: removed
    Mar  5 14:07:02 mail amavis[10561]: (10561-01) extra modules loaded: /opt/zimbra/zimbramon/lib/x86_64-linux-gnu-thread-multi/auto/Net/SSLeay/autosplit.ix, /opt/zimbra/zimbramon/lib/x86_64-linux-gnu-thread-multi/auto/Net/SSLeay/randomize.al, IO/Socket/SSL.pm, Net/LDAP/Extension.pm, Net/SSLeay.pm
    Mar  5 14:07:02 mail postfix/smtp[7415]: C3030394221: to=<xxx@xxx.it>, relay=xxx.xxx.it[xxx.xxx.xxx.xxx]:25, delay=0.1, delays=0.04/0.01/0.01/0.03, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 34262784093)
    Mar  5 14:07:02 mail postfix/qmgr[15358]: C3030394221: removed
    without disclaimer:

    Code:
    Mar  5 14:09:58 mail postfix/smtpd[8693]: connect from unknown[192.168.0.140]
    Mar  5 14:09:58 mail postfix/smtpd[8693]: setting up TLS connection from unknown[192.168.0.140]
    Mar  5 14:09:58 mail postfix/smtpd[8693]: TLS connection established from unknown[192.168.0.140]: TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)
    Mar  5 14:09:58 mail saslauthd[15396]: zmauth: authenticating against elected url 'https://mail.xxx.int:7071/service/admin/soap/' ...
    Mar  5 14:09:58 mail saslauthd[15396]: zmpost: url='https://mail.xxx.int:7071/service/admin/soap/' returned buffer->data='<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"><soap:Header><context xmlns="urn:zimbra"><change token="493"/></context></soap:Header><soap:Body><AuthResponse xmlns="urn:zimbraAccount"><authToken>0_f4d94ada5005ceaadd0cbebec344f449417e1176_69643d33363a35613430306236372d386364332d343730332d393337662d3635373737326437623434393b6578703d31333a313236373936373339383534353b747970653d363a7a696d6272613b</authToken><lifetime>172800000</lifetime><skin>beach</skin></AuthResponse></soap:Body></soap:Envelope>', hti->error=''
    Mar  5 14:09:58 mail saslauthd[15396]: auth_zimbra: admin auth OK
    Mar  5 14:09:58 mail postfix/smtpd[8693]: 8CC73394221: client=unknown[192.168.0.140], sasl_method=PLAIN, sasl_username=admin
    Mar  5 14:09:58 mail postfix/cleanup[8696]: 8CC73394221: message-id=<4B9102A7.2010409@xxx.int>
    Mar  5 14:09:58 mail postfix/qmgr[15358]: 8CC73394221: from=<admin@xxx.int>, size=551, nrcpt=1 (queue active)
    Mar  5 14:09:58 mail postfix/smtpd[8693]: disconnect from unknown[192.168.0.140]
    Mar  5 14:10:00 mail postfix/pickup[1701]: 087DE394224: uid=1001 from=<admin@xxx.int>
    Mar  5 14:10:00 mail postfix/pipe[8697]: 8CC73394221: to=<xxx@xxx.it>, relay=dfilt, delay=1.5, delays=0.06/0.01/0/1.4, dsn=2.0.0, status=sent (delivered via dfilt service)
    Mar  5 14:10:00 mail postfix/qmgr[15358]: 8CC73394221: removed
    Mar  5 14:10:00 mail postfix/cleanup[8696]: 087DE394224: message-id=<4B9102A7.2010409@xxx.int>
    Mar  5 14:10:00 mail postfix/qmgr[15358]: 087DE394224: from=<admin@xxx.int>, size=666, nrcpt=1 (queue active)
    Mar  5 14:10:00 mail amavis[10559]: (10559-02) ESMTP::10024 /opt/zimbra/data/amavisd/tmp/amavis-20100305T104115-10559: <xxx@xxx.int> -> <xxx@xxx.it> SIZE=666 Received: from mail.xxx.int ([127.0.0.1]) by localhost (mail.xxx.int [127.0.0.1]) (amavisd-new, port 10024) with ESMTP for <xxx@xxx.it>; Fri,  5 Mar 2010 14:10:00 +0100 (CET)
    Mar  5 14:10:00 mail amavis[10559]: (10559-02) Checking: PJZeboXpMFqJ <xxx@xxx.int> -> <xxx@xxx.it>
    Mar  5 14:10:00 mail postfix/smtpd[8751]: connect from localhost[127.0.0.1]
    Mar  5 14:10:00 mail postfix/smtpd[8751]: 5BBA7394221: client=localhost[127.0.0.1]
    Mar  5 14:10:00 mail postfix/cleanup[8696]: 5BBA7394221: message-id=<4B9102A7.2010409@xxx.int>
    Mar  5 14:10:00 mail postfix/smtpd[8751]: disconnect from localhost[127.0.0.1]
    Mar  5 14:10:00 mail postfix/qmgr[15358]: 5BBA7394221: from=<xxx@xxx.int>, size=1101, nrcpt=1 (queue active)
    Mar  5 14:10:00 mail amavis[10559]: (10559-02) FWD via SMTP: <xxx@xxx.int> -> <xxx@xxx.it>,BODY=7BIT 250 2.6.0 Ok, id=10559-02, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 5BBA7394221
    Mar  5 14:10:00 mail amavis[10559]: (10559-02) Passed SPAMMY, <xxx@xxx.int> -> <xxx@xxx.it>, Message-ID: <4B9102A7.2010409@xxx.int>, mail_id: PJZeboXpMFqJ, Hits: 8.048, size: 666, queued_as: 5BBA7394221, 325 ms
    Mar  5 14:10:00 mail postfix/smtp[8748]: 087DE394224: to=<xxx@xxx.it>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.44, delays=0.11/0.01/0/0.32, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 5BBA7394221)
    Mar  5 14:10:00 mail postfix/qmgr[15358]: 087DE394224: removed
    Mar  5 14:10:00 mail postfix/smtp[8752]: 5BBA7394221: to=<xxx@xxx.it>, relay=xxx.xxx.it[xxx.xxx.xxx.xxx]:25, delay=0.09, delays=0.04/0.01/0.01/0.03, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as BD991784093)
    Mar  5 14:10:00 mail postfix/qmgr[15358]: 5BBA7394221: removed

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

    Default

    Hmmm, it must be something in the script then as without it is actually being passed to the dfilt service
    Code:
    Mar  5 14:10:00 mail postfix/pipe[8697]: 8CC73394221: to=<xxx@xxx.it>, relay=dfilt, delay=1.5, delays=0.06/0.01/0/1.4, dsn=2.0.0, status=sent (delivered via dfilt service)

  4. #14
    Join Date
    Oct 2009
    Posts
    42
    Rep Power
    5

    Default

    but if the problem is in the script it might not work also via webmail, right?
    Last edited by sgnaus; 03-05-2010 at 06:08 AM.

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

    Default

    That depends on whether both of them are passing the test
    Code:
    if [[ $R1 != 0 && $R2 == 0 && $R3 != 0 ]]; then
    You may have to add some debug code in the script and write out the values.

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

    Default

    could you explain me where i must place that debug code? thanks.

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

    Default

    Try something like
    Code:
    echo "$2 - $R1 - $R2 - $R3" >> /tmp/disclaimer.trace
       if [[ $R1 != 0 && $R2 == 0 && $R3 != 0 ]]; then

  8. #18
    Join Date
    Oct 2009
    Posts
    42
    Rep Power
    5

    Default

    but where i must put that code?

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

    Default

    You need to add it into the disclaimer script ... Look at the second line in what I have posted and you should be able to find it.

  10. #20
    Join Date
    Oct 2009
    Posts
    42
    Rep Power
    5

    Default

    i don't have that string into my script...

    Code:
    #!/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 $?

Similar Threads

  1. [SOLVED] Re-creating the spam training e-mail account
    By richard-hdd in forum Administrators
    Replies: 21
    Last Post: 03-20-2012, 07:34 AM
  2. Slow Sending Messages with Zimbra?
    By Diranged in forum Administrators
    Replies: 5
    Last Post: 08-22-2010, 01:51 AM
  3. Replies: 1
    Last Post: 04-08-2010, 08:49 AM
  4. web client not sending or receiving mail
    By eaperezh in forum Administrators
    Replies: 2
    Last Post: 02-16-2006, 05:46 PM
  5. Error sending to external address from web client
    By Billy in forum Administrators
    Replies: 12
    Last Post: 10-24-2005, 09:54 PM

Posting Permissions

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