Koozali.org: home of the SME Server

Pre upgrade ponderings

Offline ReetP

  • *
  • 3,291
  • +5/-0
Re: Pre upgrade ponderings
« Reply #30 on: September 08, 2021, 04:42:37 PM »
I'm trying to understand why email isn't being collected from my POP box under the "email reception settings".  Is there a log which would show if the current settings are being rejected, and why ?

Check the difference between servers - is this the same on both?

Code: [Select]
config show fetchmail
Logs for POP collection from your server:

Code: [Select]
tail -f /var/log/maillog
...
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 Jean-Philippe Pialasse

  • *
  • 2,166
  • +8/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: Pre upgrade ponderings
« Reply #31 on: September 08, 2021, 05:45:17 PM »
without more explanation logs to check would be

dovecot
qpsmtp
fetchmail

Offline david000

  • ***
  • 150
  • +0/-0
Re: Pre upgrade ponderings
« Reply #32 on: September 09, 2021, 03:27:38 PM »
Thank you ReetP and Jean-Philippe,

I've spent a bit of time looking at this and rebuilt the server so that I could try accessing the 'live' pop box without making any modifications. However no change.

I am seeing a Cron email from Cron <root@sme10> /etc/startmail:

Code: [Select]
/var/lock/fetchmail/fetchmail.pid: No such file or directory
fetchmail: lock creation failed.

The maillog on the rebuild server has a repeated entry regarding spam checking so presumably no an issue. I've tried turning off spam checking just in case with no change:

Code: [Select]
Sep  9 12:43:12 sme10 spamd[5275]: config: configuration file "/usr/share/spamassassin/73_sandbox_manual_scores.cf" requires version 3.004004 of SpamAssassin, but this is code version 3.004005. Maybe you need to use the -C switch, or remove the old config files? Skipping this file
I've tried to check the other logs but I assume they are empty as the tail command doesn't open them, but they are in the log folder.

When I list the log directory there is no fetchmail log.   
I'm unable to see if the server is trying to make a connection or what the error code might be.


On this fresh build I've not installed any contribs,  although on the last build and test I did install:

