AOA
Dear All ,
I am using fetchmail on FreeBSD (sendmail as a mail server) to fetch my mail from my domain and users can get their mails from the local server. Now I have to configure a new server and the email IDs are increased to 150. I old routine I have only one users having the "fetchmailrc" file and all the accounts details were mentioned in that file. It collect the mail in top to bottom order for each account mentioned in that file which is time consuming and not an efficient method.
Now I want to make "fetchmailrc" file for each user and "crontab" to be set for each user will that work fine for that much users.
Using fetchmail for 200 Email accounts
Using fetchmail for 200 Email accounts
Thanks & Regards
Muhammad Ali
Muhammad Ali
-
- Site Admin
- Posts: 5132
- Joined: Fri May 02, 2003 10:24 am
- Location: Karachi
- Contact:
Re: Using fetchmail for 200 Email accounts
Dear Learner,
Salam,
Best Regards.
Salam,
Make shell script and run put it into crontab.Learner wrote:I am using fetchmail on FreeBSD (sendmail as a mail server) to fetch my mail from my domain and users can get their mails from the local server. Now I have to configure a new server and the email IDs are increased to 150. I old routine I have only one users having the "fetchmailrc" file and all the accounts details were mentioned in that file. It collect the mail in top to bottom order for each account mentioned in that file which is time consuming and not an efficient method.
Now I want to make "fetchmailrc" file for each user and "crontab" to be set for each user will that work fine for that much users.
Best Regards.
Farrukh Ahmed
AOA
Dear LinuxFreaK,
Please guide a bit more that how can I make a script for this.
Also that it will do the same as checking each account one by one from top to bottom.
If an account at 10 position have 20 MB mail it will down load all and move to next position but the position 1-9 have to wait for more.
Dear LinuxFreaK,
Please guide a bit more that how can I make a script for this.
Also that it will do the same as checking each account one by one from top to bottom.
If an account at 10 position have 20 MB mail it will down load all and move to next position but the position 1-9 have to wait for more.
Thanks & Regards
Muhammad Ali
Muhammad Ali
-
- Site Admin
- Posts: 5132
- Joined: Fri May 02, 2003 10:24 am
- Location: Karachi
- Contact:
Re:
Dear Learner,
Salam,
Example Script:
Create a file users.txt
Best Regards.
Salam,
Example Script:
Code: Select all
USERS=(user1 user2 user3 user4)
for USER in ${USERS[@]}
do
your commands here
done
Code: Select all
for USER in `cat /path/to/user.txt`
do
your commands here
done
Farrukh Ahmed
AOA
Dear LinuxFreaK,
The .fetchmailrc file contain the users details with passwords,
How do I set them in the script you have written because evry users have different password of their emails.
Dear LinuxFreaK,
The .fetchmailrc file contain the users details with passwords,
Code: Select all
poll mail.abcd.com with proto POP3
user 'username@abcd.com' there with password 'xxxxxxxx' is username
Thanks & Regards
Muhammad Ali
Muhammad Ali
-
- Site Admin
- Posts: 5132
- Joined: Fri May 02, 2003 10:24 am
- Location: Karachi
- Contact:
Re:
Dear Laerner,
Salam,
Best Regards.
Salam,
Do not you have .fetchmailrc in every user directory. If you do not have then you can create it with same way using shell script and execute fetchmail to fetch mails from remote mail server.Learner wrote:The .fetchmailrc file contain the users details with passwords,
How do I set them in the script you have written because evry users have different password of their emails.Code: Select all
poll mail.abcd.com with proto POP3 user 'username@abcd.com' there with password 'xxxxxxxx' is username
Best Regards.
Farrukh Ahmed
Dear LinuxFreaK
Sorry I didnt get your point what are you trying to say.
Sorry I didnt get your point what are you trying to say.
Please guide me in detail I am still confussedDo not you have .fetchmailrc in every user directory. If you do not have then you can create it with same way using shell script and execute fetchmail to fetch mails from remote mail server.
Thanks & Regards
Muhammad Ali
Muhammad Ali
-
- Site Admin
- Posts: 5132
- Joined: Fri May 02, 2003 10:24 am
- Location: Karachi
- Contact:
Dear Learner,
Salam,
Just go through following document and it will give you better understanding.
FYI, http://www.howtoforge.com/debian_etch_fetchmail
Best Regards.
Salam,
Just go through following document and it will give you better understanding.
FYI, http://www.howtoforge.com/debian_etch_fetchmail
Best Regards.
Farrukh Ahmed