Author Topic: external mail retrieval problem (mail forwarding loop detected)  (Read 2381 times)

heupink

  • Zen Apprentice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Hi,

I'm having a problem retrieving remote mail into my zentyal server. Zentyal mail system is configured with the domain @company.com, and the remote mails are also @company.com. Retrieving the mails fails with 'mail forwarding loop detected'. I have read https://tracker.zentyal.org/issues/378, where Javier Amor says that retrieving external mail for same mail domain is not supported at all.

I worked around this, using a cron job that retrieves my external mails via pop3, and puts them in the end user mailbox using imap, which for *many* reasons is obviously no permanent solution.

As soon as I try the regular way to deliver them to my zentyal mailboxes (either via the zentyal retrieve external mail module, or via fetchmail -> smtp) I'm getting the mail forwarding loop detected.

What are my options at this point? Anyone with trics or tips?

heupink

  • Zen Apprentice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: external mail retrieval problem (mail forwarding loop detected)
« Reply #1 on: May 16, 2014, 03:32:53 pm »
Hi,

Answering for the archives:

I learned that "mail forwarding loop" is a concept in Postfix's local forwarding mechanism. It is triggered when an incoming email has more than one "Delivered to: user@company.com" statements.

Now I'm using fetchmail to collect pop3 mail, and using the "dropdelivered" directive, the "delivered to" is dropped, and the mail is successfully 'redelivered' to the final zentyal mailbox.

My complete .fetchmail recipe:

defaults smtphost localhost
poll external.mail.com with proto pop3 port 995 user "username@company.com" with password "very_secret" dropdelivered smtpname username@company.cpm options ssl

I feel it would be nice to add this functionality to the web interface. However, I'm no programmer, so hopefully others with the same problem will find this post, and help themselves with this info.