APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed


SME Server (E-Smith) Mail Forwarding, Lists, Etc.


© Tony Lawrence, aplawrence.com
June 2002

The SME Server (formerly E-Smith) is a friendly web server and e-mail gateway. Here we cover forwarding email to another mail account and mailing lists.

Mitel (E-Smith) SME Server Mail Forwarding and Lists

Every user account created can be forwarded to another account (you also have the choice of forwarding a copy to another account). You normally would do this using the administrative web panel, but behind the scenes, this is accomplished with the .qmail file in the user's directory. Here's what a user's .qmail file looks like without forwarding:

#------------------------------------------------------------
# DO NOT MODIFY THIS FILE! It is updated automatically by the
# e-smith server and gateway software. Instead, modify the source
# template in the /etc/e-smith/templates directory. For more
# information, see http://www.e-smith.org.
# 
# copyright (C) 1999-2001 e-smith, inc.
#------------------------------------------------------------
./Maildir/


#------------------------------------------------------------
# TEMPLATE END
 

That just tells Qmail to deliver this user's mail into the Maildir hierarchy (which contains new, cur, and tmp subdirectories). If a forwarding address is added through the SME Server web panels, the file might look like this:

#------------------------------------------------------------
# DO NOT MODIFY THIS FILE! It is updated automatically by the
# e-smith server and gateway software. Instead, modify the source
# template in the /etc/e-smith/templates directory. For more
# information, see http://www.e-smith.org.
# 
# copyright (C) 1999-2001 e-smith, inc.
#------------------------------------------------------------
&[email protected]
./Maildir/


#------------------------------------------------------------
# TEMPLATE END
 

A forwarding address has been added. If we had told it not to deliver locally, then the "./Maildir/" line would have been removed.

What if you wanted to forward to two or more addresses? Typically that would be a mail list, althought there might be situations where an individual would want multiple forwarding. You could manually add multiple lines to .qmail, but although that would work, the SME Server web panels would overwrite your changes. It is possible to add Perl code to /etc/e-smith/events/user-modify or /etc/e-smith/templates-user-custom/.qmail to control the contents of .qmail. For example, the "vacation" add-on does exactly that. That would be a possible way to handle a mail list, though it could be a little clumsy.

If the list is small, you can do this entirely through the SME Web Manager. Simply create a locked account for each user you wish to be on the list, and forward that account to the actual email address of each person. I suggest creating the names with a common component to make it easier. For example, if I were on your mail list, you'd create an account for me such as "listtonyl" and would forward that to "[email protected]". Another accoount might be "listjimb" and would be forwarded to whatever jimb's real email address is. You'd then create a group with the actual mail list name and put "listtonyl", "listjimb" and everyone else you want in that group. Mail to that group would end up going to each of those addresses.

Qmail has another feature that can make such lists a little easier. Every user can create "dash" files in their home directory. The file name is ".qmail-something". Put the email addresses you want in this file, one per line. You don't need the leading "& for this. For example, I might create ".qmail-mylist". Mail sent to "[email protected]" would then go to whoever was listed in that file. The format is a little clumsy, but nothing stops you from creating another system level account caled "tonylist" and having that forward (using the web manager) to "tony-mylist". That lets me send mail to "tonylist" instead.

You could also just create ~alias/.qmail-tonylist but the problem with that is that use of the web manager for aliases will update this area itself and wipe out your list. You could, with effort, modify the related code to prevent this, but it doesn't seem to be worth the effort to me.

Finally, you can install a real mailing list manager. Ezmlm is a popular choice, and there is a contributed RPM at http://www.e-smith.org/contrib/rpm-index/ (link dead, sorry) . Using a real list manager lets you do such things as restricting who can send mail to the list, makes it easy to add and subtract members, etc. I'd really recommend this if your list needs are at all complex.





(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

-> -> SME Server (E-Smith) Mail Forwarding, Lists, Etc.





More Articles by

Find me on Google+

Tony Lawrence



Kerio Connect Mailserver

Kerio Samepage

Kerio Control Firewall

Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us




















This post tagged: