POP3 / GetMail stops fetching on any mailbox

Hi there,

we actualy have 3 Neth-Installations running. Two of them work fine, the third makes trouble.

We fetch mails for 8 mailboxes from provider with pop3 / getmail and sporadicaly it forgots to fetch mails from a mailbox. It is not always the same mailbox. If it happens, the other mailboxes get there mails as always. After reboot all mails get fetched.

This error occurs sometimes after 3 days, sometimes after a month.

There are no errors in the logs, cron continues to call the mailboxes (according to the log) but getmail no longer fetches for the mailbox in question.

There are also no errors on messages-log. But here I can see, that “trouble-mailbox” has no items, if the error occurs. It seems, getmail is no more started for this mailbox, but cron-log says, it was started. :-/

I thank you for any help. TK

Hi @tk_ksh and welcome to NethServer community forum!

Ok, could you attach an excerpt of /var/log/maillog? Can you see any interesting line there?

As Steph says: “in logs we trust” :smile:

Out of curiosity: why do you need getmail? Can you tell why it was chosen? Did you evaluate to configure NethServer as MX to replace the pop3 hosted domain?

I’m interested in getmail real world usage scenarios, because it usually leads to issues with mail. I promote the adoption of SMTP. SMTP is safe, POP3 and IMAP are weak if used to transport messages, expecially if getmail pairs them with a mail filter.

1 Like

Some reason:

  • You can’t modify MX record of domain
  • You can’t modify configuration of your router
  • You have mail addresses on various domains (your domains or @gmail.com @yahoo.com @sarcazzo.com) and you want to concentrate your mail on a one place
  • PEC (Italians know what I’m talking about)
  • The company that manages the domain refuses to redirect the MX record
1 Like

Hello, thanks for your help.

I would like to pick up the emails via pop3 because I have such a buffer in transit. Regardless of that, the pop3 collector is there for that.

In /var/log/maillog there is no entry for the relevant email from the time of the failure, but for all other email addresses there is. However, the getmail call is documented in /var/log/cron. I think that the fault with the cron is to be found. It seem’s not to start getmail for the unusual mailbox, or getmail itself “hangs”.

How can I check whether getmail starts at all for the email address in question?

Did you check if there is a getmail process hanged around? Maybe

 pgrep getmail

I cannot give you an exact command now (maybe @saitobenkei can help here) but it should be possible to extract the same command the cronjob usually runs and test what it does from a command line shell…

Are those mailboxes on gmail?

I’m having a similar problem with a customer and he’s got maIlboxes on gmail or is mail management on gmail servers even with a different domain?

The problem seems to be gmail (who would have thought?).
It can happen that rspamd rejects the email just downloaded with a soft-fail (maybe because it’s busy to so other things).

At that point getmail is instructed not to delete the mail and not to mark it as downloaded so that it can be downloaded at the next round.

Gmail, who is an asshole, thinks instead that the email has already been downloaded and he doesn’t propose it again for the download so that email seems to be “lost”.

To avoid all this, in the pop3 connector, in the “username” field, try adding “recent:” before the username.

For example:

if in the POP3 connector your username is


replace it with


Also read here for more configurations on gmail:

I have the same problems in only one server
if i type ps ax|grep flock i see various getmail proceess that seems in standby

Today with the neth version 7.8 I had the problem again that the mails could not be picked up from any mailbox. I found a hanging process via pgrep getmail. With pkill getmail I was able to finally end the process. I have now created a cronjob that regularly ends the getmail processes in coordination with the mail collection.