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.orgIf 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