1

Topic: Fetchmail

==== Required information ====
- iRedMail version (check /etc/iredmail-release):     v0.9.4
- Linux/BSD distribution name and version: Centos 7.2
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MYSQL
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? No
- Related log if you're reporting an issue:
====
Hi, i'm here again ...

I configured IREDMAIL to use fetchmail and I used this technique:

I created in IREDMAIL 2 domains :
xxxxxxx.xx (the real domain)
localdispatch.xx ( the domain that is used to forward the emails )

For example for email info@xxxxxx.xx I use this fetchmail :
proto pop3 user password xxxxxx xxxx to ' info@localdispatch.xx ' here fetchall

and using sieve rules in maildir of info@localdispatch.xx to forward emails to mark@xxxxxx.xx , max@xxxxxx.xx , etc .

I was not able to use the aliases because for example on email mark@xxxxxx.xx that must be forwarded to mark@xxxxxx.xx , max@xxxxxx.xx goes in a loop of mark@xxxxxx.xx.

Is it correct ? Are there better solutions ?

Thank you
Mark

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Fetchmail

Try sieve rule like this:

redirect user@domain.com;
keep;

Or:

redirect :copy user@domain.com;

FYI: Sieve Extension: Copying Without Side Effects.
https://www.rfc-editor.org/rfc/rfc3894.txt

3

Re: Fetchmail

Ok, thank you for your reply.

But I would like use the IREDMAIL alias in MySQL for example :

For email mark@domain.com (real email) I use this fetchmail :
       proto pop3 user password xxxxxx xxxx to ' mark@domain.com ' here fetchall

I would like using the IREDMAIL alias in MySQL to forward emails to mark@domain.com , max@domain.com , etc ,
how can I do this without going to loop on mark@domain.com ?

If I put in IREDMAIL table alias : address=mark@domain.com, goto=mark@domain.com,max@domain.com it goes in loop.

Is there a way to not duplicate users ?

Thank you
Mark


ZhangHuangbin wrote:

Try sieve rule like this:

redirect user@domain.com;
keep;

Or:

redirect :copy user@domain.com;

FYI: Sieve Extension: Copying Without Side Effects.
https://www.rfc-editor.org/rfc/rfc3894.txt

4

Re: Fetchmail

kaifamm wrote:

If I put in IREDMAIL table alias : address=mark@domain.com, goto=mark@domain.com,max@domain.com it goes in loop.
Is there a way to not duplicate users ?

Just don't put 'mark@domain.com' in 'goto='.

5

Re: Fetchmail

If I don't put 'mark@domain.com' in 'goto='  the emails to mailbox of mark@domain.com doesn't arrive, but if I put 'mark@domain.com' in 'goto='  it goes in loop.

The  mailbox of mark@domain.com also must receive this emails.

The problem is that the  user mark@domain.com is the real user (mailbox) and at the same time is the user that make fetchmail.

Is it  necessary make 2 different users ? One user to make the fetchamil and the other for the real user's mailbox ?

Is it possible handle this situation with aliases or it is possible handle it only with sieve rules ?

Thank you
Mark


ZhangHuangbin wrote:
kaifamm wrote:

If I put in IREDMAIL table alias : address=mark@domain.com, goto=mark@domain.com,max@domain.com it goes in loop.
Is there a way to not duplicate users ?

Just don't put 'mark@domain.com' in 'goto='.

6

Re: Fetchmail

I'm confused about your explanation.

You want to save a copy of forwarded email in mailbox? if yes, put 'mark@domain.com' in 'goto=' (no loop here). If not, don't put 'mark@domain.com' in 'goto='.