Mail Server Mail Relaxer: Hibernation while running DSM Mail Server and Mail Station

Status
Für weitere Antworten geschlossen.

Basalt

Benutzer
Mitglied seit
06. Mai 2012
Beiträge
255
Punkte für Reaktionen
0
Punkte
0
Interesting, so almost exactly every 5 or 10 minutes you get this log.
Who could be triggering this event?
- e-mail client => check your devices, especially smart phones, especially Android types (switch them OFF)
- Any unnecessary port portwarding in your router?
- any open mail related port in your firewall?
- (roundcube => Cannot be running, otherwise Mail Relaxer would not stop the mail processes)
- (procmail trying to deliver an e-mail to an internal Syno user => AFAIK procmail is not a daemon)

- ...anything else?...

/Erik
 

Basalt

Benutzer
Mitglied seit
06. Mai 2012
Beiträge
255
Punkte für Reaktionen
0
Punkte
0
Mail Relaxer version 1.2 is out.
Updated to get it working again with the latest Mail Station / Mail Server under DSM 5.0
I should also run fine under DSM 5.1, although I did not test it.

Summary of changes:
  • Required change to align daemon with Mail Station 20141031-0213
  • Restricted start/stop retries to 3
  • Tested with DSM 5.0-4528

The package is available on SourceForge.
Note that the package does not contain the Synology digital signature, please set Package Center Trust level to "Any Publisher" to install

Best regards,
Erik
 

bvrulez

Benutzer
Mitglied seit
19. Feb 2014
Beiträge
292
Punkte für Reaktionen
0
Punkte
0
Hi, is this thread still relevant? I stumbled upon it while I was searching for an explanation of how to start Mail Server via SSH terminal after it got stopped from the task scheduler of the web-GUI. Obviously, neither "synoservice --start pkgctl-MailServer" or "--enable" can start it, nor "/var/packages/MailServer/scripts$ sudo sh start-stop-status start" will do the job. Perl is running. What am I missing?
 

hoewer

Benutzer
Mitglied seit
29. Nov 2016
Beiträge
15
Punkte für Reaktionen
6
Punkte
3
I have the same issue as bvrulez. I tried to adapt the script to meet the DSM6 requirements, but up to now I had no success since I haven't figured out how to restart the Mail Server correctly.
I highly appreciated the functionality of mail relaxer. My system is passive for long periods and therefore the script came very useful up to DSM5.
Is the packet's publisher still active and can provide help?
 

hoewer

Benutzer
Mitglied seit
29. Nov 2016
Beiträge
15
Punkte für Reaktionen
6
Punkte
3
Hi all,

I changed the original script to make it compatible with DSM 6.x. I changed the following:

Corrected entries in the directories section:
WebMailDir="/var/packages/MailStation/target"
WebMailExt=${WebMailDir}/mail/ext
WebMailConf=${WebMailDir}/mail/config/config.inc.php
FetchBin=${WebMailDir}/bin/synofetch

I had an issue with the syntax of the sed command due to a different version of sed. Maybe it's just caused by some iPKG Packages I'm using, but the change should work on all platforms. I changed
sed 's/.\{6\}$//``'
to: sed 's/.\{6\}$//'

I also created a patched installation package, based on version 1.2. You may download it here https://gofile.io/?c=hyGXKk or apply the changes manually.

Hope this helps anyone who's moving to DSM6 and missing the Mail Relaxer. Many thanks to the original developer.
 

bvrulez

Benutzer
Mitglied seit
19. Feb 2014
Beiträge
292
Punkte für Reaktionen
0
Punkte
0
Thank you very much. I have a question regarding Mail Station. Mail Relaxer just works with Mail Station using POP3 to check for mails on the Relay Server. Does this prevent from hibernation? Meaning: Does Mail Station have to be set to not check for mails over POP3 during certain times?
 

hoewer

Benutzer
Mitglied seit
29. Nov 2016
Beiträge
15
Punkte für Reaktionen
6
Punkte
3
Hi bvrulez,

Short Answer:
No, You don't have do deactivate POP3-fetching manually. You should configure it as you require it.

Long Answer:
It is Mail Relaxers job to deactivate the mail processes and therefore the POP3-fetching while they are not required. This way hibernation is made possible for your Syno (regardless of other processes possibly interfering hibernation).
Mail Relaxer checks wether a mail client or webmail access is currenlty active. If this isn't the case, it waits a while (configurable in the script) before it stops the mail processes (and therefore POP3-fetching). If a Mail Client or Webamail accesses your Syno again, mail processes are restartet and POP3 mails are checked again.

Recommendation:
First you should ensure that your Syno hibernates without the mail processes. Stop MailServer and Mailstation and checks wether your Diskstation hibernates. If it does, restart MailServer and Mailstation, activate Mail Relaxer and check for hibernation again. If it enters hibernation, you're done.
If it doesn't hibernate - even if no mail clients are active - check /var/log/messages for Mail Relaxers activity and adapt the script where required.

Good luck ;-)
 

bvrulez

Benutzer
Mitglied seit
19. Feb 2014
Beiträge
292
Punkte für Reaktionen
0
Punkte
0
Thank you very much for the detailled answer, I really appreciate your effort! Mail Relaxer is now running successfully on my system. As a sidenote I wanted to say that I have CloudStation Drive on the same server, too. I thought that CloudStation prevents from Hibernation, but this seems not to be the case. Hibernation is working fine with Mail Relaxer installed. Thanks again for updating the skript!
 

hoewer

Benutzer
Mitglied seit
29. Nov 2016
Beiträge
15
Punkte für Reaktionen
6
Punkte
3
You're welcome. It's nice to see that it's valued if one is sharing the results of his efforts. That's how user boards like this are working... ;-)
 

bvrulez

Benutzer
Mitglied seit
19. Feb 2014
Beiträge
292
Punkte für Reaktionen
0
Punkte
0
Just wanted to share my experience with updating to "DSM 6.1-15047 Update 2" while having Mail Relaxer running: My Mail Server was not sending out mails after the update. It was putting these files into "sent" on my IMAP but the log did not show any real sents. I figured this out after a lot of my emails where not reaching its destination. Had to manually stop Mail Relaxer, Mail Station and Mail Server and restart all again. Now, it works fine I guess.

Of course sharing is valued! :) Did you make your changes to the file "start-stop-status"? Would it be usefull to create a GIT with the original code and your changes so people could easily adapt it to further changes in the DSM later on?

Cheers,
Ben
 

sebastians

Benutzer
Mitglied seit
15. Nov 2016
Beiträge
6
Punkte für Reaktionen
0
Punkte
1
Hi, I just tried to use Mail Relaxer 1.2 on DSM 6.1.4-15217 Update 3. After a short period, Mail Relaxer changes its status from running to stopped. I have seen that hoewer posted a changed script for compatibility with DSM 6.x in january 2017, but the file is down. Could somebody provide a download link for a working Mail Relaxer script for DSM 6.x?

Thanks!
 

bvrulez

Benutzer
Mitglied seit
19. Feb 2014
Beiträge
292
Punkte für Reaktionen
0
Punkte
0
Is Mail Relaxer still workin in 6.2 ? It is running on my DS214SE, but the system never goes do sleep.
 

Basalt

Benutzer
Mitglied seit
06. Mai 2012
Beiträge
255
Punkte für Reaktionen
0
Punkte
0
I never tried, still running DSM 5 myself.
You could give it a try though.
 

hoewer

Benutzer
Mitglied seit
29. Nov 2016
Beiträge
15
Punkte für Reaktionen
6
Punkte
3
Hi bvrulez,
I'm on 6.2.1 now, and mail relaxer still works like charm. On 6.2. I also didn't regognize any changes in behaviour. No changes to the scripts have been required.
Hope you can solve your problem otherwise...
 

bvrulez

Benutzer
Mitglied seit
19. Feb 2014
Beiträge
292
Punkte für Reaktionen
0
Punkte
0
Thanks for the answer. It works on my system now, also. I think I had the Roundcube Mail Client running which was probably preventing it from hibernation.
 

bvrulez

Benutzer
Mitglied seit
19. Feb 2014
Beiträge
292
Punkte für Reaktionen
0
Punkte
0
My DS214se is not hibernating any more. It runs 6.2.1-23824 Update 6. If I delete the port forwarding from my router to the DSM for Mail Station it goes into hibernation. I run a Mail Server with a mail relay via Strato Webhosting. But I don't know the details of how they do the recording (A, MX) for me to beeing able to receive all mail, even when I am offline for a short period. Mail Relaxer worked fine in the past.
 

bvrulez

Benutzer
Mitglied seit
19. Feb 2014
Beiträge
292
Punkte für Reaktionen
0
Punkte
0
After having posted here already twice I will add a third one to clear things up. I have an own domain and running a Mail Server with IMAP for my clients. Sending mail works via a Relay at Strato.com. The mails get picked up from Strato by Mail Station (Roundcube) with POP3. In RC you can adjust the frequency for picking them up. This was at 5 Minutes. In the past I had Mail Station shut down and my mails got picked up anyway. I am not sure how this worked. After the last two updates of DSM I had to restart Mail Station and change something in the configuration (login with admin) to make it generate a new config file. This was a known bug discussed in the forum. Now the situation is that I HAVE to run Mail Station to get my mails.

I just wanted to clearify this process and to make sure that Mail Relaxer is still a very usefull and needed component since there is no way of configuring Mail Station to pause the POP3. I suspect this is the only reason my Synology is not hibernating sometimes and I am glad this package exists.

Also, I wanted to add that the package probably needs to be restarted after an update of the DSM.
 
Zuletzt bearbeitet:

jackrip5

Benutzer
Mitglied seit
02. Jul 2010
Beiträge
1
Punkte für Reaktionen
0
Punkte
1
Hi all,

I changed the original script to make it compatible with DSM 6.x. I changed the following:

Corrected entries in the directories section:
WebMailDir="/var/packages/MailStation/target"
WebMailExt=${WebMailDir}/mail/ext
WebMailConf=${WebMailDir}/mail/config/config.inc.php
FetchBin=${WebMailDir}/bin/synofetch

I had an issue with the syntax of the sed command due to a different version of sed. Maybe it's just caused by some iPKG Packages I'm using, but the change should work on all platforms. I changed
sed 's/.\{6\}$//``'
to: sed 's/.\{6\}$//'

I also created a patched installation package, based on version 1.2. You may download it here https://gofile.io/?c=hyGXKk or apply the changes manually.

Hope this helps anyone who's moving to DSM6 and missing the Mail Relaxer. Many thanks to the original developer.

I'm on DSM 6.2 and have read the post from hoewer with his modification of the script.
As the modified package isn't available anymore, i have a little question.
Is is correct that the modifications have to be done in the file /var/packages/mail_relaxer/target/bin/relax_mailprocd ?
Is that enough or must it be starter/registered in some kind ?

Thx
 
Status
Für weitere Antworten geschlossen.
 

Kaffeautomat

Wenn du das Forum hilfreich findest oder uns unterstützen möchtest, dann gib uns doch einfach einen Kaffee aus.

Als Dankeschön schalten wir deinen Account werbefrei.

:coffee:

Hier gehts zum Kaffeeautomat