[SOLVED] fetchmail: no mailservers have been specified.

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
forger

[SOLVED] fetchmail: no mailservers have been specified.

Post by forger »

I am having first go at setting up a mail server. I am using the tutorial in Linux Format 115 using fetchmail, procmail and dovecot.

When test running the configuration of fetchmail and procmail in a terminal I successfully retrieved email from my ISP which was then delivered to Thunderbird by dovecot when I got that configured. I thought I had cracked it.

I then posted further test emails to the isp account but they were not picked up. I tested again in a terminal using

Code: Select all

fetchmail --daemon 0 -v -f /etc/fetchmail
. This time all I got was:
fetchmail: WARNING: Running as root is discouraged.
fetchmail: no mailservers have been specified.
My etc/fetchmailrc file reads as follows:

Code: Select all

set postmaster "postmaster"
set bouncemail
set no spambounce
set properties ""
set daemon 300
poll mail.force9.net with protocol POP3
user 'xxxxxxxx' there with password 'xxxxx' is 'xxxxxxx'
here options keep
mda '/usr/bin/procmail -d %T'

Nothing was edited between the successful initial test and the subsequent failures.

Why does it say no mailservers specified?, what is it I am missing.

Hoping someone can help
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
DrHu

Re: fetchmail: no mailservers have been specified.

Post by DrHu »

forger wrote:Linux Format 115 using fetchmail, procmail and dovecot. Nothing was edited between the successful initial test and the subsequent failures.
Don't have the magazine..