DiskUsage
Fetchmail (to enable the 'Mail Retrieval' button in server manage and allow collection of mail from 2nd pop box.
using the command in the documentation:
Code: [Select]
yum --enablerepo=smecontribs install smeserver-fetchmail
signal-event console-save

In addition:
Code: [Select]
# /sbin/e-smith/audittools/newrpms
Returns the following for my working production server. 

Code: [Select]
Loaded plugins: fastestmirror, post-transaction-actions, smeserver
Loading mirror speeds from cached hostfile
 * smeaddons: www.mirrorservice.org
 * smeos: www.mirrorservice.org
 * smeupdates: www.mirrorservice.org
Extra Packages
imapsync.noarch                          1.684-1.el6                @epel
libmcrypt.x86_64                         2.5.8-9.el6                @smecontribs
perl-Data-Uniqid.noarch                  0.12-2.el6                 @epel
perl-IO-Socket-INET6.noarch              2.72-1.of.el6              @smecontribs
perl-IO-Tee.noarch                       0.64-1.el6                 @epel
perl-Mail-IMAPClient.noarch              3.37-1.el6                 @epel
perl-NTLM.noarch                         1.09-1.el6                 @epel
perl-Parse-RecDescent.noarch             1.965-1.el6                @epel
php-kolab-net-ldap3.noarch               1.0.7-2.el6                @smecontribs
php-pear-Mail-mimeDecode.noarch          1.5.5-1.el6                @smecontribs
php-pear-Net-IDNA2.noarch                0.1.1-3.el6                @smecontribs
php-pear-Net-LDAP2.noarch                2.1.0-1.el6                @smecontribs
php-pear-Net-Sieve.noarch                1.3.4-1.el6                @smecontribs
roundcubemail.noarch                     1.1.3-101.el6.sme          @smecontribs
roundcubemail_plugins.noarch             1.2-2.el6.sme              @smecontribs
smeserver-diskusage.noarch               0.2.0-2.el6.sme            @smecontribs
smeserver-dovecot-extras.noarch          0.1.1-2.el6.sme            @smecontribs
smeserver-fetchmail.noarch               1.6-15.el6.sme             @smecontribs
smeserver-roundcube.noarch               1.2-9.el6.sme              @smecontribs
sqlite.x86_64                            3.7.17-9.el6.sme           @smecontribs

The server is connecting to the internet as I'm able to send outgoing mail to the pop box I'm trying to collect from, but oddly not to email accounts outside of my 'reseller' hosting server. [Fixed by setting a valid 'from' email address in Horde !]

Could it be that a missing contrib is the issue ?  It seems that imapsync was installed to try and move some mail some time ago and I wonder of Dovecot-extras was related as we don't use IMAP.

I've since istalled fetchmail and diskusage but no change.  However the cron email message above is  is repeated 3 times, which matches the number of pop accounts to be checked as set in "email>email reception settings" and "mail retrieval".



 



« Last Edit: September 09, 2021, 05:49:58 PM by david000 »

Offline ReetP

  • *
  • 3,291
  • +5/-0
Re: Pre upgrade ponderings
« Reply #33 on: September 09, 2021, 06:08:37 PM »
Remove the important bits from this and then paste here:

Code: [Select]
cat /etc/fetchmail
...
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,291
  • +5/-0
Re: Pre upgrade ponderings
« Reply #34 on: September 09, 2021, 06:10:49 PM »
Ooooh and actually this too:

Code: [Select]
cat /etc/startmail
...
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,291
  • +5/-0
Re: Pre upgrade ponderings
« Reply #35 on: September 09, 2021, 06:12:44 PM »
HMmm.

i can see this

[root@files startmail]# ll /var/lock

lrwxrwxrwx. 1 root root 11 Oct 16  2020 /var/lock -> ../run/lock

[root@files startmail]# ll /var/lock/fetchmail

ls: cannot access /var/lock/fetchmail: No such file or directory

That might be the issue. Not directory.
...
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 david000

  • ***
  • 150
  • +0/-0
Re: Pre upgrade ponderings
« Reply #36 on: September 09, 2021, 06:26:42 PM »
Ooooh and actually this too:

Code: [Select]
cat /etc/startmail

Thank you. I've removed all the pw and domain info:

Code: [Select]
[root@sme10 ~]# cat /etc/fetchmail
#!/bin/sh
#------------------------------------------------------------
#              !!DO NOT MODIFY THIS FILE!!
#
# Manual changes will be lost when this file is regenerated.
#
# Please read the developer's guide, which is available
# at http://www.contribs.org/development/
#
# Copyright (C) 1999-2006 Mitel Networks Corporation
#------------------------------------------------------------



# multi-drop configuration; fetchmail retrieves all mail from a remote POP mailbox:

/usr/bin/fetchmail --syslog --silent --auth password --fetchmailrc - <<EOF

set postmaster "postmaster@xxxxxxxx.local"
set bouncemail
set properties ""

poll xxxxxxxxxxxxxxxxx.com
envelope "Deliver-To:"
    protocol POP3
    no dns
    localdomains xxxxxxx.co.uk xxxxxxx.co.uk xxxxxxx.local xxxxxxx.co.uk
       username "test@xxxx.co.uk" password "xxxxxxxxxx" to * here
           smtphost 127.0.0.200
           fetchall
           forcecr

EOF
#
#   Mail N1 Account for : stuff
/usr/bin/fetchmail -l15000000 -d0 --silent --syslog --fetchmailrc - <<EOF
set postmaster "postmaster@xxxxxxx.local"
set bouncemail
set no softbounce
set properties ""
poll 172.16.16.74 with proto POP3 timeout 60 and options uidl no dns
  user 'admin' smtpaddress xxxxxxx.local with password 'xxxxxxxxxxxxxxxxx' is stuff here keep
  smtphost 127.0.0.200/25
  antispam 550
EOF
#
#   Mail N2 Account for : stuff
/usr/bin/fetchmail -l15000000 -d0 --silent --syslog --fetchmailrc - <<EOF
set postmaster "postmaster@xxxxxxx.local"
set bouncemail
set no softbounce
set properties ""
poll xxxxxxxxx.com with proto POP3 timeout 60 and options uidl no dns
  user 'djt\@xxxxxxxx.co.uk' smtpaddress mediacopy.local with password 'xxxxxxxxxxxxxxxxxx' is stuff here keep
  smtphost 127.0.0.200/25
  antispam 550
EOF
#
#

Offline david000

  • ***
  • 150
  • +0/-0
Re: Pre upgrade ponderings
« Reply #37 on: September 09, 2021, 06:30:27 PM »
HMmm.

i can see this

[root@files startmail]# ll /var/lock

lrwxrwxrwx. 1 root root 11 Oct 16  2020 /var/lock -> ../run/lock

[root@files startmail]# ll /var/lock/fetchmail

ls: cannot access /var/lock/fetchmail: No such file or directory

That might be the issue. Not directory.

I get the same:

Code: [Select]
[root@sme10 ~]# ll /var/lock
lrwxrwxrwx. 1 root root 11 Sep  9 09:48 /var/lock -> ../run/lock

[root@sme10 ~]# ll /var/lock/fetchmail
ls: cannot access /var/lock/fetchmail: No such file or directory
[root@sme10 ~]#



Offline ReetP

  • *
  • 3,291
  • +5/-0
Re: Pre upgrade ponderings
« Reply #38 on: September 09, 2021, 08:41:21 PM »
Hmmm. Odd. It should be there.

In the rpm spec file used to build e-smith-email we have:

Code: [Select]
%setup
mkdir -p root/var/lock/fetchmail

And then:

Code: [Select]
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \
    --dir /var/lock/fetchmail 'attr(755,qmailr,qmail)' \

Wonder if it should be actually created in /run/lock ??

I can see on a fairly standard v10 the same thing occurs.

You need to open a bug against e-smith/email and we can take a look at it.

Something like "fetchmail lock directory does not exist"
...
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 Jean-Philippe Pialasse

  • *
  • 2,166
  • +8/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: Pre upgrade ponderings
« Reply #39 on: September 10, 2021, 06:14:19 AM »
recurrent bug on SME10 CentOS7 and newer

/var/lock/ is linked to /run/var/lock/

all content is deleted on reboot, even if rpm owned, except if declared somewhere ...

already opened bug for this particular one https://bugs.koozali.org/show_bug.cgi?id=11634

so is someone answer the question to get if fixed : in the contrib or in core ?

Offline Jean-Philippe Pialasse

  • *
  • 2,166
  • +8/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: Pre upgrade ponderings
« Reply #40 on: September 10, 2021, 06:25:32 AM »
fixed

solution was given by Terry

need testers  ;)

