Koozali.org: home of the SME Server
Legacy Forums => Experienced User Forum => Topic started by: Gwenaël on May 08, 2001, 07:17:14 PM
-
Hi,
I have several problems to configure (personalize) e-smith with the following criteria:
With my ISP, i have 5 accounts (with 5 pop accounts):
Acc. Nr login password
******* ****** ********
#1 login1 password1
#2 login2 password2
...
with smtp server : smtp.myisp
and pop server : pop.myisp
for example
I want to check email (for all the 5 accounts) from my ISP via pop.myisp and redirect to the user login1, login2, ... login5 in local.
And in the other "direction", i want to send mails for outbound (in local) to the e-smith queue. And a mail sended from account login1 to smtp.myisp via account login1.
My english is poor but i can understand...
Can you help me?
Thanks in advance,
Regards,
Gwenael
-
Here is a long-winded response. Don't worry, I did not just write this for you, I wrote it a while back for several friends trying to do similar things (I do this myself).
On the outbound (SMTP) side. If the users are just using a POP (or preferably IMAP) client, they just need to set the POP/IMAP and SMTP server to "mail" or the IP of your e-smith server and set their "return address" to the correct address as needed. Your e-smith server should (probably) be set to use your ISPs SMTP server in the "other email settings" in e-smith manager. If you are using webmail, it is probably best to have the e-smith server's domain be your ISPs domain (but that adds some other complications I won't go into here).
For the inbound side, you need to hack the standard e-smith fetchmail setup:
This is too much of a hack to make it a "howto", but this has worked for
several folks I have sent it to. The good thing to this approach has it that
it works well within the e-smith system, and as long as there are no major
changes to the fetchmail template system it will be backed up with backups and will move to new revs nicely.
From the e-smith manager, set your mail retrieval settings to "multi-drop",
leave "delegate mail server" blank, put some bogus stuff
in the username and password field (this will be ignored anyway after we
do the hacks below), and set the check interval (this IS paid attention to).
- telnet/ssh in as root
- mkdir /etc/e-smith/templates-custom/etc
- mkdir /etc/e-smith/templates-custom/etc/fetchmail
- cd /etc/e-smith/templates-custom/etc/fetchmail
- touch 50multi-drop (creates an empty file by that name)
Using your favorite editor (pico is my favorite) create a file called 90fetchmail in that same directory
It should look something like this:
# This is the beginning
/usr/bin/fetchmail --silent --syslog --fetchmailrc - <
set postmaster "postmaster"
set bouncemail
set properties ""
poll isp_pop_server_here proto POP3 user user1 smtpaddress
yourdomain.com with password secret is user1
poll isp_pop_server_here proto POP3 user user2 smtpaddress
yourdomain.com with password secret is user2
poll isp_pop_server_here proto POP3 user user3 smtpaddress
yourdomain.com with password secret is user3
poll isp_pop_server_here proto POP3 user user4 smtpaddress
yourdomain.com with password secret is user4
poll isp_pop_server_here proto POP3 user user5 smtpaddress
yourdomain.com with password secret is user5
EOF
# This is the end
Let's take a look at the first poll entry:
poll isp_pop_server_here (isp_pop_server_here is your ISP's POP server) proto POP3 (duh)
user user1 (popusername) smtpaddress yourdomain.com (this should be the name of your e-smith server)
with password secret (pop password) is user1 (the IMAP user you want this mail
forwarded to)
Make sense?
OK, now you got the 90fetchmail file done, you need to trigger a rebuild of
all the config files. run :
/sbin/e-smith/expand-template /etc/fetchmail
That will execute the stuff we just changed, and rebuild /etc/fetchmail
script to your liking. You should check it out and see. It should look
exactly like 90fetchamil. I am not sure why, but I did notice it sometimes
created /etc/fetchmail without the execute attribute set. Be sure to run
the command "chmod 755 /etc/fetchmail". I have not messed with it, but this is a bit of a security risk (depends if you trust your users), you might want to try setting the rights to 700 so no one else can see the passwords.
At this point you can run it and see if it worked. You can troubleshoot the script by replacing the "--silent --syslog " with a "--verbose --verbose" and running it at the command line, it will step through the entire process.
More info on fetchmail conf files in man fetchmail or www.tuxedo.org
If you are not familiar with template hacks, be sure to checkout http://www.e-smith.org/content/custom/ for some idea of what the heck you just did above ;)
JP
-
Your e-smith multi-drop fetchmail hack...
Hello John
I'm a total linux newbie so be patient with me :-) Thanks for the long post but I'm an ignoramus and need some more detailed instructions/spoonfeeding...
I'm trying to understand precisely what you are saying here with the lines you are adding in to the "template".
The first bit I get, its from the bit about smtpaddress I get confused. Is this all meant to be on one line or is it a seperate line?
> poll isp_pop_server_here proto POP3 user user1 smtpaddress
> yourdomain.com
What is "yourdomain"? The ISP? The one I've set up on the e-smith server? The domain bit of my email address?
> with password secret is user1
Does that mean I put the password in where it says password, substituting abcxyyhzz&&$ for example for the word "password"?
OK, using a live example (me) this would translate as, using the same line breaks that came over in your post, using the e-smith arbitrary domain:
poll pop.ntlworld.com proto POP3 user mkb smtp.ntlworld.com
ess.roadent $$abcdefgh££ secret is mkb
Or is the domain ntlworld.com? And is "password" the word password as such, like giving an order for it to remain secret (if so where does it read the password from?) or is the password entered in plain text in this line kept secret by fetchmail somehow (despite being in a file buried in the directory structure)?
Sorry, I did say I was a newbie :-(( I'm not parsing the lines above well enough to be confident of what I'm trying to do.