Nothing was edited between the successful initial test and..
It is not the same test
  • test 1, dovecoat + thunderbird
    test 2 fetchmail to ISP (dovecoat? Y or N, don't know)
    --not using dovecoat ? Y or N
  • Are you using an ssl connections
  • Do you need a port # for the fetchmail network connection
  • Does the IP address
    --for mail.force9.net work
--if so it is name resolution problem within your setups (network)

Fetchmail..
http://fetchmail.berlios.de/fetchmail-man.html#21
--have you compared your /etc/fetchmail.rc settings against the man page information
forger

Re: fetchmail: no mailservers have been specified.

Post by forger »

I think the test just gets fetchmail to pickup mail from the ISP

DrHu wrote
Nothing was edited between the successful initial test and..
It is not the same test

test 1, dovecoat + thunderbird
test 2 fetchmail to ISP (dovecoat? Y or N, don't know)
--not using dovecoat ? Y or N

* Are you using an ssl connections
* Do you need a port # for the fetchmail network connection
* Does the IP address
--for mail.force9.net work

--if so it is name resolution problem within your setups (network)
It is the same test as Dovecot and Thunderbird are not involved in any of the tests I mentioned

I am not using SSL, the error message does not show any port issue or problem with the IP for mail.force9.net.

Why does fetchmail think
no mailservers have been specified.
when it is stated in fetchmailrc and did work before?
DrHu

Re: fetchmail: no mailservers have been specified.

Post by DrHu »

forger wrote:It is the same test as Dovecot and Thunderbird are not involved in any of the tests I mentioned...I am not using SSL, the error message does not show any port issue or problem with the IP for mail.force9.net. Why does fetchmail think no mailservers have been specified
...when it is stated in fetchmailrc and did work before?
I still don't think there is enough context being supplied, no eror messages are listed, however no-one can ever explain why does X not work now, when it did before (last time)
--except to point out the obvious, something was changed somewhere

Why does fetchmail think no mailservers...
search query: fetchmail no mailservers have been specified.
...
http://lists.ccil.org/pipermail/fetchma ... 09089.html
http://www.linuxquestions.org/questions ... ons-87182/
http://www.linuxquestions.org/questions ... ail-32013/
http://osdir.com/ml/mail.fetchmail.user ... 00041.html

The one error you show fetchmail: WARNING: Running as root is discouraged.
--that's only an informational message, does not necessarily indicate an issue with running fetchmail.. So, based on th search for "fetchmail no mailservers have been specified.", then check the PATH for the user being used to run the fetchmail selections (root, user?)
and the Home is listed correctly..
http://lists.ccil.org/pipermail/fetchma ... 09089.html
  • Given that fetchmail looks for $HOME/.fetchmailrc, unless root's home
    dir is /var/root, you're gonna have problems :)

    Specify the path to the .fetchmailrc file in the startup script. I
    can't remember the option off the top of my head, but the man page
    will tell you.
Has the system made any backup versions of fetchmail.conf, that you can see, and compare with the one that doesn't work now..
http://newbiedoc.sourceforge.net/networ ... hmail.html
http://packages.debian.org/sid/fetchmailconf
--program to assist with *.conf

http://thedjbway.org/services/fetchmail.html
  • Of course, make the script executable as usual. The $FETCHMAILHOME environmental variable is set, telling fetchmail where to write its fetchmail.pid lock file. Then fetchmail is invoked with the -v flag for the "verbose" option, and told to read its configuration file from /var/svc.d/fetchmail/fetchmail.conf. The --nodetach option tells fetchmail to run in the foreground, as daemontools requires. The interval between polls is parameterized with the variable $INTERVAL, used as an argument to the --daemon flag. The example sets up fetchmail to poll the remote server every 9 minutes, 11 seconds. (The --nodetach option keeps fetchmail in the foreground, even when running with the --daemon option.)

    Most everything else about running fetchmail is defined in its configuration file, fetchmail.conf. This configuration will be very specific to your site. As an example, it may look something like this:
Last edited by DrHu on Fri Jul 31, 2009 10:30 pm, edited 1 time in total.
forger

Re: fetchmail: no mailservers have been specified.

Post by forger »

Thanks for that very comprehensive answer. I will work through it and post again when I have followed the links and tried to sort it out.
forger

Re: fetchmail: no mailservers have been specified.

Post by forger »

Sorry DrHu but the failed test thing was my fault because the test command should have read

Code: Select all

fetchmail --daemon 0 -v -f /etc/fetchmailrc
not
fetchmail --daemon 0 -v -f /etc/fetchmail
note the rc missing at the end. Once corrected it work as before.

However this leaves the original problem. When I manually set fetchmail running with the command it picks up the mail but left alone it does not run. Fetchmail is set to run at start up in the Mint services manager.

Is there a command I can use to check if fetchmail is running at any given time?
DrHu

Re: fetchmail: no mailservers have been specified.

Post by DrHu »

forger wrote:When I manually set fetchmail running with the command it picks up the mail but left alone it does not run. Fetchmail is set to run at start up in the Mint services manager.
There is also the poll option to wake-up or search the mail server for any activity (mail check..), and I see you do that with the interval command and poll mail server

http://linux.about.com/library/cmd/blcm ... chmail.htm
  • The following options modify the behavior of fetchmail. It is seldom necessary to specify any of these once you have a working .fetchmailrc file set up.
    ...
    general options
    -c | --check
    Return a status code to indicate whether there is mail waiting, without actually fetching or deleting mail (see EXIT CODES below). This option turns off daemon mode (in which it would be useless). It doesn't play well with queries to multiple sites, and doesn't work with ETRN or ODMR ..
If I remember it correctly , one of the links I had indicated --nodetach when starting fetchmail daemon

http://htop.sourceforge.net/index.php?page=comparison
http://www.atcomputing.nl/Tools/atop/whyatop.html
If I was running it (fetchmail), I would probably just use..
  • top in a console
  • atop or htop on the desktop
    --to see what fetchmail was doing
--or just use system monitor, it is already included in Mint
mint menu>Applications>system Monitor>Processes TAB..
http://www.comptechdoc.org/os/linux/how ... vices.html
forger

Re: fetchmail: no mailservers have been specified.

Post by forger »

I have checked using System Monitor and Fetchmail is not shown as running, also Dovecot is missing. However both these applications are checked for start up on boot up in the Services Settings.

What else do I need to do to make these run as services?
DrHu

Re: fetchmail: no mailservers have been specified.

Post by DrHu »

http://ubuntuforums.org/showthread.php?p=6394672
http://www.linux.com/news/enterprise/sy ... cd-scripts
A service is an application that runs in the background waiting for inputs..

Well, I think it is odd that the fetchmail daemon does not appear in the system montor's resources list for running processes
--however, since you started it as a service, I have to assume it is running..

For example, in the system monitor I see,
  • dbus-daemon
    gnome-settings-daemon
    gvfs-fuse-daemon
--all running, or use in a terminal ps -e, you should see your application listed

http://bobpeers.com/linux/services.php
http://www.ubuntugeek.com/service-comma ... erver.html
In terminal, check
  • apt search chkconfig
    p chkconfig - system tool to enable or disable system se
    apt search sysvinit-utils
    i sysvinit-utils - System-V-like utilities
I think I gave this command already..

Code: Select all

sudo service --help
Usage: service < option > | --status-all | [ service_name [ command | --full-restart ] ] 

--in terminal, check
  • sudo service --status-all
    [ + ] NetworkManager
    [ ? ] acpi-support
    [ + ] acpid
    [ ? ] alsa-utils
    [ - ] anacron
forger

Re: [SOLVED] fetchmail: no mailservers have been specified.

Post by forger »

DrHu thanks for all your input.

I have found the solution. :o

The problem was Fetchmail was not running from start up. I found the solution by looking at /etc/init.d/fetchmail which contained the comment
# This script will NOT start or stop fetchmail if the /etc/fetchmailrc file
# does not exist or if START_DAEMON in /etc/default/fetchmail is set to no.
So I went to /etc/default/fetchmail and found it was set to no and changed it to yes.

I ran

Code: Select all

ps -e
and could see after my fix that fetchmail, and Dovecot, were running.

Emails are now picked up from the ISP and via Procmail and Dovecot turn up in Thunderbird. I am pleased with that I can tell you. :D

However that does leave questions like why Dovecot and fetchmail do not show in System Monitor as processes and why checking fetchmail in Services Settings is overridden by other settings with no warning given.

Now I am going to move on to other tasks like accessing the server from other machines on my network, wish me luck
Locked

Return to “Software & Applications”