Offline TerryF

  • grumpy old man
  • *
  • 1,717
  • +2/-0
Re: Pre upgrade ponderings
« Reply #41 on: September 10, 2021, 08:15:08 AM »
fixed
solution was given by Terry
need testers  ;)

Yeah well way to much credited to moi..initial triage interupted by our big almost three week power outage, my old grey cells moved the bug into a side dark room, out of sight out of mind.. :-) bug is on the verificatuion table
--
qui scribit bis legit

Offline david000

  • ***
  • 150
  • +0/-0
Re: Pre upgrade ponderings
« Reply #42 on: September 10, 2021, 10:00:56 AM »
fixed

solution was given by Terry

need testers  ;)

Thanks all.  I may be able to help :D

I see the current download has notes from June, so will the fix appear via a server manager update ?


Offline TerryF

  • grumpy old man
  • *
  • 1,717
  • +2/-0
Re: Pre upgrade ponderings
« Reply #43 on: September 10, 2021, 11:10:21 AM »
update is in /smetest, easiets and quickest way is to login to server with say putty and from the terminal

# yum update e-smith-email --enablerepo=smetest

Added: never ever do a straight yum update --enablerepo=smetest
« Last Edit: September 10, 2021, 01:11:51 PM by TerryF »
--
qui scribit bis legit

Offline david000

  • ***
  • 150
  • +0/-0
Re: Pre upgrade ponderings
« Reply #44 on: September 10, 2021, 11:26:04 AM »
update is in /smetest, easiets and quickest way is to login to server with say putty and from the terminal

# yum update e-smith-email --enablerepo=smetest

Cool, that seems to have installed. I'll update later on how it works :)