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
  #21 (permalink)  
Old 05-25-2006, 04:06 PM
Moderator
 
Posts: 927
Default

I've just set this up and it works very well if I cheat and execute it as root. If I try to execute as the zimbra user, I get the following:

Code:
zimbra@zimbra:/home/zimbra> fetchmail -v -c -f opt/zimbra/conf/my_fetchrc
/opt/zimbra/.fetchmail.pid: Permission denied
fetchmail: lock creation failed.
The permissions on the my_fetchrc are zimbra:zimba and 710 (set the ownership to root to test it as root.

Any idea what I've done wrong?
Reply With Quote
  #22 (permalink)  
Old 05-26-2006, 12:18 AM
Zimbra Consultant & Moderator
 
Posts: 19,655
Default

Fetchmail runs as the user that you're fetching the mail for. Have you followed the instructions here ?
__________________
Regards


Bill
Reply With Quote
  #23 (permalink)  
Old 05-26-2006, 12:49 AM
Moderator
 
Posts: 927
Default

Yes, I followed this process. I created the zmfetchercfg file and made it executable, I used it to generate the my_fetchrc file and set that to chmod710, and I then tested it as described.

The original post seems to show that the fetchmail command should be executed from a folder with write permissions, so I made a folder called zimbra in /home and set the permissions on it to zimbra:zimbra. I did this as root. Then I changed to the zimbra user and moved into /home/zimba and typed in the fetchmail command there with the same results, an error about being unable to create a lock file.

It seems to want to create a lock file in /opt/zimbra/.fetchmail.pid this file does not exist when I look for it, so I cant change it's permissions to suit, nor does it seem I can change the location the file is created.

I have yet to set this up on a schedule as I need to ensure I've got it all right first.
Reply With Quote
  #24 (permalink)  
Old 05-26-2006, 02:12 AM
Zimbra Consultant & Moderator
 
Posts: 19,655
Default

OK, by far the easiest thing to do is install webmin that I mentioned earlier in this thread. It has a module for setting-up fetchmal and running against a mail server. It's a doddle to run, try it.
__________________
Regards


Bill
Reply With Quote
  #25 (permalink)  
Old 05-26-2006, 03:19 PM
Moderator
 
Posts: 927
Default

I've installed webmin and configured it's pop3 method, there's an option when you are done to 'check servers' or start the download from the remote pop3 server. The output from this is:

Code:
Checking for mail on server(s) with command fetchmail -v -f '/opt/zimbra/.fetchmailrc' ..

/opt/zimbra/.fetchmail.pid: Permission denied
fetchmail: lock creation failed.

.. checking failed!
which is just the same as it was before!!!

I told it to use the zimbra user as this server is setup at home just for this purpose and no other users are configured. I'm also setting up one at work, but we are using smtp delivery for that and it works ok, so I'm pretty convinced the servers themselves are set right as I'm on the same learning curve on them both, the only difference is the ability to recieve mail from a remote pop3 server.

I cant be the only one to have this exact problem can I?
Reply With Quote
  #26 (permalink)  
Old 05-27-2006, 12:55 AM
Zimbra Consultant & Moderator
 
Posts: 19,655
Default

Quote:
Originally Posted by Dirk
I told it to use the zimbra user as this server is setup at home just for this purpose and no other users are configured.
Sorry, perhaps I should have read your earlier post a bit more carefully. You do actually need a local user to collect the mail for. As you've already found out you can't write to the zimbra directory.
__________________
Regards


Bill
Reply With Quote
  #27 (permalink)  
Old 05-27-2006, 04:30 AM
Moderator
 
Posts: 927
Default

Thanks Phoenix, shortly after I posted I reconfigured the jobs via webmin to check using the root users and found it to work. I'll add a user for the task shortly.

So, POP3 email retrieval is now working fine, I'm happy with the speed too, I've set it to check every 3 minutes and considering that this one is running on an underpowered server, I'm very impressed.

If it matters to anyone, the home setup is using a Compaq 1600 rack server with 512MB ram and two PIII 550MHz chips, the work one is on 1GB Ram and a P4 3.6MHz chip, so quite a difference, but performance is similar (of course the work one will be supporting more users and a lot more email traffic)

Thanks all, it's a great product and although it's tricky to get it all working (when knowledge is limited) it's nice to get there eventually.

There are still a few teething problems though, so I'm sure I'll be back for more help soon
Reply With Quote
  #28 (permalink)  
Old 07-04-2006, 04:19 AM
New Member
 
Posts: 4
Default How to fix dates after fetchmail imports from POP3?

Thanks for these terrific instructions! Fetchmail seems just the ticket for importing POP3 mail for my migration from a post.office server. A test run of 10,000 messages ran very well.

However, I am now facing the date problem other people have mentioned -- messages are sorted in Zimbra with the timestamp of import and not the original message-received timestamp. I know that importing using imapsync from an imapserver can solve this with the syncdates option, but post.office doesn't have imap.

So how can I get fetchmail to set the date correctly? Perusing its manpage didn't reveal any option similar to imapsync's -syncdates option.
Reply With Quote
  #29 (permalink)  
Old 07-20-2006, 03:12 AM
Partner (VAR/HSP)
 
Posts: 123
Thumbs up

tested and worked fine for migrating emails from iPlanet messaging to zimbra.

since the mailsvr does not use IMAP w SSL, i just change the port to 143. during the fetch process, i add "-a" option to fetch all mails.
Reply With Quote
  #30 (permalink)  
Old 09-01-2006, 06:06 AM
Member
 
Posts: 11
Default

Quote:
Originally Posted by scalper
tested and worked fine for migrating emails from iPlanet messaging to zimbra.

since the mailsvr does not use IMAP w SSL, i just change the port to 143. during the fetch process, i add "-a" option to fetch all mails.

I have tested with Sun JES Messaging by following fetchmail config.

poll mail.oldmail.com port 143 protocol IMAP user user1@oldmail.com password 'password' smtpname user1@newmail.com folder "Sent" fetchall keep

The result is all messages in Sent folder are fetched to Inbox in newmail and Received date are changed to curent time. How can I migrate Sent to Sent not to Inbox and not change received date?
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.