Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: Aliases to Scripts

  1. #11
    Join Date
    Dec 2007
    Location
    Portland, OR
    Posts
    7
    Rep Power
    7

    Default

    Thanks for pointing that out! And for the extra cautious, there's always the chattr hammer! Assuming you are running ext3 or another supported filesystem (not reiser, I believe), setting the immutable flag on a file will prevent unwanted deletions and modifications...how gracefully zimbra would handle this is something one should definitely test though!

  2. #12
    Join Date
    Apr 2008
    Location
    Portland, OR
    Posts
    14
    Rep Power
    7

    Default

    Quote Originally Posted by drj33 View Post
    Thanks for pointing that out! And for the extra cautious, there's always the chattr hammer! Assuming you are running ext3 or another supported filesystem (not reiser, I believe), setting the immutable flag on a file will prevent unwanted deletions and modifications...how gracefully zimbra would handle this is something one should definitely test though!
    Interesting idea, but I think it might be highly dangerous.

    On a day-to-day basis, it appears that Zimbra rewrites main.cf at every restart and configuration change. If that write fails due to chattr, you may be left with a Zimbra that refuses to start.
    During upgrades, almost everything in /opt/zimbra gets wiped out and re-created. This process could also blow up if something is chattr'ed. It's a bit heavy-handed for seasoned Unix admins, but seems to keep everyone else from causing too many problems.

  3. #13
    Join Date
    Dec 2007
    Location
    Portland, OR
    Posts
    7
    Rep Power
    7

    Default

    Heavy handed, yes, dangerous, probably

    I've always only used chattr in situations where I was simply uninterested in taking the time to deal with a user the time-consuming way...in a managed web-hosting environment, for example, elite sysadmin/office managers would try their hand at adding all sorts of trash (^M^Ms, insane my.cnf specs for the given hardware, httpd.conf maxclients=100000, etc) and chattr would occasionally be the quick way to get them to call us for a talk

    Anyway, greetings from Beavertron.

  4. #14
    Join Date
    Apr 2008
    Location
    Portland, OR
    Posts
    14
    Rep Power
    7

    Default Wiki article

    FWIW, I've created an entry in the wiki documenting this:

    Configuring Postfix to work with piped scripts - Zimbra :: Wiki


    We should really have a way to differentiate Zimbra 5 articles from Zimbra 4 articles, as the differences can get confusing.

  5. #15
    Join Date
    Jul 2008
    Posts
    4
    Rep Power
    7

    Default

    I did this slightly differently, following the guide for getting mailman integrated. This is because although I followed the instructions above, it didn't work properly for me. I could send messages to rt@mydomain.com from within Zimbra, but external mail to rt@mydomain.com bounced.

    What I did was this (as the zimbra user):

    Code:
    $ sudo mkdir -p /usr/local/release-tracker/postfix
    
    $ sudo vim /usr/local/release-tracker/postfix/aliases
    --- add the content:
    rt:     "|/usr/bin/rt-mailgate --queue general --action correspond --url http://rt.example/org/"
    rt-comment:     "|/usr/bin/rt-mailgate --queue general --action comment --url http://rt.example.org/"
    ---
    
    $ sudo vim /usr/local/release-tracker/postfix/virtual-rt
    --- add the content:
    rt@example.org   rt
    rt-comment@example.org   rt-comment
    ---
    The first file sets up your actual aliases on whatever Zimbra believes to be the local domain... The second one adds a virtual mapping from your preferred virtual-hosted domain, to the local one.

    Then, you compile and install these files by doing this:

    Code:
    $ sudo postmap /usr/local/release-tracker/postfix/virtual-rt
    $ sudo postmap /usr/local/release-tracker/postfix/aliases
    --- ignore the warnings about "is this an aliases file?"
    
    $ zmlocalconfig -e postfix_alias_maps="hash:/etc/aliases,hash:/usr/local/release-tracker/postfix/aliases"
    $ zmlocalconfig -e postfix_virtual_alias_maps="ldap:/opt/zimbra/conf/ldap-vam.cf,hash:/usr/local/release-tracker/postfix/virtual-rt"
    
    $ zmmtactl stop ; zmmtactl start
    
    $ newaliases
    The above should work for anything you need to pipe, and it's a little clearer what's going on... Also you're not editing any files that are going to get wiped out by a future Zimbra upgrade.

    Note, my ubuntu box had two copies of the 'newaliases' command installed. I needed to make sure I was the zimbra user, so that it ran the one out of Zimbra's postfix.

  6. #16
    Join Date
    Apr 2008
    Location
    Portland, OR
    Posts
    14
    Rep Power
    7

    Default

    sdetheridge,

    Are you sure you got this working based on those instructions? I tried implementing this recently, and here is what I see when delivery is attempted:

    Jun 12 15:46:34 wasabi postfix/cleanup[25362]: warning: 180AE4D804D: unreasonable virtual_alias_maps map nesting for rt@toprotecttheinnocent.com

    And no actual delivery.

Similar Threads

  1. Zimbra aliases verses Exim aliases
    By mond in forum Administrators
    Replies: 5
    Last Post: 01-04-2011, 07:12 AM
  2. Same user and aliases on multiple domains
    By wiscalico in forum Administrators
    Replies: 1
    Last Post: 08-01-2007, 02:37 AM
  3. Offsite Aliases, Multi-Recipient Aliases
    By dballing in forum Administrators
    Replies: 8
    Last Post: 07-30-2007, 07:11 AM
  4. Hiding Aliases - Zimbra Web Client
    By soxfan in forum Administrators
    Replies: 0
    Last Post: 03-13-2007, 05:39 PM
  5. Incorrect Aliases Display?
    By sduensin in forum Administrators
    Replies: 3
    Last Post: 03-07-2006, 11:04 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
  •