Zentyal Forum, Linux Small Business Server

Zentyal Server => Installation and Upgrades => Topic started by: bertalanimre on July 16, 2014, 03:33:12 pm

Title: Where did External mail recieve go?
Post by: bertalanimre on July 16, 2014, 03:33:12 pm
Hey Guys!

I've just noticed that the external mail recieve is missing from the Mail module in Zentyal 3.5! Where did it go? I've read a few words that sais fetchmaili is still in and working, but how and where?

Cheers!
Title: Re: Where did External mail recieve go?
Post by: StuartNaylor on July 16, 2014, 05:20:30 pm
fetchmail is still installed but the interface to add the external emails has gone.

Create a file /etc/fetchmailrc

Code: [Select]
set daemon 180
set syslog
set postmaster postmaster@zent1.office.zentyal.lan


poll my.bumbox.com proto POP3
   user "quarkybeddingspot" with password "theansweris42" is test1@zentyal.lan here  ;

Just add a list of external accounts with the full local email address and that worked for me with 3.5 and standard mail settings.

Haven't tried it with openchange but because it sits on top I presume its the same.

There are loads of examples for fetchmail

http://www.zarafa.com/wiki/index.php/Fetchmail_to_Zarafa
http://www.howtoforge.com/debian_etch_fetchmail

I would prob use the zarafa example but use the above fetchmailrc. Create fetchmail.sh and cronjob.

create a cronjob and thats it just add each email address like the one above.

Manual Reference Pages  - fetchmail (1)
http://www.fetchmail.info/fetchmail-man.html

Frequently Asked Questions About Fetchmail
http://www.fetchmail.info/fetchmail-FAQ.html

Fetchmail-users -- general discussion on fetchmail, its use, and support
https://lists.sourceforge.net/lists/listinfo/fetchmail-users
Title: Re: Where did External mail recieve go?
Post by: bertalanimre on July 18, 2014, 11:01:47 am
Jesus, god damn it. Why did they remove it? I'm using Zentyal because it is user friendly and I can learn ubuntu server and setting slowly while still operating it as a "noob". Are they gonna bring it back somewhen? BTW: I have to use OpenChange, so it will be 2x more problematic for me. Thanks for the link, I'm observing and studying them.
Title: Re: Where did External mail recieve go?
Post by: bertalanimre on July 18, 2014, 11:12:34 am
Question: Can I ( or is it adviceable to ) set up the fetchmail with IMAP instead of POP3 because I wish to keep the mails on the external accounts server as well. I don't want to download it and delete.
Title: Re: Where did External mail recieve go?
Post by: StuartNaylor on July 18, 2014, 11:42:34 am
I am going to by shares in webmin. I bang on about it enough :)

If you have webmin and Zentyal then for a noob much is possible.

I guess I am a noob as I use them all the time and have learnt loads.

Read http://www.zarafa.com/wiki/index.php/Fetchmail_to_Zarafa

They didn't remove fetchmail just the script and datastore (which might of been openldap)

Its very easy to create some cron jobs in webmin.

Its very easy to download zentyal 3.2 and have a look what was going on.

imap or pop3 you can have yes.

If you need any help either post or email on the provision you write up a community document if satisfactory.

I just wish generally on each module Zentyal had blank custom fields that would allow many fixes and hackz.

As an idea each user could have a file in there home folder and these are scanned to create the account list?

Or a sysadmin just writes them out in one fretchmailrc
Title: Re: Where did External mail recieve go?
Post by: Torsten73 on July 18, 2014, 03:38:23 pm
Webmin has been remove from ubuntu due to security reasons. It can break your system.

I am not sure if it is a good idea to modify without the WebIF of zentyal. These changes can affect other parts of zentyal. Or better i say, every modification without zentyal can brake it espessially for a noob.

the fetchmailrc has some lines i dont understand, do i need to modify "set postmaster ..."?
can you give us your modified files as full example?

Anyway i can´t believe that we need to do such quirks to get basic functionality back.

 
Title: Re: Where did External mail recieve go?
Post by: StuartNaylor on July 18, 2014, 04:11:26 pm
I am not going to go into it but Torsten the tooth fairy is as real as santa claus.

I dunno where these urban myths come from especially about webmin.

webmin like the command line do many things that the zentyal interface can not.

Change the network settings in zentyal and you can end up with a broken system

