Fetchmail ispconfig

Discussion in 'ISPConfig 3 Priority Support' started by Stephan Ververda, Nov 21, 2018.

  1. Stephan Ververda

    Stephan Ververda Member HowtoForge Supporter

    Currently i'm configuring a fetchmail account for a new client. I don't get any error message however neither do i seen any mails being fetched from their old account. How can i monitor fetchmail, and how often is this process taking place?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The software behind the fetchmail functionality is called getmail, you can find its config (and the job you created) in /etc/getmail. getmail is run by cron, the cronjob is defined in the crontab of the getmail user, get it with:

    crontab -l -u getmail

    You can e.g. try to run getmail as shown in the crontab manually, just ensure that you use su / sudo so that the command is run as user getmail, it won't work when you run it as root directly.
     
  3. Stephan Ververda

    Stephan Ververda Member HowtoForge Supporter

    Hmmm i can see now that the e-mails from the old mailbox have dissapeared but nothing appears in the mailbox on the ispconfig server
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Check the mail.log file of your server, you should see the deliveries there.
     
  5. Stephan Ververda

    Stephan Ververda Member HowtoForge Supporter

    I'm seeing things like this in the mail.log
    Code:
    Nov 21 12:07:35 wh004 postfix/pipe[29050]: 35DE5604C9: to=<[email protected]>, relay=dovecot, delay=0.01, delays=0.01/0/0/0, dsn=5.4.6, status=bounced (mail forwarding loop for [email protected])
    It's seems it's getting bounced because of a mail forwarding loop. I configured the old mailbox with the ip address instead of the FQDN to prevent problems with DNS lookup. mailbox names are completely the same.
     
  6. Stephan Ververda

    Stephan Ververda Member HowtoForge Supporter

    Ok seems i have found the e-mail missing, they are delivered to the local getmail account as "Undelivered Mail Returned to Sender" with the original e-mail attached to it.
    So i wonder why this happened firstly because we have more mailboxes to migrate, secondly i see it only migrated the inbox and no other imap folders, thirdly how can i easily get these mail box in their original format in the migrated mailbox?
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    What happens when you try to send an email to that suppoer@ account with e.g. webmail locally on that server, does it gets delivered?
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    You wrote that you used the function to migrate an account, that is normally not the purpose of that function and might be the reason for the probelm. The fetchmail function is used e.g. when you have a mailbox at gmail and want to fetch mails from gmail to the mailbox of your own domain automatically. For mailbox migrations, I would use tools like imapcopy.
     
  9. Stephan Ververda

    Stephan Ververda Member HowtoForge Supporter

    tnx Till, your first suggestions helped. I found that it does get stuck because the domain names are the same (for now ofc). Yes it was not really intended to migrate the entire mailbox but just fetch and forward all the mails that are in the inbox. I temporarily renamed the mail domain name on my server, did a few more tests and it seems to work perfectly now. And apparently i can rename it back at a later stage once we really are going to migrate the domains from that client without too many problems.
    The reason we did it this way was because the client has a very bad experience with his current provider (reading the e-mails from another client when they found out they were going to move to another provider). So we wanted to make sure no new e-mail will remain at his old provider once he is going to ask for the domain tokens to move to us.
    I have been able to retrieve the e-mails from the local getmail account and forward them again to the support account.

    For the migration of the entire mailbox i will go use the tool you suggested in the last post.
     
    till likes this.

Share This Page