Forums

Resolved
0 votes
i setup fetchmail and mail is being collected but not delivered to the local user. here is the error:


This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error.

Reason: Some addresses were rejected by the MDA fetchmail forwards to.

The following address(es) failed:
jako@localhost
SMTP error: 550 5.1.1 <jako@localhost>: Recipient address rejected: User unknown in local recipient table



Reporting-MTA: dns; sigserv.6s.lan

Final-Recipient: rfc822; jako@localhost
Last-Attempt-Date: Fri, 03 Aug 2012 06:14:18 +0200 (SAST)
Action: failed
Status: 5.1.1
Diagnostic-Code: 550 5.1.1 <jako@localhost>: Recipient address rejected: User unknown in local recipient table
In Mail
Friday, August 03 2012, 04:21 AM
Share this post:
Responses (35)
  • Accepted Answer

    Sunday, February 03 2013, 01:45 AM - #Permalink
    Resolved
    0 votes
    Found the problem. I'd attempted to change the default pidfile in the /etc/init.d/fetchmail script and the script was invoking the daemon with "daemon $prog $args $pidfile". After removing the $pidfile from the line "viola", everything works perfectly
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, February 03 2013, 01:20 AM - #Permalink
    Resolved
    0 votes
    Thanks for the alternatives Nick. If I enter "service fetchmail start" I'm still being prompted for the root user password even though I'm using the root user account to invoke the command.

    I edited the rc.local and added "service fetchmail start" but the daemon didn't start on a server reboot. I can start it manually for now but need to find out what I've done wrong.
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, February 02 2013, 08:29 PM - #Permalink
    Resolved
    0 votes
    So, slightly silly last post of mine - though it may work. Instead of your line in rc.local, put:
    service fetchmail start
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, February 02 2013, 07:52 PM - #Permalink
    Resolved
    0 votes
    You've probably a mistake in the init file. Did you include the line:
    # chkconfig: 2345 99 01
    Have you tried the command ntsysv instead? It may suffer from the same problem.

    For the rc.local line line try adding a " &" at the end. I seem to remember this will detach the process from the console.
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, February 02 2013, 06:05 PM - #Permalink
    Resolved
    0 votes
    Tim Burgess wrote:
    To autostart at boot... 'chkconfig fetchmail on'


    I'm seeing
    service fetchmail does not support chkconfig


    I've added
    /etc/init.d/fetchmail start
    to /etc/rc.d/rc.local. If I run this line on the command line, I'm prompted to
    Enter password for root@/var/run/fetchmail.pid:
    . A simple carriage return and fetchmail daemon executes fine (no root user pwd required). If I <CTRL-C> instead of hitting the return key, fetchmail won't start.

    I'm now a little concerned that fetchmail will want to be prompted to start on a system start up.

    Probably the simplist question to answer but how do i parse a carriage return to the rc.local line?
    The reply is currently minimized Show
  • Accepted Answer

    Cas Nuy
    Cas Nuy
    Offline
    Wednesday, January 30 2013, 07:42 PM - #Permalink
    Resolved
    0 votes
    that was dum mistake on my end, just did not see that. :(
    But... it did not change anything.
    Removed all, rebooted, followed the instructions now with the correct reference but I still get the same message.
    I started the service manual using:
    fetchmail -f /etc/fetchmail/fetchmail.conf --syslog

    I can add this line to rd.local and it works fine so no big worries, just surprised that something so obvious is giving me this problem ;)
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, January 30 2013, 01:35 AM - #Permalink
    Resolved
    0 votes
    The script in your daemon file reads:

    nicename="Fetchmail"
    pidfile="/var/run/fetchmail.pid"
    args="-f /etc/fetchmail/fetchmail.conf --syslog"
    prog="fetchmail"
    RETVAL=0


    but it looks like your directory is actually labeled /etc/fetchmailrc. Correct this in the daemon file.
    The reply is currently minimized Show
  • Accepted Answer

    Cas Nuy
    Cas Nuy
    Offline
    Tuesday, January 29 2013, 10:35 PM - #Permalink
    Resolved
    0 votes
    Running this command:
    /usr/bin/fetchmail -f /etc/fetchmailrc/fetchmail.conf
    runs fine
    The reply is currently minimized Show
  • Accepted Answer

    Cas Nuy
    Cas Nuy
    Offline
    Tuesday, January 29 2013, 10:31 PM - #Permalink
    Resolved
    0 votes
    Ok, first the config file called fetchmail.conf located in /etc/fetchmailrc.

    set daemon 60
    set logfile /home/admin/fetchmail.log
    poll pop.hccnet.nl protocol pop3 username ********* password ********** is cas@nuy.info
    fetchall
    no keep
    no rewrite


    now the daemon file called fetchmail

    #!/bin/sh
    #
    # Startup script for fetchmail
    #
    # chkconfig: 2345 99 01
    # description: A software package for fetching mail from remote servers.
    # processname: fetchmail
    # pidfile: /var/run/fetchmail.pid
    # config: /etc/fetchmailrc/fetchmail.conf

    # Source function library.
    . /etc/rc.d/init.d/functions

    # Source networking configuration.
    . /etc/sysconfig/network

    # Check that networking is up.
    #[ ${NETWORKING} = "no" ] && exit 0

    nicename="Fetchmail"
    pidfile="/var/run/fetchmail.pid"
    args="-f /etc/fetchmail/fetchmail.conf --syslog"
    prog="fetchmail"
    RETVAL=0

    # See how we were called.
    case "$1" in
    start)
    echo -n $"Starting $prog: "
    daemon $prog $args
    echo
    RETVAL=$?
    ;;
    stop)
    echo -n $"Stopping $prog: "
    killproc $prog
    echo
    /bin/rm -f $pidfile
    RETVAL=$?
    ;;
    status)
    status -p $pidfile $fetchmail
    RETVAL=$?
    ;;
    restart|reload)
    $0 stop
    $0 start
    RETVAL=$?
    ;;
    *)
    echo "Usage: $prog {start|stop|restart|reload|status}"
    exit 1
    esac

    exit $RETVAL


    Hope this sheds some light.
    Cas
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, January 29 2013, 09:49 PM - #Permalink
    Resolved
    0 votes
    Why don't you post the scripts from both the fetchmail daemon file (i.e. the service) and the fetchmail config file?
    The reply is currently minimized Show
  • Accepted Answer

    Cas Nuy
    Cas Nuy
    Offline
    Tuesday, January 29 2013, 07:28 PM - #Permalink
    Resolved
    0 votes
    I removed all files and started from scratch following advice in this thread but had the same result, so I am still puzzled..........
    The reply is currently minimized Show
  • Accepted Answer

    Cas Nuy
    Cas Nuy
    Offline
    Monday, January 28 2013, 07:52 PM - #Permalink
    Resolved
    0 votes
    Hi Dirk,
    i did create that file and it also on the filesystem on both locations. Changed ownership and gave execute permissions as instructed. Still get this message.
    Thanks,
    Cas
    The reply is currently minimized Show
  • Accepted Answer

    Monday, January 28 2013, 04:14 PM - #Permalink
    Resolved
    0 votes
    Sounds like you created the fetchmail config file, but not the daemon to run a fetchmail service when your server starts up. The syslog script is referring to the service, not the config file. You need to create the daemon file and put it in /etc/rc.d/init.d

    Tim posted it here
    The reply is currently minimized Show
  • Accepted Answer

    Cas Nuy
    Cas Nuy
    Offline
    Sunday, January 27 2013, 12:14 PM - #Permalink
    Resolved
    0 votes
    Following the steps in the thread, I get fetchmail nicely running if I run the "start"command manually.
    So for me that is " fetchmail -f /etc/fetchmailrc/.fetchmailrc --syslog".
    Now I did like the script as created by Tim and created this file according specs. No changes other than adjusting the Args line from
    args="-f /etc/fetchmail --syslog"
    to
    args="-f /etc/fetchmailrc/.fetchmailrc --syslog"

    now when trying to start the service, i get this:
    env: /etc/init.d/fetchmail: No such file or directory

    The file fetchmail is available in /etc/init.d & in /etc/rc.d/init.d
    In both locations the file is executable & identical.

    What am I missing here?
    Thanks for some advice for a new user who really likes what he sees!

    Cas
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, September 23 2012, 05:46 AM - #Permalink
    Resolved
    0 votes
    Hello Tim,

    thanks for your reply.

    Where can I add "domain.local " or in my case "1830donnerstag.local" to the acceped mail domains?

    @little bit off topic: is there a newbie-guide (for someone who never set up a domainserver before) somewhere? There are a lot of threads, but right now it's quite difficult do find the right information.

    Thanks, Peter
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, September 22 2012, 07:43 PM - #Permalink
    Resolved
    0 votes
    All fetchmail activity is logged in /var/log/maillog and you will see it passed to Postfix if successful then delivered and removed from the queue, as above

    Your issue is noted on these two lines
    NOQUEUE: reject: RCPT from localhost.localdomain[127.0.0.1]: 550 5.1.1 <ppfeifer@1830donnerstag.local>: Recipient address rejected: User unknown in local recipient table; from=<p.pfeifer.77@gmail.com> to=<ppfeifer@1830donnerstag.local> proto=ESMTP helo=<1830donnerstag.local>
    SMTP error: 550 5.1.1 <ppfeifer@1830donnerstag.local>: Recipient address rejected: User unknown in local recipient table

    Postfix is rejecting the incoming mail because the address does not match your destination domain...you need to add domain.local to your accepted mail domains list... or change your fetchmail config. Did you see my post here?
    http://www.clearfoundation.com/component/option,com_kunena/Itemid,232/catid,14/func,view/id,44365/#44494
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, September 22 2012, 02:39 PM - #Permalink
    Resolved
    0 votes
    Hi.

    i tried to install/configure fetchmail as shown above.

    I took the script from Tim.

    How can I see if the mails are fetched and delivered to the appropriate user account?

    Should there be any "*fetchmail*" log entries in /var/logs/maillog?

    Do I need a special mail transaction service so that the mails get delivered to the user accounts?

    What did I do wrong?

    Thanks.

    Peter

    log content:

    Sep 22 10:58:21 localhost fetchmail[26812]: starting fetchmail 6.3.17 daemon
    Sep 22 10:58:21 localhost fetchmail[26812]: Server certificate verification error: self signed certificate
    Sep 22 10:58:21 localhost fetchmail[26812]: This means that the root signing certificate (issued for /O=Dovecot mail server/OU=can190/CN=can190/emailAddress=root@debian) is not in the trusted CA certificate locations, or that c_rehash needs to be run on the certificate directory. For details, please see the documentation of --sslcertpath and --sslcertfile in the manual page.
    Sep 22 10:58:21 localhost fetchmail[26812]: Server certificate verification error: certificate has expired
    Sep 22 10:58:22 localhost fetchmail[26812]: Warning: the connection is insecure, continuing anyways. (Better use --sslcertck!)
    Sep 22 10:58:22 localhost fetchmail[26812]: 3 messages (2 seen) for web33p4 at mail.1830donnerstag.net (5545 octets).
    Sep 22 10:58:22 localhost postfix/smtpd[26813]: connect from localhost.localdomain[127.0.0.1]
    Sep 22 10:58:22 localhost postfix/smtpd[26813]: NOQUEUE: reject: RCPT from localhost.localdomain[127.0.0.1]: 550 5.1.1 <ppfeifer@1830donnerstag.local>: Recipient address rejected: User unknown in local recipient table; from=<p.pfeifer.77@gmail.com> to=<ppfeifer@1830donnerstag.local> proto=ESMTP helo=<1830donnerstag.local>
    Sep 22 10:58:22 localhost fetchmail[26812]: reading message web33p4@mail.1830donnerstag.net:3 of 3 (1797 octets) (log message incomplete)
    Sep 22 10:58:22 localhost fetchmail[26812]: SMTP error: 550 5.1.1 <ppfeifer@1830donnerstag.local>: Recipient address rejected: User unknown in local recipient table
    Sep 22 10:58:22 localhost postfix/smtpd[26815]: connect from localhost.localdomain[127.0.0.1]
    Sep 22 10:58:22 localhost postfix/smtpd[26815]: 9C17A5DAE: client=localhost.localdomain[127.0.0.1]
    Sep 22 10:58:22 localhost fetchmail[26812]: mail from MAILER-DAEMON@1830donnerstag.local bounced to p.pfeifer.77@gmail.com
    Sep 22 10:58:22 localhost postfix/cleanup[26816]: 9C17A5DAE: message-id=<20120922145822.9C17A5DAE@1830donnerstag.local>
    Sep 22 10:58:22 localhost postfix/qmgr[22027]: 9C17A5DAE: from=<>, size=3185, nrcpt=1 (queue active)
    Sep 22 10:58:22 localhost postfix/smtpd[26815]: disconnect from localhost.localdomain[127.0.0.1]
    Sep 22 10:58:22 localhost postfix/smtpd[26813]: ACDE56204: client=localhost.localdomain[127.0.0.1]
    Sep 22 10:58:22 localhost postfix/cleanup[26816]: ACDE56204: message-id=<CAA2bizCVnGCos7cyawM92TAgcxAPdV1ox9BdM-qkCz5XW3uWFQ@mail.gmail.com>
    Sep 22 10:58:22 localhost postfix/qmgr[22027]: ACDE56204: from=<p.pfeifer.77@gmail.com>, size=2155, nrcpt=1 (queue active)
    Sep 22 10:58:22 localhost fetchmail[26812]: flushed
    Sep 22 10:58:22 localhost postfix/smtpd[26813]: disconnect from localhost.localdomain[127.0.0.1]
    Sep 22 10:58:24 localhost postfix/smtpd[26822]: connect from localhost.localdomain[127.0.0.1]
    Sep 22 10:58:24 localhost postfix/smtpd[26822]: 4D4F1620B: client=localhost.localdomain[127.0.0.1]
    Sep 22 10:58:24 localhost postfix/cleanup[26816]: 4D4F1620B: message-id=<20120922145822.9C17A5DAE@1830donnerstag.local>
    Sep 22 10:58:24 localhost postfix/qmgr[22027]: 4D4F1620B: from=<>, size=3378, nrcpt=1 (queue active)
    Sep 22 10:58:24 localhost postfix/smtpd[26822]: disconnect from localhost.localdomain[127.0.0.1]
    Sep 22 10:58:24 localhost postfix/smtpd[26822]: connect from localhost.localdomain[127.0.0.1]
    Sep 22 10:58:24 localhost postfix/smtpd[26822]: NOQUEUE: reject: RCPT from localhost.localdomain[127.0.0.1]: 550 5.1.1 <root@1830donnerstag.net>: Recipient address rejected: User unknown in local recipient table; from=<p.pfeifer.77@gmail.com> to=<root@1830donnerstag.net> proto=ESMTP helo=<localhost>
    Sep 22 10:58:24 localhost postfix/smtpd[26822]: lost connection after RCPT from localhost.localdomain[127.0.0.1]
    Sep 22 10:58:24 localhost postfix/smtpd[26822]: disconnect from localhost.localdomain[127.0.0.1]
    Sep 22 10:58:24 localhost postfix/pipe[26818]: 9C17A5DAE: to=<p.pfeifer.77@gmail.com>, relay=mailprefilter, delay=1.9, delays=0.14/0.12/0/1.7, dsn=2.0.0, status=sent (delivered via mailprefilter service)
    Sep 22 10:58:24 localhost postfix/qmgr[22027]: 9C17A5DAE: removed
    Sep 22 10:58:24 localhost postfix/pipe[26819]: ACDE56204: to=<root@1830donnerstag.net>, orig_to=<postmaster@localhost>, relay=mailprefilter, delay=2, delays=0.28/0.18/0/1.6, dsn=2.0.0, status=sent (delivered via mailprefilter service)
    Sep 22 10:58:24 localhost postfix/qmgr[22027]: ACDE56204: removed
    Sep 22 10:58:24 localhost amavis[22255]: (22255-01) (!)run_av (ClamAV-clamd) FAILED - unexpected , output="/var/lib/amavis/tmp/amavis-20120922T165824-22255/parts: lstat() failed: Permission denied. ERROR\n"
    Sep 22 10:58:24 localhost amavis[22255]: (22255-01) (!)ClamAV-clamd av-scanner FAILED: CODE(0x30139f0) unexpected , output="/var/lib/amavis/tmp/amavis-20120922T165824-22255/parts: lstat() failed: Permission denied. ERROR\n" at (eval 87) line 596.
    Sep 22 10:58:24 localhost amavis[22255]: (22255-01) (!!)WARN: all primary virus scanners failed, considering backups
    Sep 22 10:58:38 localhost postfix/smtpd[26829]: connect from localhost.localdomain[127.0.0.1]
    Sep 22 10:58:38 localhost postfix/cleanup[26817]: 2D8445DAE: message-id=<20120922145822.9C17A5DAE@1830donnerstag.local>
    Sep 22 10:58:38 localhost postfix/qmgr[22027]: 2D8445DAE: from=<>, size=3850, nrcpt=1 (queue active)
    Sep 22 10:58:38 localhost amavis[22255]: (22255-01) Passed CLEAN, LOCAL [127.0.0.1] [127.0.0.1] <> -> <p.pfeifer.77@gmail.com>, Message-ID: <20120922145822.9C17A5DAE@1830donnerstag.local>, mail_id: 25uudO8PoJ0X, Hits: -0.2, size: 3378, queued_as: 2D8445DAE, 13662 ms
    Sep 22 10:58:38 localhost postfix/smtp[26824]: 4D4F1620B: to=<p.pfeifer.77@gmail.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=14, delays=0.07/0.21/0.08/14, dsn=2.0.0, status=sent (250 2.0.0 from MTA([127.0.0.1]:10026): 250 2.0.0 Ok: queued as 2D8445DAE)
    Sep 22 10:58:38 localhost postfix/qmgr[22027]: 4D4F1620B: removed
    Sep 22 10:59:06 localhost postfix/smtp[26830]: 2D8445DAE: to=<p.pfeifer.77@gmail.com>, relay=1830donnerstag.net[213.131.245.140]:25, delay=29, delays=0.04/0.12/28/0.13, dsn=5.7.1, status=bounced (host 1830donnerstag.net[213.131.245.140] said: 554 5.7.1 <p.pfeifer.77@gmail.com>: Recipient address rejected: Relay access denied (in reply to RCPT TO command))
    Sep 22 10:59:06 localhost postfix/qmgr[22027]: 2D8445DAE: removed
    The reply is currently minimized Show
  • Accepted Answer

    nello
    nello
    Offline
    Monday, August 27 2012, 09:33 PM - #Permalink
    Resolved
    0 votes
    After some testing, I got it running :)
    First I created a folder named /var/run/fetchmail and set the user fetchmail as the owner.
    Then I changet the init.d script to create the PID file under the /var/run/fetchmail directory:
    nicename="Fetchmail"
    USER="fetchmail"
    PIDFILE="/var/run/fetchmail/fetchmail.pid"
    prog="fetchmail"
    args="-f /etc/fetchmail.conf --syslog --pidfile=$PIDFILE"
    RETVAL=0

    # See how we were called.
    case "$1" in
    start)
    echo -n $"Starting $prog: "
    daemon --user="$USER" --pidfile="$PIDFILE" $prog $args
    echo
    RETVAL=$?
    ;;
    The reply is currently minimized Show
  • Accepted Answer

    nello
    nello
    Offline
    Monday, August 27 2012, 03:59 PM - #Permalink
    Resolved
    0 votes
    I installed fetchmail using the instruction in this thread and everything worked out as expected. The only little issue is related to the fact that in this way the deamon is run as root and I keep getting the warning message:

    fetchmail: WARNING: Running as root is discouraged.

    To prevent this, I created a user fetchmail with the command:

    useradd -r fetchmail

    and then I edited the file /etc/init.d/fetchmail in the following way:

    start)
    echo -n $"Starting $prog: "
    daemon --user="fetchmail" $prog $args
    echo
    RETVAL=$?

    Unfortunately, It doesn't work...
    Sorry for the newby question, any comments is more than welcome.

    Thanks
    Nello
    The reply is currently minimized Show
  • Accepted Answer

    Robert
    Robert
    Offline
    Tuesday, August 21 2012, 02:38 PM - #Permalink
    Resolved
    0 votes
    Thanks Dirk. Changing it to user@domainname solved the fetchmail problem. Still I cannot set the mail domain in the webconfig "System - settings - mail settings". It always says wrong syntax. Is there a special way except "mydomain.com" to put the domain name in there? Can I set the domain name for mails in the shell without the webconfig?

    We are close to the solution :-)

    Thanks.

    Robert

    Edit: Does somebody knows how to set the mail domain without using the webconfig or how to reinstall it?
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, August 21 2012, 01:48 PM - #Permalink
    Resolved
    0 votes
    Maybe there is something wrong the with the mail app. It says "Record not found (mail_settings)" for the details of the app on the webconfig. Also when I want to add the mail domain it says " OOOps: Invalid syntax". Is there something wrong with my mail app? Can I repair/reinstall it?


    mail domain should be the server's domain name...domainname,com

    I have for all new messages:"SMTP error: 550 5.1.1 <jako@localhost>: Recipient address rejected: User unknown in local recipient table" like in the first post. This maybe also points in the direction of the mail domain settings. All users have access to zarafa in the webconfig and I can also login.


    I think Tim referenced this earlier in this thread. Make sure you set the local user in your fetchmail.rc file to the username@domainname.com, not username@localhost. SSL is also only necessary if the mailhost requires it when logging in to your remote mail accounts that you're pulling in, like gmail or yahoo. If you use the KEEP rule without checking your remote mail often, your mail will build up on the remote mail servers. You really don't need it if your mail server is all you're using to check mail.
    The reply is currently minimized Show
  • Accepted Answer

    Robert
    Robert
    Offline
    Tuesday, August 21 2012, 08:46 AM - #Permalink
    Resolved
    0 votes
    Thanks for your reply, it was actually a permission problem. [strike]Unfortunately I have another problem now. It does (for whatever reason not fetch the mails). The config file is unter /etc called fetchmail and contains.

    set daemon 60

    poll pop3.web.de
    protocol pop3
    username "username"
    password "password"
    is "user" here keep ssl

    I also cannot stop fetchmail. "service fetchmail stop" responds with a failture. Also I cannot find fetchmail in the "service --status-all" list.

    I am sure it is something very small which is still wrong, but I cannot find it.[/strike]

    I added -L /var/log/fetchmail to the args line in the /etc/rc.d/init.d file and found out, that the fetching actually works fine, but I cannot see any mails when I login as the user under: https://server/webaccess. What can be the reason, why I cannot see them?

    Thanks for you help.

    Cheers.

    Robert

    Edit: Maybe there is something wrong the with the mail app. It says "Record not found (mail_settings)" for the details of the app on the webconfig. Also when I want to add the mail domain it says " OOOps: Invalid syntax". Is there something wrong with my mail app? Can I repair/reinstall it?

    Edit2: I have for all new messages:"SMTP error: 550 5.1.1 <jako@localhost>: Recipient address rejected: User unknown in local recipient table" like in the first post. This maybe also points in the direction of the mail domain settings. All users have access to zarafa in the webconfig and I can also login.
    The reply is currently minimized Show
  • Accepted Answer

    Friday, August 17 2012, 04:01 AM - #Permalink
    Resolved
    0 votes
    Make sure you placed the file in /etc/rc.d/init.d/. It should be owned by root:

    chown root:root /etc/rc.d/init.d/fetchmail


    and then given executable permission:

    chmod 0700 /etc/rc.d/init.d/fetchmail
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, August 16 2012, 11:31 AM - #Permalink
    Resolved
    0 votes
    Has /etc/init.d/fetchmail got execute permission?
    The reply is currently minimized Show
  • Accepted Answer

    Robert
    Robert
    Offline
    Thursday, August 16 2012, 07:01 AM - #Permalink
    Resolved
    0 votes
    Hi all,

    first thanks for the reply at the other topic @Tim. I tried to set up fetchmail with the /etc/rc.d/init.d/fetchmail file you just wrote in this topic. I somehow does something incorrect. Everytime I want to start the service "service fetchmail start" it says service does not exist at /etc/init.d/fetchmail. I have had a look and it is there. I think the file under /etc/init.d is a link to /etc/rc.d/init.d.

    What can I have done potentially wrong?

    Thanks.

    Cheers.

    Robert
    The reply is currently minimized Show
  • Accepted Answer

    Monday, August 06 2012, 01:25 PM - #Permalink
    Resolved
    0 votes
    @ Tim...you certainly can recommend that. I hadn't given the antimalware checks a thought, although I thought I had tried using the configuration you posted and it didn't work the first go around, but now it's working. Thanks Tim!
    The reply is currently minimized Show
  • Accepted Answer

    Monday, August 06 2012, 12:36 PM - #Permalink
    Resolved
    0 votes
    look in maillog...if it's truncated you can either export it as a text file or look in /var/log/maillog
    The reply is currently minimized Show
  • Accepted Answer

    Monday, August 06 2012, 12:19 PM - #Permalink
    Resolved
    0 votes
    where is the log file for fetchmail? mine just stop collecting emails this morning after working fine since yesterday.
    The reply is currently minimized Show
  • Accepted Answer

    Monday, August 06 2012, 11:52 AM - #Permalink
    Resolved
    0 votes
    Dirk, can I recommend the following fetchmail config, as using mda "/usr/bin/zarafa-dagent clearosuser" passes mail straight to Zarafa bypassing the ClearOS spam / virus checks

    A better method is just to specify the user@domain.com (domain.com is required, otherwise you will get user@localhost which will be rejected)...e.g.
    set daemon 300
    poll pop.mail.yahoo.com
    protocol pop3
    username "user@yahoo.com"
    ssl password "PASSWORD"
    is "user@domain.com" here
    keep
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, August 05 2012, 09:06 PM - #Permalink
    Resolved
    0 votes
    Nice tweak! updated the post above :)
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, August 05 2012, 08:28 PM - #Permalink
    Resolved
    0 votes
    I like that better than my fix Tim. Thanks.

    I added

      status)
    status -p $pidfile $fetchmail
    RETVAL=$?
    ;;


    in place of the blank status, so I would get a response when checking the fetchmail service's status.
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, August 05 2012, 07:34 PM - #Permalink
    Resolved
    0 votes
    Dirk, thanks for that - in reply to your other thread...i'd forgotten that I had to create the service manually, so that you can control it with 'service fetchmail start/stop'

    Script uses config at /etc/fetchmail (create it if it doesn't exist) or change the path

    Create /etc/rc.d/init.d/fetchmail with the following and make it executable (chmod +x)
    #!/bin/sh
    #
    # Startup script for fetchmail
    #
    # chkconfig: 2345 99 01
    # description: A software package for fetching mail from remote servers.
    # processname: fetchmail
    # pidfile: /var/run/fetchmail.pid
    # config: /etc/fetchmail

    # Source function library.
    . /etc/rc.d/init.d/functions

    # Source networking configuration.
    . /etc/sysconfig/network

    # Check that networking is up.
    #[ ${NETWORKING} = "no" ] && exit 0

    nicename="Fetchmail"
    pidfile="/var/run/fetchmail.pid"
    args="-f /etc/fetchmail --syslog"
    prog="fetchmail"
    RETVAL=0

    # See how we were called.
    case "$1" in
    start)
    echo -n $"Starting $prog: "
    daemon $prog $args
    echo
    RETVAL=$?
    ;;
    stop)
    echo -n $"Stopping $prog: "
    killproc $prog
    echo
    /bin/rm -f $pidfile
    RETVAL=$?
    ;;
    status)
    status -p $pidfile $fetchmail
    RETVAL=$?
    ;;
    restart|reload)
    $0 stop
    $0 start
    RETVAL=$?
    ;;
    *)
    echo "Usage: $prog {start|stop|restart|reload|status}"
    exit 1
    esac

    exit $RETVAL

    To autostart at boot... 'chkconfig fetchmail on'
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, August 05 2012, 04:56 PM - #Permalink
    Resolved
    0 votes
    Get rid of "@localhost" and just use the user's name configured in your webconfig. Make certain that the user has Zarafa privileges in their user configuration in your webconfig. So .fetchmailrc should look like this:

    poll pop-server.domainname.com protocol pop3 username so&so@domainname.com password such&such mda "/usr/bin/zarafa-dagent clearosuser"


    I also created a directory /etc/fetchmailrc and placed my fetchmail config file in it (i.e. .fetchmailrc) and then under /etc/rc.d/rc.local I added a line:

    /usr/bin/fetchmail -f /etc/fetchmailrc/.fetchmailrc


    to kick start the daemon on boot, pointing it at the .fetchmailrc configuration file, and then included the timed polling command in .fetchmailrc:

    set daemon 60
    poll pop-server.domainname.com protocol pop3 username so&so@domainname.com password such&such mda "/usr/bin/zarafa-dagent clearosuser"


    Now fetchmail polls my remote pop accounts every 60 seconds and I get the emails in my user account and can view them in Zarafa's webmail app.
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, August 04 2012, 08:31 PM - #Permalink
    Resolved
    0 votes
    that particular server got trashed yesterday, so i cannot remember what exactly i put in the .fetchmailrc file for that particular server. this is what i am currently using on the replacement:

    set daemon 60
    defaults
    proto pop3
    nokeep
    no rewrite
    poll user@domain.com.au
    via mail.domain.com.au
    user "user@domain.com.au"
    pass "password"
    mda "/usr/bin/zarafa-dagent user"
    flush
    no ssl
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, August 04 2012, 08:18 PM - #Permalink
    Resolved
    0 votes
    Hi Yaseen, what mail service do you have installed? Zarafa?

    Can you post the contents of your fetchmail config? (hide passwords / usernames if necessary)
    The reply is currently minimized Show
Your Reply