Don't as if you think about it you could argue using a windows desktop you could break the system, are we going to say don't use it or be scared?

I spoke to James Cameron about it who is the main developer and he just hasn't bothered submitting it.

He is a good guy and has helped me with a few things.

He is happy with http://www.webmin.com/deb.html

Code: [Select]
apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python
wget http://prdownloads.sourceforge.net/webadmin/webmin_1.690_all.deb
dpkg --install webmin_1.690_all.deb

create a network service webmin port 10000
allow just like the zentyal webadmin in the firewall

Its a lot easier for the noob for many tasks than the cli.

https://library.linode.com/email/fetchmail there are loads of good examples for fetchmail.

Some people seem to be stuck and in desperate need of fetchmail functions so I posted some info on how to do it.

I can't help that the fetchmail part of zentyal is missing until we get an update.

I am sure Zentyal will add it, but until then.
The easiest way to do your cronjobs is through webmin which zentyal just doesn't have. Its a bit like a general gui for linux admin.
It also has a file manager which is great as ftp isn't part of zentyal anymore either.
So its also good for creating the fetchmailrc file and setting its permissions.

I suggest for a noob to install webmin and ask the community if unsure.

Just my tip, if you have an alternative method please say.

set postmaster: Give the name of the last-resort mail recipient (default: user running fetchmail, "postmaster" if run by the root user). In case there is no delivery route

Also at the end of each mail poll you can add...
You will notice that the poll lines have different endings (e.g. nofetchall (default), fetchall, keep, nokeep). The meanings are as follows:

nofetchall: Retrieve only new messages (default). If nothing else is specified (e.g. fetchall, keep), this means nofetchall.
fetchall: Fetch all messages whether seen or not.
keep: Don't delete seen messages from server.
nokeep: Delete seen messages from server.

imap, pop3 or whatever protocol the account allows


Manual Reference Pages  - fetchmail (1)
http://www.fetchmail.info/fetchmail-man.html

Frequently Asked Questions About Fetchmail
http://www.fetchmail.info/fetchmail-FAQ.html

Fetchmail-users -- general discussion on fetchmail, its use, and support
https://lists.sourceforge.net/lists/listinfo/fetchmail-users
Title: Re: Where did External mail recieve go?
Post by: bertalanimre on July 21, 2014, 09:01:46 am
You gave me a very good and detailed example of fetchmail, thank you for it. However I have an issue. I'm using OpenChange ( can't use Zarafa, must use OpenChange ). I've made a simple set up for one account but I don't know where to set the time how often should it download new messages. That would be needed. Google-in it right now. :) I think it will work cause I've recieved ONE email to my original mail address and THAT has appeared in the newly created one. But that was on the weekend. I haven't recieved anything that was sent today. Damn, why did Zentyal remove this? Along with the old virtualization. That was very useful and awsome. I'm affraid that Zentyal is beginning to look like a very plain server system with purchaseable modules. Am I alone with this feeling?
Title: Re: Where did External mail recieve go?
Post by: StuartNaylor on July 21, 2014, 09:55:14 am
Just use a cron job.

/etc/fetchmailrc has the line set daemon 180 which is the poll frequency

The cron job will make sure fetchmail is running

I think you have got Zentyal at a feature low point because it has made some fundemental base changes.

Install webmin as honest its a perfect complement as one can not do what the other can. Together they are just superb.

Be carefull with the server settings but also its great for seeing what server settings are in zentyal.

Set up a cron job and you choose how often you download.


Code: [Select]
apt-get install -y perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python
wget http://prdownloads.sourceforge.net/webadmin/webmin_1.690_all.deb
dpkg --install webmin_1.690_all.deb

In zentyal>network>services create a webmin service and add port 10000
Allow on internal firewall section.

Makes making cronjobs much easier.
webmin>system>scheduled cron jobs
also
webmin>other>file manager makes things mush easier.

Have a go with those two honest they will not bite.
Apols Torsten but the don't run with a knife in your hand, don't stick your fingers in a plug socket crowd wind me up.
Apols if I sounded severe.

