Koozali.org: home of the SME Server

Mailsorting - Cannot get geekmode to work

Offline CmdLn

  • **
  • 57
  • +0/-0
Mailsorting - Cannot get geekmode to work
« on: July 04, 2017, 08:38:12 AM »
I have enabled geekmode for a number of "system" accounts that need advanced procmail recipes. When I rebooted yesterday all my custom .procmailrc files were overwritten with defaults it seems. Am I missing something?

Offline ReetP

  • *
  • 3,731
  • +5/-0
Re: Mailsorting - Cannot get geekmode to work
« Reply #1 on: July 04, 2017, 09:14:45 AM »
You haben't told us what you did or what happened prior to this.

A recent update to the contrib pehaps?

There was a fix to allow sorting admin mail. Not sure it should wreck your existing setups though?

See:
https://bugs.contribs.org/show_bug.cgi?id=9737
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline CmdLn

  • **
  • 57
  • +0/-0
Re: Mailsorting - Cannot get geekmode to work
« Reply #2 on: July 04, 2017, 11:53:03 AM »
I require certain system mail accounts to reject mails larger than 4MB. This seems to be beyond the standard mailsorting contribs capabilities.

The mailsorting documentation says you can prevent template overwrites by enabling geekmode.

$ db accounts setprop USERNAME geekmode enabled


I did this for all my system accounts and have double checked that the db config records still show this field after the reboot, however my custom .procmailrc entries are gone.

Offline ReetP

  • *
  • 3,731
  • +5/-0
Re: Mailsorting - Cannot get geekmode to work
« Reply #3 on: July 04, 2017, 12:32:24 PM »
I require certain system mail accounts to reject mails larger than 4MB. This seems to be beyond the standard mailsorting contribs capabilities.

The mailsorting documentation says you can prevent template overwrites by enabling geekmode.

$ db accounts setprop USERNAME geekmode enabled


I did this for all my system accounts and have double checked that the db config records still show this field after the reboot, however my custom .procmailrc entries are gone.

You still haven't told us what you did before this occurred.

In the words of Mr Zamboni of these parts, this is an X and Y problem: http://xyproblem.info/

We can't help you if you don't provide something for us to go on....


B. Rgds
John

...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline CmdLn

  • **
  • 57
  • +0/-0
Re: Mailsorting - Cannot get geekmode to work
« Reply #4 on: July 04, 2017, 01:04:25 PM »
We have a Windows based web system which pops mail from our SME server. Data from these mails is extracted and stored in an MS-SQL database and used is some way by the system. Mails bigger than 4MB cause issues for the system, I dont know what the issues are but I will have to ask the developers if this info is really needed to solve my problem. I have been asked to bounce messages larger than 4MB to system mail accounts but not mails to standard email accounts.

I have been able to do this with mailsorting and custom .procmailrc, however after a system reboot my custom .procmailrc is gone even though I have set geekmode for these users.

I would like to know how to have custom .procmailrc files that dont get overwritten, but still have mailsorting contrib work because we also use the web driven mailsorting for reasons which I am sure is not relevant to this question.

Offline CmdLn

  • **
  • 57
  • +0/-0
Re: Mailsorting - Cannot get geekmode to work
« Reply #5 on: July 04, 2017, 01:11:58 PM »
I have added the following code to the system .procmailrc under  #--------- user rules -----------

SEDSCRIPT='0,/^$/ s//\nYour message was rejected because its too big [Max=4MB]\n/'
MAILADDR=me@nowhere

:0
* > 4000000
| formail -rk  \
| sed "$SEDSCRIPT" \
| $SENDMAIL -t




Offline CmdLn

  • **
  • 57
  • +0/-0
Re: Mailsorting - Cannot get geekmode to work
« Reply #6 on: July 04, 2017, 01:22:44 PM »
I have also tried getting around this by adding

# ---- include custom user rules from .procmailrc-custom -------
INCLUDERC=$PMDIR/.procmailrc-custom

to /etc/e-smith/templates-users-custom/.procmailrc/50custom

Then in the homedir of a user that I dont want overwritten I have added my procmail recipe to .procmailrc-custom

For some reason the includes recipe is ignored.

Offline ReetP

  • *
  • 3,731
  • +5/-0
Re: Mailsorting - Cannot get geekmode to work
« Reply #7 on: July 04, 2017, 01:47:35 PM »
And you STILL haven't told us what you did that might have made a change to your server....

I really don't care that much about all the whys and wherefores of your procmails or big mails or any mails, because we can't cure ANY of that unless we find out WHAT CHANGED !!!!!

So, go back and tell us what happened prior to things changing. Tell us about the simple history of this server, and what you did to it just before things changed. You rebooted. Why ?
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline CmdLn

  • **
  • 57
  • +0/-0
Re: Mailsorting - Cannot get geekmode to work
« Reply #8 on: July 04, 2017, 02:24:43 PM »
I am not sure I understand your line of questioning?

I rebooted because server-manager required a reconfigure/reboot after installing an update. I think an update to sudo, but I didnt make a note.

The .procmailrc rules were added just a few days ago and this is the first reboot since then.

Offline Stefano

  • *
  • 10,839
  • +2/-0
Re: Mailsorting - Cannot get geekmode to work
« Reply #9 on: July 04, 2017, 03:08:50 PM »
ok..

how did you create your .procmailrc custom files?
which updates did you install?

would you mind to take a look at the logs and (really) start helping us to help you? ATM you're just saying us "it doesn't work"

Offline CmdLn

  • **
  • 57
  • +0/-0
Re: Mailsorting - Cannot get geekmode to work
« Reply #10 on: July 04, 2017, 03:49:08 PM »
The .procmailrc files were already in the home folders for all users. Maybe installed by mailsorting contrib or maybe they are just there by default? I edited them with vi and made the changes mentioned before, in the place mentioned before and in each users home folder that I wanted a custom procmail recipe.

The server is SME 9.2 and up to date according to server-manager. I assume that means everything that could possibly be updated is updated to the latest version?

Does "geekmode" do what I think it does which is protect custom .procmailrc files from being overwritten by templated .procmailrc files?

Any idea what log file I should look at to shed some light?


Offline Stefano

  • *
  • 10,839
  • +2/-0
Re: Mailsorting - Cannot get geekmode to work
« Reply #11 on: July 04, 2017, 04:05:06 PM »
well, it seems you hit a bug..

please open a bug, asap, thank you

Offline ReetP

  • *
  • 3,731
  • +5/-0
Re: Mailsorting - Cannot get geekmode to work
« Reply #12 on: July 04, 2017, 04:11:33 PM »
Note: A little bit of history will go a long way to helping :-)

Think I have sussed it - I'll open a bug and post a patched file to test as I can['t attach one here

Give me 10 minutes
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline ReetP

  • *
  • 3,731
  • +5/-0
Re: Mailsorting - Cannot get geekmode to work
« Reply #13 on: July 04, 2017, 04:16:06 PM »
https://bugs.contribs.org/show_bug.cgi?id=10366

try the patched file and see what happens please.

If that fixes it I'll push a patch to CVS
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline CmdLn

  • **
  • 57
  • +0/-0
Re: Mailsorting - Cannot get geekmode to work
« Reply #14 on: July 04, 2017, 06:31:49 PM »
The patch works as far as I can tell. Thanks.

Offline ReetP

  • *
  • 3,731
  • +5/-0
Re: Mailsorting - Cannot get geekmode to work
« Reply #15 on: July 04, 2017, 06:33:43 PM »
Can you note that on the bug please?
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation