Koozali.org: home of the SME Server

Fetchmail

Offline simongie

  • 4
  • +0/-0
Fetchmail
« on: August 26, 2009, 05:55:33 PM »
Hello all

I am no Linux expert, so please have some compassion for me! :)

I have been running an SME box as a mail server for a few years now without hitch. The problem is that it works so well that I never have to play with it, which means I can't fix it when it breaks!

Basically, I am running SME 7.3 with smeserver-fetchmail to fetch pop3 mail from other ISP's and distributing it to local accounts.

SME has now stopped fetching mail from one of the ISP's, but is still fetching from two others. So SME is not the problem.

Every now and then I force mail retrieval by logging in as root and typing /etc/startmail

I also keep an eye on things by running tail -f /var/log/qmail/current .
What I want is a more verbose response to the /etc/startmail or /etc/fetchmail command.

If I use /etc/fetchmail -v , nothing happens and the server tries to fetch mail as per normal, but I cannot see what it is trying to do, or where its getting stuck.

Does anyone feel like enlightening a noob?

Offline jokiin

  • *
  • 28
  • +0/-0
Re: Fetchmail
« Reply #1 on: August 27, 2009, 01:03:49 AM »
probably not related but you really should update to the current version at least, there have been quite a lot of updates released since 7.3

Offline p-jones

  • *
  • 588
  • +0/-0
Re: Fetchmail
« Reply #2 on: August 27, 2009, 06:03:37 AM »
Try going into the fetchmail setup and turn on detailed logging for the account which is failing. Have a look at the maillog log file a few hours later and it will probably give you some clues else post a log excerpt back here for more help.

From the management interface, mail retrevial, the account, Do you want to debug this account  - YES

« Last Edit: August 27, 2009, 06:07:42 AM by p-jones »
...

Offline simongie

  • 4
  • +0/-0
Re: Fetchmail
« Reply #3 on: August 27, 2009, 10:19:43 AM »
Hello all

Thanks for the reponses. Ok, it seems the problem ISP had beefed up security and changed the default user name from username to username@isp.com.
Changing all the usernames to include the full email address solved the problem.

If there was a verbose output from /etc/fetchmail I would have spotted this much sooner without having to debug a mail account though. Is there no way to get detailed info from a command shell? Reason being is that I am sorting this server out from the UK when it is based in South Africa and I am accessing via putty.

Anyway, problem solved, thanks for the input!

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: Fetchmail
« Reply #4 on: August 27, 2009, 12:00:01 PM »
simongie

After logging in via Putty, you can access server manager from the command prompt by typing
console
and then selecting server manager
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline Stefano

  • *
  • 10,811
  • +1/-0
  • Skype account: maghissimo
    • Smeserver italian community
Re: Fetchmail
« Reply #5 on: August 27, 2009, 01:05:53 PM »
After logging in via Putty, you can access server manager from the command prompt by typing
console
and then selecting server manager

or, simply, typing
elinks

:-)

Stefano
Consulente di Smeserver.it -  Soluzioni e supporto su Sme server in Italia

Offline simongie

  • 4
  • +0/-0
Re: Fetchmail
« Reply #6 on: August 27, 2009, 01:54:17 PM »
Hi guys

Thanks again, but not really what I'm looking for.
I want a blow by blow indication of what fetchmail is doing when I type /etc/startmail

Offline Stefano

  • *
  • 10,811
  • +1/-0
  • Skype account: maghissimo
    • Smeserver italian community
Re: Fetchmail
« Reply #7 on: August 27, 2009, 03:32:55 PM »
I want a blow by blow indication of what fetchmail is doing when I type /etc/startmail

well.. first of all I would say "I would like.." and not "I want" ;-)

if you feel confortable with cli, you can manually edit /etc/fetchmail to put fetchmail in verbose mode.. then start it with /etc/startmail and check the log with tail -f

HTH
Stefano
Consulente di Smeserver.it -  Soluzioni e supporto su Sme server in Italia

Offline simongie

  • 4
  • +0/-0
Re: Fetchmail
« Reply #8 on: August 27, 2009, 04:06:05 PM »
Spot on!

I would like to thank you ;)

Offline Stefano

  • *
  • 10,811
  • +1/-0
  • Skype account: maghissimo
    • Smeserver italian community
Re: Fetchmail
« Reply #9 on: September 02, 2009, 11:45:58 PM »
Spot on!

I would like to thank you :wink:

just remember that /etc/fetchmail is a template/db based file, so anytime you modify something via server-manager your editing is lost

Stefano
Consulente di Smeserver.it -  Soluzioni e supporto su Sme server in Italia

Offline fpausp

  • *
  • 728
  • +0/-0
Re: Fetchmail
« Reply #10 on: September 05, 2009, 08:52:30 AM »
Hi All,

Since a few days i had also problems with fetchmail, i stopped the fetchmail-contrib and try to use multidrop to fetch the mails for the whole domain.

I like to debug the incomming and outgoing mails, i start searching about qmail logfiles and found some information: http://qmail.jms1.net/logfiles.shtml

There are some scripts (mtrack, strack ...) the author says "this script will make your life MUCH easier".

Can someone with enough english and linux skills take a look on it please ?

Best
fpausp
Viribus unitis

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: Fetchmail
« Reply #11 on: September 05, 2009, 10:41:45 AM »
fpausp

If you want an easy life, just configure your external pop accts to forward email to your sme server domain based email addresses, and enable/use the  smtp server that is built in to sme server.

It all works very well and mail is usually received almost instantly, depending on how quickly the originating mail server sends the message.

Certainly much better than fetchmail or multidrop etc, and without any of the hassles.

If you don't wish to pay for a domain name, you can use a free domain name from dyndns etc, and while not absolutely recommended, mail will still work even on a dynamic IP connection from your ISP (you'll need to use dynamic update of your domain name/IP address with the ddclient contrib or use the built in client if only only domain is hosted).

I'm really puzzled why people persist to use fetchmail when the sme servers smtp mail server is so easy and simple to use.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline fpausp

  • *
  • 728
  • +0/-0
Re: Fetchmail
« Reply #12 on: September 05, 2009, 01:34:13 PM »
Hi mary,

If you want an easy life, just configure your external pop accts to forward email to your sme server domain based email addresses

Thats a good idea because the mail is going immediately to my server.
I have a server with a static-ip but no mx-record, how must i configure the mailforwarding, how should the mailaddresses looks like (user@ip ???), or must i have a mx-record ?

On a nother server i use a dynamic-ip, when i use the smesmtp i get a reject error (550 blacklist ...) i use the isp smtp on that machine.

Best
fpausp
 

Viribus unitis

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: Fetchmail
« Reply #13 on: September 05, 2009, 02:12:37 PM »
fpausp

You will need to setup mail forwarding at your external mail providor, to forward mail to user@yoursmeserverdomain.com

I assume you have an existing  domain name for your sme server.
Get whoever handles the external DNS records for that domain to point the MX record at your servers static IP.

Alternatively you maintain your own external DNS records including MX records at Zone Edit for free.
It more ideally suits existing commercial type domain names, although you can forward to dynamic hosts.
http://www.zoneedit.com/

Alternatively you can obtain a free domain name at
http://www.dyndns.com/
which automatically sets up DNS records and default MX record for systems using a dynamic or static IP.

There are others where you can get free domains.


Yes, to avoid spam filter & RBL & Reverse DNS lookups rejection etc, you will need to send email via your ISP's smtp server on any system that has a dynamic IP.

If using a static IP connection and sending directly to other mail servers, you will need some external configuration to ensure your mail gets delivered (or you can still send via your ISPs smtp server).
See here re PTR & SPF & speak to your ISP and DNS record maintainer to get them setup.
http://wiki.contribs.org/SME_Server:Documentation:Administration_Manual:Appendix#Appendix_B._DNS

Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline fpausp

  • *
  • 728
  • +0/-0
Re: Fetchmail
« Reply #14 on: September 05, 2009, 02:36:37 PM »
Hi Mary,

Thanks for the quick reply, i will check that all.

regards
fpausp
Viribus unitis