Quote
Next create a file called: /etc/cron.domain/fetchmail.sh and add the following to that file: (This file will be called via crontab to initiate the fetchmail collection every 5 minutes or what ever you specify.)
/etc/cron.domain/fetchmail.sh

   #!/bin/bash
   #
   # Add this to a cron process that runs once every 15 mins
   # just to make sure fetchmail is up and running
   #
   fetchmailpid=`/sbin/pidof fetchmail`
   #
   # If fetchmail is not running then start it
   #
   if [ $? -ne 0 ]; then
     /usr/bin/fetchmail -F -K -L /var/log/fetchmail
   fi
Please note: The '-K' option above will delete retrieved messages from the remote mailserver. If you want to keep the emails on the external POP3 server, then i would suggest removing the '-K'.
Parameter Breakdown from above:
   -K - Delete retrieved messages from the remote mailserver. This option forces retrieved mail to be deleted
   -L - Specify the log file to which fetchmail should log to
   -F - Delete old (previously retrieved) messages from the mailserver before retrieving new messages
Set the permissions on the /etc/cron.domain/fetchmail.sh to 777:
   chmod 777 /etc/cron.domain/fetchmail
Now we setup the cron to collect the mail every 5 minutes:
   */5 * * * * /etc/cron.domain/fetchmail.sh
If there any errors check the /var/log/fetchmail.log for more information.

I always forget the cron format so just use webmin years of gui's I guess


Manual Reference Pages  - fetchmail (1)
http://www.fetchmail.info/fetchmail-man.html

Frequently Asked Questions About Fetchmail
http://www.fetchmail.info/fetchmail-FAQ.html

Fetchmail-users -- general discussion on fetchmail, its use, and support
https://lists.sourceforge.net/lists/listinfo/fetchmail-users
Title: Re: Where did External mail recieve go?
Post by: bertalanimre on July 21, 2014, 11:27:29 am
Sounds very easy to do it with webmin. I'll give it a go, but ATM I'm very close to make fetchmail working as it is. There are 2 things I need to solve still. Oh and this is only a mail server. Nobody is going to log in directly, only the sysadmin.
1; Use IMAP and not POP3. I think this is why it grabs down the mails now correctly but deleting it as well from the original server
2; I want to enable this for multiple users

+1; I need to download the already opened messages as well once. Basicly copy the whole profile with subfolders and all messages inside it. Any tipp?

Here is my fetchmailrc:
Code: [Select]
set syslog;
set daemon 10;
set postmaster "postmaster@***.hu";
set logfile /home/rendszergazda/fetchmail.log;

defaults
   proto imap
   keep

poll i**e.be***an@***.hu
   via mail.t****e.hu
   user "i**e.be***an@***.hu"
   pass "********";
smtphost "z****l.****.hu smtpname "i**e.be****an@***.hu";

I know it is messed up, but I've found soooooooo many variations. I don't know wich one to use or wich is better, etc....
Title: Re: Where did External mail recieve go?
Post by: StuartNaylor on July 21, 2014, 11:31:44 am
Its OK as these things can be a nightmare.

Logs is where it is all at. Just try and read you logs.

I had this format and found the FQ email address did the job on my server.

/etc/fetchmailrc

Code: [Select]
set daemon 180
set syslog
set postmaster postmaster@zent1.office.zentyal.lan


poll my.bumbox.com proto POP3
   user "quarkybeddingspot" with password "theansweris42" is test1@zentyal.lan here fetchall, nokeep

poll mail.there.com proto IMAP
   user "marvintheparanoidandroid" with password "zaphod" is test2@zentyal.lan here nofetchall, keep

  ;

Each account can have its own protocol. set daemon 180 is the global repeat poll time.
Your cron job just sets it going and keeps it going.

Haven't tried but think I got the two lines right.
Fetchall, nokeep grabs everything and cleans the source
nofetchall, keep just grabs new.

So both should stop duplication with the 2nd keeping a backup store.

I don't know how clever fetchmail is and how nofetchall would work on pop3

Apols as never even looked at fetchmail until I read the forum posts. In production I am still running 3.2 so personally have never used it.
Title: Re: Where did External mail recieve go?
Post by: bertalanimre on July 21, 2014, 12:32:31 pm
Getting there. :)

It does fetch all email and keeps them on the source server as well. Magnificant, thank you. Now, ther is still one problem. :D It keeps fetching it non-stop and now in my test account I have 2 messages but each 20 times ( before I stopped fetchmail ). I don't know if there is any way of forcing the fetchmail to compare the mails and see if it already exists. If there is not, then I'll try to solfe it like this:

1stly on Friday I'll reset all users password so I can add them all to the fetchmailrc and start fetchmail so by Monday morning it will finnish with all users .( thinking about it, it is not a good idea because if it finnishes in 10 hours, then all users will have all their emails but 4 times.... ) damn, need to rethink again....

*Bert is brainstorming.........
Title: Re: Where did External mail recieve go?
Post by: StuartNaylor on July 21, 2014, 12:42:24 pm
Dunno I am not sure if we just put the full email address that it just sends like a sendmail without any checks.

Easiest way would be to delete them nokeep

Below is the Zarafa example and a MTA is defined which might keep control the uid's of the emails.

/root/.fetchmailrc:
Code: [Select]
   set daemon 60
   defaults
           proto pop3
           nokeep
   poll user@domain.com.au
           via mail.domain.com.au
           user "user@domain.com.au"
           pass "password"
           mda "/usr/bin/zarafa-dagent user"
           flush
           no ssl
There are a number of other parameters you can use, find more here: Redhat Fetchmail Commands
Then you repeat the 'poll' section to 'no ssl' for each user. Obviously changing the details.
Next create a file called: /etc/cron.domain/fetchmail.sh and add the following to that file: (This file will be called via crontab to initiate the fetchmail collection every 5 minutes or what ever you specify.)

mda "/usr/libexec/dovecot/dovecot-lda -d test@domain.org.uk"
mda "/usr/lib/dovecot/deliver -d mail -m /srv/mail/user1/"


/etc/cron.domain/fetchmail.sh

Code: [Select]
   #!/bin/bash
   #
   # Add this to a cron process that runs once every 15 mins
   # just to make sure fetchmail is up and running
   #
   fetchmailpid=`/sbin/pidof fetchmail`
   #
   # If fetchmail is not running then start it
   #
   if [ $? -ne 0 ]; then
     /usr/bin/fetchmail -F -K -L /var/log/fetchmail
   fi
Please note: The '-K' option above will delete retrieved messages from the remote mailserver. If you want to keep the emails on the external POP3 server, then i would suggest removing the '-K'.
Parameter Breakdown from above if you want global fetch options:
   -K - Delete retrieved messages from the remote mailserver. This option forces retrieved mail to be deleted
   -L - Specify the log file to which fetchmail should log to
   -F - Delete old (previously retrieved) messages from the mailserver before retrieving new messages

Manual Reference Pages  - fetchmail (1)
http://www.fetchmail.info/fetchmail-man.html

Frequently Asked Questions About Fetchmail
http://www.fetchmail.info/fetchmail-FAQ.html

Fetchmail-users -- general discussion on fetchmail, its use, and support
https://lists.sourceforge.net/lists/listinfo/fetchmail-users
Title: Re: Where did External mail recieve go?
Post by: bertalanimre on July 21, 2014, 01:42:16 pm
What if.....

I make a batchfile that runs fetchmail for all users ( line by line after each other ) and fetches all emails. If I'm not doing this with the daemon it should do this only once am I right?
IF that has been done and all mails have arrived, then I can start the daemon but to recieve only the new messages. Then it wouldn't spam the mailbox with duplicated mails ( since the old ones were downloaded once and it wasn't made with the daemon ) and would still download all newly recieved messages. Right?
Title: Re: Where did External mail recieve go?
Post by: StuartNaylor on July 21, 2014, 01:56:01 pm
Can you just not delete the read mail? Why are you keeping it if its in there new mailbox?

I am not sure depends on the manner you end your poll line, "nofetchall, keep"

Or the run parameters of  fetchmail -F -K -L /var/log/fetchmail for global

Setting up a cron job can run as any user and any schedule.

Will leave you to try and report back.
Title: Re: Where did External mail recieve go?
Post by: bertalanimre on July 21, 2014, 02:48:42 pm
I have to keep the original mails since the server I'm using is still only in test phase. If I download all the mails and the server needs to be reinstalled that wouldn't be a good thing. :) Plus the mailboxes are important like sh*t.... :) I'll let you know if it works.
Title: Re: Where did External mail recieve go?
Post by: Torsten73 on July 21, 2014, 02:49:08 pm
Getting there. :)

It does fetch all email and keeps them on the source server as well. Magnificant, thank you. Now, ther is still one problem. :D It keeps fetching it non-stop and now in my test account I have 2 messages but each 20 times ( before I stopped fetchmail ). I don't know if there is any way of forcing the fetchmail to compare the mails and see if it already exists. If there is not, then I'll try to solfe it like this:

1stly on Friday I'll reset all users password so I can add them all to the fetchmailrc and start fetchmail so by Monday morning it will finnish with all users .( thinking about it, it is not a good idea because if it finnishes in 10 hours, then all users will have all their emails but 4 times.... ) damn, need to rethink again....

*Bert is brainstorming.........

this also happens in zentyal 3.4 when you activate fetch already read messages. switch it of and choose only don´t delete option and it works. But you will not get older messages. It seems to be not only a problem of zentyal as i though before you post the same with manual fetchmail setting.
Maybe it helps.
Title: Re: Where did External mail recieve go?
Post by: StuartNaylor on July 21, 2014, 03:08:11 pm
Fetchmail is really good as a normal external email retriever for your users.

If you are doing migrations then imapcopy for imap is an excellent migration tool.

apt-get install imapcopy  /usr/share/doc/imapcopy/examples

Also I found a really freaky feature out today which I am not sure how I feel about it.

https://forum.zentyal.org/index.php/topic,22655.msg87142.html#msg87142

ldbsearch -H /var/lib/samba/private/sam.ldb '(&(objectclass=person)(name=Administrator))' name unicodePwd

# record 1
dn: CN=Administrator,CN=Users,DC=office,DC=zentyal,DC=lan
name: Administrator
unicodePwd:: kXh1DQFudwnw+lnHhubyUw==

Give this site a go and tell me your success rate.

http://www.hashkiller.co.uk/ntlm-decrypter.aspx paste kXh1DQFudwnw+lnHhubyUw== and my test server password is zent1

You might not need to reset there passwords, you might understand why I have questions about this.
Title: Re: Where did External mail recieve go?
Post by: bertalanimre on July 21, 2014, 03:29:42 pm
that hashkiller is the best way to add words to attacker programs that try a number of words to enter a website, equipemtn or anything.... Don't use it. :)

I'm watching ipamcopy right now. I hope it will work. If it does, you have saved my life ( and probably my job as well ). :)
Title: Re: Where did External mail recieve go?
Post by: bertalanimre on July 21, 2014, 04:07:23 pm
It WORKS! ImapCopy + Fetchmail with IMAP is just what I needed. I'll start the 1st phase of the tests and if it works still then I'll publish the methods here step-by-step guys. :)
Title: Re: Where did External mail recieve go?
Post by: bertalanimre on July 28, 2014, 03:46:58 pm
Sorry for being very inactive but had some jobs to do. But here is the Step-by-step Guide how to migrate mails from an external mail server without any mail loss and using fetchmail:

1st thing is to download ImapCopy
Code: [Select]
sudo apt-get install imapcopy
2; Configure the imapcopy.cfg file wich is supposed to be in the folder where imapcopy is. ( normally your home folder )
Code: [Select]
mcedit imapcopy.cfg
3; What you need to edit is sourceserver, destination server, ports, usernames and password. You can find them in the basic config file
Code: [Select]
SourceServer hostname.sourceserver.com
SourcePort 143

DestServer hostname.destinationserver.com
DestPort 143

..
..
..

Copy "user1@sourceserver.com" "password" "user1@destserver.com" "password"
Copy "user2@sourceserver.com" "password" "user2@destserver.com" "password"

Normallí this will copy all the files/folders and labels as well.

4; Run ImapCopy
Code: [Select]
imapcopy
5; Take a break. We just copied all the messages to our local mailbox  ;)
Code: [Select]
sudo getadrink
6; Now we will set up fetchmail. I'll show how to start fetchmail manually because new users should use this instead of the daemon and apply these settings to the daemon only if it works 100%. Create a config file for the fetchmail
Code: [Select]
mcedit .fetchmailrc
7; Add the user, server, protocol and the rest wich will let fetchmail know that we want to keep the mail in our source mailbox
Code: [Select]
set syslog;
set postmaster "postmaster@destserver.com";
set daemon 60;
set logfile /home/user/fetchmail.log;

defaults
     smtpaddress "sysadmin@destserver.com"

poll sourceserver.com protocol imap:
     username "user1@sourceserver.com" is "user1@destserver.com"
     password "password";

