Results 1 to 6 of 6

Thread: Saving emails to file

Hybrid View

  1. #1
    Join Date
    Feb 2007
    Posts
    3
    Rep Power
    8

    Red face Saving emails to file

    I know it can be done, but I am just getting lost in all the settings...

    My Zimbra server is on a local company network -- there is no connection to the Internet. I want to set it up to dump messages to file instead of trying to send them to SMTP.

    Basically, I want to have 2 servers setup one on the outside and one on the intranet.

    I need to configure them to dump messages to file and I will transfer the messages between the 2 manually (via USB stick).

    I know it sounds dumb, but such is my life...

    Any pointers to information on how this can be set up are appreciated.

    DZ

  2. #2
    Join Date
    Sep 2005
    Posts
    93
    Rep Power
    10

    Default

    You can't configure Zimbra to do it -- Zimbra can *only* send email via SMTP (defaults to port 25 locally, but can be configured via Admin Console).

    You might be able to configure Postfix to do it, take a look through the Postfix docs.

    Worst-case, you can hack up a dummy SMTP server that listens on port 25 and writes the messages out to a file -- you can do this in probably 50 lines of Perl using Net::SMTP::Server
    Bugzilla - Wiki - Downloads - Before posting... Search!

  3. #3
    Join Date
    Feb 2007
    Posts
    3
    Rep Power
    8

    Wink

    Hiya Tim,
    Thanks for the idea. So, I can do a small proxy server that listens on some port (other than 25?) and once it receives SMTP connection, it reads all messages from Zimbra and dumps them into a local folder, for example.

    Does Zimbra both send and receive messages via SMTP? (Sorry if I am aksing stupid questions, mail is not an area that I am strong at.)

    Then I can basically write another script that reads messages from a local folder and passes them to Zimbra via SMTP. Does that sound reasonable?

    I guess I better get my lunch-box ready -- it's time to go learn SMTP.

    Lastly, how do I configure Zimbra to use relay host? relayhost = [192.168.1.100] ?

    DZ
    Last edited by i_magic; 02-14-2007 at 03:46 PM.

  4. #4
    Join Date
    Sep 2005
    Posts
    93
    Rep Power
    10

    Default

    Zimbra sends via SMTP, but it receives via LMTP on port 7025. The two protocols are almost identical except (iirc) that LMTP handles queuing while SMTP doesn't...

    Attached is a script that I wrote a while back that a lot of the devs here use internally for testing (since Postfix doesn't run on Windows) -- it listens on port 25 and writes local messages to LMTP on 7025, or fwds remote messages to a remote SMTP server. You should be able to adapt this pretty quickly for what you need.
    Attached Files Attached Files
    Bugzilla - Wiki - Downloads - Before posting... Search!

  5. #5
    Join Date
    Sep 2005
    Posts
    93
    Rep Power
    10

    Default

    Lastly, how do I configure Zimbra to use relay host? relayhost = [192.168.1.100] ?
    Look in the admin console under Servers/YourServer/MTA Tab
    Bugzilla - Wiki - Downloads - Before posting... Search!

  6. #6
    Join Date
    Feb 2007
    Posts
    3
    Rep Power
    8

    Default

    Hey Tim,
    Thanks again.

    OK, so I found a little python script, tweaked it a bit and voile, I now have outgoing messages being dumped to a local folder.

    To set up relay host, I did:
    /opt/zimbra/bin/postconf -e fallback_relay=[127.0.0.1]:9025
    (9025 is the port on which my script is listening for incoming connections.)

    One gotcha that I ran into is that before installing Zimbra, I already had postfix installed, so when I tried running postconf, it would modify main.cf in /etc/postfix/main.cf -- not the one that zimbra uses (/opt/zimbra/postfix/main.cf?). Zimbra installs its own postfix! Hence, full path in the above postconf.

    How does Zimbra listen on port 7025? Does use one of the agents of the postfix?

    Actually, to be honest, I am fully tracking how Zimbra integrates with postfix, ie how emails pass between zimbra and postfix, etc. If you could point me where I can read up on this, I'd appreciate it.

    LMTP... Hmm, I hope I can figure it out from your script. Thanks in advance.

    DZ

Similar Threads

  1. centos 5 zimbra 4.5.6 no statistics
    By rutman286 in forum Installation
    Replies: 9
    Last Post: 08-14-2007, 09:30 AM
  2. Opensource backup Question.
    By nfear24 in forum Administrators
    Replies: 3
    Last Post: 03-31-2007, 11:47 PM
  3. Replies: 5
    Last Post: 03-01-2007, 02:20 AM
  4. Traslation SVN tree status
    By meikka in forum I18N/L10N - Translations
    Replies: 7
    Last Post: 02-13-2007, 10:13 AM
  5. M3 problem with shares
    By titangears in forum Users
    Replies: 4
    Last Post: 01-12-2006, 12:01 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
  •