Koozali.org: home of the SME Server

pop3 force single user session

Offline magwm

  • *
  • 159
  • +0/-0
  • SmeLover
    • Gadis Tourist Service Italia SRL
pop3 force single user session
« on: March 31, 2016, 04:52:37 PM »
hello folks! long time no see..

I have the following issue: my sme box has several "general" accounts which email is downloaded by more than one person. for example, 4 people download info@domain.com and this works quite wel, generally speaking.

however.
as you could predict, it happens that the same email message gets downloaded more than one time, if pop sessions overlap (I suspect). this intensifies when the server is under load.

So I would like to know: is it possible to silently force 1 session per USER (not per ip! there are 2 terminal servers with many users as well) so that that session downloads and deletes all available email messages?
preferably this should put on "hold" other sessions, so that their outlook does not lament a connection loss.

any ideas?

ciao from Italy, 8)
Michel

MagWm

Offline brianr

  • *
  • 990
  • +2/-0
Re: pop3 force single user session
« Reply #1 on: March 31, 2016, 05:02:16 PM »
I use Imap in these circumstances, resulting in no strange effects due to concurrent access.
Brian j Read
(retired, for a second time, still got 2 installations though)
The instrument I am playing is my favourite Melodeon.
.........

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: pop3 force single user session
« Reply #2 on: March 31, 2016, 05:08:04 PM »
I agree 150% with Brian.. imap is the way to go

Offline magwm

  • *
  • 159
  • +0/-0
  • SmeLover
    • Gadis Tourist Service Italia SRL
Re: pop3 force single user session
« Reply #3 on: March 31, 2016, 05:22:01 PM »
but.. imap would leave the messages on the server..?  I don't want that..
MagWm

Offline brianr

  • *
  • 990
  • +2/-0
Re: pop3 force single user session
« Reply #4 on: March 31, 2016, 05:25:33 PM »
but.. imap would leave the messages on the server..?  I don't want that..

Why not?  They can be deleted by any of the users if required.
Brian j Read
(retired, for a second time, still got 2 installations though)
The instrument I am playing is my favourite Melodeon.
.........

Offline magwm

  • *
  • 159
  • +0/-0
  • SmeLover
    • Gadis Tourist Service Italia SRL
Re: pop3 force single user session
« Reply #5 on: March 31, 2016, 05:27:04 PM »
and, everyone would see all messages in that inbox.. I only want them to see the messages that they are working on..

imap is perfect for when they are on the road, so they can see messages that have not yet been downloaded.

anyway, the question was: is it possible to tweak pop3 (authentication ?) so that only one session per account can download messages?

ciao, M
MagWm

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: pop3 force single user session
« Reply #6 on: March 31, 2016, 05:28:45 PM »
you are seeing things from the wrong perspective IMO

IMAP is really the way to go

Offline magwm

  • *
  • 159
  • +0/-0
  • SmeLover
    • Gadis Tourist Service Italia SRL
Re: pop3 force single user session
« Reply #7 on: March 31, 2016, 06:31:22 PM »
yes, I know that pop3 gets misused here. the general accounts are used to download round-robin-like and then forwarded to the correct person responsible. this approach has worked for some 20 years right now.. ;)  the system has great failover proprieties, as in,  person x is not there but work on this item continues.

I couldn't give 4 people give 400 emails/day (+ 200 spam) to look at and still pretend they work them, better 100 each.. or even 110 if 10 are doubles..

so no joy to limit qmail pop3 sessions?
thats's a pity.

M
MagWm

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: pop3 force single user session
« Reply #8 on: April 03, 2016, 04:19:48 PM »
You should look at proper ticketing systems, which allow tasks to be allocated to people, notes added, etc. RT is a well known one. OTRS I've heard good things about.

Good ticketing systems allow new incoming messages to trigger creation of a new ticket. Most of the workflow is done via web access.