poll sourceserver.com protocol imap:
     username "user2@sourceserver.com" is "user2@destserver.com"
     password "password";

keep

What could need some explanation:
set daemon 60; = Check incoming mails in every 60 seconds
keep = Keep the mail in the source server


8; Create the logfile since fetchmail can't create it on it's own. What a bastard  :)
Code: [Select]
mcedit fetchmail.log
Then save it.

9; Start Fetchmail
Code: [Select]
fetchmail
10; If you want, you can check the log file for any errors. With these settings it is working for me like a charm. It keeps all mails on the server and copies all unread messages the my local mail server. Perfect for testing.

In case if you need any help, do not hesitate to ask. :)
Title: Re: Where did External mail recieve go?
Post by: Torsten73 on July 28, 2014, 09:39:53 pm
I am not sure if zentyal did a mistake, but external mail can be activated again and in users you can configure it. But editing is not possible due to a missing user corner...

Still waiting for a stuff/dev statement.
Title: Re: Where did External mail recieve go?
Post by: bertalanimre on July 29, 2014, 08:14:26 am
Yes, a developer reply would be nice to have.
Title: Re: Where did External mail recieve go?
Post by: AbsyntH on July 29, 2014, 10:02:01 am
it's back on "Core version    3.5.2"

"Retrieve mail for external accounts
This allow users to retrieve mail for external accounts, the mail would be delivered to their local account. External account can be configured in the user's corner. " 

just flag the checkbox in you mail page and configure it per user ;)

(but it seems that does not begin to download your email, i don't see them in my SOGo/openchange webpage)
Title: Re: Where did External mail recieve go?
Post by: StuartNaylor on July 29, 2014, 10:53:59 am
Code: [Select]
Jul 29 09:49:26 zent1 fetchmail[14264]: starting fetchmail 6.3.26 daemon
Jul 29 09:49:27 zent1 fetchmail[14264]: 7 messages for stuartiannaylor@inbox.com at my.inbox.com (125967 octets).
Jul 29 09:49:28 zent1 postfix/smtpd[14265]: connect from localhost.localdomain[127.0.0.1]
Jul 29 09:49:28 zent1 postfix/smtpd[14265]: 7E07A22D2F: client=localhost.localdomain[127.0.0.1]
Jul 29 09:49:28 zent1 postfix/cleanup[14271]: 7E07A22D2F: message-id=<30004590.20140715210838.53c598564d22a5.60150238@mail132.atl41.mandrillapp.com>
Jul 29 09:49:28 zent1 fetchmail[14264]: reading message stuartiannaylor@inbox.com@my.inbox.com:1 of 7 (14935 octets) flushed
Jul 29 09:49:28 zent1 postfix/qmgr[13914]: 7E07A22D2F: from=<bounce-md_30004590.53c59856.v1-a2f3bd1cb5eb417fb9ad6952b34bb10e@mandrillapp.com>, size=16902, nrcpt=1 (queue active)
Jul 29 09:49:28 zent1 dovecot: lda(peterpugh@zentyal.lan): msgid=<30004590.20140715210838.53c598564d22a5.60150238@mail132.atl41.mandrillapp.com>: saved mail to INBOX
Jul 29 09:49:28 zent1 postfix/pipe[14272]: 7E07A22D2F: to=<peterpugh@zentyal.lan>, relay=dovecot, delay=0.16, delays=0.1/0.02/0/0.04, dsn=2.0.0, status=sent (delivered via dovecot service)

Jul 29 09:49:33 zent1 postfix/qmgr[13914]: 52C6C22D2F: removed
Jul 29 09:49:33 zent1 postfix/smtpd[14265]: disconnect from localhost.localdomain[127.0.0.1]
Jul 29 09:50:01 zent1 cron[2001]: (*system*ebox-mail) RELOAD (/etc/cron.d/ebox-mail)
Title: Re: Where did External mail recieve go?
Post by: bertalanimre on July 29, 2014, 10:56:59 am
Yes, noticed it.... However I'm NOT going to use it now since I worked 2 weeks with this. :D And as far as I can recall it does not keep the downloaded messages on the source server. That is still a mistake. Oh, and where is the user corner? How can a user change his password ( only mail server, no AD to lok in to )
Title: Re: Where did External mail recieve go?
Post by: StuartNaylor on July 29, 2014, 11:17:23 am
Mine stay on the server but there are tick boxes to set. (mine are unticked so should say)

One thing is and I thought about this afterwards is the problem of storing passwords in ldap as they can't be hashes.

If you use it your passwords will be bare on ldap. lol

Hidden Attributes

All operational attributes are hidden, but not all hidden attributes are operational. These attributes are not particularly well hidden, they just don’t show up in * search. You need to specify the name to get them.
Operation attributes are generated, not static. The data that they hold is generated from other attributes or from system information. They are read-only.
There are some non-operational, but hidden attributes which may be read-only, read-write or there are even some that are write-only (for example, changing password).
The database schema information contains an attribute called “SystemFlags”, which allows multiple values. If one of the values within this field is ‘FLAG_ATTR_IS_OPERATIONAL’ then this is a hidden or operational attribute.
Some hidden attributes are:
   replPropertyMetaData
   nTSecurityDescriptor
   msDS-BridgeHeadServersUsed
   msDS-Entry-Time-To-Die
   msDS-USNLastSyncSuccess

https://wiki.samba.org/index.php/Samba4/LDBIntro#Hidden_Attributes

Or its permissions
Title: Re: Where did External mail recieve go?
Post by: bertalanimre on July 29, 2014, 11:32:09 am
How does Hidden Attributes comes into this topic? :)
Title: Re: Where did External mail recieve go?
Post by: StuartNaylor on July 29, 2014, 11:34:19 am
The whole ldap is on port 390.

So maybe the idea of putting fetchmail accounts in ldap isn't that good an idea?

Maybe should be hidden or done via permissions
Title: Re: Where did External mail recieve go?
Post by: StuartNaylor on July 30, 2014, 05:08:35 am
I guess samba-tool dsacl set [options]

http://technet.microsoft.com/en-us/library/cc771151.aspx
Title: Re: Where did External mail recieve go?
Post by: Torsten73 on July 31, 2014, 08:15:55 am
it's back on "Core version    3.5.2"

"Retrieve mail for external accounts
This allow users to retrieve mail for external accounts, the mail would be delivered to their local account. External account can be configured in the user's corner. " 

just flag the checkbox in you mail page and configure it per user ;)

(but it seems that does not begin to download your email, i don't see them in my SOGo/openchange webpage)

Yes i agree, its back. But dont use it, it will brake your mail and flood it with endless duplicated mails!!! >:( (When you dont delete them Ehen collecting)
Title: Re: Where did External mail recieve go?
Post by: StuartNaylor on July 31, 2014, 11:03:34 am
Tortsten, how does it break your mail ?

Also what settings do you have in the user coener I just tried one email box and it seemed to work.
Title: Re: Where did External mail recieve go?
Post by: papajulio on July 31, 2014, 01:23:30 pm
Please, can you describe the steps to reproduce the problems with fetchmail and create a ticket in the bug tracker (https://tracker.zentyal.org/projects/zentyal) with this information so we can solve the bug.

The more detailed information that you will give us the easier for us to fix the bug.

Thanks for your time!!
Title: Re: Where did External mail recieve go?
Post by: StuartNaylor on July 31, 2014, 01:34:56 pm
The only problem that I can see as it seemed to work but will try again is not that it doesn't work its just a huge security flaw.

All the passwords as published on an ldap that is readable by any user.
Title: Re: Where did External mail recieve go?
Post by: AbsyntH on July 31, 2014, 02:39:20 pm
for me doesn't work, i've no mail in SOGo webpage
Title: Re: Where did External mail recieve go?
Post by: StuartNaylor on July 31, 2014, 03:03:09 pm
Didn't use SoGo apols works with roundcube, what mta does sogo use is it just the same?
Title: Re: Where did External mail recieve go?
Post by: AbsyntH on July 31, 2014, 04:38:21 pm
i just configured samba and mail server, then i set up openchange provision, i've import from exchange server all mail boxes using imapsync, and i setup fetchmail using zentyal gui, but no new mails appear in the SOGo webpage,i see onlty the ones that i've imported from exchange
Title: Re: Where did External mail recieve go?
Post by: Torsten73 on July 31, 2014, 09:35:05 pm
Sorry about having no time momentally. I will give you some screenshots. My df.eu mail account has normally around 200 Mails. Now after a few days (with shutdown by night) it exploded to over 1800
and i get bounce messages from no-ip.com...

Break is maybe the wrong word for it.
But i did earlier in 3.4 a bugreport. It was nearly the same problem, but with a littel difference in settings.
today i say don´t delete mails but didn´t activate collect mails. Last bug report i had collect mails activated and don´t delete mails.

the reason is i don´t trust momentally the zentyal system and so the isp mail store is my mail backup  ;)

Thats the old ticket https://tracker.zentyal.org/issues/455 (https://tracker.zentyal.org/issues/455)
does it make sense to reactivate it?
Title: Re: Where did External mail recieve go?
Post by: papajulio on August 01, 2014, 08:21:51 am
Torsten73, better create a new one for 3.5 with the screenshoots you just attached and the detail explanation of the steps you take, what you expect and what happens.

Thank you very much for your collaboration!! :)
Title: Re: Where did External mail recieve go?
Post by: aradur on August 02, 2014, 12:21:43 pm
For me it is not working too. It thems that fetchmail works fine and receives well. But the mails fetchmail receives allways bounced by dovecot

Please see screenshot.
Title: Re: Where did External mail recieve go?
Post by: StuartNaylor on August 02, 2014, 10:12:35 pm
Just a thought but does fetchmail need to deliver direct to the mta rather than just passing them smtp?

That way it knows what are duplicates?
Title: Re: Where did External mail recieve go?
Post by: AbsyntH on August 02, 2014, 11:00:34 pm
Just a thought but does fetchmail need to deliver direct to the mta rather than just passing them smtp?

That way it knows what are duplicates?

same problem...forwarding loop
Title: Re: Where did External mail recieve go?
Post by: StuartNaylor on August 02, 2014, 11:07:22 pm
Not sure why as I had a test VM where I did the updated roundcube install with just dovecot and hand scripted fetchmail.

The zentyal implementation looks identical? But I guess is this only with sogo?
Title: Re: Where did External mail recieve go?
Post by: AbsyntH on August 03, 2014, 10:12:10 pm
why are there so many fetchmail's processes ?

 ps -aux |grep fetchmail
root     22647  0.0  0.0  67876  1620 ?        Ss   22:09   0:00 /bin/su fetchmail -c/usr/bin/fetchmail --nodetach -f /etc/ebox-fetchmail.rc
fetchma+ 22654  0.0  0.0   4444   392 ?        Ss   22:09   0:00 sh -c /usr/bin/fetchmail --nodetach -f /etc/ebox-fetchmail.rc
fetchma+ 22655  0.2  0.0  41316  3424 ?        S    22:09   0:00 /usr/bin/fetchmail --nodetach -f /etc/ebox-fetchmail.rc
Title: Re: Where did External mail recieve go?
Post by: Torsten73 on August 04, 2014, 10:13:17 pm
Torsten73, better create a new one for 3.5 with the screenshoots you just attached and the detail explanation of the steps you take, what you expect and what happens.

Thank you very much for your collaboration!! :)
Sorry i am out of time for doing that.
Title: Re: Where did External mail recieve go?
Post by: Torsten73 on August 13, 2014, 02:14:37 pm
I can´t see that anyone has done a bug report about it. i reactivated the old one under https://tracker.zentyal.org/issues/455 (https://tracker.zentyal.org/issues/455)

Hopefully that something will happens.
Title: Re: Where did External mail recieve go?
Post by: Torsten73 on August 13, 2014, 06:56:24 pm
Just a thought but does fetchmail need to deliver direct to the mta rather than just passing them smtp?

That way it knows what are duplicates?
with duplicates i mean that every existing mail will be cloned / copied again and again. So i have the messsage not 1 times, it exists on the webmailer again and again. they looks similar, but when you look nearer you see, that its and bounce from MTA with the same mail. 
Title: Re: Where did External mail recieve go?
Post by: bertalanimre on August 21, 2014, 01:11:53 pm
Unfortunatelly, the fetchmail has a very problematic downside. It checks only if the mail has the "read" or "unread" flag in it. If it has "unread" then it will download the message and modify the mails flag on the source server to "read". If you tell fetchmail to keep it "unread" it will always download the message whenever it is downloaded yet or not. That's is why we can have infinite copy of our mails.

Still waiting for a good alternative. Getmail is not good, since it is scanning all the mails in the postbox. In case of 50-60 user with over 8000 mail in each postbox it is just too much.