View previous topic :: View next topic |
Author |
Message |
jdoppenberg Junior Member
Joined: 23 Jan 2012 Posts: 5
|
Posted: Mon Jan 23, 2012 2:03 pm Post subject: Fetchmail > deliver to local accounts |
|
|
Hi All,
How can i fetch mail from 1 external account and let those mails deliver to local accounts?
Gr, Jeroen |
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Mon Jan 23, 2012 6:22 pm Post subject: |
|
|
Assuming you have create local user, go to
Webmin-> Servers->Fetchmail Mail Retrieval
and set your mail settings and to which user will forward.
Or you can do it manually creating a /home/youruser/.fetchmailrc
for instance
Code: | poll mail.domain.com
proto imap # or pop3
user "user@domain.com"
pass "password"
is youruser
keep |
gerasimos_h _________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
jdoppenberg Junior Member
Joined: 23 Jan 2012 Posts: 5
|
Posted: Mon Jan 23, 2012 7:22 pm Post subject: |
|
|
Thank you for your answer gerasimos_h.
But what i mean is that i use 1 external catchall box (e.g. info@domain.com) and have those mails sorted after fetching.
So when i have like 10 local accounts the fetched mails will be send to the right local account.
All mailservers i know have this option, but only in SMS i can't find it.
Know what i mean? |
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Mon Jan 23, 2012 7:57 pm Post subject: |
|
|
If all messages exist (forward) from 10 accounts to info@domain.com you can fetch them and redirect them with procmail filter to appropriate accounts based by recipient address.
There is a web GUI at Webmin->Servers->Procmail Mail Filter.
If you are referring at Windows mail servers style where a user login and fetch all accounts and same user send messages too, this will cause a bottleneck, and messages might take 20 minutes or more to sent.
If that's the case I'll have to check confs since I'm not using this option and not recommend it to anyone.
gerasimos_h _________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
jdoppenberg Junior Member
Joined: 23 Jan 2012 Posts: 5
|
Posted: Mon Jan 23, 2012 10:23 pm Post subject: |
|
|
Procmailfilter... thank you!
I will try that tomorrow.
I'll let you know if it worked for me
Gr, Jeroen |
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Tue Jan 24, 2012 7:28 am Post subject: |
|
|
Don't forget to add in your .fetchmailrc that the Mail delivery agent will be procmail and not postfix.
Just add at the end of fetchmailrc
mda "/usr/bin/procmail"
gerasimos_h _________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
jdoppenberg Junior Member
Joined: 23 Jan 2012 Posts: 5
|
Posted: Tue Jan 24, 2012 9:34 am Post subject: |
|
|
Ha, it works!
Thank you so much for your help.
I only wonder where the mails go to when there is no address for it.
I guess they are just dropped or not? |
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Tue Jan 24, 2012 9:43 am Post subject: |
|
|
They bounce, so return to sender with "Undelivered Mail Returned to Sender" you can set a postmaster to grub all undelivered mails, in procmail.
gerasimos_h _________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
jdoppenberg Junior Member
Joined: 23 Jan 2012 Posts: 5
|
Posted: Tue Jan 24, 2012 11:18 am Post subject: |
|
|
Well what i did now is this:
I created a mailbox 'unroutable'.
In procmail the last filter rule is like > deliver all all mail to unroutable@domain.com
The second last filter is > deliver to info@domain.com and i didn't set the option > Continue processing even if conditions match
So when the last filter didn't match the mail will be delivered to unroutable@domain.com
This works great!
Also my compliments to this distribution!
In my opinion this is much faster and better than smeserver, clearos and so on. I will stick with this one. |
|
Back to top |
|
|