Offline magwm

  • *
  • 159
  • +0/-0
  • SmeLover
    • Gadis Tourist Service Italia SRL
Re: pop3 force single user session
« Reply #9 on: April 04, 2016, 10:13:04 AM »
thanks Charlie, yes we do use a ticketing system where applicable. but that still does not ease the pain of duplicate emails in outlook. And also, outlook is integrated in our homegrown CRM applications so I still need the emails downloaded and processed.

so, if it is not possible to massage qmail-pop3d into forcing round-robin-like behavior to pop3 clients, i will go on and try (again) to convince outlook to properly close its sessions somewhat earlier. (this does not work if people manually sync however..)

ciao!
MagWm

Offline mmccarn

  • *
  • 2,656
  • +10/-0
Re: pop3 force single user session
« Reply #10 on: April 04, 2016, 02:38:27 PM »
If you need a strictly round-robin distribution you could:
* create a new pop3 folder or account for each operator
* re-configure each operator to use their own, dedicated pop3 account/folder
* write a shell script to move new emails from <currentmailbox>/new to each operator in turn.

Alternatively, the script could check the number of emails in each operator's inbox and assign new emails in a way that keeps all operators at the same queue size.




Offline Daniel B.

  • *
  • 1,700
  • +0/-0
    • Firewall Services, la sécurité des réseaux
Re: pop3 force single user session
« Reply #11 on: April 04, 2016, 03:03:46 PM »
Another approach would be to create one dedicated account per operator, and change the email address into a pseudonym. Then, add a small cron task which update the target account of the pseudonym at fixed interval (say, every 15minutes)
C'est la fin du monde !!! :lol:

Offline magwm

  • *
  • 159
  • +0/-0
  • SmeLover
    • Gadis Tourist Service Italia SRL
Re: pop3 force single user session
« Reply #12 on: April 04, 2016, 03:33:41 PM »
wheehaaw!! now there are some new ideas to work on. thanks guys!!

and, just while thinking.. hm. these approaches need to be aware which users are "in" today/now, otherwise some messages will remain hidden in the "away person" box only to be delivered when he/she returns. hmm.
MagWm

Offline Daniel B.

  • *
  • 1,700
  • +0/-0
    • Firewall Services, la sécurité des réseaux
Re: pop3 force single user session
« Reply #13 on: April 04, 2016, 03:37:02 PM »
Are you using the vacation contribs to manage away responses ? If you do, the script updating the pseudo target account could check if the user is absent, and skip it. Else, you'll need another way to tell the system when users are away (a simple idea is to create a group, with all the operators, and manually remove users from the group when they are on vacation for example)
C'est la fin du monde !!! :lol:

Offline magwm

  • *
  • 159
  • +0/-0
  • SmeLover
    • Gadis Tourist Service Italia SRL
Re: pop3 force single user session
« Reply #14 on: April 04, 2016, 04:04:31 PM »
bonjour Daniel,
for the "generic" addresses, I use no vacation messages, as there must always be someone to "man" the area/address.
for the personal addresses yes, I do use vacation messages, but only if they are away for many days.

you see, for one area on a normal day it might be like
Code: [Select]
user     7am     10am    13pm     15pm     18pm    20pm
user1    in----------------------out
user2               in-----------------------out
user3                                    in----------------out
user4               in-------out         in-------------out

I would not want to manually change presence info like 6 times a day..

but.. let's say area@domain.it is the general address and user1, user2 and user3 the personal addresses,
it could indeed be possible to do area->user1 and then move all messages around between personal mailboxes, with intervals of like 3 minutes, like

message collect in user1
every 3m-> move (x) messages user1 to user2
every 3m-> move messages user2 to user3
every 3m-> move messages user3 to user4
every 3m-> move messages user4 to user1

and make the various outlooks download every 10 minutes..

it might be that the result feels adequately randomized..

is moving a message as simple as moving it from one users/user/Maildir/cur directory to another?

ciaoo

M
MagWm