Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: [SOLVED] Add a disclaimer (fail)

  1. #1
    samael is offline Member
    Join Date
    Apr 2009
    Location
    Spain
    Posts
    13
    Rep Power
    6

    Default [SOLVED] Add a disclaimer (fail)

    Hi:
    I'm trying to add a disclaimer so i've searched before and find:
    Domain Disclaimer Extension Admin UI - Zimbra :: Wiki
    Adding a disclaimer (altermime) or footer - Zimbra :: Wiki

    I use Ubuntu 8.04 server and zcs 5.0.16 in 64 bits.

    I tried whith those solutions but i only have problems:
    I can't compile altermime with make, i've already instaled make.

    So i intalled it using "sudo apt-get install altermime" and follow the steps but, when I modify "/opt/zimbra/postfix/conf/master.cf" and save it the changes do not stay, I use vim to change and save with :w! because the file is readonly.

    And then LADP broke, i've recibed 2 mail: "You have new mail in /var/mail/zimbra":

    Code:
    From: root@**** (Cron Daemon)
    To: zimbra@****
    Subject: Cron <zimbra@malone> /opt/zimbra/libexec/zmqueuelog
    Content-Type: text/plain; charset=ANSI_X3.4-1968
    X-Cron-Env: <SHELL=/bin/sh>
    X-Cron-Env: <HOME=/opt/zimbra>
    X-Cron-Env: <PATH=/usr/bin:/bin>
    X-Cron-Env: <LOGNAME=zimbra>
    Message-Id: <E1MDvT7-0006VT-Hn@****>
    Date: Tue, 09 Jun 2009 09:10:01 +0200
    
    postqueue: fatal: Queue report unavailable - mail system is down
    Code:
    From: root@**** (Cron Daemon)
    To: zimbra@****
    Subject: Cron <zimbra@malone> /opt/zimbra/libexec/zmstatuslog
    Content-Type: text/plain; charset=ANSI_X3.4-1968
    X-Cron-Env: <SHELL=/bin/sh>
    X-Cron-Env: <HOME=/opt/zimbra>
    X-Cron-Env: <PATH=/usr/bin:/bin>
    X-Cron-Env: <LOGNAME=zimbra>
    Message-Id: <E1MDvTO-0006ag-AG@****>
    Date: Tue, 09 Jun 2009 09:10:19 +0200
    
    Unable to determine enabled services from ldap.
    Enabled services read from cache. Service list may be inaccurate.
    Thank for the time to read this and for any solution

  2. #2
    uxbod's Avatar
    uxbod is offline Moderator
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    24

    Default

    Check /var/log/zimbra.log for any error messages from Postfix when it starts ... You should also have I think, a master.cf.in file, which you will need to make the changes to as master.cf gets overwritten on a ZCS restart. Alternatively you will have a master.cf.default file in the conf directory. I could be wrong though

  3. #3
    samael is offline Member
    Join Date
    Apr 2009
    Location
    Spain
    Posts
    13
    Rep Power
    6

    Default

    I've done what you say but now I've a new mail:

    Code:
    From: root@**** (Cron Daemon)
    To: zimbra@****
    Subject: Cron <zimbra@malone> /opt/zimbra/libexec/zmqueuelog
    Content-Type: text/plain; charset=ANSI_X3.4-1968
    X-Cron-Env: <SHELL=/bin/sh>
    X-Cron-Env: <HOME=/opt/zimbra>
    X-Cron-Env: <PATH=/usr/bin:/bin>
    X-Cron-Env: <LOGNAME=zimbra>
    Message-Id: <E1MDyHJ-0004Eg-AZ@****>
    Date: Tue, 09 Jun 2009 12:10:01 +0200
    
    postqueue: fatal: Queue report unavailable - mail system is down
    But when I do a zmcontrol status everything is running

    And i can`t send mails

  4. #4
    uxbod's Avatar
    uxbod is offline Moderator
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    24

    Default

    Quote Originally Posted by uxbod View Post
    Check /var/log/zimbra.log for any error messages from Postfix when it starts
    Not quite everything

  5. #5
    samael is offline Member
    Join Date
    Apr 2009
    Location
    Spain
    Posts
    13
    Rep Power
    6

    Default

    Ok:
    grep postfix /var/log/zimbra.log
    Code:
    Jun  9 11:42:10 malone postfix/postfix-script[27036]: starting the Postfix mail system
    Jun  9 11:42:10 malone postfix/master[27037]: daemon started -- version 2.4.7, configuration /opt/zimbra/postfix-2.4.7.5z/conf
    Jun  9 12:09:26 malone postfix/postfix-script[15973]: stopping the Postfix mail system
    Jun  9 12:09:26 malone postfix/master[27037]: terminating on signal 15
    Jun  9 12:10:01 malone postfix/postqueue[16277]: fatal: Queue report unavailable - mail system is down
    Jun  9 12:11:05 malone postfix/postfix-script[19614]: starting the Postfix mail system
    Jun  9 12:11:05 malone postfix/master[19615]: daemon started -- version 2.4.7, configuration /opt/zimbra/postfix-2.4.7.5z/conf
    Jun  9 12:24:54 malone postfix/smtpd[29203]: connect from ***[***.***.***.***]
    Jun  9 12:24:54 malone postfix/smtpd[29203]: 6752C5201E5: client=***[***.***.***.***]
    Jun  9 12:24:54 malone postfix/cleanup[29207]: 6752C5201E5: message-id=<1593622845.01244543093837.JavaMail.root@malone>
    Jun  9 12:24:54 malone postfix/smtpd[29203]: disconnect from ***[***.***.***.***]
    Jun  9 12:24:54 malone postfix/qmgr[19620]: 6752C5201E5: from=<admin@***>, size=649, nrcpt=1 (queue active)
    Jun  9 12:24:54 malone postfix/pipe[29208]: 6752C5201E5: to=<***>, relay=dfilt, delay=0.28, delays=0.21/0.01/0/0.06, dsn=5.3.0, status=bounced (Command died with status 2: "/opt/zimbra/postfix/conf/disclaimer". Command output: /opt/zimbra/postfix/conf/disclaimer: 25: Syntax error: "||" unexpected )
    Jun  9 12:24:54 malone postfix/cleanup[29207]: A94B75201E9: message-id=<20090609102454.A94B75201E9@malone.sedasolubles.com>
    Jun  9 12:24:54 malone postfix/bounce[29218]: 6752C5201E5: sender non-delivery notification: A94B75201E9
    Jun  9 12:24:54 malone postfix/qmgr[19620]: A94B75201E9: from=<>, size=2677, nrcpt=1 (queue active)
    Jun  9 12:24:54 malone postfix/qmgr[19620]: 6752C5201E5: removed
    Jun  9 12:24:55 malone postfix/lmtp[29219]: A94B75201E9: to=<admin@***>, relay=***[***.***.***.***]:7025, delay=0.46, delays=0.06/0.01/0.01/0.38, dsn=2.1.5, status=sent (250 2.1.5 OK)
    Jun  9 12:24:55 malone postfix/qmgr[19620]: A94B75201E9: removed

  6. #6
    uxbod's Avatar
    uxbod is offline Moderator
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    24

    Default

    There is a problem with the WiKi page so the script got munged ... try the following instead
    Code:
    #!/bin/sh
    INSPECT_DIR=/var/spool/filter
    SENDMAIL=/opt/zimbra/postfix/sbin/sendmail
    FOLDER_DISCLAIMER=/opt/zimbra/postfix/conf
      
    # Exit codes from <sy***its.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; }
      
    TEXT_DISCLAIMER=`grep "[a|A-z|Z]" ${FOLDER_DISCLAIMER}/disclaimer.txt | grep -v "_" | tail -2 | head -1`
      
    cat > in.$$ || { echo Cannot save mail to file; exit $EX_TEMPFAIL; }
      
    nohup grep "${TEXT_DISCLAIMER}" in.$$ > /dev/null 2>&1
      
    if [ ! "$?" = 0 ]; then
      /usr/bin/altermime --input=in.$$ --disclaimer=${FOLDER_DISCLAIMER}/disclaimer.txt --disclaimer-html=${FOLDER_DISCLAIMER}/disclaimer.html --xheader="X-Copyrighted-Material: Please visit http://www.company.com/privacy.htm" || { echo Message content rejected; exit $EX_UNAVAILABLE; }
    fi
      
    $SENDMAIL -i "$@" < in.$$
      
    exit $?
    Last edited by uxbod; 06-09-2009 at 04:04 AM. Reason: remove line continuation tags

  7. #7
    samael is offline Member
    Join Date
    Apr 2009
    Location
    Spain
    Posts
    13
    Rep Power
    6

    Default

    Now when I send a mail I recived a mail:

    Undelivered Mail Returned to Sender

    Code:
    This is the mail system at host malone.sedasolubles.com.
    
    I'm sorry to have to inform you that your message could not
    be delivered to one or more recipients. It's attached below.
    
    For further assistance, please send mail to postmaster.
    
    If you do so, please include this problem report. You can
    delete your own text from the attached returned message.
    
                       The mail system
    
    <**@**>: service unavailable. Command output:
        /opt/zimbra/postfix/conf/disclaimer: 25: --xheader=X-Copyrighted-Material:
        Please visit http://www.company.com/privacy.htm: not found Message content
        rejected

  8. #8
    uxbod's Avatar
    uxbod is offline Moderator
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    24

    Default

    I have updated the script above to remove the \\. The line should not be to long so does not require a single \ to show line wrap.

  9. #9
    samael is offline Member
    Join Date
    Apr 2009
    Location
    Spain
    Posts
    13
    Rep Power
    6

    Default

    Thanks thanks thanks


    Whith this i can send mails again and with the disclaimer but still this error

    Code:
    postqueue: fatal: Queue report unavailable - mail system is down
    Thanks again.

  10. #10
    uxbod's Avatar
    uxbod is offline Moderator
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    24

    Default

    So please check zimbra.log again and see what error it is reporting.

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 0
    Last Post: 10-16-2008, 02:19 AM
  2. Replies: 5
    Last Post: 06-12-2008, 03:31 AM
  3. Disclaimer
    By jpbuse in forum Installation
    Replies: 7
    Last Post: 02-21-2008, 12:21 PM
  4. Add Disclaimer to Email
    By nocboy in forum Administrators
    Replies: 28
    Last Post: 09-16-2007, 10:54 PM
  5. Zimbra + Samba LDAP, cannot add winxp
    By fajarpri in forum Installation
    Replies: 4
    Last Post: 07-08-2007, 11:45 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
  •