Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-24-2009, 02:12 AM
Senior Member
 
Posts: 65
Default I Cannot use Domain Disclaimer Extension Admin UI

I follow by this http://wiki.zimbra.com/index.php?tit...nsion_Admin_UI

I can send mail with disclaimer but I cannot use admin zimlet for save disclaimer.
///////////////////////////
I already install altermime
and I test it's work.

I add new attribute in LDAP (it's work).

I edit file master.cf.in for add disclimer when send email
and create script for read disclimer from files.
(follow by Adding a disclaimer - Zimbra :: Wiki)
I test send email (I saw disclimer in there email).

I try to install admin zimlet for add disclimer.
I can deploy and I can edit disclimer in tab "Disclimer"
but when I click save I got error like this.
Quote:
JavaScript error encountered in method ZaDomainController.prototype.saveButtonListener
------------------------------------------------------------------
message: this._currentObject.attrs[W].join is not a function fileName: https://172.1.1.92:7071/zimbraAdmin/...v=090206125235 lineNumber: 6774 stack: ()@https://172.1.1.92:7071/zimbraAdmin/js/Admin_all.js.zgz?v=090206125235:6774 ([object Object])@https://172.1.1.92:7071/zimbraAdmin/j...
I don't know how to solve this.
Please let me know.
Thank you for reply.
Reply With Quote
  #2 (permalink)  
Old 09-24-2009, 06:30 AM
Advanced Member
 
Posts: 191
Default

This is the error message I am having when I try to send email from my zimbra account to outside domain. Below the error message is my disclaimer script...
If yours work and you are only having trouble with the zimlet, then you should know what my problem is.

This is the mail system at host zimbra.mail.domain.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

<borngunners@mail.com>: service unavailable. Command output:
/opt/zimbra/postfix/conf/disclaimer: 39: /usr/bin/altermime: Permission
denied Message content rejected


Quote:
#!/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

# Extract SENDTO Address(ex. "user@other_domain.com")
to_address=`grep -m 1 "To:" in.$$ | cut -d "<" -f 2 | cut -d ">" -f 1`

# Extract from SENDTO address only DOMAIN name(ex. "other_domain.com")
to_dom=`echo $to_address |cut -d "@" -f 2`

our_domain="mail.domain.com"

# If OTHER_DOMAIN.COM(SENDTO domain) is not YOURDOMAIN.COM add disclaimer
# means that add disclaimer only for outgoing mail
# for internal mail you will not have disclaimer
if [ $to_dom != $our_domain ]; 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 $?
Reply With Quote
  #3 (permalink)  
Old 09-24-2009, 08:14 AM
Senior Member
 
Posts: 65
Default

you sure about your altermime is work?
After you used make command you need to no this
#cp altermime /usr/bin/
#chown root.root /usr/bin/altermime
#chmod 755 /usr/bin/altermime

please see in this Adding a disclaimer - Zimbra :: Wiki

I see your script, I think your script can check only first email
If user send to many people you cannot check.
Reply With Quote
  #4 (permalink)  
Old 09-24-2009, 10:07 AM
Advanced Member
 
Posts: 191
Default

I did all of the above code. What I am not sure of is, the chown filter.filter, is it suppose to be chown zimbra.zimbra or filter.filter?

I believe it is a permission issue. It does not even send out the email to the first email that it checks

After stopping and starting zmmtactl, this is the message that came up:

zimbra@zimbra:~$ zmmtactl start
Rewriting configuration files...done.
Starting zmmtaconfig...done.
postfix/postfix-script: warning: not owned by root: /opt/zimbra/data/postfix/spo ol
postfix/postfix-script: warning: not owned by root: /opt/zimbra/postfix-2.6.2.2z /conf/main.cf
postfix/postfix-script: warning: not owned by root: /opt/zimbra/postfix-2.6.2.2z /conf/master.cf
postfix/postfix-script: warning: not owned by root: /opt/zimbra/postfix-2.6.2.2z /conf/master.cf.in
postfix/postfix-script: warning: not owned by postfix: /opt/zimbra/data/postfix/ ./spool/pid/unix.smtp
postfix/postfix-script: warning: not owned by postfix: /opt/zimbra/data/postfix/ ./spool/pid/inet.127.0.0.1:10025
postfix/postfix-script: warning: not owned by postfix: /opt/zimbra/data/postfix/ ./spool/pid/unix.smtp-amavis
postfix/postfix-script: warning: not owned by postfix: /opt/zimbra/data/postfix/ ./spool/pid/unix.showq
postfix/postfix-script: warning: not owned by postfix: /opt/zimbra/data/postfix/ ./spool/pid/unix.cleanup
postfix/postfix-script: warning: not owned by postfix: /opt/zimbra/data/postfix/ ./spool/pid/master.pid
postfix/postfix-script: warning: not owned by postfix: /opt/zimbra/data/postfix/ ./spool/pid/unix.lmtp
postfix/postfix-script: warning: not owned by postfix: /opt/zimbra/data/postfix/ ./spool/pid/inet.smtp
postfix/postfix-script: starting the Postfix mail system
Starting saslauthd...done.
zimbra@zimbra:~$

Last edited by borngunners; 09-24-2009 at 12:14 PM..
Reply With Quote
  #5 (permalink)  
Old 09-24-2009, 07:48 PM
Senior Member
 
Posts: 65
Default

In master.cf you can condig user to zimbra like this
Quote:
dfilt unix - n n - - pipe
flags=Rq user=zimbra argv=/your/path/script_name -f ${sender} -- ${recipient}
and you need to set permission of your script to
rwxr-xr-x
#chmod 755 script_name
Reply With Quote
  #6 (permalink)  
Old 09-25-2009, 08:54 AM
Advanced Member
 
Posts: 191
Default

After making the changes you suggested, I still got the same error:


root@zimbra:/opt/zimbra/postfix/conf# su zimbra
zimbra@zimbra:~/postfix/conf$ zmmtactl stop
Stopping zmmtaconfig...done.
postfix/postfix-script: stopping the Postfix mail system
Stopping saslauthd...done.
zimbra@zimbra:~/postfix/conf$ zmmtactl start
Rewriting configuration files...done.
Starting zmmtaconfig...done.
postfix/postfix-script: warning: not owned by root: /opt/zimbra/data/postfix/spool
postfix/postfix-script: warning: not owned by root: /opt/zimbra/postfix-2.6.2.2z/conf/main.cf
postfix/postfix-script: warning: not owned by root: /opt/zimbra/postfix-2.6.2.2z/conf/master.cf
postfix/postfix-script: warning: not owned by root: /opt/zimbra/postfix-2.6.2.2z/conf/master.cf.in
postfix/postfix-script: warning: not owned by postfix: /opt/zimbra/data/postfix/./spool/pid/unix.smtp
postfix/postfix-script: warning: not owned by postfix: /opt/zimbra/data/postfix/./spool/pid/inet.127.0.0.1:10025
postfix/postfix-script: warning: not owned by postfix: /opt/zimbra/data/postfix/./spool/pid/unix.smtp-amavis
postfix/postfix-script: warning: not owned by postfix: /opt/zimbra/data/postfix/./spool/pid/unix.showq
postfix/postfix-script: warning: not owned by postfix: /opt/zimbra/data/postfix/./spool/pid/unix.cleanup
postfix/postfix-script: warning: not owned by postfix: /opt/zimbra/data/postfix/./spool/pid/unix.bounce
postfix/postfix-script: warning: not owned by postfix: /opt/zimbra/data/postfix/./spool/pid/master.pid
postfix/postfix-script: warning: not owned by postfix: /opt/zimbra/data/postfix/./spool/pid/unix.dfilt
postfix/postfix-script: warning: not owned by postfix: /opt/zimbra/data/postfix/./spool/pid/unix.defer
postfix/postfix-script: warning: not owned by postfix: /opt/zimbra/data/postfix/./spool/pid/unix.lmtp
postfix/postfix-script: warning: not owned by postfix: /opt/zimbra/data/postfix/./spool/pid/inet.smtp
postfix/postfix-script: starting the Postfix mail system
Starting saslauthd...done.
zimbra@zimbra:~/postfix/conf$
Reply With Quote
  #7 (permalink)  
Old 09-26-2009, 09:07 AM
Senior Member
 
Posts: 65
Default

try to chang owner of your script to root
#chown root.root script_name

and change in your master.cf.in yo
Quote:
dfilt unix - n n - - pipe
flags=Rq user=root argv=/your/path/script_name -f ${sender} -- ${recipient}
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.