Fetchmail - use IP instead of FQDN

Discussion in 'Tips/Tricks/Mods' started by austingecko, Jun 22, 2010.

  1. austingecko

    austingecko New Member

    Ran into a scenario where I needed to put an IP address in the Pop3/Imap Server field in fetchmail but kept getting an error: "Pop3/Imap Server is not a valid domain name."

    Basically I was replacing an old LAMP server running Ubuntu 8.04 with Ispconfig2 using a new box in the same local area network. After setting up the new perfect server with the same domains, email etc I went to use the fetchmail feature in Ispconfig3 and received the error above. Obviously I could not use the FQDN as it would be pointing to itself instead of the old server I wanted to pull mail from.

    My solution was simple: First I set up a fetchmail entry. Then I used PHPMyAdmin to go into the database and modify the record in the table mail_get. Just modify the source_server field and replace the FQDN with the IP address.

    After I did this the server started pulling over emails. Hours later I was able to officially retire the old LAMP server.

    Hope this helps someone in the future. In the meantime I'm going to enter this on the bug tracker.

    Edit: Looks like someone has already added it to the bugtracker. If you need this please vote for it on the bugtracker here.
     
    Last edited: Jun 22, 2010
  2. till

    till Super Moderator

    The solution is to edit the /etc/hosts file in your linux distribution and add a line like this:

    123.123.123 yourgetmailhost.tld

    and then use yourgetmailhost.tld in ISPConfig as address for the getmail server.
     
    inside83 likes this.

Share This Page